A meter searching method, circuit breaker, electric meter and computer readable storage medium

By optimizing the format of the meter search request frame and response frame, and utilizing a counter and a preset two-dimensional array, the problem of communication conflict between the smart circuit breaker and the electricity meter was solved, achieving an efficient meter search process and improving the real-time performance and convenience of meter reading.

CN116367011BActive Publication Date: 2025-12-05YUNNAN POWER GRID CO LTD ELECTRIC POWER RES INST
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310011269.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-05
Publication Date
2025-12-05
Estimated Expiration
2043-01-05

AI Technical Summary

Technical Problem

In the prior art, when intelligent circuit breakers perform meter searching, the existing methods for intelligent circuit breaker meter searching, intelligent appliance meter searching, and intelligent appliance meter searching present technical problems.

Method used

By sending a meter search request frame to at least one meter and clearing the first and second counters, and searching for meter search response frames in the receiving buffer at a first preset time interval, the format of the meter search request frame and the meter search response frame is optimized, communication conflicts are reduced, and the real-time performance and convenience of meter reading are improved.

Benefits of technology

This effectively avoids communication conflicts between smart circuit breakers and electricity meters, improving the efficiency of meter searching and the real-time nature and convenience of meter reading.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116367011B_ABST
    Figure CN116367011B_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses a meter searching method, a circuit breaker, an electric meter and a computer readable storage medium, relates to the technical field of circuit breakers, and the method comprises the following steps: sending a meter searching request frame to at least one electric meter, and clearing a first counter and a second counter; searching for a meter searching response frame in a receiving buffer area at a first preset time interval, wherein the receiving buffer area is used for storing the meter searching response frame returned by the at least one electric meter at a second preset time interval; storing the meter address of the electric meter corresponding to the meter searching response frame meeting a standard response frame; and if the value of the first counter is greater than a preset value, searching for all meter searching response frames according to a preset two-dimensional array and the second counter. The application can greatly avoid the communication conflict between the circuit breaker and the electric meter, reduce the time consumption of the whole meter searching process, and improve the real-time performance and convenience of meter reading.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of circuit breakers, in particular to a meter searching method, a circuit breaker, an electric meter and a computer readable storage medium. BACKGROUND

[0002] With the development of Internet technology, the intelligent management of electricity is increasingly concerned by the public. In a low-voltage transformer area, the correctness and timeliness of the meter searching of the intelligent circuit breaker are the basis for the normal work of the intelligent identification and topology identification. Only when the intelligent circuit breaker correctly searches the electric meter mounted on the data bus, can the edge computing functions including topology identification, line loss analysis and electric meter abnormality identification be performed.

[0003] In actual use, due to user information changes, electric meter replacement, and transformer body upgrading and reconstruction, the mounted electric meter often changes, causing a series of production and life problems. At present, the meter searching of the intelligent circuit breaker often adopts a step-by-step reduction method. Due to the communication conflict between the communication bus between the intelligent circuit breaker and the electric meter, the meter searching takes a long time, greatly affecting the real-time and convenience of meter reading. SUMMARY

[0004] Therefore, one of the purposes of the present application is to provide a meter searching method, a circuit breaker, an electric meter and a computer readable storage medium, which at least solve part of the above technical problems.

[0005] In a first aspect, an embodiment of the present application provides a meter searching method applied to a circuit breaker, and the method comprises the following steps.

[0006] sending a meter searching request frame to at least one electric meter, and clearing a first counter and a second counter, wherein the first counter is used to record time, and the second counter is used to record the number of meter searching times;

[0007] searching a meter searching response frame in a receiving buffer area according to a first preset time interval, wherein the receiving buffer area is used to store the meter searching response frame returned by the at least one electric meter according to a second preset time interval;

[0008] storing the meter address of the electric meter corresponding to the meter searching response frame conforming to a standard response frame;

[0009] if the value of the first counter is greater than a preset value, searching all meter searching response frames according to a preset two-dimensional array and the second counter, wherein the preset two-dimensional array is used to store the all meter searching response frames.

[0010] In a possible implementation, before the step of sending the meter searching request frame to the at least one electric meter, the method further comprises the following steps.

[0011] If the preset instant meter searching instruction and / or the preset meter searching period is monitored, a sending buffer is initialized and the meter searching request frame is sent to the at least one meter, wherein the sending buffer is used to store the meter searching request frame.

[0012] In a possible implementation, after searching the meter searching response frame in the receiving buffer according to the first preset time interval, the method further comprises:

[0013] If the meter searching response frame that does not conform to the standard response frame is detected, a meter communication conflict event is recorded.

[0014] In a possible implementation, the step of searching all the meter searching response frames according to the preset two-dimensional array and the second counter comprises:

[0015] A preset two-dimensional array is formed based on the preset two-dimensional array, the value of the second counter and a preset variable, wherein the preset variable has a value range of 0 to 99.

[0016] If the meter communication conflict event is detected in the preset two-dimensional array, the preset two-dimensional array is cleared and the value of the second counter is accumulated.

[0017] The wildcard corresponding to the value of the second counter in the meter searching request frame is replaced by the preset variable, and the step of sending the meter searching request frame to the at least one meter is performed.

[0018] If the meter communication conflict event is not detected in the preset two-dimensional array, the value of the second counter is decremented until the value of the second counter is less than 0, and the search of all the meter searching response frames is completed.

[0019] In a possible implementation, the step of decrementing the value of the second counter until the value of the second counter is less than 0 further comprises:

[0020] If the value of the second counter after being decremented once is still greater than or equal to 0, the step of forming the preset two-dimensional array based on the preset two-dimensional array, the value of the second counter and the preset variable is performed.

[0021] In a possible implementation, neither the meter searching request frame nor the meter searching response frame contains a frame length and a data field.

[0022] In a second aspect, the embodiments of the present application provide a meter searching method, applied to a meter, and the method comprises:

[0023] The received meter searching request frame is compared with a meter address of the meter.

[0024] If the comparison passes, a preset delay counter is cleared and a delay response time is set for the meter address of the comparison pass;

[0025] A meter search response frame is sent to the circuit breaker according to the delay response time.

[0026] In a third aspect, an embodiment of the present application provides a circuit breaker, which comprises a memory and a processor, and the memory stores a computer program which, when executed by the processor, implements the meter search method provided in the first aspect.

[0027] In a fourth aspect, an embodiment of the present application provides an electric meter, which comprises a memory and a processor, and the memory stores a computer program which, when executed by the processor, implements the meter search method provided in the second aspect.

[0028] In a fifth aspect, an embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the computer program, when executed by one or more processors, implements the meter search method provided in the first aspect or the meter search method provided in the second aspect.

[0029] The meter search method provided in the embodiments of the present application can effectively avoid communication conflicts between the circuit breaker and the electric meter by sending a meter search request frame to at least one electric meter, clearing a first counter and a second counter, and searching for a meter search response frame in a receiving buffer area at a first preset time interval, wherein the receiving buffer area is used to store the meter search response frame returned by the at least one electric meter at a second preset time interval. Meanwhile, the meter address of the electric meter corresponding to a standard response frame is stored, and all the meter search response frames are searched according to a preset two-dimensional array and the second counter, thereby reducing the time consumption of the entire meter search process and improving the real-time performance and convenience of meter reading. BRIEF DESCRIPTION OF DRAWINGS

[0030] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. It should be understood that the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative effort on the basis of these drawings.

[0031] Figure 1 An application environment diagram of a meter search method provided in an embodiment of the present application is shown;

[0032] Figure 2 A method flowchart of a meter search method provided in an embodiment of the present application is shown;

[0033] Figure 3A frame format diagram of a search table request frame and a search table response frame involved in a search table method provided by an embodiment of the present application is shown.

[0034] Figure 4 A first search table flow chart involved in a search table method provided by an embodiment of the present application is shown.

[0035] Figure 5 A method flow chart of another search table method provided by an embodiment of the present application is shown.

[0036] Figure 6 A second search table flow chart involved in another search table method provided by an embodiment of the present application is shown.

[0037] Figure 7 An internal structure diagram of a circuit breaker provided by an embodiment of the present application is shown.

[0038] Figure 8 An internal structure diagram of an electric meter provided by an embodiment of the present application is shown.

[0039] Icon:

[0040] Master station 100, intelligent terminal 110, circuit breaker 120, communication bus 130, electric meter 140. DETAILED DESCRIPTION

[0041] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0042] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments of the present application. The components of the embodiments of the present application described and shown in the drawings herein can be arranged and designed in various different configurations.

[0043] Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0044] It should be noted that like reference numerals and characters refer to like elements throughout the following figures and the written description. Thus, once any aspect is defined in one figure, it is understood that it is not necessary to re-define the element in subsequent figures.

[0045] In general, the expression "or" or "at least one of A or / and B" means any combination of listed terms and all possible combinations thereof. For example, the expression "A or B" or "at least one of A or / and B" can include A alone, B alone, or both A and B.

[0046] In addition, the terms "first", "second", and the like are used only to distinguish descriptions, and cannot be understood as indicating or implying relative importance.

[0047] It should be noted that the features of the embodiments of the present application can be combined with each other without conflict.

[0048] Please refer to Figure 1 , Figure 1 An application environment diagram of a meter searching method provided by an embodiment of the present application is shown in FIG. 1. In the embodiment, the master station 100 can realize remote monitoring of slave stations, which can include an intelligent terminal 110, a circuit breaker 120, and a meter 140. The intelligent terminal 110 has basic functions such as communication, information storage, instruction receiving and issuing, and the like. The intelligent terminal 110 can be a computer or a smart phone. In the embodiment and the following embodiments, the circuit breaker 120 and the meter 140 are intelligent circuit breakers and intelligent meters respectively, and both have functions such as information storage, acquisition, and instruction sending and receiving. In the embodiment and the following embodiments, the intelligent circuit breaker is denoted as the circuit breaker 120, and the intelligent meter is denoted as the meter 140 for simplification of description.

[0049] In addition, the communication mode between the intelligent terminal 110 and the circuit breaker 120 includes at least one of low-voltage power line high-speed carrier communication (HPLC) and Bluetooth, and the specific communication mode can be selected according to the actual use environment and specific requirements. The circuit breaker 120 and the meter 140 are connected through a communication bus 130, and the communication bus 130 in the embodiment can use a 485 bus. The communication protocol used for communication between the intelligent terminal 110 and the circuit breaker 120, and between the circuit breaker 120 and the meter 140 is a DL / T485 protocol.

[0050] Please refer to Figure 2 , Figure 2 A method flowchart of a meter searching method provided by an embodiment of the present application is shown in FIG. 2. The meter searching method is applied to a circuit breaker, and each step of the meter searching method will be described in detail below.

[0051] S210, sending a meter searching request frame to at least one meter, and clearing the first counter and the second counter, wherein the first counter is used to record time, and the second counter is used to record the number of times of searching.

[0052] In the embodiment, the sending of the meter searching request frame by the circuit breaker 120 to the meter 140 can start the meter searching, the first counter and the second counter are both arranged in the circuit breaker 120, specifically, the initial values of the first counter and the second counter are both 0, after the sending of the meter searching request frame is completed, the circuit breaker 120 starts to receive, at the same time, the value of the first counter is increased by 1 every 1 ms, and the value of the second counter is 1, when it is detected that the circuit breaker 120 sends the meter searching request frame to the meter 140 again, the value of the second counter is increased by 1. Exemplarily, 100 ms after the circuit breaker 120 starts to receive, the value of the first counter is 100.

[0053] The meter searching request frame is composed of multiple bytes, the processor or the processing chip in the circuit breaker 120 records every time a byte is sent, when it is detected that the bytes of a meter searching request frame are all sent, the processor or the processing chip starts the receiving function of the circuit breaker 120, so as to receive the feedback information of the meters hung on the circuit breaker 120.

[0054] Optionally, before the sending of the meter searching request frame to the at least one meter, the method further comprises:

[0055] If the preset instant meter searching instruction and / or the preset meter searching period are monitored, a sending buffer area is initialized and the meter searching request frame is sent to the at least one meter, wherein the sending buffer area is used to store the meter searching request frame.

[0056] In the embodiment, the preset meter searching period is set in the circuit breaker 120, when it is detected that the preset meter searching period has arrived, the circuit breaker 120 sends the meter searching request frame to the meter 140 through the bus, the preset meter searching period can be set as 30 minutes, 12 hours or 1 day, the specific period can be selected according to actual needs, which is not limited in the embodiment.

[0057] In a possible case, for example, when the preset meter searching period is 12 hours, the meter 140 in the low-voltage area is replaced due to failure or added when the meter searching just ends and the next preset meter searching period has not come, in this case, the meter address of the added meter is still unknown, and the meter address of the replaced meter is different from the meter address of the original meter, if the meter searching is not performed in time, the real-time performance of meter reading will be greatly affected. The preset instant meter searching instruction can reduce the influence on the real-time performance of meter reading in this case, specifically, when the added meter, the replaced meter, or even the added low-voltage area appears before the preset meter searching period, the master station 100 or the intelligent terminal 110 sends the preset instant meter searching instruction to the circuit breaker 120 to instruct the circuit breaker 120 to start meter searching, and the real-time performance of meter reading can be effectively improved.

[0058] The preset instant meter searching instruction is a standard DL / T645 protocol 14H write data command, the data identification code of which is 04AAAAAA, and when the data identification code is written as 0X01, it indicates that the meter searching can be started.

[0059] The DL / T645 communication protocol used between the circuit breaker 120 and the meter 140 cannot effectively improve the meter searching efficiency, the DL / T645 communication protocol used in the embodiment is self-defined and can improve the meter searching efficiency.

[0060] In a possible implementation, the meter searching request frame and / or the meter searching response frame do not contain the frame length and the data field.

[0061] Specifically, refer to Figure 3 , Figure 3 The figure shows the frame format of the meter searching request frame and the meter searching response frame involved in the meter searching method provided in the embodiment of the application, wherein, in the meter searching request frame and the meter searching response frame, Figure 3In the embodiment, (a) shows a frame format diagram of the search table request frame provided by the embodiment, (b) shows a frame format diagram of the search table response frame provided by the embodiment. The search table request frame and the search table response frame do not include frame length and data field. 18H is a control code, 98H is a normal response control code, A0A1A2A3A4A5 is an address of 6 bytes. From the low byte to the high byte, a byte can be represented by a wildcard AA. If the address of a byte is represented by the wildcard AA, it means that the electric meter 140 does not compare the address of the byte. For example, when the circuit breaker 120 sends a search table request with the address of the wildcard 0900AAAAAAAA, the electric meters with the address of the low two bytes of 0009 all meet the address condition and all require to return the search table response frame. Taking the search table request frame as an example, after removing the frame length and the data field, the time consumption of the circuit breaker 120 in sending the search table request frame can be shortened. At the same time, the electric meter 140 feeds back the search table response frame to the circuit breaker 120 according to the received search table request frame. Optimizing the frame format of the search table request frame can also improve the response speed of the electric meter 140, thereby improving the search table efficiency.

[0062] S220, searching for the search table response frame in the receiving buffer area according to a first preset time interval, wherein the receiving buffer area is used to store the search table response frame returned by the at least one electric meter according to a second preset time interval.

[0063] In the embodiment, the first preset time interval can be set separately or can be understood as the preset search table period in the above embodiment. When the preset search table period is too long and modification is inconvenient, a first preset time interval shorter than the preset search table period can be set for searching.

[0064] The communication between the circuit breaker 120 and the electric meter 140 using the 485 bus will inevitably encounter the communication conflict of the 485 bus. For example, if the circuit breaker 120 sends a search request frame, there are at least two electric meters that simultaneously feed back to the circuit breaker 120 according to the received search table request frame. In this case, the communication conflict problem is easy to occur, the search table time is long, and the real-time and convenience of the meter reading are seriously affected.

[0065] The search table response frame in the embodiment is fed back to the circuit breaker 120 after the second time interval. It should be noted that the second time interval corresponding to different search table response frames is not the same. It can also be understood that the feedback time of the electric meter with different addresses to the circuit breaker is different. In the case that multiple electric meters simultaneously feed back the search table response frame to the circuit breaker 120, the time of each electric meter feeding back the search table response frame is different, which can effectively avoid the communication conflict problem of the 485 bus. Moreover, through different feedback times, the corresponding byte address can be determined, and then the meter address of the corresponding electric meter is determined, thereby improving the search table efficiency.

[0066] For example, if the meter address low two bytes address is 0009, the meter 140 will feedback to the circuit breaker 120 when the meter address low two bytes address is 0900AAAAAAA A in the search table request frame. The feedback time is determined by the third byte address value of the meter address low three bytes. The meter with the meter address low three bytes of 000009 will feedback immediately when receiving the search table request frame of 68H0900AAAAAAAA68H18HCS16H. The meter with the meter address low three bytes of 010009 will feedback after 100 ms. The meter with the meter address low three bytes of 990009 will feedback after 9900 ms. The feedback time of the 100 meters with the third byte of the meter address low byte being 00-99 to the circuit breaker 120 is different, which can greatly avoid the 485 bus communication conflict. In the search table request frame, the wildcard AA is used to indicate that the meters with the byte address of AA from 00 to 99 need to feedback to the circuit breaker. To ensure the normal feedback of the meters, for example, at the 9600 baud rate, the protocol stipulates that the feedback time error of the meters with adjacent addresses cannot exceed ±50 ms.

[0067] It should be noted that in the present embodiment, the search table request frame is taken as 68HA0A1A2A3A4A568H18HCS16H, the low byte address is A0, the low two bytes address is A0A1, the low three bytes address is A0A1A2, A0 can also be represented by the 0th byte, and A1 can be represented by the 1st byte.

[0068] In the above example, the feedback time interval of the meters 140 with adjacent addresses that need to feedback according to the search table request frame is 100 ms. For example, at the 9600 baud rate, it takes about 1 ms to send a byte. The 100 ms can be set to have sufficient time for the feedback time of a search table response frame. If the adjacent meters 140 need to feedback to the circuit breaker 120 at the same time, the short feedback time interval will cause the current meter 140 to not have finished feedback, and the adjacent meter 140 starts to feedback, causing the 485 bus communication conflict. Setting a sufficient feedback time interval can greatly avoid the 485 bus communication conflict. It should be understood that the feedback time interval can also be set to 150 ms or 200 ms, which is within the protection scope of the present embodiment, and can be selected according to the actual demand. In order to facilitate unified description, the feedback time interval in the present embodiment and the following embodiments is taken as 100 ms for example.

[0069] S230, storing the meter address of the meter corresponding to the search table response frame of the standard response frame.

[0070] Specifically, the standard response frame can refer to the meter search response frame as shown in Figure 3 (b). If the format of the meter search response frame fed back by the meter 140 corresponds to the format of the standard response frame, the circuit breaker 120 stores the meter address of the meter 140 in the meter search response frame. Alternatively, the meter address of the meter 140 can be stored in a receiving buffer area inside the circuit breaker 120. In addition, the circuit breaker 120 can periodically delete the meter addresses stored in the receiving buffer area. For example, the circuit breaker 120 can mark the meter addresses stored for 30 days as historical addresses, or delete the meter addresses stored for the first 5 to 10 times or more than 10 times of meter search, so as to ensure that there is enough storage space inside the circuit breaker 120 and reduce the storage cost of the circuit breaker 120.

[0071] Alternatively, after searching for the meter search response frame in the receiving buffer area at the first preset time interval, the method further comprises:

[0072] If it is detected that there is a meter search response frame that does not conform to the standard response frame, record a meter 140 communication conflict event.

[0073] S240, if the value of the first counter is greater than a preset value, search all meter search response frames according to a preset two-dimensional array and the second counter, wherein the preset two-dimensional array is used to store the all meter search response frames.

[0074] In this embodiment, the setting of the preset value is affected by the interval time fed back in the above embodiment. For example, if the interval time fed back is 100 ms, the time length after the meters 140 with the meter addresses from 000000000009 to 000000990009 have finished feeding back is 10000 ms, and the corresponding preset value is 10000.

[0075] The preset two-dimensional array defined in the circuit breaker 120 is set in the receiving buffer area and is specifically used to store the meter addresses fed back by the meters 140. The preset two-dimensional array has a form of V_ucAddr[5]

[100] , and the corresponding meter address in the meter search response frame is A0A1A2A3A4A5. A0 is the lowest byte, and from A0 to A4, there are a total of 5 bytes, that is, the length of the first data of the two-dimensional array is 5. The address of each byte is from 00 to 99, that is, the length of the second data of the two-dimensional array is 5500, and the preset two-dimensional array can store a total of 500 data.

[0076] For example, if the current search is for the lowest byte, and the address of the lowest byte is 1, the preset two-dimensional array is V_ucAddr

[00]

[01] . The preset two-dimensional array can also record communication conflict events, such as a communication conflict occurring 100 ms after the breaker 120 opens to receive a meter searching feedback frame, indicating that there are multiple meters with the lowest byte address of 01, and the preset two-dimensional array V_ucAddr[N]

[01] has a corresponding value of 0xFF, where N represents the current byte or the current meter searching.

[0077] In addition, the search frequency of the breaker 120 for searching the meter searching response frame in the receiving buffer area can be selected according to actual needs, such as 1 ms, 5 ms, or 10 ms.

[0078] From the above analysis, it can be seen that the meter searching method provided by the embodiments of the present application can effectively avoid communication conflicts between the breaker and the meter by sending a meter searching request frame to at least one meter, clearing the first counter and the second counter, and searching for a meter searching response frame in the receiving buffer area at a first preset time interval, where the receiving buffer area is used to store the meter searching response frame returned by at least one meter at a second preset time interval. At the same time, the meter address of the meter corresponding to the standard response frame is stored, and all meter searching response frames are searched according to the preset two-dimensional array and the second counter. The format of the meter searching request frame and the meter searching response frame in the entire process is optimized, the time consumption of the entire meter searching process is reduced, and the real-time and convenience of meter reading are improved.

[0079] In a possible implementation, the step of searching all meter searching response frames according to the preset two-dimensional array and the second counter includes:

[0080] forming a preset two-dimensional array based on the preset two-dimensional array, the value of the second counter, and a preset variable, where the preset variable has a value range of 0 to 99;

[0081] if the communication conflict event of the meter 140 is detected in the preset two-dimensional array, clearing the preset two-dimensional array and accumulating the value of the second counter;

[0082] replacing the wildcard corresponding to the value of the second counter in the meter searching request frame with the preset variable, and performing the step of sending the meter searching request frame to at least one meter 140;

[0083] if the communication conflict event of the meter 140 is not detected in the preset two-dimensional array, decrementing the value of the second counter until the value of the second counter is less than 0, and completing the search for all meter searching response frames.

[0084] In the embodiment, i represents the preset variable i, the value range of which is between 0 and 99, the accumulated value and the decreased value of the second counter are both 1, V_usTimeCNT represents the value of the first counter, and V_ucRound represents the value of the second counter. For the preset two-dimensional array V_ucAddr[5]

[100] in the above embodiment, the circuit breaker 120 can search the value of the two-dimensional array V_ucAddr[V_ucRound][i], and if V_ucAddr[V_ucRound][i] = 0xFF, the two-dimensional array V_ucAddr[V_ucRound][i] is cleared, the value of the second counter V_ucRound is increased by 1, the wildcard AA corresponding to the searched address in the search request frame in the sending buffer is replaced by i, and then the replaced search request frame is sent to the electric meter 140.

[0085] Optionally, the step of decreasing the value of the second counter until the value of the second counter is less than 0 further comprises:

[0086] If the value of the second counter after being decreased once is still greater than or equal to 0, the step of forming a target two-dimensional array based on the preset two-dimensional array, the value of the second counter and a preset variable is performed.

[0087] Specifically, if V_ucAddr[V_ucRound][i] in the above embodiment is not found to be 0xFF after searching, the value of the second counter V_ucRound is decreased by 1, and if the value of V_ucRound is still greater than or equal to 0, the values in the preset two-dimensional array V_ucAddr[5]

[100] are searched again, and if the value of V_ucRound is less than 0, the current search is ended.

[0088] In order to better show the search process, please see Figure 4 , Figure 4 A first search flowchart involved in a search method provided by the embodiment is shown, wherein V_usTimeCNT%10 represents the search frequency of the circuit breaker 120 for searching the search response frame in the receiving buffer, and if V_usTimeCNT = 100, the search frequency is 10 ms, and other search frequencies such as 1 ms or 5 ms can also be set, which is selected according to the use requirement. When V_usTimeCNT%10 = 0, the circuit breaker 120 checks whether there is a search response frame conforming to the standard response frame in the receiving buffer, and if there is, the circuit breaker 120 stores it, which indicates that the circuit breaker 120 correctly searches a mounted electric meter, and if there is a search response frame not conforming to the standard response frame, it indicates that there is more than one electric meter conforming to the shortened address, a communication conflict occurs and the communication conflict is recorded.

[0089] Wherein, the method for recording communication conflict is: 0-50ms, detecting a search table response frame which does not conform to the standard response frame, then V_ucAddr[V_ucRound][0]=0xff, 51-150ms, detecting a search table response frame which does not conform to the standard response frame, then V_ucAddr[V_ucRound][1]=0xff, 151-250ms, detecting a search table response frame which does not conform to the standard response frame, then V_ucAddr[V_ucRound][2]=0xff, and subsequently, if detecting a search table response frame which does not conform to the standard response frame, the recording of communication conflict event is sequentially continued.

[0090] In the above embodiment, it is mentioned that the corresponding byte address can be determined by different feedback time, and then the meter address of the corresponding meter is determined, thereby improving the search table efficiency. In this embodiment, the search table request frame is combined with the actual address of the meter. Figure 4 The example is as follows:

[0091] When the circuit breaker sends a search table request frame such as 68H0900AAAAAAAA68H18HCS16H to perform the first search table, the meter with the low three byte address of 000009 will respond to the circuit breaker immediately, the meter with the low three byte address of 010009 will respond to the circuit breaker after 100ms, the meter with the low three byte address of 020009 will respond to the circuit breaker after 200ms, and correspondingly, the meter with the low three byte address of 990009 will respond to the circuit breaker after 9900ms.

[0092] In the process of responding of the meters with the low three byte address of 000009 to 990009 within the current search table number or the value of the first counter is less than or equal to 10000, if communication conflict occurs, the corresponding position of the preset two-dimensional array is recorded as FF according to the time from the start of the search table to the occurrence of the communication conflict. For example, in 68A0A1A2A3A4A56818CS16, A0 is the 0th byte, A1 is the 1st byte, and correspondingly, A4 is the 4th byte. When the communication conflict occurs at the 300th ms of the 4th byte, the 4th byte address A4 has the communication conflict, and the 4th row and the 3rd column of the preset two-dimensional array are recorded as FF. Wherein, according to the DL / T645 protocol, the actual address of the search table request frame and the meter in this embodiment is reversed. In order to facilitate understanding, the 0th row of the preset two-dimensional array corresponds to the byte address A0, and the 2nd row corresponds to the byte address A2.

[0093] When the current number of times of searching for the meter is not within the preset number of times or the value of the first counter is greater than 10000, a preset two-dimensional array is queried, when FF is queried, V_ucAddr[V_ucRound][i] is cleared, V_ucRound is added by 1, the wildcard AA in the search request frame is replaced by i, then a new search request frame is sent to the meter, and the above search operation is repeated, if multiple FFs exist in the preset two-dimensional array, the above search operation is repeated for each FF.

[0094] In addition, at least two meters 140 are hung below one circuit breaker 120, and the above embodiments of the application are described by taking one circuit breaker 120 and at least two meters 140 hung below the circuit breaker 120 as an example, and it should be noted that the form of at least two circuit breakers 120 and at least two meters 140 hung below the at least two circuit breakers 120 is also applicable to the application and within the protection scope of the application.

[0095] In summary, the search method provided by the embodiments of the application can effectively avoid the communication conflict between the circuit breaker and the meter by sending a search request frame to at least one meter, clearing the first counter and the second counter, and searching for a search response frame in a receiving buffer area at a first preset time interval, wherein the receiving buffer area is used to store the search response frame returned by at least one meter at a second preset time interval. At the same time, the meter address corresponding to the standard response frame is stored, and all search response frames are searched according to the preset two-dimensional array and the second counter, and the format of the search request frame and the search response frame in the whole process is optimized, which reduces the time consumption of the whole search process and improves the real-time performance and convenience of meter reading.

[0096] Please refer to Figure 5 , Figure 5 A method flowchart of another search method provided by the embodiments of the application is shown, and the method is applied to a meter, and each step of the search method will be described in detail below.

[0097] S510, the received search request frame is compared with the meter address of the meter.

[0098] Specifically, after the meter 140 receives the search request frame, the meter 140 compares the search request frame with the meter address A0A1A2A3A4A5 of the meter 140, and if the comparison fails, the meter 140 directly exits the current search. In addition, the circuit breaker 120, the meter 140, the search request station and the search response frame are described in the above embodiments of the search method, and will not be described herein.

[0099] S520, if the comparison passes, a preset delay counter is cleared and a delay response time is set for the meter address that passes the comparison.

[0100] In the embodiment, the preset delay counter can be used for the electric meter 140 to delay the feedback to the circuit breaker 120, which can greatly avoid the communication conflict problem of the 485 bus. The delay rule of the preset delay counter can refer to the description of the time interval of the meter address of the adjacent electric meter 140 which needs to feedback to the circuit breaker 120 at the same time in the above embodiment. If the electric meter 140 passes the comparison, the preset delay counter is cleared and the delay feedback is performed according to the corresponding delay rule.

[0101] For example, if the address of the search meter request frame is AAAAAAAAAAA, the electric meter 140 with the meter address A0 delays A0*100 ms to feedback. If the address of the search meter request frame is A0AAAAAAAAAA, the electric meter 140 with the meter address A1 delays A1*100 ms to feedback. Correspondingly, if the address of the search meter request frame is A0A1A2A3A4AA, the electric meter 140 with the meter address A5 delays A5*100 ms to feedback. The meter address of the electric meter 140 is fed back to the circuit breaker 120 after the delay, which greatly avoids the communication conflict problem of the 485 bus caused by the simultaneous feedback of multiple electric meters.

[0102] In order to better show the feedback process of the electric meter 140, please refer to Figure 6 , Figure 6 A second search meter flowchart related to a search meter method provided by the embodiment of the application is shown.

[0103] S530, sending a search meter response frame to the circuit breaker according to the delay response time.

[0104] From the above analysis, it can be known that the search meter method provided by the embodiment of the application can greatly avoid the communication conflict problem of the 485 bus by comparing the received search meter request frame with the meter address of the electric meter, setting the delay response time for the meter address which passes the comparison, and sending a search meter response frame to the circuit breaker according to the delay response time, which reduces the time consumption of the entire search meter process and improves the real-time performance and convenience of the meter reading.

[0105] The application also provides a circuit breaker 120. Please refer to Figure 7 , Figure 7 A schematic structural diagram of the circuit breaker 120 provided by the embodiment of the application is shown. The circuit breaker 120 includes a processor, a memory and a network interface connected through a system bus. The memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the electric meter 140 stores an operating system and can also store a computer program. When the computer program is executed by the processor, the processor can implement the search meter method applied to the circuit breaker in the above embodiment. The internal memory can also store a computer program. When the computer program is executed by the processor, the processor can execute the search meter method of the circuit breaker. Those skilled in the art can understand that Figure 7The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0106] The present application also provides an electric meter 140, please refer to Figure 8 , Figure 8 An internal structure diagram of an electric meter 140 provided by an embodiment of the present application is shown. The electric meter 140 includes a processor, a memory and a network interface connected through a system bus. The memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the electric meter 140 stores an operating system, and can also store a computer program. When the computer program is executed by the processor, the processor can implement the meter searching method applied to the electric meter in the above embodiment. The internal memory can also store a computer program. When the computer program is executed by the processor, the processor can execute the meter searching method. Those skilled in the art can understand that Figure 8 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0107] The present application also discloses a computer readable storage medium, the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the circuit breaker meter searching method and / or the meter searching method in the method embodiment.

[0108] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The program can be stored in a non-volatile computer readable storage medium, and when the program is executed, the processes of the above-mentioned embodiments of the methods can be included. Any reference to memory, storage, database or other medium used in the embodiments provided in the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0109] The above-mentioned embodiments only express several implementation manners of the present application, and the description is relatively specific and detailed, but it cannot be understood as a limitation on the patent scope of the present application. It should be noted that for those skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the protection scope of the present application. Therefore, the protection scope of the patent of the present application should be subject to the appended claims.

Claims

1. A method of searching for a table, characterized by, The method applied to a circuit breaker comprises the following steps: sending a meter searching request frame to at least one electric meter, and clearing a first counter and a second counter, wherein the first counter is used to record time, and the second counter is used to record the number of times of searching for the electric meter; searching for a meter searching response frame in a receiving buffer area at a first preset time interval, wherein the receiving buffer area is used to store the meter searching response frame returned by the at least one electric meter at a second preset time interval; storing the meter address of the electric meter corresponding to the meter searching response frame meeting a standard response frame; if the value of the first counter is greater than a preset value, searching for all meter searching response frames according to a preset two-dimensional array and the second counter, wherein the preset two-dimensional array is used to store the all meter searching response frames.

2. The method of claim 1, wherein, Before the step of sending the meter searching request frame to the at least one electric meter, the method further comprises the following steps: if a preset instant meter searching instruction and / or a preset meter searching period are monitored, initializing a sending buffer area and sending the meter searching request frame to the at least one electric meter, wherein the sending buffer area is used to store the meter searching request frame.

3. The method of claim 1, wherein, After the step of searching for the meter searching response frame in the receiving buffer area at the first preset time interval, the method further comprises the following steps: if it is detected that there is a meter searching response frame not meeting the standard response frame, recording a communication conflict event of the electric meter once.

4. The method of claim 3, wherein, The step of searching for all meter searching response frames according to the preset two-dimensional array and the second counter comprises the following steps: forming a preset two-dimensional array based on the preset two-dimensional array, the value of the second counter and a preset variable, wherein the value of the preset variable ranges from 0 to 99; if it is detected that there is the communication conflict event of the electric meter in the preset two-dimensional array, clearing the preset two-dimensional array and accumulating the value of the second counter; replacing a wildcard corresponding to the value of the second counter in the meter searching request frame with the preset variable, and performing the step of sending the meter searching request frame to the at least one electric meter; if the communication conflict event of the electric meter is not detected in the preset two-dimensional array, decreasing the value of the second counter until the value of the second counter is less than 0, and completing the search for all meter searching response frames.

5. The method of claim 4, wherein, The step of decreasing the value of the second counter until the value of the second counter is less than 0 further comprises the following steps: if the value of the second counter after decreasing the value of the second counter once is still greater than or equal to 0, performing the step of forming the preset two-dimensional array based on the preset two-dimensional array, the value of the second counter and the preset variable.

6. The method of claim 1 to 5, wherein, Neither the meter searching request frame nor the meter searching response frame contains a frame length and a data field.

7. A circuit breaker characterized by, The circuit breaker comprises a memory and a processor, the memory stores a computer program, and the computer program realizes the meter searching method of any one of claims 1-6 when executed by the processor.

8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program realizes the meter searching method of any one of claims 1-6 when executed by one or more processors.

Citation Information

Patent Citations

  • Water meter, gas meter and heat meter active sensing method for half-duplex channel

    CN107369309A

  • Meter searching method, medium, electronic equipment and meter searching system

    CN114996192A