CN114827038B - Data reporting method, device, equipment and storage medium - Google Patents

Data reporting method, device, equipment and storage medium Download PDF

Info

Publication number
CN114827038B
CN114827038B CN202210720952.5A CN202210720952A CN114827038B CN 114827038 B CN114827038 B CN 114827038B CN 202210720952 A CN202210720952 A CN 202210720952A CN 114827038 B CN114827038 B CN 114827038B
Authority
CN
China
Prior art keywords
data
reporting
reported
equipment
serial number
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
CN202210720952.5A
Other languages
Chinese (zh)
Other versions
CN114827038A (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.)
Shenzhen Macy Communication Technology Co ltd
Original Assignee
Shenzhen Macy Communication Technology 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 Shenzhen Macy Communication Technology Co ltd filed Critical Shenzhen Macy Communication Technology Co ltd
Priority to CN202210720952.5A priority Critical patent/CN114827038B/en
Publication of CN114827038A publication Critical patent/CN114827038A/en
Application granted granted Critical
Publication of CN114827038B publication Critical patent/CN114827038B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q9/00Arrangements in telecontrol or telemetry systems for selectively calling a substation from a main station, in which substation desired apparatus is selected for applying a control signal thereto or for obtaining measured values therefrom
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q2209/00Arrangements in telecontrol or telemetry systems
    • H04Q2209/60Arrangements in telecontrol or telemetry systems for transmitting utility meters data, i.e. transmission of data from the reader of the utility meter

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Selective Calling Equipment (AREA)

Abstract

The invention discloses a data reporting method, a data reporting device, data reporting equipment and a storage medium, and belongs to the technical field of data reporting. The method comprises the steps of obtaining equipment parameters of the equipment; obtaining the time length of the reported data and the serial number of the equipment based on the equipment parameters; when a data reporting instruction is received, a data reporting mode is obtained based on the data reporting instruction; and performing data reporting according to the reporting data time length and the equipment serial number based on the reporting data mode, calculating the sequence of the reported data through the reporting data time length and the equipment serial number, automatically and sequentially reporting the data according to the set sequence, avoiding channel blockage caused by simultaneous data reporting, and improving the efficiency of data reporting and the efficiency of data acquisition.

Description

Data reporting method, device, equipment and storage medium
Technical Field
The present invention relates to the field of data reporting technologies, and in particular, to a data reporting method, apparatus, device, and storage medium.
Background
When the gateway and the electric meter are connected in a 485 wired communication mode, data congestion and data cannot be reported timely frequently during data reporting. Particularly, with the development of the internet of things technology, the number of devices connected under one gateway is more and more, the efficiency is low in the traditional networking mode of point reading by the gateway and data reporting by an ammeter, and although an occupied line avoidance mechanism is adopted in the active reporting mode under the conditions of timing tasks, re-electrification and the like, the channel is blocked due to unreasonable design, a large amount of data cannot be reported in time, and the problem of data loss is more serious for a long time.
Disclosure of Invention
The invention mainly aims to provide a data reporting method, a data reporting device, data reporting equipment and a storage medium, and aims to solve the technical problem of low data reporting efficiency in the prior art.
In order to achieve the above object, the present invention provides a data reporting method, which comprises the following steps:
acquiring equipment parameters of equipment;
obtaining the time length of the reported data and the serial number of the equipment based on the equipment parameters;
when a data reporting instruction is received, obtaining a data reporting mode based on the data reporting instruction;
and reporting data according to the reporting data time length and the equipment serial number based on the reporting data mode.
Optionally, the reporting data mode based on the reporting data time length and the device sequence number includes:
when the reported data mode is a broadcast mode, receiving a first reported data parameter;
obtaining a reported data type and reported data content according to the first reported data parameter;
and sequentially reporting data through the reported data type, the reported data content, the reported data duration and the equipment serial number.
Optionally, the sequentially reporting data according to the reported data type, the reported data content, the reported data duration, and the device serial number includes:
when the type of the reported data is a timed reported type, calculating the time of the reported data through the equipment serial number and the time length of the reported data;
and sequentially reporting the data according to the data reporting time and the data reporting content.
Optionally, the sequentially reporting the data through the reported data type, the reported data content, the reported data duration, and the device serial number includes:
when the reported data type is re-power-on reporting, acquiring the networking time length in the equipment parameters;
calculating the time of reporting data according to the networking time length, the equipment serial number and the time of reporting data;
and sequentially reporting the data according to the data reporting time and the data reporting content.
Optionally, after the data is reported according to the reported data duration and the device sequence number based on the reported data mode, the method further includes:
when the feedback signal is not received, judging that the equipment is in failure;
judging whether the equipment is in a timed reporting period or a re-electrifying reporting period;
when the equipment is in a timed reporting period or a re-electrifying reporting period, obtaining the quantity of the equipment based on the equipment serial number;
calculating the reporting time length of abnormal data according to the number of the devices and the reporting data time length;
sending an abnormal data reporting request based on the abnormal data reporting duration, and receiving a fed-back abnormal data reporting instruction according to the abnormal data reporting request;
suspending reporting data based on the abnormal data reporting instruction, reporting an equipment serial number corresponding to equipment failure, and receiving a fed-back abnormal data reporting permission instruction according to the equipment serial number;
and reporting the abnormal data based on the instruction for allowing reporting the abnormal data, and continuing to report the data after the reporting of the abnormal data is finished.
Optionally, the determining whether the device is in the timed reporting period or after the re-powering on reporting period further includes:
when the equipment is not in the timed reporting period and the re-electrifying reporting period, acquiring the fault type and abnormal data of equipment faults;
and reporting the fault type and the abnormal data so as to process according to the fault type and the abnormal data.
Optionally, the reporting data mode based on the reporting data time length and the device sequence number includes:
receiving a second reported data parameter when the reported data mode is a directional reported mode;
obtaining a serial number of a reporting device, a type of reported data and content of the reported data according to the second reported data parameter;
determining target equipment according to the serial number of the reporting equipment;
and reporting data through the target equipment, the serial number of the reporting equipment, the type of the reported data, the content of the reported data and the duration of the reported data.
In addition, to achieve the above object, the present invention further provides a data reporting apparatus, where the data reporting apparatus includes:
the acquisition module is used for acquiring equipment parameters of the equipment;
the acquisition module is further configured to obtain a reporting data duration and a device serial number based on the device parameter;
the acquisition module is further configured to obtain a reported data mode based on the reported data instruction when the reported data instruction is received;
and the reporting module is used for reporting data according to the reporting data time length and the equipment serial number based on the reporting data mode.
In addition, to achieve the above object, the present invention further provides a data reporting apparatus, where the data reporting apparatus includes: the data reporting program is configured to implement the steps of the data reporting method described above.
In addition, in order to achieve the above object, the present invention further provides a storage medium, where the storage medium stores a data reporting program, and the data reporting program, when executed by a processor, implements the steps of the data reporting method described above.
The method comprises the steps of obtaining equipment parameters of the equipment; obtaining the time length of the reported data and the serial number of the equipment based on the equipment parameters; when a data reporting instruction is received, obtaining a data reporting mode based on the data reporting instruction; and performing data reporting according to the reporting data time length and the equipment serial number based on the reporting data mode, calculating the sequence of the reported data through the reporting data time length and the equipment serial number, automatically and sequentially reporting the data according to the set sequence, avoiding channel blockage caused by simultaneous data reporting, and improving the efficiency of data reporting and the efficiency of data acquisition.
Drawings
Fig. 1 is a schematic structural diagram of a data reporting device in a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a data reporting method according to a first embodiment of the present invention;
FIG. 3 is a schematic diagram of a gateway, a system and a meter connection according to a first embodiment of the data reporting method of the present invention;
fig. 4 is a schematic view of an overall flow of a system issuing a data reporting requirement in an embodiment of the data reporting method of the present invention;
fig. 5 is a schematic processing flow diagram after a device receives a data request reported by a system in an embodiment of the data reporting method of the present invention;
FIG. 6 is a flowchart illustrating a data reporting method according to a second embodiment of the present invention;
FIG. 7 is a flowchart illustrating a data reporting method according to a third embodiment of the present invention;
fig. 8 is a schematic flowchart of a data reporting method according to a fourth embodiment of the present invention;
FIG. 9 is a flowchart illustrating a fifth embodiment of a data reporting method according to the present invention;
fig. 10 is a block diagram of a first embodiment of the data reporting apparatus according to the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a schematic diagram of a data reporting device of a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the data reporting device may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a Wireless interface (e.g., a Wireless-Fidelity (Wi-Fi) interface). The Memory 1005 may be a Random Access Memory (RAM) Memory, or may be a Non-Volatile Memory (NVM), such as a disk Memory. The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the architecture shown in fig. 1 does not constitute a limitation of a data reporting device, and may include more or fewer components than shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a storage 1005 as a storage medium may include an operating system, a network communication module, a user interface module, and a data reporting program.
In the data reporting apparatus shown in fig. 1, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the data reporting device of the present invention may be disposed in the data reporting device, and the data reporting device calls the data reporting program stored in the memory 1005 through the processor 1001 and executes the data reporting method provided in the embodiment of the present invention.
An embodiment of the present invention provides a data reporting method, and referring to fig. 2, fig. 2 is a flowchart illustrating a first embodiment of the data reporting method according to the present invention.
In this embodiment, the data reporting method includes the following steps:
step S10: device parameters of a device are obtained.
It should be noted that, an execution main body of this embodiment is a controller in the data reporting device, for example, a controller in the electric meter, and may also be a controller of another device that can implement the same or similar functions.
In a specific implementation, as shown in fig. 3, fig. 3 is a schematic diagram of a gateway, a system and electric meter connections in this embodiment, the system is a management system for managing data collected by the gateway, the gateway is connected to the electric meters through RS-485 wires, the gateway communicates with each electric meter through RS-485 wires, the gateway can be connected to a plurality of electric meters, the data sent to the gateway by the system is stored, the system receives data reported by each electric meter, when a new gateway accesses the network, automatically acquiring the time length of reporting data each time and the maximum connection number from the management system, wherein the maximum connection number refers to the number of the electric meters which can be connected with the gateway, when the electric meters are detected to be accessed, equipment parameters are automatically obtained from the system, and the equipment parameters can comprise the networking time of the gateway, the data reporting duration of the equipment set by the system, the number of electric meter equipment connected with the system, the corresponding serial number of each electric meter and the like.
Step S20: and obtaining the time length of the reported data and the equipment serial number based on the equipment parameters.
In this embodiment, the device parameters include a data reporting duration of the device and a device serial number of each electric meter device in the segment. The time length of the reported data can be set by an administrator management system, for example, 60s, 90s, etc., which is not limited in this embodiment, the device serial numbers can be sorted according to the number of gateway connection devices, when a new device accesses the network, the time length of the reported data each time and the serial number of the device in the segment are automatically obtained from the system, when the previous serial number is not missing, the next serial number is automatically obtained, when the previous serial number is missing, the missing minimum serial number is obtained, and the system sends an instruction to clear the missing serial number.
In a specific implementation, when the device removes the network, the system detects that the device removes the network, adjusts the serial number of the device, changes the last serial number if the device is the last serial number, and controls to write a missing serial number if the device is not the last serial number. When the gateway is replaced, the new gateway automatically acquires the time length of reporting data each time and the maximum connection number from the system. When the electric meter equipment is accessed to or removed from the network, the reporting setting can be automatically updated, the reporting data sequence is automatically perfected, and the data reporting efficiency is improved.
Step S30: and when a data reporting instruction is received, obtaining a data reporting mode based on the data reporting instruction.
It should be understood that the report data instruction refers to an instruction for reporting data, which is issued by the system to the electric meter device, and the report data instruction may be analyzed to obtain a corresponding report data mode, where the report data mode may be a broadcast mode, a directional report mode, and the like, which is not limited in this embodiment. The broadcast mode refers to that all the electric meter equipment reports data, and the directional reporting mode refers to that the instructed electric meter equipment reports data.
In a specific implementation, the system and gateway primary application interface includes:
public GatewayInterface{
void init(param);
void broadcast(svcId,data);
int serviceRead(addr,svcUuid,charaUuid,param,data);
int serviceWrite(addr,svcUuid,charaUuid,data);
int dataGet(addr,svcId,data)
};
initializing all devices of a network segment to which a gateway belongs;
broadcast is used for data broadcast;
the serviceRead reads service data and can perform operations such as data acquisition;
the serviceWrite writes service data, and can perform operations such as parameter configuration;
and obtaining the active reported data by the dataGet.
public MeterInterface{
void init(param);
int dataGet(addr,svcId,data)
int dataSend(addr,svcId,data)
};
init initializes the basic data in the electric meter;
obtaining relevant data from the gateway by the dataGet;
dataSend sends the relevant data to the gateway.
The mutual communication between the system and the electric meter equipment, the GATEWAY service and the electric meter service bidirectional service are provided through the interface, and the GATEWAY service and the electric meter service bidirectional service comprise GATEWAY _ WRITE, GATEWAY _ READ _ REQ, GATEWAY _ READ _ RSP, GATEWAY _ MASTER _ NUM, GATEWAY _ BROADCAST and GATEWAY _ notify. GATEWAY _ WRITE indicates writable, writing data over a network; the GATEWAY _ READ _ REQ indicates that the network segment can be READ and written, and reports data duration parameters; the GATEWAY _ READ _ RSP represents readable and writable, and returns the result by reading data through the network; GATEWAY _ MASTER _ NUM represents readable and writable, and the maximum sequence number of the network segment; GATEWAY _ BROADCAST indicates writable, BROADCAST data; GATEWAY _ lost represents the sequence number of readable, writable, lost network segment.
Step S40: and reporting data according to the reporting data time length and the equipment serial number based on the reporting data mode.
It should be noted that, after the data reporting mode is determined, the data reporting type may be further determined according to the data reporting mode, so that calculation is performed according to the data reporting type, the data reporting duration, and the device serial number to obtain a sequence of reporting data, and corresponding data reporting is performed according to the sequence of reporting data.
It can be understood that, when the electric meter device reports data to the system according to the corresponding data reporting sequence, the system sends a feedback signal to the electric meter device after receiving the reported data, and completes the data reporting process.
As shown in fig. 4, fig. 4 is a schematic view of an overall flow of the system issuing a data reporting request in this embodiment. The system transmits the data reporting mode to the electric meter equipment, and transmits the relevant data needing data reporting to the electric meter equipment when the data transmitting mode is the broadcasting mode, so that the electric meter equipment reports the relevant data. And when the data issuing mode is not the broadcasting mode, issuing the equipment serial number and the corresponding data content to be reported, so that the ammeter equipment sequentially reports the data according to the equipment serial number and the reported data content, and the system receives the returned data.
As shown in fig. 5, fig. 5 is a schematic processing flow diagram after a device receives a data request reported by a system. The equipment receives the issuing mode sent by the system, judges the issuing mode, sends data when the issuing mode is the broadcasting mode, enables the system to receive the data, and feeds back the equipment serial number and the information of successful receiving to the equipment. And when the system issuing mode is not the broadcasting mode, acquiring the equipment serial number required to be received, and if the equipment serial number is not the equipment, not processing. If the receiving equipment is the local equipment, the relevant data is received, the data is reported through the equipment serial number and the relevant data, and after the system receives the data, the successful receiving information is returned to the equipment.
The embodiment obtains the device parameters of the device; obtaining the time length of the reported data and the serial number of the equipment based on the equipment parameters; when a data reporting instruction is received, a data reporting mode is obtained based on the data reporting instruction; and performing data reporting according to the reporting data time length and the equipment serial number based on the reporting data mode, calculating the sequence of the reported data through the reporting data time length and the equipment serial number, automatically and sequentially reporting the data according to the set sequence, avoiding channel blockage caused by simultaneous data reporting, and improving the efficiency of data reporting and the efficiency of data acquisition.
Referring to fig. 6, fig. 6 is a flowchart illustrating a data reporting method according to a second embodiment of the present invention.
Based on the first embodiment, the step S40 of the data reporting method in this embodiment specifically includes:
step S41: and receiving a first reported data parameter when the reported data mode is a broadcast mode.
In this embodiment, in the broadcast mode, if all the electric meter devices need to report data, the report data instruction issued by the system is received and analyzed, so as to obtain a first report data parameter. The first reported data parameter includes the type of data to be reported by each electric meter device, the content of the reported data, and the like.
Step S42: and obtaining the type and the content of the reported data according to the first reported data parameter.
It should be understood that, after obtaining the first reporting data parameter, the reporting data type and the reporting data content may be obtained according to the first reporting data parameter, where the reporting data type includes: and the electric meter equipment is powered on again for reporting, or the electric meter equipment reports at regular time, and the like, which is not limited in this embodiment.
Step S43: and sequentially reporting data through the reported data type, the reported data content, the reported data duration and the equipment serial number.
It can be understood that, when the data reporting type is re-power-on reporting or timed reporting, the specific time of reporting data by each electric meter device can be calculated according to the specific calculation rule and the device serial number of the re-power-on reporting or timed reporting, and the corresponding data content is sequentially reported to the system by controlling each electric meter device according to the specific time of reporting data.
Further, when the reporting data mode is the directional reporting mode, the specific process of reporting data includes: receiving a second reported data parameter when the reported data mode is a directional reported mode; obtaining the serial number of the reporting equipment, the type of the reported data and the content of the reported data according to the second reported data parameter; determining target equipment according to the serial number of the reporting equipment; and reporting data through the target equipment, the serial number of the reporting equipment, the type of the reported data, the content of the reported data and the duration of the reported data.
When a reporting data instruction issued by a system is received, the reporting data instruction is analyzed, the obtained reporting data mode is a directional reporting mode, and a second reporting data parameter is obtained based on the directional reporting mode, wherein the second reporting data parameter comprises a reporting equipment serial number, a reporting data type and a reporting data content. The reporting device serial number refers to a serial number corresponding to a device that needs to report data, and a target device that needs to report data may be determined by the reporting device serial number, where the number of the target devices may be 1, 5, or 10, and the specific number of the target devices may be set according to a gateway requirement, which is not limited in this embodiment.
It should be understood that, by determining whether the type of the reported data is the timed report or the re-power-on report, when the type of the reported data is the timed report, the time of the timed report can be obtained by calculating according to the sequence number of the target device and the time length of the reported data, for example, the time length of the reported data is 60s, and the sequence numbers of the target devices reported at the timed time are 3 and 6, so that the timed report time of the sequence number of the target device 3 can be calculated to be 3 × 60=180s, and the timed report time of the sequence number of the target device 6 is 6 × 60=360s, that is, the sequence number of the target device 3 can report data to the system by reporting the data content after 180s, and can perform the circular timed report by reporting the data content again after 180 s. The serial number of the target equipment is 6, the data can be reported to the system through the reported data content after 360s, and the data can be reported again through the reported data content after 360 s.
In a specific implementation, when the type of the reported data is re-power-on reporting, the networking duration of the gateway in the device parameter may be obtained, where the networking duration may be 3s, 5s, and the like, and this embodiment does not limit this, and the networking duration is selected according to the specific model of the gateway, and if the target device directionally reported by re-power-on reporting is a target device with a sequence number of 6, for example, the networking duration is 3s, and the reported data duration is 60s, the re-power-on reporting time may be calculated as (networking duration + target device sequence number × reported data duration) = (3 +6 × 60) =363s, and then the target device with a device sequence number of 6 is re-powered on for 363s, and then reports data to the system through the reported data content.
In this embodiment, when the reporting data mode is the broadcast mode, a first reporting data parameter is received; obtaining a reported data type and reported data content according to the first reported data parameter; data reporting is carried out in sequence through the reported data type, the reported data content, the reported data time length and the equipment serial number, the reporting time of the data content reported by each equipment can be calculated according to the reported data type, the reported data time length and the equipment serial number, related data can be reported in sequence according to the calculated reporting time sequence, channel blockage caused by simultaneous reporting of the equipment is avoided, and the efficiency of data reporting is improved.
Referring to fig. 7, fig. 7 is a flowchart illustrating a data reporting method according to a third embodiment of the present invention.
Based on the second embodiment, the step S43 of the data reporting method in this embodiment specifically includes:
step S403: and when the type of the reported data is a timed reported data, calculating the time of the reported data according to the equipment serial number and the time length of the reported data.
It should be understood that, when the type of the reported data is a timed report, the time (the device number x the data reporting time length) reported by each electric meter device at a fixed time may be calculated according to the device number and the data reporting time length of each device, for example, the number of the electric meter devices is 10, the data reporting time length is 60s, the device number is 1-10, and the time (the time) reported by each electric meter device at a fixed time may be calculated as 60s, 120s, 180s, 240s, 300s, 360s, 420s, 480s, 540s, and 600s in sequence.
Step S413: and sequentially reporting the data according to the data reporting time and the data reporting content.
In a specific implementation, after the data reporting time is calculated according to the device serial number and the data reporting duration, each device may sequentially report data according to the data reporting time. The time for the device with the device serial number 1 to report data is 60s, and the time for the device with the device serial number 5 to report data is 300s, so that the time sequence of the reported data of each device can be set, channel blockage caused by simultaneous reporting of data by the ammeter device is avoided, and the efficiency of data reporting is improved.
In this embodiment, when the type of the reported data is a timed report, the time for reporting the data is calculated according to the device serial number and the reported data duration; and data reporting is carried out in sequence according to the data reporting time and the data reporting content, so that channel blockage caused by simultaneous data reporting of the electric meter equipment is avoided, and the data reporting efficiency is improved.
Referring to fig. 8, fig. 8 is a schematic flowchart of a data reporting method according to a fourth embodiment of the present invention.
Based on the second embodiment, the step S43 of the data reporting method in this embodiment specifically includes:
step S423: and when the reported data type is the re-power-on report, acquiring the networking time length in the equipment parameters.
It should be noted that, when the type of the reported data is reported by powering on again, the networking time when powering on again after the power off of the gateway needs to be determined, and only after the gateway is determined to be connected to the network, the data can be reported to the system through the gateway, so that the data reported by the device is guaranteed to be effective data. When the gateway is accessed to the network for the first time, the electric meter equipment can acquire the networking time length in the equipment parameters and store the networking time length in each electric meter equipment, so that the reporting time calculation of data after subsequent power-on is facilitated. The gateway networking time may be 3s, 5s, etc., which is not limited in this embodiment.
Step S433: and calculating the time of reporting data according to the networking time length, the equipment serial number and the time of reporting data.
It should be understood that when the type of reporting data is a re-power report, the time for reporting data is: if the number of the connected electric meter devices is 10, the networking time is 3s, and the reported data time is 60s, the time for the electric meter device with the device number of 1 to report data is 3+1 × 60=63s, the time for the electric meter device with the device number of 3 to report data is 3+3 × 60=183s, and the time for the electric meter device with the device number of 7 to report data is 3+7 × 60=423s, and so on, the time for reporting data after all the electric meter devices connected with the gateway are powered on again can be calculated.
Step S443: and sequentially reporting the data according to the data reporting time and the data reporting content.
After the time for reporting the data of each electric meter device is calculated, the data of each device in the broadcast mode can be reported in sequence according to the time for reporting the data and the data content reported by each electric meter device.
In this embodiment, when the type of the reported data is a power-on report again, the networking duration in the device parameter is obtained; calculating the time of reporting data according to the networking time length, the equipment serial number and the time length of reporting data; and data reporting is carried out in sequence according to the data reporting time and the data reporting content, and the data reporting time after power is turned on again is calculated, so that the reported data of each device is prevented from being disordered due to power-off, the reported data is prevented from being blocked, and the data reporting efficiency is improved.
Referring to fig. 9, fig. 9 is a schematic flowchart of a data reporting method according to a fifth embodiment of the present invention.
Based on the first and second embodiments, after step S40, the data reporting method of this embodiment further includes:
step 50: and when the feedback signal is not received, judging that the equipment is in failure.
It should be noted that, after the device reports the data content to the system, the system sends a feedback signal to the device, so that the device knows that the active data reporting is successful, and if the device does not receive the signal fed back by the system, it indicates that the system does not receive the data content reported by the device or the reported data received by the system is abnormal data, it determines that the device is in a failure, where the device failure refers to a failure of the device or an abnormality of the data content.
Step 51: and judging whether the equipment is in a timed reporting period or a re-power-on reporting period.
When a fault occurs in the equipment or the data content is abnormal, the related abnormal information needs to be actively reported, so that whether the equipment is in a timed reporting period or a re-power-on reporting period can be judged, and when the equipment is not in the timed reporting period or the re-power-on reporting period, the fault type and the abnormal data of the equipment fault are acquired; and reporting the fault type and the abnormal data so as to process according to the fault type and the abnormal data.
The method comprises the steps that the fault type of equipment comprises an instant processing fault and an alarm fault, and a serial number and abnormal data of the equipment with the fault are obtained, wherein the instant processing fault refers to that the electric meter equipment actively processes according to a preset requirement, and reports a processing result, the processing result can be a process of processing the equipment fault by the equipment, when the fault type of the equipment is the instant processing fault type, the instant processing fault, the abnormal data, the serial number of the equipment and the processing result are sent to a system, and when the fault type of the equipment is the alarm fault, the alarm fault and the abnormal data are sent to the system.
When the fault type and the abnormal data of the equipment are sent to the system, a signal returned by the system is received, after the system receives the abnormal data and the fault type information, a processing result is received or the reported alarm fault and the abnormal data are processed, whether a data re-reporting instruction is issued or not is determined, if the system requests to issue the data re-reporting instruction, the data re-reporting instruction is issued to the equipment with the fault, after the equipment with the fault receives the data re-reporting instruction, the data are re-reported to the system, and after a signal fed back by the system is received, the data reporting is completed.
Step 52: and when the equipment is in the timing reporting period or the re-electrifying reporting period, obtaining the quantity of the equipment based on the equipment serial number.
And when the equipment is in the timed reporting period or the re-electrifying reporting period, obtaining the quantity of all the equipment connected with the gateway through all the equipment serial numbers.
Step 53: and calculating the reporting time length of the abnormal data according to the number of the devices and the reporting data time length.
It should be understood that the abnormal data reporting duration refers to the time for sending the abnormal data reporting request to the system, and the process of calculating the abnormal data reporting duration is as follows:
(Nt) -0.1 (formula 1)
In formula 1, N is the number of devices, and t is the length of time for reporting data. And calculating the abnormal data reporting time length according to the number of the devices and the reporting data time length, wherein if the number of the devices is 10 and the reporting data time length is 60s, the abnormal data reporting time length is 599.9 s.
Step 54: and sending an abnormal data reporting request based on the abnormal data reporting duration, and receiving a feedback abnormal data reporting instruction according to the abnormal data reporting request.
And after the abnormal data reporting time length is obtained, an abnormal data reporting request can be sent to the system after the abnormal data reporting time length is obtained, and after the abnormal data reporting request sent by the electric meter equipment is received by the system, an abnormal data reporting instruction is immediately broadcast and issued, wherein the abnormal data reporting instruction comprises a data reporting pause instruction and an equipment serial number instruction for reporting the abnormal data.
Step 55: and suspending reporting data based on the abnormal data reporting instruction, reporting the equipment serial number corresponding to the equipment fault, and receiving a fed back instruction allowing reporting of the abnormal data according to the equipment serial number.
It should be noted that, after the device receives the abnormal data reporting instruction fed back by the system, the abnormal data reporting instruction is analyzed to obtain a requirement for suspending reporting data and a device serial number requirement for reporting the abnormal data, the current data reporting is suspended, the reporting time of the device which does not report data is prolonged, the prolonged specific value is a device serial number +2 without reporting data, the reporting time is prolonged to wait for other devices with the abnormal data to report the abnormal data and the device serial number to the system, after the device reports the device serial number of the abnormal data to the system according to the device serial number instruction for reporting the abnormal data, the system feeds back an instruction for allowing reporting the abnormal data according to the device serial number of the received abnormal data, and the instruction for allowing reporting the abnormal data refers to the gateway allowing the device to report the abnormal data.
Step 56: and reporting the abnormal data based on the instruction for allowing reporting the abnormal data, and continuing to report the data after the reporting of the abnormal data is finished.
In a specific implementation, after receiving an instruction of allowing reporting of abnormal data fed back by a system, the device reports the abnormal data, and waits for a signal of successful reporting fed back by the system, and after receiving the abnormal data, the system determines whether to issue a re-reporting instruction, if the system needs to issue the re-reporting instruction, the re-reporting instruction is issued according to the failed device, after receiving the re-reporting instruction, the failed devices continue to report data in sequence, and the time length for re-reporting data is calculated as the following formula 2:
(M + 2-Y). t (formula 2)
In formula 2, M is the serial number of the failed device, Y is the number of devices that have reported data, and t is the length of time for reporting data. For example, if the serial number of the failed device is 5, the number of devices connected to the gateway is 10, the number of devices that have reported data is 3, and the time length for reporting data is 60s, the time length for reporting data again is calculated as: (5 + 2-3) × 60=240s, the device with the fault can report the data to the system again after 240s until receiving the signal fed back by the system, and the data reporting is completed. And when the system does not receive the data reported by the equipment, acquiring the serial number of the equipment, and putting the equipment into a fault alarm list for fault alarm.
The embodiment determines the equipment fault by not receiving the feedback signal; judging whether the equipment is in a timed reporting period or a re-electrifying reporting period; when the equipment is in a timing reporting period or a re-electrifying reporting period, obtaining the quantity of the equipment based on the equipment serial number; calculating the reporting time length of abnormal data according to the number of the devices and the reporting data time length; sending an abnormal data reporting request based on the abnormal data reporting duration, and receiving a fed-back abnormal data reporting instruction according to the abnormal data reporting request; suspending reporting data based on the abnormal data reporting instruction, reporting an equipment serial number corresponding to equipment failure, and receiving a fed-back abnormal data reporting permission instruction according to the equipment serial number; reporting abnormal data based on the abnormal data reporting permission instruction, continuing to report the data after the abnormal data reporting is completed, calculating the time for reporting the data again when the equipment fails or the abnormal data occurs, avoiding the problem that the reporting time of each equipment is disordered due to the equipment failure, orderly reducing the time distribution of the reported data, improving the efficiency of data reporting, timely processing the equipment failure, and avoiding the problem that the data cannot be reported in time due to the equipment failure, thereby causing the data loss.
Referring to fig. 10, fig. 10 is a block diagram illustrating a first embodiment of a data reporting apparatus according to the present invention.
As shown in fig. 10, a data reporting apparatus provided in the embodiment of the present invention includes:
an obtaining module 10, configured to obtain device parameters of a device.
The obtaining module 10 is further configured to obtain a reporting data duration and a device serial number based on the device parameter.
The obtaining module 10 is further configured to, when receiving a data reporting instruction, obtain a data reporting mode based on the data reporting instruction.
And a reporting module 20, configured to report data according to the reporting data duration and the device serial number based on the reporting data mode.
The embodiment obtains the device parameters of the device; obtaining the time length of the reported data and the serial number of the equipment based on the equipment parameters; when a data reporting instruction is received, obtaining a data reporting mode based on the data reporting instruction; and performing data reporting according to the reporting data time length and the equipment serial number based on the reporting data mode, calculating the sequence of the reported data through the reporting data time length and the equipment serial number, automatically and sequentially reporting the data according to the set sequence, avoiding channel blockage caused by simultaneous data reporting, and improving the efficiency of data reporting and the efficiency of data acquisition.
In an embodiment, the reporting module 20 is further configured to receive a first reported data parameter when the reported data mode is a broadcast mode; obtaining a reported data type and reported data content according to the first reported data parameter; and sequentially reporting data through the reported data type, the reported data content, the reported data duration and the equipment serial number.
In an embodiment, the reporting module 20 is further configured to calculate a time for reporting data according to the device serial number and the time duration for reporting data when the type of the reported data is a timed report; and sequentially reporting the data according to the data reporting time and the data reporting content.
In an embodiment, the reporting module 20 is further configured to obtain a networking time length in the device parameter when the type of the reported data is a re-power-on report; calculating the time of reporting data according to the networking time length, the equipment serial number and the time length of reporting data; and sequentially reporting the data according to the data reporting time and the data reporting content.
In an embodiment, the reporting module 20 is further configured to determine that the device is faulty when the feedback signal is not received; judging whether the equipment is in a timed reporting period or a re-electrifying reporting period; when the equipment is in a timed reporting period or a re-electrifying reporting period, obtaining the quantity of the equipment based on the equipment serial number; calculating the reporting time length of abnormal data according to the number of the devices and the reporting data time length; sending an abnormal data reporting request based on the abnormal data reporting duration, and receiving a fed-back abnormal data reporting instruction according to the abnormal data reporting request; suspending reporting data based on the abnormal data reporting instruction, reporting an equipment serial number corresponding to equipment failure, and receiving a fed-back abnormal data reporting permission instruction according to the equipment serial number; and reporting the abnormal data based on the instruction for allowing reporting the abnormal data, and continuing to report the data after the reporting of the abnormal data is finished.
In an embodiment, the reporting module 20 is further configured to obtain a fault type and abnormal data of a device fault when the device is not in the timed reporting period and the re-power-on reporting period; and reporting the fault type and the abnormal data so as to process according to the fault type and the abnormal data.
In an embodiment, the reporting module 20 is further configured to receive a second reported data parameter when the reported data mode is a directional reporting mode; obtaining a serial number of a reporting device, a type of reported data and content of the reported data according to the second reported data parameter; determining target equipment according to the serial number of the reporting equipment; and reporting data through the target equipment, the serial number of the reporting equipment, the type of the reported data, the content of the reported data and the duration of the reported data.
In addition, to achieve the above object, the present invention further provides a data reporting apparatus, where the data reporting apparatus includes: the data reporting program is configured to implement the steps of the data reporting method described above.
Since the data reporting device adopts all technical solutions of all the embodiments, at least all the beneficial effects brought by the technical solutions of the embodiments are achieved, and are not described in detail herein.
In addition, an embodiment of the present invention further provides a storage medium, where the storage medium stores a data reporting program, and the data reporting program, when executed by a processor, implements the steps of the data reporting method described above.
Since the storage medium adopts all technical solutions of all the embodiments, at least all the beneficial effects brought by the technical solutions of the embodiments are achieved, and no further description is given here.
It should be understood that the above is only an example, and the technical solution of the present invention is not limited in any way, and in a specific application, a person skilled in the art may set the technical solution as needed, and the present invention is not limited thereto.
It should be noted that the above-mentioned work flows are only illustrative and do not limit the scope of the present invention, and in practical applications, those skilled in the art may select some or all of them according to actual needs to implement the purpose of the solution of the present embodiment, and the present invention is not limited herein.
In addition, the technical details that are not described in detail in this embodiment may refer to the data reporting method provided in any embodiment of the present invention, and are not described herein again.
Further, it is to be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system 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 system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention or portions thereof that contribute to the prior art may be embodied in the form of a software product, where the computer software product is stored in a storage medium (e.g. Read Only Memory (ROM)/RAM, magnetic disk, optical disk), and includes several instructions for enabling a terminal device (e.g. a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (8)

1. A data reporting method is characterized in that the data reporting method comprises the following steps:
acquiring equipment parameters of equipment;
obtaining the time length of the reported data and the serial number of the equipment based on the equipment parameters;
when a data reporting instruction is received, a data reporting mode is obtained based on the data reporting instruction;
reporting data according to the reporting data time length and the equipment serial number based on the reporting data mode;
the reporting data mode based on the reporting data time length and the equipment serial number comprises:
when the reported data mode is a broadcast mode, receiving a first reported data parameter;
obtaining a reported data type and reported data content according to the first reported data parameter;
data reporting is carried out in sequence through the reported data type, the reported data content, the reported data duration and the equipment serial number;
after the data is reported according to the reported data duration and the device serial number based on the reported data mode, the method further includes:
when the feedback signal is not received, judging that the equipment is in failure;
judging whether the equipment is in a timed reporting period or a re-electrifying reporting period;
when the equipment is in a timed reporting period or a re-electrifying reporting period, obtaining the quantity of the equipment based on the equipment serial number;
calculating the reporting time length of abnormal data according to the number of the devices and the reporting data time length;
sending an abnormal data reporting request based on the abnormal data reporting duration, and receiving a fed-back abnormal data reporting instruction according to the abnormal data reporting request;
suspending reporting data based on the abnormal data reporting instruction, reporting an equipment serial number corresponding to equipment failure, and receiving a fed-back abnormal data reporting permission instruction according to the equipment serial number;
and reporting the abnormal data based on the instruction for allowing reporting the abnormal data, and continuing to report the data after the reporting of the abnormal data is finished.
2. The method for reporting data according to claim 1, wherein the sequentially reporting data through the type of data to be reported, the content of the data to be reported, the duration of the data to be reported, and the device serial number comprises:
when the type of the reported data is a timed reported type, calculating the time of the reported data through the equipment serial number and the time length of the reported data;
and sequentially reporting the data according to the data reporting time and the data reporting content.
3. The method for reporting data of claim 1, wherein the sequentially reporting data according to the type of the reported data, the content of the reported data, the duration of the reported data, and the device serial number comprises:
when the reported data type is re-power-on reporting, acquiring the networking time length in the equipment parameters;
calculating the time of reporting data according to the networking time length, the equipment serial number and the time of reporting data;
and sequentially reporting the data according to the data reporting time and the data reporting content.
4. The method for reporting data of claim 1, wherein the determining whether the device is in the timed reporting period or after the re-powered reporting period further comprises:
when the equipment is not in the timed reporting period and the re-electrifying reporting period, acquiring the fault type and abnormal data of equipment faults;
and reporting the fault type and the abnormal data so as to process according to the fault type and the abnormal data.
5. The method according to any of claims 1-4, wherein the reporting data according to the reporting data duration and the device sequence number based on the reporting data mode comprises:
receiving a second reported data parameter when the reported data mode is a directional reported mode;
obtaining a serial number of a reporting device, a type of reported data and content of the reported data according to the second reported data parameter;
determining target equipment according to the serial number of the reporting equipment;
and reporting data through the target equipment, the serial number of the reporting equipment, the type of the reported data, the content of the reported data and the duration of the reported data.
6. A data reporting apparatus, wherein the data reporting apparatus comprises:
the acquisition module is used for acquiring equipment parameters of the equipment;
the acquisition module is further configured to obtain a reporting data duration and a device serial number based on the device parameter;
the acquisition module is further used for acquiring a reported data mode based on the reported data instruction when the reported data instruction is received;
a reporting module, configured to report data according to the reported data duration and the device serial number based on the reported data mode;
the reporting module is further configured to receive a first reported data parameter when the reported data mode is a broadcast mode; obtaining a reported data type and reported data content according to the first reported data parameter; data reporting is carried out in sequence through the reported data type, the reported data content, the reported data duration and the equipment serial number;
the reporting module is further configured to determine that the device is in a failure when the feedback signal is not received; judging whether the equipment is in a timing reporting period or a re-electrifying reporting period; when the equipment is in a timed reporting period or a re-electrifying reporting period, obtaining the quantity of the equipment based on the equipment serial number; calculating the reporting time length of abnormal data according to the number of the devices and the reporting data time length; sending an abnormal data reporting request based on the abnormal data reporting duration, and receiving a fed-back abnormal data reporting instruction according to the abnormal data reporting request; suspending reporting data based on the abnormal data reporting instruction, reporting an equipment serial number corresponding to equipment failure, and receiving a fed-back abnormal data reporting permission instruction according to the equipment serial number; and reporting the abnormal data based on the instruction for allowing reporting the abnormal data, and continuing to report the data after the reporting of the abnormal data is finished.
7. A data reporting device, wherein the data reporting device comprises: a memory, a processor and a data reporting program stored on the memory and operable on the processor, the data reporting program being configured to implement the data reporting method according to any one of claims 1 to 5.
8. A storage medium, wherein a data reporting program is stored on the storage medium, and when executed by a processor, the data reporting program implements the data reporting method according to any one of claims 1 to 5.
CN202210720952.5A 2022-06-24 2022-06-24 Data reporting method, device, equipment and storage medium Active CN114827038B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210720952.5A CN114827038B (en) 2022-06-24 2022-06-24 Data reporting method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210720952.5A CN114827038B (en) 2022-06-24 2022-06-24 Data reporting method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114827038A CN114827038A (en) 2022-07-29
CN114827038B true CN114827038B (en) 2022-09-27

Family

ID=82520709

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210720952.5A Active CN114827038B (en) 2022-06-24 2022-06-24 Data reporting method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114827038B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104968029A (en) * 2015-05-20 2015-10-07 中国电子科技集团公司第三十八研究所 Synchronous time division multiple access method suitable for wireless sensing network
CN107465764A (en) * 2017-09-20 2017-12-12 诚迈科技(南京)股份有限公司 Internet of Things network communication system, gateway device and method based on stelliform connection topology configuration
CN110191062A (en) * 2019-05-20 2019-08-30 成都中科慧源科技有限公司 A kind of NB-IoT measuring instrument data reporting method
CN110913493A (en) * 2018-09-18 2020-03-24 中国电信股份有限公司 Data reporting method and system, core network element and computer readable storage medium
CN113012415A (en) * 2021-02-07 2021-06-22 新天科技股份有限公司 Discrete method, device, server and storage medium for uploading wrong peaks of tables of NB-IoT (NB-IoT)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8473314B2 (en) * 2010-03-04 2013-06-25 Ut-Battelle, Llc Method and system for determining precursors of health abnormalities from processing medical records
CN109660380B (en) * 2018-09-28 2022-09-06 深圳壹账通智能科技有限公司 Server running state monitoring method, platform, system and readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104968029A (en) * 2015-05-20 2015-10-07 中国电子科技集团公司第三十八研究所 Synchronous time division multiple access method suitable for wireless sensing network
CN107465764A (en) * 2017-09-20 2017-12-12 诚迈科技(南京)股份有限公司 Internet of Things network communication system, gateway device and method based on stelliform connection topology configuration
CN110913493A (en) * 2018-09-18 2020-03-24 中国电信股份有限公司 Data reporting method and system, core network element and computer readable storage medium
CN110191062A (en) * 2019-05-20 2019-08-30 成都中科慧源科技有限公司 A kind of NB-IoT measuring instrument data reporting method
CN113012415A (en) * 2021-02-07 2021-06-22 新天科技股份有限公司 Discrete method, device, server and storage medium for uploading wrong peaks of tables of NB-IoT (NB-IoT)

Also Published As

Publication number Publication date
CN114827038A (en) 2022-07-29

Similar Documents

Publication Publication Date Title
CN105593823B (en) Method, system and computer readable storage medium for the data packet flows between the virtual machine VM in monitoring data center
CN103201724B (en) Providing application high availability in highly-available virtual machine environments
CN102214117B (en) Virtual machine management method, system and server
CN109656782A (en) Visual scheduling monitoring method, device and server
JPWO2008146677A1 (en) Virtual machine management apparatus, virtual machine management method, and virtual machine management program
US8880676B1 (en) Resource planning for computing
CN104579768A (en) Client upgrading method and device
CN108737179A (en) Facility information processing method, device, terminal device and storage medium
JP2013542524A (en) Intelligent interface for distributed control systems.
CN111104210A (en) Task processing method and device and computer system
CN107220162A (en) A kind of service alarm method, storage medium and device
CN109992566A (en) A kind of file access method, device, equipment and readable storage medium storing program for executing
CN116482598A (en) Power consumption data monitoring method and device
CN115277566A (en) Load balancing method and device for data access, computer equipment and medium
CN110191182B (en) Distributed file batch processing method, device, equipment and readable storage medium
CN114827038B (en) Data reporting method, device, equipment and storage medium
CN115904669A (en) Task scheduling method, system, electronic device and computer readable storage medium
US20160132975A1 (en) Identifying high usage periods
CN113590007B (en) Method and device for generating progress bar, computer equipment and storage medium
CN113220342A (en) Centralized configuration method and device, electronic equipment and storage medium
CN109600266A (en) A kind of device management command dissemination method and management equipment
CN112637370B (en) Data processing method, device, equipment and storage medium
CN112084099B (en) Method, device, equipment and storage medium for acquiring alarm state value based on host
CN103929335A (en) Monitoring system of managing cloud host and monitoring method thereof
CN113242302A (en) Data access request processing method and device, computer equipment and medium

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