Disclosure of Invention
Based on this, it is necessary to provide a method, an apparatus, a storage medium and an underground bucket terminal for uploading data with high communication efficiency for solving the problem of low communication efficiency of the conventional underground bucket monitoring system.
A method for uploading data by an underground barrel terminal comprises the following steps:
determining a data sending time zone corresponding to the state information of each buried bucket according to the state information of each buried bucket obtained through detection and the data sending time zone obtained from the server platform, wherein the data sending time zone obtained from the server platform is determined by dividing the time for sending the state information of the buried buckets into preset time zones and obtaining the time length of each time zone according to the number of the connected buried buckets, the number of the bearable maximum connected buried buckets and the time length for completing one-time communication through the server platform;
and generating a data frame according to the state information of each buried bucket and the corresponding data sending time zone and sending the data frame to the server platform.
An apparatus for uploading data at a terminal of an underground barrel, comprising:
a data sending time zone determining module, configured to determine, according to the detected state information of each buried bucket and the data sending time zone acquired from the server platform, a data sending time zone corresponding to the state information of each buried bucket, where the data sending time zone acquired from the server platform is determined by the server platform according to the number of connected buried buckets, the number of bearable maximum-connected buried buckets, and the time duration for completing one-time communication, after dividing the time for sending the state information of the buried buckets into preset time zones and obtaining the time duration of each time zone, according to the time duration of each time zone and preset timing sending time;
and the data frame generating module is used for generating data frames according to the state information of each buried bucket and the corresponding data sending time zone and sending the data frames to the server platform.
A method for uploading data by an underground barrel terminal comprises the following steps:
acquiring the number of connected buried buckets, the number of bearable maximum connected buried buckets and the time length for completing one-time communication;
dividing the time for sending the state information of the buried buckets into preset time zones and obtaining the time length of each time zone according to the number of the buried buckets, the number of the bearable maximum connected buried buckets and the time length for completing one-time communication to obtain a data sending time zone;
and sending the sending data time zone to an underground barrel terminal, so that the underground barrel terminal determines a corresponding sending data time zone for sending the state information of each underground barrel according to the detected state information of each underground barrel and the sending data time zone, and generates and returns a data frame according to the state information of each underground barrel and the corresponding sending data time zone.
An apparatus for uploading data at a terminal of an underground barrel, comprising:
the data acquisition module is used for acquiring the number of connected buried buckets, the number of bearable maximum connected buried buckets and the time length for completing one-time communication;
and the partitioning module is used for dividing the time for sending the state information of the underground buckets into preset time zones and obtaining the time of each time zone according to the number of the underground buckets, the number of the bearable maximum connection underground buckets and the time for completing one-time communication, obtaining data sending time zones, sending the data sending time zones to the underground bucket terminals, so that the underground bucket terminals determine the corresponding data sending time zones for sending the state information of the underground buckets according to the detected state information of the underground buckets and the data sending time zones, and generating and returning data frames according to the state information of the underground buckets and the corresponding data sending time zones.
A storage medium having stored thereon a computer program which, when executed by a processor, carries out the steps of the method described above.
An underground bucket terminal comprises a battery electric quantity detection module, a sensor fault detection module, an underground bucket capacity detection module, a processor and a wireless radio frequency transceiver, wherein the battery electric quantity detection module, the sensor fault detection module, the underground bucket capacity detection module and the wireless radio frequency transceiver are all connected with the processor,
the battery electric quantity detection module is used for detecting the battery electric quantity information of each underground barrel;
the sensor fault detection module is used for detecting sensor fault information of each underground barrel;
the buried bucket capacity detection module is used for detecting real-time capacity information of each buried bucket;
the processor is used for executing the method for uploading data by the buried bucket terminal, and the generated data frame is sent to the server platform through the wireless radio frequency transceiver.
According to the method for uploading the data by the underground bucket terminal, the data sending time zone corresponding to the state information of each underground bucket is determined according to the state information of each underground bucket obtained through detection and the data sending time zone obtained from the server platform, wherein the data sending time zone obtained from the server platform is determined by dividing the time for sending the state information of the underground buckets into preset time zones and obtaining the time length of each time zone according to the number of the connected underground buckets, the number of the bearable maximum connected underground buckets and the time length for completing one-time communication through the server platform; and generating a data frame according to the state information of each buried bucket and the corresponding data sending time zone and sending the data frame to the server platform. The data transmission time zone corresponding to the buried bucket is determined according to the state information of the buried bucket, the data frame is generated according to the state information of the buried bucket and the corresponding data transmission time zone, the time for transmitting the data frame is diverged according to the state information of the buried bucket, communication congestion is avoided, communication quality is effectively improved, and communication efficiency is high.
Detailed Description
In one embodiment, as shown in fig. 1, a method for uploading data by an underground barrel terminal comprises the following steps:
step S110: and determining a data sending time zone corresponding to the state information of each buried bucket according to the state information of each buried bucket obtained by detection and the data sending time zone obtained from the server platform, wherein the data sending time zone obtained from the server platform is determined by dividing the time for sending the state information of the buried buckets into preset time zones and obtaining the time length of each time zone according to the number of connected buried buckets, the number of bearable maximum connected buried buckets and the time length for completing one-time communication by the server platform.
Specifically, the number of the preset subareas is greater than or equal to the number of the types of the state information of the underground barrel, the state information of the underground barrel comprises battery capacity fault information, sensor fault information and real-time capacity information of the underground barrel, further, the state information of the underground barrel is not limited to the above types, and can be adjusted and modified as required, according to the state information and the data sending time zones of the buried buckets, corresponding data sending time zones for sending the state information of the buried buckets are determined, for example, the number of preset subareas is 3, and the preset subareas are respectively a 0 zone, a 1 zone and a 2 zone, for example, a battery low fault occurs, the data sending time zone enters the 0 zone, a sensor fault or other faults occur, the data sending time zone enters the 1 zone, the data sending time zone normally sends the capacity of the trash bucket, and the data sending time zone enters the 2 zone, in addition, the underground bucket terminals connected with the underground buckets can automatically acquire globally unique ID numbers, so that the server platform can conveniently identify the position information of the underground buckets connected with the server platform.
Step S120: and generating a data frame according to the state information of each buried bucket and the corresponding data sending time zone and sending the data frame to the server platform.
Specifically, a data frame is generated according to the state information of each buried bucket and the corresponding data sending time zone, and further, the data frame comprises a frame header identifier, a buried bucket ID, a buried bucket capacity, a buried bucket battery capacity, a sensor fault, a data sending time zone, a firmware version and a check word.
According to the method for uploading the data by the underground bucket terminal, the data sending time zone corresponding to the state information of each underground bucket is determined according to the state information of each underground bucket obtained through detection and the data sending time zone obtained from the server platform, wherein the data sending time zone obtained from the server platform is determined by dividing the time for sending the state information of the underground buckets into preset time zones and obtaining the time length of each time zone according to the number of the connected underground buckets, the number of the bearable maximum connected underground buckets and the time length for completing one-time communication through the server platform; and generating a data frame according to the state information of each buried bucket and the corresponding data sending time zone and sending the data frame to the server platform. The data transmission time zone corresponding to the buried bucket is determined according to the state information of the buried bucket, the data frame is generated according to the state information of the buried bucket and the corresponding data transmission time zone, the time for transmitting the data frame is diverged according to the state information of the buried bucket, communication congestion is avoided, communication quality is effectively improved, and communication efficiency is high.
In one embodiment, step S120 includes step 122 and step 124.
Step 122: and determining the sending time according to the state information of each buried bucket and the corresponding sending data time zone.
Specifically, since the status information of the buried bucket in each data transmission time zone is different, the transmission time needs to be determined according to the specific real-time condition of the buried bucket, the communication congestion is avoided, and the method for determining the transmission time is not unique, and in the present embodiment, step 122 includes steps 1222 and 1224.
Step 1222: and when the corresponding data sending time zone is a first preset zone time period, carrying out random number delay according to the preset importance rating of the underground bucket state in the first preset zone time period, or determining sending time according to the preset importance rating of the underground bucket state, the battery electric quantity fault information of each underground bucket and the sensor fault information.
Specifically, when the data sending time zone is a zone 0 and a zone 1, the random number delay can be performed in the time period of the zone, that is, the random number is used for delaying and can be obtained in the existing mode, and the sending time can be determined by combining battery electric quantity fault information (electric quantity is high and low) and sensor fault information (sensor fault number) of each buried bucket, so that communication congestion in extreme cases is avoided.
Step 1224: and when the corresponding data sending time zone is a second preset partition time period, carrying out random number delay according to the preset importance rating of the state of the underground bucket in the second preset partition time period, or determining sending time according to the preset importance rating of the state of the underground bucket and real-time capacity information of the underground buckets.
Specifically, when the data transmission time zone is 2 zones, random number delay can be performed in the time zone, and the priority of the data transmission time can also be determined according to the real-time capacity of each buried bucket, that is, the higher the usage of the buried bucket, the higher the priority, that is, the higher the priority of transmission.
Further, the partition rule is as shown in fig. 2, the sending priority is evaluated according to the preset importance of the buried bucket state in the partition time period, the sending time is determined by a random number delay method when the importance is equal, the priority of the partition is artificially evaluated according to the usage of the buried buckets in each place, the battery power of the buried buckets in each place and the importance of the sensor fault of the buried buckets in each place, and the priority in the present application sequentially refers to the battery power (zone 0), the sensor fault (zone 1) and the buried bucket usage (zone 2) from high to low. Evaluation process within the partition: taking the battery power (area 0) as an example, determining the priority according to the power level, wherein the lower the power level, the higher the priority, the earlier the transmission is, the higher the power level is, the lower the priority is, similarly, determining the priority according to the number of sensor faults in the sensor fault (area 1), the more the faults are, the higher the priority is, determining the priority according to the full capacity of the buried bucket (area 2), and the higher the buried bucket is, the higher the full capacity of the buried bucket is, the higher the priority is.
Step 124: and generating a data frame according to the sending time and the state information of the buried bucket and sending the data frame to the server platform.
Specifically, the sending time (time) of the status information of each underground bucket is determined in step 122, a data frame is generated according to the sending time and the status information of the underground bucket, the data frame comprises a frame header identifier, an underground bucket ID, the capacity of the underground bucket, the battery capacity of the underground bucket, a sensor fault, the sending time, a firmware version and a check word, and the uploading of the status information of the underground bucket is completed after the data frame is sent to the server platform.
In one embodiment, the method for uploading data by the underground barrel terminal further comprises the following steps: and receiving a response frame returned by the server platform corresponding to the data frame, extracting time and calibrating self time according to the received response frame, and determining a data sending time zone corresponding to the state information of each buried bucket according to the detected state information of each buried bucket and the data sending time zone obtained from the server platform.
Specifically, after receiving a data frame, a monitoring platform appends the current time zone time to the data frame to obtain a response frame and replies the response frame to a processor, wherein the current time zone time is in a year, month, day, hour, minute and second millisecond format, the processor extracts time and calibrates self time after receiving the response frame of the monitoring platform, so that time reference points of all underground bucket terminals are consistent, the accuracy of sending time is improved, after calibrating the self time of the processor, all calculations are delayed by a period, namely after the processor finishes sending the data frame each time, the processor determines a corresponding sending data time area for sending the state information of each underground bucket according to the rule again according to the detected state information of each underground bucket and the sending data time area, and determines the sending time for sending the data frame next time, namely, the total length of time for entering dormancy immediately is calculated.
According to the method for uploading data by the underground bucket terminal, the data sending time zone corresponding to the underground bucket is determined according to the state information of the underground bucket, random number delay is carried out according to the preset importance rating of the state of the underground bucket, or the sending time of the state information of the underground bucket is determined according to the preset importance rating of the state of the underground bucket and the state information of the underground bucket, a data frame is generated according to the state information of the underground bucket and the specific sending time zone and is sent to the server platform, the time for sending the data frame is diverged according to the state information of the underground bucket, communication congestion is avoided, the communication quality is effectively improved, the communication efficiency is high, resource allocation is optimized, investment cost is saved, and unnecessary human input is reduced.
In one embodiment, as shown in fig. 3, an apparatus for uploading data by a ground bucket terminal includes a transmission data time zone determination module 110 and a data frame generation module 120.
The data sending time zone determining module 110 is configured to determine, according to the detected status information of each buried bucket and the data sending time zone obtained from the server platform, a corresponding data sending time zone for sending the status information of each buried bucket, where the data sending time zone obtained from the server platform is determined by dividing the time for sending the status information of each buried bucket into preset time zones and obtaining the time duration of each time zone according to the number of connected buried buckets, the number of bearable maximum connected buried buckets, and the time duration for completing one-time communication by the server platform.
The data frame generating module 120 is configured to generate a data frame according to the status information of each buried bucket and the corresponding data sending time zone, and send the data frame to the server platform.
In one embodiment, the data frame generation module 120 includes a transmission time determination unit and a data frame generation unit.
The sending time determining unit is used for determining sending time according to the state information of each buried bucket and the corresponding sending data time zone.
And the data frame generating unit is used for generating a data frame according to the sending time and the state information of the underground bucket and sending the data frame to the server platform.
In one embodiment, the transmission time determination unit includes a first transmission time determination unit and a second transmission time determination unit.
The first sending time determining unit is used for carrying out random number delay according to the preset importance rating of the underground bucket state in the first preset partition time period or determining sending time according to the preset importance rating of the underground bucket state, the battery electric quantity fault information of each underground bucket and the sensor fault information when the corresponding data sending time region is the first preset partition time period.
And the first sending time determining unit is used for carrying out random number delay according to the preset importance rating of the state of the underground bucket in the second preset partition time period or determining the sending time according to the preset importance rating of the state of the underground bucket and the real-time capacity information of each underground bucket when the corresponding data sending time region is the second preset partition time period.
In an embodiment, the apparatus for uploading data at the end of the buried bucket further includes a calibration module, where the calibration module is configured to receive a response frame returned by the server platform corresponding to the data frame, extract time and calibrate its own time according to the received response frame, and control the sending data time zone determining module 110 to determine, again according to the detected state information of each buried bucket and the sending data time zone obtained from the server platform, a sending data time zone corresponding to the state information of each buried bucket.
According to the device for uploading data of the underground bucket terminal, the data sending time zone corresponding to the underground bucket is determined according to the state information of the underground bucket, random number delay is carried out according to the preset importance rating of the state of the underground bucket, or the sending time of the state information of the underground bucket is determined according to the preset importance rating of the state of the underground bucket and the state information of the underground bucket, a data frame is generated according to the state information of the underground bucket and the specific sending time zone and is sent to the server platform, the time for sending the data frame is diverged according to the state information of the underground bucket, communication congestion is avoided, the communication quality is effectively improved, the communication efficiency is high, resource allocation is optimized, investment cost is saved, and unnecessary human input is reduced.
In one embodiment, as shown in fig. 4, a method for uploading data by an underground barrel terminal comprises the following steps:
step S210: the number of connected buried buckets, the maximum number of connected buried buckets that can be tolerated, and the length of time to complete one communication are obtained.
Specifically, the server platform comprises a system server and a monitoring platform, the system server is a server required by the installation and deployment of the monitoring platform, the maximum number of the connecting buried buckets which can be borne by the server platform is related to the configuration of the system server, and the configuration of the system server comprises hardware performances of a processor, a memory, a hard disk, a network card and the like of the server. Further, under the condition that the server configuration is fixed and unchanged, namely the performance of the server is fixed, the capacity of processing data is fixed and limited, and a maximum parameter capable of being processed simultaneously exists, wherein the parameter refers to the maximum number of the connecting buried buckets which can be simultaneously accepted. The higher the server configuration (the better the performance), the larger the number of the largest connecting buried buckets that can be borne by the server at the same time, specifically, the number of the largest connecting buried buckets that can be borne by the system server can be calculated according to the configuration of the server and the configuration condition that each buried bucket occupies the server, and the acquisition mode of the time length for completing one-time communication is as follows: and adopting the underground bucket terminals corresponding to the underground buckets to be connected and communicated with the server platform, and averaging the connection communication time length of the underground bucket terminals to obtain the time length of one-time communication between the underground bucket terminals corresponding to the underground buckets and the server platform.
Step S220: and dividing the time for sending the state information of the underground buckets into preset time zones and obtaining the time duration of each time zone according to the number of the underground buckets, the number of the maximum bearable connected underground buckets and the time duration for completing one-time communication to obtain the time zone for sending data.
Specifically, on the premise that the number of the preset partitions is not changed, the larger the number of the buried buckets or the time duration for completing one-time communication is, the longer the time duration of each time zone is, the smaller the number of the buried buckets which can be borne by the system server and are connected to the maximum extent, and the smaller the time duration of each time zone may be, further, the time durations of the time zones are not necessarily the same, and may be adjusted according to actual situations. For example, the obtained duration of each time zone is 15 minutes, and assuming that the time for sending the preset timing is time t, zone 0 is [ t, t +15 ], zone 1 is [ t +15, t +30 "), zone 2 is [ t +30, t +45), and so on, the size of each zone may also be adjusted according to the actual size, and is not necessarily equal.
Step S230: and sending the data sending time zone to the buried bucket terminal, so that the buried bucket terminal determines a corresponding data sending time zone for sending the state information of each buried bucket according to the detected state information of each buried bucket and the data sending time zone, and generates and returns a data frame according to the state information of each buried bucket and the corresponding data sending time zone.
In one embodiment, step S220 specifically includes:
TS≥[(m/s)/n]×T
wherein, TSThe time zone is the time length of the time zone, m is the number of the buried buckets, n is the maximum number of the buried buckets connected with the monitoring platform and can be borne by a system server, T is the time length for completing one-time communication, and s is the number of the preset zones, wherein s is larger than or equal to the number of the types of the buried bucket state information.
In one embodiment, as shown in fig. 5, an apparatus for uploading data by a terminal of an underground bucket includes a data acquisition module 210, a partition module 220, and a time partition transmission module 230.
In one embodiment, the data acquisition module 210 is configured to acquire the number of connected buried buckets, the maximum number of connected buried buckets that can be tolerated, and the duration of one communication.
In one embodiment, the partitioning module 220 is configured to divide the time for sending the status information of the buried buckets into preset time zones and obtain the time duration of each time zone according to the number of buried buckets, the number of sustainable maximum connected buried buckets, and the time duration for completing one communication, so as to obtain the time zone for sending data.
In one embodiment, the time zone transmitting module 230 is configured to transmit the data transmission time zone to the buried bucket terminal, so that the buried bucket terminal determines a corresponding data transmission time zone for transmitting the state information of each buried bucket according to the detected state information of each buried bucket and the data transmission time zone, and generates and returns a data frame according to the state information of each buried bucket and the corresponding data transmission time zone.
In one embodiment, the apparatus for uploading data by the ground bucket terminal further includes a response frame reply module, and the response frame reply module is configured to obtain a response frame by appending the current time to the received data frame, and send the response frame to the ground bucket terminal.
In one embodiment, a storage medium has a computer program stored thereon, which when executed by a processor implements the method for uploading data by a ground bucket terminal described above.
In one embodiment, as shown in fig. 6, an underground barrel terminal 310 includes a battery level detection module 311, a sensor failure detection module 312, an underground barrel capacity detection module 313, a processor 314 and a wireless radio frequency transceiver 315, where the battery level detection module 311, the sensor failure detection module 312, the underground barrel capacity detection module 313 and the wireless radio frequency transceiver 315 are all connected to the processor 314, and the battery level detection module 311 is configured to detect battery level information of each underground barrel; the sensor fault detection module 312 is used for detecting sensor fault information of each buried bucket; the buried bucket capacity detection module 313 is used for detecting real-time capacity information of each buried bucket; the processor 314 is configured to execute the above method for uploading data by the ground bucket terminal, and send the generated data frame to the server platform 330 through the wireless rf transceiver 315.
In one embodiment, as shown in fig. 7, a monitoring system comprises a communication device 320, a server platform 330 and the above ground bucket terminal 310, wherein the ground bucket terminal 310 is connected with the server platform 330 through the communication device 320, and the ground bucket terminal 310 is used for being connected with a ground bucket; the server platform 330 obtains the number of connected buried buckets, the maximum bearable number of connected buried buckets and the time length for completing one-time communication; dividing the time for sending the state information of the buried buckets into preset time zones and obtaining the time duration of each time zone according to the number of the buried buckets, the number of the maximum bearable connected buried buckets and the time duration for completing one-time communication, obtaining a data sending time zone and sending the data sending time zone to the buried bucket terminal 310; the buried bucket terminal 310 receives the data transmission time zone, determines a corresponding data transmission time zone for transmitting the state information of each buried bucket according to the detected state information of each buried bucket and the detected data transmission time zone, generates a data frame according to the state information of each buried bucket and the corresponding data transmission time zone, and transmits the data frame to the server platform 330.
Specifically, a wireless radio frequency transceiver 315 in the in-ground barrel terminal 310 is connected to a server platform 330 through a communication device 320.
In one embodiment, communication device 320 is a wireless communication device.
Specifically, the wireless communication device includes at least one of a WIFI device, a bluetooth device, and a GPRS device, and is not limited to the above.
In a more specific embodiment, as shown in fig. 8, one monitoring terminal (i.e., a ground bucket terminal) is connected to one ground bucket, and each monitoring terminal transmits the status information of the connected ground bucket to the communication base station and to the server platform through the internet. Further, the correspondence between the monitoring terminal and the buried bucket is not limited to the above form, as long as the monitoring terminal can detect the status information of each buried bucket and can determine the sending time of the uploaded data according to the above-described manner.
According to the monitoring system, the time for sending the data frame is diverged according to the real-time state information of the underground barrel, the communication quality is improved, the communication congestion is avoided, the reliability and the stability of the system are enhanced, meanwhile, the configuration requirement of the server is reduced, and the operation cost is saved.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the 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.