Abnormal data processing method, system and electronic device

By judging and processing abnormal data frames in the communication module of the meter, calculating the buffer time delays sending the main station data frame, the problem of poor data interaction when the electrical surface interferes with radio frequency radiation is solved, and the resource consumption on the main station is reduced and the realization of Automatic adjustments.

CN115632997BActive Publication Date: 2025-02-18HOLLEY METERING LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211097502.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-08
Publication Date
2025-02-18
Estimated Expiration
2042-09-08

AI Technical Summary

Technical Problem

When existing electricity meters face radio frequency radiation interference, abnormal data will be generated, resulting in poor data interaction and increasing data transmission resources and operating pressure on the main station.

Method used

By receiving the main station data frame in the communication module and determining whether the power meter generates abnormal data frames, determining the acquisition time and stop receiving time of abnormal data frames, calculating the buffer time, delaying the main station data frame to the power meter, avoiding frequent transmission of abnormal data .

Benefits of technology

It effectively avoids frequent sending of abnormal data to the main site, reduces the consumption of data transmission resources on the main site, and realizes automatic adjustment of delayed time intervals, solving the problem of poor data interaction caused by abnormal data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115632997B_ABST
    Figure CN115632997B_ABST
Patent Text Reader

Abstract

The present invention provides a method, system and electronic device for processing abnormal data, and relates to the field of data interaction of electric meters. The method first receives a master station data frame sent from a master station to a communication module, and uses a first preset judgment condition to determine whether the electric meter has generated an abnormal data frame; if it is an abnormal data frame, the buffer time is determined according to the time when the communication module no longer receives the abnormal data frame, and the master station data frame is sent to the electric meter to generate an electric meter data frame; finally, after receiving the electric meter data frame sent by the electric meter, the electric meter data frame is sent to the master station; wherein the buffer time is used to delay the communication module from sending the next frame of the master station data frame to the electric meter side. Without changing the existing hardware, the method timely obtains the abnormal data frame generated by the electric meter and stops sending it to the master station, thereby avoiding frequent sending of abnormal data to the master station and reducing the data transmission resources at the master station end.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of electric meter data interaction, and in particular to a method, system and electronic equipment for processing abnormal data. Background Art

[0002] As the level of intelligence of electric meters continues to improve, more and more electric meters have realized remote communication functions through the communication modules they are equipped with. When the communication module exchanges data, the communication antenna and other components in it will generate radio frequency radiation, which will interfere with the data of the relevant serial port channels of the communication module. Therefore, relevant anti-interference components will be set in the communication module to increase its anti-interference ability.

[0003] Since the electric meter is generally installed in a closed environment, the communication module will also be set up in this environment. The RF radiation intensity of the communication module is related to factors such as the antenna position, the base station environment, and the transmission power. Once the interference of the RF radiation exceeds the anti-interference ability of the communication module, it will cause abnormal data to appear in the relevant serial port channels of the electric meter, causing the meter side of the communication module to receive abnormal data. Moreover, once this type of interference occurs, there will be a steady stream of abnormal data sent to the main station, resulting in continuous RF radiation, entering a vicious cycle, resulting in additional data traffic consumption on the electric meter side. At the same time, the master station frequently receives abnormal data, which not only occupies the data transmission resources of the master station, but also increases the operating pressure of the master station.

[0004] In summary, in the existing process of processing abnormal data of electric meters, there is a lack of reasonable processing method for processing interference data generated at the electric meter end. Summary of the invention

[0005] In view of this, the purpose of the present invention is to provide a method, system and electronic device for processing abnormal data. The method, without changing the existing hardware, timely obtains the abnormal data frames generated by the electric meter and stops sending them to the main station, thereby avoiding frequent sending of abnormal data to the main station and reducing the data transmission resources on the main station side. At the same time, the method can send the data frame to the main station in time when it is normal, realizes the automatic adjustment of the delay interval, thereby completely solving the problem of poor data interaction caused by abnormal data.

[0006] In a first aspect, an embodiment of the present invention provides a method for processing abnormal data, the method being used in a communication module for processing data communication between an electric meter and a master station, the method comprising:

[0007] receiving a master station data frame sent from the master station to the communication module, and determining whether the electric meter has generated an abnormal data frame using a first preset determination condition;

[0008] If yes, the acquisition time of the abnormal data frame is determined as the first time, and the abnormal data frame generated in real time by the electric meter is judged using the first preset judgment condition, and the time when the communication module no longer receives the abnormal data frame is determined as the second time;

[0009] Determine a buffer time according to the first moment and the second moment, and use the buffer time to send the master station data frame to the electric meter to generate the electric meter data frame; wherein the buffer time is used to delay the master station data frame from being sent to the electric meter;

[0010] After receiving the meter data frame sent by the meter, the meter data frame and the buffer time are sent to the master station.

[0011] In some embodiments, the method further includes: after receiving the master station data frame sent from the master station to the communication module, the method further includes:

[0012] Using the second preset judgment condition, judging whether the master station data frame is an abnormal master station data frame;

[0013] If yes, the master station data frame is discarded.

[0014] In some implementations, after determining whether the electric meter generates an abnormal data frame using the first preset determination condition, the method further includes:

[0015] If not, the master station data frame is sent to the electric meter to generate an electric meter data frame;

[0016] After receiving the meter data frame sent by the meter, the meter data frame is sent to the master station.

[0017] In some implementations, after determining whether the electric meter generates an abnormal data frame using the first preset determination condition, the method further includes:

[0018] If yes, determine whether buffer time is generated in the communication module;

[0019] If no buffer time is generated, the time when the abnormal data frame is obtained is determined as the first time, and the abnormal data frame generated in real time by the electric meter is judged using the first preset judgment condition, and the time when the communication module no longer receives the abnormal data frame is determined as the second time.

[0020] In some implementations, if the buffer time has been generated, the communication module is controlled to send the master station data frame to the electric meter with a delay according to the buffer time.

[0021] In some implementations, controlling the communication module to send the master station data frame to the electric meter according to the buffer time delay includes:

[0022] After delaying according to the buffer time, determining whether the electric meter has an abnormal data frame using a first preset judgment condition;

[0023] If yes, the buffer time is accumulated according to the preset step time, and after delaying according to the accumulated buffer time, it is determined whether there is an abnormal data frame in the electric meter using the first preset judgment condition;

[0024] Until there is no abnormal data frame in the electric meter, the master station data frame is sent to the electric meter according to the accumulated buffer time delay.

[0025] In some implementations, if the accumulated buffer time exceeds a preset time threshold, the communication module is controlled to stop data communication between the electric meter and the master station, and the buffer time, abnormal data frame and master station data frame are cleared.

[0026] In a second aspect, an embodiment of the present invention provides a system for processing abnormal data, the system being used in a communication module for processing data communication between an electric meter and a master station, the system comprising:

[0027] an abnormal data frame determination module, used to receive a master station data frame sent from the master station to the communication module, and to determine whether the electric meter has generated an abnormal data frame using a first preset determination condition;

[0028] A timing module, used to determine the time when the abnormal data frame is obtained as the first time, and use the first preset judgment condition to judge the abnormal data frame generated in real time by the electric meter, and determine the time when the communication module no longer receives the abnormal data frame as the second time;

[0029] The electric meter data frame determination module is used to determine the buffer time according to the first moment and the second moment, and use the buffer time to send the master station data frame to the electric meter to generate the electric meter data frame; wherein the buffer time is used to delay the master station data frame to be sent to the electric meter;

[0030] The data processing module is used to receive the meter data frame sent by the meter and then send the meter data frame and buffer time to the main station.

[0031] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising: a processor and a memory; a computer program is stored in the memory, and when the computer program is executed by the processor, the steps of the method for processing abnormal data mentioned in the first aspect are implemented.

[0032] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, wherein when the computer program is executed by a processor, the steps of the method for processing abnormal data mentioned in the first aspect are implemented.

[0033] The embodiments of the present invention bring the following beneficial effects:

[0034] The present invention provides a method, system and electronic device for processing abnormal data, which are used in a communication module for processing data communication between an electric meter and a main station. In the process of processing abnormal data, a main station data frame sent from the main station to the communication module is first received, and a first preset judgment condition is used to judge whether the electric meter has generated an abnormal data frame; if it is an abnormal data frame, the acquisition time of the abnormal data frame is determined as a first time, and the first preset judgment condition is used to judge the abnormal data frame generated in real time by the electric meter, and the time when the communication module no longer receives the abnormal data frame is determined as a second time; then a buffer time is determined according to the first time and the second time, and the main station data frame is sent to the electric meter using the buffer time to generate an electric meter data frame; wherein the buffer time is used to delay the sending of the main station data frame to the electric meter; finally, after receiving the electric meter data frame sent by the electric meter, the electric meter data frame and the buffer time are sent to the main station. Without changing the existing hardware, the method timely obtains the abnormal data frames generated by the electric meter and stops sending them to the main station, thereby avoiding frequent sending of abnormal data to the main station and reducing the data transmission resources on the main station side. At the same time, the method can send the data frames to the main station in time when they are normal, realizing the automatic adjustment of the delay interval, thereby completely solving the problem of poor data interaction caused by abnormal data.

[0035] Other features and advantages of the present invention will be set forth in the following description, or some features and advantages may be inferred or unambiguously determined from the description, or may be learned by implementing the above-mentioned technology of the present invention.

[0036] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are specifically listed below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0038] Figure 1 A flowchart of a method for processing abnormal data provided by an embodiment of the present invention;

[0039] Figure 2 A flowchart after receiving a master station data frame sent from a master station to a communication module in a method for processing abnormal data provided by an embodiment of the present invention;

[0040] Figure 3A flowchart after using a first preset judgment condition to judge whether an electric meter has generated an abnormal data frame in a method for processing abnormal data provided by an embodiment of the present invention;

[0041] Figure 4 A flowchart of a method for processing abnormal data provided by an embodiment of the present invention for specifically determining the buffer time in a master station data frame;

[0042] Figure 5 A flowchart of a method for processing abnormal data provided by an embodiment of the present invention, in which a master station data frame is sent to an electric meter according to a buffer time delay;

[0043] Figure 6 A flowchart of another method for processing abnormal data provided by an embodiment of the present invention;

[0044] Figure 7 A schematic diagram of the structure of a system for processing abnormal data provided by an embodiment of the present invention;

[0045] Figure 8 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention.

[0046] icon:

[0047] 710-abnormal data frame determination module; 720-timing module; 730-electric meter data frame determination module; 740-data processing module;

[0048] 101 - processor; 102 - memory; 103 - bus; 104 - communication interface. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0050] As the level of intelligence of electric meters continues to improve, more and more electric meters have realized remote communication functions through the communication modules they are equipped with. When the communication module exchanges data, the communication antenna and other components in it will generate radio frequency radiation, which will interfere with the data of the relevant serial port channels of the communication module. Therefore, relevant anti-interference components will be set in the communication module to increase its anti-interference ability.

[0051] Since the electric meter is generally installed in a closed environment, the communication module will also be set up in this environment. The RF radiation intensity of the communication module is related to factors such as the antenna position, the base station environment, and the transmission power. Once the interference of the RF radiation exceeds the anti-interference ability of the communication module, it will cause abnormal data to appear in the relevant serial port channels of the electric meter, causing the meter side of the communication module to receive abnormal data. Moreover, once this type of interference occurs, there will be a steady stream of abnormal data sent to the main station, resulting in continuous RF radiation, entering a vicious cycle, resulting in additional data traffic consumption on the electric meter side. At the same time, the master station frequently receives abnormal data, which not only occupies the data transmission resources of the master station, but also increases the operating pressure of the master station.

[0052] In summary, in the existing process of processing abnormal data of electric meters, there is a lack of reasonable processing methods in the process of receiving abnormal data at the master station. Based on the above problems, the embodiments of the present invention provide a method, system and electronic device for processing abnormal data. Without changing the existing hardware, the abnormal data frames generated by the electric meter can be timely acquired and stopped from being sent to the master station, thereby avoiding frequent sending of abnormal data to the master station and reducing the data transmission resources at the master station. At the same time, the method can send data frames to the master station in a timely manner when they are normal, realizing the automatic adjustment of the delay interval, thereby completely solving the problem of poor data interaction caused by abnormal data.

[0053] To facilitate understanding of this embodiment, a method for processing abnormal data disclosed in an embodiment of the present invention is first introduced in detail. The method is used in a communication module for processing data communication between an electric meter and a main station. Specifically, the communication module is a communication component connecting the electric meter and the main station, and realizes data transmission and instruction interaction with the main station through a built-in related antenna module; the method is as follows Figure 1 As shown, the following steps are included:

[0054] Step S101 , receiving a master station data frame sent from a master station to a communication module, and using a first preset judgment condition to judge whether the electric meter has generated an abnormal data frame.

[0055] The master station data frame in the communication module is the data transmitted from the master station to the relevant serial port channel in the communication module. Under normal circumstances, the master station data frame is transmitted regularly according to the pre-defined data transmission rules, but the transmission process will be affected by the network environment of the relevant base station, the transmission power parameters of the communication module, etc., resulting in abnormal RF radiation intensity of the communication module, thereby interfering with the relevant data of the meter serial port channel, and finally generating abnormal data frames at the meter end, resulting in continuous interference of abnormal data frames on the sending interface between the meter and the communication module.

[0056] The abnormal data frame is determined by the first preset judgment condition, which includes various rules for judging the data in different fields of the meter data frame, such as the frame header, frame tail, check bit, etc. For example, the frame header of a normal meter data frame is 68H. If the frame header is not 68H, the meter data frame is judged as an abnormal data frame; the judgment process of the frame tail and the check bit is similar to that of the frame header, which will not be repeated here.

[0057] Step S102, if yes, the time when the abnormal data frame is obtained is determined as the first time, and the abnormal data frame generated in real time by the electric meter is judged using the first preset judgment condition, and the time when the communication module no longer receives the abnormal data frame is determined as the second time.

[0058] The abnormal data frame generated by the electric meter usually lasts for a period of time, so the duration needs to be acquired, and the current moment when the abnormal data frame is generated can be determined as the first moment, that is, the start moment of the abnormal data frame. Since the abnormal data frame will last, the first preset judgment condition is continued to be used to make a real-time judgment on the abnormal data frame generated by the electric meter until the abnormal data frame no longer exists, and the current acquisition moment at this time is determined as the second moment, that is, the end moment of the abnormal data frame.

[0059] Step S103, determining a buffer time according to the first moment and the second moment, and using the buffer time to send the master station data frame to the electric meter to generate an electric meter data frame; wherein the buffer time is used to delay sending the master station data frame to the electric meter.

[0060] The first moment is the moment when the meter is abnormal, and the second moment is the moment when the meter returns to normal. Therefore, the buffer time can be determined by the time interval between the first moment and the second moment; the buffer time is used as the delay time for the subsequent communication module to delay the master station data frame to be sent to the meter. Under normal circumstances, the buffer time is unchanged. After the buffer time, the meter is in normal working state, and then the master station data frame is sent to the meter, and the meter data frame is generated from the meter end.

[0061] Step S104, after receiving the meter data frame sent by the meter, the meter data frame and the buffer time are sent to the master station.

[0062] The meter data frame generated by the meter end is received by the communication module after being sent. After receiving the meter data frame sent by the meter, the communication module sends the meter data frame to the master station, thereby completing the complete data transmission process. Specifically, the buffer time is used to delay the master station data frame of the next frame from the communication module to the meter end. When the communication module receives the master station data frame sent from the master station again, it needs to be delayed according to the buffer time. After the delay is completed according to the buffer time, the first preset judgment condition is used to judge the abnormal data frame generated by the meter in real time. Usually, after the buffer time, the interference generated by the meter has ended. Therefore, after the delay is completed according to the buffer time, the master station data frame is sent to the meter to generate the meter data frame. After receiving the meter data frame sent by the meter, the meter data frame and the buffer time are sent to the master station, and this cycle is repeated.

[0063] It can be seen from the method for processing abnormal data provided in the above embodiment that this method, without changing the existing hardware between the electric meter and the main station, timely obtains the abnormal data frames generated by the electric meter and stops sending them to the main station, thereby avoiding frequent sending of abnormal data to the main station and reducing data transmission resources on the main station side.

[0064] In actual scenarios, it is necessary to determine the standardization of the master station data frame. In some embodiments, after receiving the master station data frame sent from the master station to the communication module, such as Figure 2 As shown, the method also includes:

[0065] Step S201, using a second preset judgment condition, judging whether the master station data frame is an abnormal master station data frame.

[0066] The second preset judgment condition is essentially different from the first preset judgment condition. The first preset judgment condition is to judge whether there is an abnormal data frame, while the second preset judgment condition is mainly to judge the legitimacy of the master station data frame. Normally, the master station data frame comes from the data request sent by the master station, which is generally normal. When the signal is unstable or other abnormalities occur during the transmission process, the master station data frame will be abnormal data. Therefore, it is still necessary to judge the legitimacy of the master station data frame.

[0067] Step S202: If yes, discard the master station data frame.

[0068] If the master station data frame is an abnormal data frame, it will be discarded; if the master station data frame is a normal data frame, it will be buffered in the relevant buffer of the communication module.

[0069] Since the abnormal data frame generated by the electric meter is not necessarily generated, in actual scenarios, the electric meter will not be affected during the transmission of the master station data frame. Therefore, in some embodiments, after using the first preset judgment condition to determine whether the electric meter has generated an abnormal data frame, the method is as follows: Figure 3 As shown, it also includes:

[0070] Step S301: If no abnormal data frame is generated, the master station data frame is sent to the electric meter to generate an electric meter data frame.

[0071] This step can be understood as executing the aforementioned step S103. Unlike step S103, this step does not generate buffer time. When the electric meter does not generate an abnormal data frame, the master station data frame is sent to the electric meter and an electric meter data frame is generated.

[0072] Step S302: after receiving the meter data frame sent by the meter, send the meter data frame to the master station.

[0073] This step is similar to the aforementioned step S104, but different from step S104 in that no buffer time is generated in this step, and thus this step only sends the meter data frame to the master station.

[0074] It is worth mentioning that the master station data frame will determine the buffer time through the above steps during the first transmission process, and the buffer time will be used for delay in the subsequent transmission process from the communication module to the electric meter. Therefore, in some implementations, it is also necessary to make a specific judgment on whether the buffer time has been generated, that is, to judge whether interference has occurred in the electric meter for the first time. Specifically, after using the first preset judgment condition to judge whether the electric meter has generated an abnormal data frame, such as Figure 4 As shown, the method also includes:

[0075] Step S401: If the electric meter generates an abnormal data frame, it is determined whether a buffer time is generated in the communication module.

[0076] The buffer time can be temporarily stored in the communication module, so by determining whether the buffer time in the communication module is generated, it can be determined whether the buffer time has been generated, thereby determining whether the interference of the electric meter occurs for the first time.

[0077] In step S402, if no buffer time is generated, the time when the abnormal data frame is obtained is determined as the first time, and the abnormal data frame generated in real time by the electric meter is judged using the first preset judgment condition, and the time when the communication module no longer receives the abnormal data frame is determined as the second time.

[0078] If the buffer time is not generated, it indicates that the electric meter is interfered for the first time and the specific buffer time has not been calculated. Therefore, the aforementioned step S102 can be continued to be executed, and the time when the abnormal data frame is acquired is determined as the first time. The abnormal data frame generated in real time by the electric meter is judged using the first preset judgment condition, and the time when the communication module no longer receives the abnormal data frame is determined as the second time.

[0079] In some implementations, if the buffer time has been generated, the communication module is controlled to send the master station data frame to the electric meter with a delay according to the buffer time.

[0080] If the buffer time has been generated, it indicates that the electric meter has been disturbed, and the buffer time is used to delay the sending of the next master station data frame. When the communication module receives the master station data frame sent from the master station again, it is necessary to send the master station data frame to the electric meter with a delay of the buffer time. After the delay is completed according to the buffer time, the first preset judgment condition is used to judge the abnormal data frame generated by the electric meter in real time. Usually, after the buffer time, the interference generated by the electric meter has ended. Therefore, after the delay is completed according to the buffer time, the master station data frame is sent to the electric meter to generate the electric meter data frame, and then after receiving the electric meter data frame sent by the electric meter, the electric meter data frame is sent to the master station, and this cycle is repeated.

[0081] Normally, the buffer time is constant, but in special cases, the buffer time may change with the influence of the signal environment and the operating status of the equipment. Therefore, it is necessary to make appropriate adjustments in the process of using the buffer time for delay. In some embodiments, the control communication module sends the master station data frame to the electric meter according to the buffer time delay, such as Figure 5 As shown, including:

[0082] Step S501, after delaying according to the buffer time, use the first preset judgment condition to judge whether there is an abnormal data frame in the electric meter.

[0083] After the delay is completed according to the buffer time, the first preset judgment condition is used again to judge the abnormal data frame in the electric meter.

[0084] Step S502: If yes, the buffer time is accumulated according to the preset step length, and after delaying according to the accumulated buffer time, a first preset judgment condition is used to judge whether there is an abnormal data frame in the electric meter.

[0085] If there are still abnormal data frames, it means that the current buffer time is not enough to meet the delay requirement of the abnormal data frames generated by the electric meter, so the buffer time needs to be accumulated according to the preset step length. For example, the step length is 1 second, and after each increase of 1 second, the first preset judgment condition is used to judge whether there are abnormal data frames in the electric meter; if there are still abnormal data frames, the judgment is continued after increasing by 1 second until there are no abnormal data frames.

[0086] Step S503 , until there is no abnormal data frame in the electric meter, the master station data frame is sent to the electric meter according to the accumulated buffer time delay.

[0087] At this time, the original buffer time plus the step time is the new buffer time; subsequently, the master station data frame is sent to the electric meter according to the accumulated buffer time delay.

[0088] The buffer time in actual scenarios is an upper limit and is not infinitely accumulated. Therefore, in some embodiments, if the accumulated buffer time exceeds a preset time threshold, the communication module is controlled to stop data communication between the meter and the master station, and the buffer time, abnormal data frame and master station data frame are cleared.

[0089] See Figure 6 Flowchart of another method for processing abnormal data shown. Specifically, when the relevant serial port of the communication module is interfered, it often occurs during the registration process or the process of interacting with the base station. It is mainly manifested in that when the electric meter has no data to send, abnormal data will be continuously sent to the communication module on the serial port line. If the communication module continues to be controlled to communicate with the main station at this time, this interference will continue to exist. Therefore, when the communication module receives the meter data frame, it first uses the first preset judgment condition to judge the frame header, frame tail and check bit of the meter data frame to determine whether the meter data frame is an abnormal data frame. If it is found to be an abnormal data frame, the meter data frame will no longer be sent to the main station, nor will any interactive communication be performed with the main station. At the same time, the first timer is started, and a delay is performed with 500ms as the benchmark. At the same time, the meter data frame received in the serial port continues to be judged using the first preset judgment condition. When the communication module eliminates the interference absorption and no abnormal data is generated in the serial port between the communication module and the electric meter, stop the delay, record the delay time, and determine it as the first delay interval. If the electric meter has new data to transmit later, it will be delayed according to the recorded first delay interval.

[0090] When the communication module receives the downlink data from the master station, i.e., the master station data frame, the frame header, frame tail and check bit of the master station data frame are judged by the second preset judgment condition to determine whether the master station data frame is a legal data frame. If it is legal data, the data sent by the master station is cached in the communication module; if it is abnormal data, it is discarded. Then the master station data frame is forwarded to the electric meter, and the meter data frame between the communication module and the electric meter is judged by the first preset judgment condition. When interference occurs in the serial port, the communication module is controlled to stop receiving the master station data frame sent by the master station, and the current acquisition time of the abnormal data frame is determined as the third time. Then 500ms is used as a reference for delay. When there is no abnormal data in the serial port, the delay is stopped, the current acquisition time of the normal data frame is determined as the fourth time and the second delay interval is determined, and then the cached data is sent to the electric meter. After the electric meter replies with data, the integrity of the data is detected and the data is sent to the master station. When the master station has data downlink again in the future, the data is sent to the electric meter directly after the delay is directly delayed according to the original recorded delay time.

[0091] When communicating at a certain delay, there will still be occasional abnormal data on the serial port; if it occurs, the delay time can be stepped by 500ms based on the original delay time. Since interference is closely related to the base station environment, this process will not always exist. Therefore, in actual scenarios, there is not only an increase in delay time, but also a decrease in delay time. After communicating at a certain delay time, if no interference is found, the solidified delay time will be stepped down by 500ms synchronously. In this way, it can adapt to interference in real time without solidifying the time delay.

[0092] It can be seen from the method for processing abnormal data provided in the above embodiment that this method, without changing the existing hardware, timely obtains the abnormal data frames generated by the meter end and stops sending them to the main station, thereby avoiding frequent sending of abnormal data to the main station and reducing the data transmission resources at the main station end; at the same time, this method can send the data frame to the main station in time when it is normal, realizes the automatic adjustment of the delay interval, and completely solves the problem of poor data interaction caused by abnormal data.

[0093] Corresponding to the abnormal data processing method mentioned in the above embodiment, the embodiment of the present invention also provides an abnormal data processing system, which is used in a communication module for processing data communication between an electric meter and a master station, such as Figure 7 As shown, the system includes:

[0094] The abnormal data frame determination module 710 is used to receive the master station data frame sent from the master station to the communication module, and use the first preset judgment condition to determine whether the electric meter has generated an abnormal data frame;

[0095] The timing module 720 is used to determine the time when the abnormal data frame is obtained as the first time, and use the first preset judgment condition to judge the abnormal data frame generated in real time by the electric meter, and determine the time when the communication module no longer receives the abnormal data frame as the second time;

[0096] The electric meter data frame determination module 730 is used to determine the buffer time according to the first moment and the second moment, and use the buffer time to send the master station data frame to the electric meter to generate the electric meter data frame; wherein the buffer time is used to delay the master station data frame to be sent to the electric meter;

[0097] The data processing module 740 is used to send the meter data frame and the buffer time to the main station after receiving the meter data frame sent by the meter.

[0098] The abnormal data processing system provided in the embodiment of the present invention has the same technical features as the abnormal data processing method provided in the above embodiment, so it can also solve the same technical problems and achieve the same technical effects. For the sake of brief description, for matters not mentioned in the embodiment part, reference can be made to the corresponding contents in the above embodiment.

[0099] This embodiment also provides an electronic device, which is a structural diagram of the electronic device as shown in Figure 8 As shown, the device includes a processor 101 and a memory 102; wherein the memory 102 is used to store one or more computer instructions, and the one or more computer instructions are executed by the processor to implement the above-mentioned abnormal data processing method.

[0100] Figure 8 The electronic device shown further includes a bus 103 and a communication interface 104 , and the processor 101 , the communication interface 104 and the memory 102 are connected via the bus 103 .

[0101] The memory 102 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The bus 103 may be an ISA bus, a PCI bus, or an EISA bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0102] The communication interface 104 is used to connect to at least one user terminal and other network units through a network interface, and send the encapsulated IPv4 message or IPv4 message to the user terminal through the network interface.

[0103] The processor 101 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 101. The above processor 101 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The disclosed methods, steps and logic block diagrams in the embodiments of the present disclosure can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present disclosure can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 102, and the processor 101 reads the information in the memory 102 and completes the steps of the method of the above embodiment in combination with its hardware.

[0104] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method of the above embodiment are executed.

[0105] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0106] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0107] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0108] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present invention can essentially or in other words, the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0109] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A method for processing abnormal data, characterized in that: The method is used in a communication module for processing data communication between an electric meter and a master station, and the method comprises: receiving a master station data frame sent from the master station to the communication module, and determining whether the electric meter generates an abnormal data frame using a first preset determination condition; If yes, the acquisition time of the abnormal data frame is determined as the first time, and the abnormal data frame generated by the electric meter in real time is judged by using the first preset judgment condition, and the time when the communication module no longer receives the abnormal data frame is determined as the second time; Determine a buffer time according to the first moment and the second moment, and use the buffer time to send the master station data frame to the electric meter to generate an electric meter data frame; wherein the buffer time is used to delay sending the master station data frame to the electric meter; After receiving the meter data frame sent by the meter, the meter data frame is sent to the master station.

2. The method for processing abnormal data according to claim 1, characterized in that: After receiving the master station data frame sent from the master station to the communication module, the method further includes: Using a second preset judgment condition, judging whether the master station data frame is an abnormal master station data frame; If yes, the master station data frame is discarded.

3. The method for processing abnormal data according to claim 1, characterized in that: After determining whether the electric meter generates an abnormal data frame using the first preset determination condition, the method further includes: If not, sending the master station data frame to the electric meter to generate an electric meter data frame; After receiving the meter data frame sent by the meter, the meter data frame is sent to the master station.

4. The method for processing abnormal data according to claim 1, characterized in that: After determining whether the electric meter generates an abnormal data frame using the first preset determination condition, the method further includes: If yes, determining whether the buffer time is generated in the communication module; If the buffer time is not generated, the time when the abnormal data frame is obtained is determined as the first time, and the abnormal data frame generated by the electric meter in real time is judged using the first preset judgment condition, and the time when the communication module no longer receives the abnormal data frame is determined as the second time.

5. The method for processing abnormal data according to claim 4, characterized in that: If the buffer time has been generated, the communication module is controlled to send the master station data frame to the electric meter with a delay according to the buffer time.

6. The method for processing abnormal data according to claim 5, characterized in that: Controlling the communication module to send the master station data frame to the electric meter according to the buffer time delay includes: After delaying according to the buffer time, determining whether the electric meter has the abnormal data frame using a first preset judgment condition; If yes, the buffer time is accumulated according to the preset step length, and after delaying according to the accumulated buffer time, a first preset judgment condition is used to judge whether the electric meter has the abnormal data frame; Until the abnormal data frame does not exist in the electric meter, the master station data frame is sent to the electric meter according to the accumulated buffer time delay.

7. The method for processing abnormal data according to claim 6, characterized in that: If the accumulated buffer time exceeds a preset time threshold, the communication module is controlled to stop data communication between the electric meter and the master station, and the buffer time, the abnormal data frame and the master station data frame are cleared.

8. A system for processing abnormal data, characterized in that: The system is used in the communication module for processing data communication between the electric meter and the main station. The system includes: an abnormal data frame determination module, configured to receive a master station data frame sent from the master station to the communication module, and determine whether the electric meter has generated an abnormal data frame using a first preset determination condition; a timing module, configured to determine the time at which the abnormal data frame is acquired as a first time, and to judge the abnormal data frame generated in real time by the electric meter using the first preset judgment condition, and to determine the time at which the communication module no longer receives the abnormal data frame as a second time; An electric meter data frame determination module, configured to determine a buffer time according to the first moment and the second moment, and use the buffer time to send the master station data frame to the electric meter to generate an electric meter data frame; wherein the buffer time is used to delay sending the master station data frame to the electric meter; The data processing module is used for sending the meter data frame and the buffer time to the main station after receiving the meter data frame sent by the meter.

9. An electronic device, characterized in that: include: A processor and a storage device; a computer program is stored on the storage device, and when the computer program is executed by the processor, the steps of the method for processing abnormal data as described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for processing abnormal data according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Link fault positioning method and system of packet transport network (PTN)

    CN101986604A

  • Master-slave communication method and master-slave communication system

    CN113259215A