Relay control method, device, equipment and medium for multi-user electric energy meter
By using a bidirectional transmission bus and internal communication lines in a multi-user electric energy meter to process the closing request information of the slave electric energy meters in sequence, the problem of power supply voltage drop and power-off reset caused by simultaneous closing of multiple electric energy meters is solved. The stable operation of the electric energy meter is achieved.
Patent Information
- Application Number
- CN202410727680.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2023-12-22
- Filing Date
- 2024-06-06
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2044-06-06
AI Technical Summary
When multiple electric energy meters are turned on and off at the same time, the power supply voltage of the multi-user electric energy meter is pulled down, causing the problem of power failure reset.
By setting up a bidirectional transmission bus and internal communication line between the host energy meter and the slave energy meter, the host energy meter receives the closing request information from the slave energy meter, stores and processes it in sequence, and generates corresponding relay control information to ensure that the slave energy meter The electromechanical energy meter performs the closing and closing operations in sequence to avoid simultaneous closing and closing.
It effectively avoids the problem of power supply voltage drop and power-off reset caused by multiple slave energy meters being turned on and off at the same time, ensuring the stable operation of the energy meter.
Smart Images

Figure CN118301196B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent electric energy meter measurement and communication technology, and in particular to a relay control method, device, equipment and medium for a multi-user electric energy meter. Background Art
[0002] The multi-user energy meter is composed of a host energy meter and several slave energy meters, which are connected by a flat cable. In order to reduce costs, only the host energy meter is equipped with a Bluetooth module, and the slave energy meter is not equipped with a Bluetooth module. Users can use the mobile phone Bluetooth APP or Bluetooth gateway to pay for the multi-user energy meter online, and can also read and write data for the multi-user energy meter. The host energy meter and all the slave energy meters communicate through the 485 bus in the flat cable. The communication between users and multi-user energy meters and the communication between the host energy meter and the slave energy meter inside the multi-user energy meter all adopt the DL / T645-2007 communication protocol of the power industry. When the user communicates with the slave energy meter, the communication information first passes through the host energy meter. The host energy meter sends the communication information to the slave energy meter through the 485 bus. The slave energy meter returns the information to be sent to the host energy meter through the 485 bus. The host energy meter then returns the information to the user through the Bluetooth module. In order to reduce costs, only the host energy meter has a power supply. The slave energy meter itself does not have a power supply. The required power is obtained from the host energy meter through a cable.
[0003] Both the master energy meter and the slave energy meter have built-in relays. When the user recharges successfully, the built-in relay closes and the user can use electricity normally. When the balance is insufficient, the built-in relay trips and the user needs to recharge again before continuing to use electricity normally. Since the master energy meter and several slave energy meters share a set of master energy meter power supply, the power supply has limited load capacity. If multiple slave energy meters are closed at the same time, the power supply voltage will be pulled down, causing the power-off reset of multiple user energy meters. Measures should be taken to solve this problem. Summary of the invention
[0004] In view of this, the present invention provides a relay control method, device, equipment and medium for a multi-user electric energy meter to solve the problem of power-off resetting of the multi-user electric energy meter caused by simultaneous closing and closing of multiple electric energy meters in the related art.
[0005] In a first aspect, the present invention provides a relay control method for a multi-user electric energy meter, the multi-user electric energy meter comprises a host electric energy meter and a plurality of slave electric energy meters, the host electric energy meter and each slave electric energy meter are internally provided with a relay, the host electric energy meter is connected in series with a target slave electric energy meter through a wiring, and different slave electric energy meters are connected in series in sequence through the wiring, the wiring comprises a bidirectional transmission bus and an internal communication line, the method is applied to the host electric energy meter, the method comprises: receiving a switch-on and switch-off request information respectively sent by different slave electric energy meters through an internal communication line, the switch-on and switch-off request information is determined by the corresponding slave electric energy meter according to the received first switch-on and switch-off control information, the first switch-on and switch-off control information is generated by a service end; storing the switch-on and switch-off request information respectively sent by different slave electric energy meters into a preset buffer area; reading the switch-on and switch-off request information in the preset buffer area in sequence; generating corresponding second switch-on and switch-off control information based on the read switch-on and switch-off request information; sending the second switch-on and switch-off control information to the corresponding slave electric energy meter through the bidirectional transmission bus, so that the slave electric energy meter performs a relay switch-on and switch-off operation based on the second switch-on and switch-off control information.
[0006] The present invention provides a relay control method for a multi-user electric energy meter. The host electric energy meter receives the closing and pulling request information sent by different slave electric energy meters through internal communication lines respectively, and stores the different closing and pulling request information in a preset buffer area. The host electric energy meter reads the closing and pulling request information stored in the preset buffer area in sequence, and generates second closing and pulling control information based on the read closing and pulling request information, and sends the second closing and pulling control information to the corresponding slave electric energy meter through a bidirectional transmission channel, so that the slave electric energy meter performs the closing and pulling operation of the relay based on the second closing and pulling control information. According to the method provided by the present invention, each slave electric energy meter reports the closing and pulling request information to the master electric energy meter through the internal communication line, the master electric energy meter stores the received closing and pulling request information in a preset buffer area, reads the closing and pulling request information stored in the preset buffer area and the corresponding second closing and pulling control information in sequence, sends the second closing and pulling control information to the corresponding slave electric energy meter through a two-way transmission bus, the slave electric energy meter reports the closing and pulling request information through the internal communication line, and the master electric energy meter sends the second closing control information through the two-way transmission bus based on the reading result of the preset buffer area, thereby realizing the sequential control of the corresponding relays of each slave electric energy meter, ensuring that multiple slave electric energy meters will not close and pull the switch at the same time, and the closing and pulling request information and the second closing control information can also be transmitted in an orderly manner through the internal communication line and the two-way transmission bus.
[0007] In an optional embodiment, a communication module is provided inside the host power meter, and the method further includes: receiving first closing and pulling control information sent by the server through the communication module, the first closing and pulling control information including address information of the corresponding slave power meter; based on the address information of the corresponding slave power meter corresponding to the first closing and pulling control information, sending the first closing and pulling control information to the corresponding slave power meter through a bidirectional transmission bus.
[0008] In an optional embodiment, the step of receiving the first closing and pulling control information sent by the server through the communication module includes: obtaining the original closing and pulling control information; parsing the table address information in the original closing and pulling control information; if the table address information in the original closing and pulling control information is inconsistent with the local table address information, using the original closing and pulling control information as the first closing and pulling control information.
[0009] In an optional embodiment, the method further includes:
[0010] If the table address information in the original closing and closing control information is consistent with the local table address information, the closing and closing operation of the relay is performed based on the original closing and closing control information.
[0011] In a second aspect, the present invention provides a relay control method for a multi-user electric energy meter, the multi-user electric energy meter comprising a host electric energy meter and a plurality of slave electric energy meters, the host electric energy meter and each slave electric energy meter are provided with relays, the host electric energy meter is connected in series with a target slave electric energy meter through a wiring, and different slave electric energy meters are connected in series in sequence through the wiring, the wiring comprising a bidirectional transmission bus and an internal communication line, the method is applied to any slave electric energy meter, the method comprising: when receiving a corresponding first closing and pulling control information, generating a closing and pulling request information, the first closing and pulling control information being generated by a server; sending the closing and pulling request information to the host electric energy meter through the internal communication line; when receiving the corresponding second closing and pulling control information returned by the host electric energy meter, executing the closing and pulling operation of the relay.
[0012] The relay control method of the multi-user electric energy meter provided by the present invention generates corresponding closing and pulling request information after receiving the first closing and pulling control information generated by the service end, and sends the closing and pulling request information to the host electric energy meter through the internal communication line, receives the second closing and pulling control information returned by the host electric energy meter based on the closing and pulling request information, and performs the closing and pulling operation of the relay based on the second closing and pulling control information. The method provided by the present invention ensures that the closing and pulling request information and the second closing control information can be transmitted in an orderly manner while ensuring that there are no multiple electric energy meters in the multi-user electric energy meter that close and pull at the same time.
[0013] In an optional embodiment, the internal communication line of the slave electric energy meter includes an internal communication line of the sending end and an internal communication line of the receiving end, and the internal communication line of the sending end and the internal communication line of the receiving end are not connected. The step of sending the closing and pulling request information to the host electric energy meter through the internal communication line includes: when there is at least one upper-level slave electric energy meter, sending the closing and pulling request information to the upper-level slave electric energy meter through the internal communication line of the sending end, so that the upper-level slave electric energy meter receives the closing and pulling request information through the internal communication line of the receiving end, and forwards the closing and pulling request information through the internal communication line of the sending end.
[0014] In the method provided by this optional implementation mode, the internal communication line of the sending end and the internal communication line of the receiving end inside each slave power meter are not connected, and the slave power meter sends the switch-on and switch-off request information to the upper-level slave power meter, so that the upper-level slave power meter receives the switch-on and switch-off request information through the internal communication line of the receiving end, and forwards the switch-on and switch-off request information through the internal communication line of the sending end until it is sent to the host power meter, thereby ensuring the transmission of the switch-on and switch-off request information at a low cost.
[0015] In an optional embodiment, the method also includes: when there is at least one subordinate electric energy meter, receiving the closing and opening request information sent by the subordinate electric energy; storing the closing and opening request information sent by the subordinate electric energy meter in a local cache; sequentially reading the closing and opening request information sent by the subordinate electric energy stored in the local cache; when the internal communication line of the sending side is idle, sending the closing and opening request information sent by the subordinate slave electric energy meter to the upper-level slave electric energy meter through the internal communication line of the sending end.
[0016] In a third aspect, the present invention provides a relay control device for a multi-user electric energy meter, the multi-user electric energy meter includes a host electric energy meter and a plurality of slave electric energy meters, the host electric energy meter and each slave electric energy meter are provided with relays, the host electric energy meter is connected in series with a target slave electric energy meter through a wiring, and different slave electric energy meters are connected in series in sequence through the wiring, the wiring includes a bidirectional transmission bus and an internal communication line, the device includes: a first receiving module, for receiving the pull-in and pull-out request information sent by different slave electric energy meters respectively through the internal communication line, the pull-in and pull-out request information is received by the corresponding slave electric energy meter according to the received first pull-in and pull-out control The control information is determined, and the first closing and pulling control information is generated by the server; the first storage module is used to store the closing and pulling request information sent by different slave electric energy meters respectively into a preset cache area; the first reading module is used to read the closing and pulling request information in the preset cache area in sequence; the first generating module is used to generate the corresponding second closing and pulling control information based on the read closing and pulling request information; the first sending module is used to send the second closing and pulling control information to the corresponding slave electric energy meter through a bidirectional transmission bus, so that the slave electric energy meter performs the closing and pulling operation of the relay based on the second closing and pulling control information.
[0017] In a fourth aspect, the present invention provides a relay control device for a multi-user electric energy meter, the multi-user electric energy meter includes a host electric energy meter and multiple slave electric energy meters, the host electric energy meter and each slave electric energy meter are provided with relays, the host electric energy meter is connected in series with the target slave electric energy meter through a wiring, and different slave electric energy meters are connected in series in sequence through the wiring, the wiring includes a bidirectional transmission bus and an internal communication line, the device includes: a second generating module, for generating a closing and pulling request information when receiving the corresponding first closing and pulling control information, the first closing and pulling control information is generated by the server; a second sending module, for sending the closing and pulling request information to the host electric energy meter through the internal communication line; an execution module, for executing the closing and pulling operation of the relay when receiving the corresponding second closing and pulling control information returned by the host electric energy meter.
[0018] In a fifth aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the relay control method for a multi-user electric energy meter according to the first aspect or any corresponding embodiment thereof, or executes the relay control method for a multi-user electric energy meter according to the second aspect or any corresponding embodiment thereof by executing the computer instructions.
[0019] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the relay control method for a multi-user electric energy meter according to the first aspect or any corresponding embodiment thereof, or to execute the relay control method for a multi-user electric energy meter according to the second aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] 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.
[0021] Figure 1 is a flow chart of a relay control method for a multi-user electric energy meter according to an embodiment of the present invention;
[0022] Figure 2 A hardware connection diagram of a multi-user electric energy meter in an embodiment of the present invention;
[0023] Figure 3 is a flow chart of another relay control method for a multi-user electric energy meter according to an embodiment of the present invention;
[0024] Figure 4 is a flow chart of another relay control method for a multi-user electric energy meter according to an embodiment of the present invention;
[0025] Figure 5 It is a flow chart of reporting the switch request information from the electromechanical energy meter of the present invention;
[0026] Figure 6 A unified control flow chart for closing and closing the host electric energy meter;
[0027] Figure 7 is a structural block diagram of a relay control device for a multi-user electric energy meter according to an embodiment of the present invention;
[0028] Figure 8 is a structural block diagram of another relay control device for a multi-user electric energy meter according to an embodiment of the present invention;
[0029] Fig. 9 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. 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 those skilled in the art without creative work are within the scope of protection of the present invention.
[0031] In the related art, both the host power meter and the slave power meter are equipped with built-in relays. When the user successfully recharges, the built-in relay closes and the user can use electricity normally. When the balance is insufficient, the built-in relay trips and the user needs to recharge again before continuing to use electricity normally. Since the host power meter and several slave power meters share a set of power supply for the host power meter, the power supply has limited load capacity. If many power meters are closed at the same time, the power supply voltage will be pulled down, causing the power-off reset of multiple user power meters. Measures should be taken to solve this problem.
[0032] In view of this, the present invention provides a relay control method for a multi-user electric energy meter, each slave electric energy meter reports the closing and pulling request information to the master electric energy meter through an internal communication line, the master electric energy meter stores the received closing and pulling request information in a preset cache area, reads the closing and pulling request information stored in the preset cache area and the corresponding second closing and pulling control information in sequence, sends the second closing and pulling control information to the corresponding slave electric energy meter through a two-way transmission bus, the slave electric energy meter reports the closing and pulling request information through the internal communication line, and the master electric energy meter sends the second closing control information through the two-way transmission bus based on the reading result of the preset cache area, thereby ensuring that multiple slave electric energy meters will not close and pull the switch at the same time, and the closing and pulling request information and the second closing control information can also be transmitted in an orderly manner through the internal communication line and the two-way transmission bus.
[0033] According to an embodiment of the present invention, an embodiment of a relay control method for a multi-user electric energy meter is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0034] In this embodiment, a relay control method for a multi-user electric energy meter is provided. The multi-user electric energy meter includes a host electric energy meter and multiple slave electric energy meters. Relays are arranged inside the host electric energy meter and each slave electric energy meter. The host electric energy meter is connected in series with a target slave electric energy meter through a wiring. Different slave electric energy meters are connected in series in sequence through the wiring. The wiring includes a bidirectional transmission bus and an internal communication line. The method is applied to the host electric energy meter. The bidirectional transmission bus may include but is not limited to a 485 bus. Figure 1 : is a flowchart of a relay control method for a multi-user electric energy meter according to an embodiment of the present invention. In the embodiment of the present application, the hardware connection diagram of the multi-user electric energy meter can be as follows Figure 2 As shown, the cables from top to bottom are 2 485 buses, +9V power line, ground line, and internal communication line; the +9V power line and ground line are generated by the power supply of the host power meter, and each slave power meter obtains power from these two lines. The 485 bus is connected inside the host power meter and each slave power meter, and the 485 buses of the host power meter and the slave power meter are connected together. There is an internal communication line on the right side of the host power meter, and there is an internal communication line on the left and right sides of the slave power meter, and the internal communication lines on the left and right are not connected. The internal communication line of the host power meter is connected to the internal communication line on the left side of slave power meter 1, and the internal communication line on the right side of slave power meter 1 is connected to the internal communication line on the left side of slave power meter 2, and so on. TXD represents the internal communication line of the data sending end, and RXD represents the internal communication line of the data receiving end. As shown Figure 1As shown, the process of the relay control method of the multi-user electric energy meter of the embodiment of the present invention includes the following steps:
[0035] Step S101, receiving the closing and pulling request information sent by different slave electric energy meters through the internal communication line, the closing and pulling request information is determined by the corresponding slave electric energy meter according to the received first closing and pulling control information, and the first closing and pulling control information is generated by the service end.
[0036] Exemplarily, the first closing and pulling control information is generated by the server, which may include but is not limited to a mobile phone APP or a Bluetooth gateway. The first closing and pulling control information may be a closing and pulling control frame generated based on the standard DL / T645-2007 communication protocol. After the first closing and pulling control information is generated by the server, it is sent to the host electric energy meter, which sends the first closing and pulling control information to the corresponding slave electric energy meter through a bidirectional transmission channel. When the slave electric energy meter receives the first closing and pulling control information, it does not perform the closing and pulling operation, but generates closing and pulling request information, and sends the closing and pulling request information to the host electric energy meter through an internal communication line.
[0037] Step S102, storing the closing and closing request information respectively sent by different slave electric energy meters into a preset buffer area.
[0038] Exemplarily, a cache area is preset inside the host power meter. When the host power meter receives the closing and closing request information, it stores it in the cache area. In the embodiment of the present application, the closing and closing request information stored in the cache area can be table information, and the information in the table mainly includes the table address information of the power meter and the closing and closing action.
[0039] Step S103, reading the closing and closing request information in the preset buffer area in sequence.
[0040] Exemplarily, in an embodiment of the present application, the closing and closing request information in the preset cache area can be read sequentially according to the time sequence and based on a certain time interval.
[0041] Step S104: Generate corresponding second closing / closing control information based on the read closing / closing request information.
[0042] For example, in the embodiment of the present application, based on the read information, the corresponding second switch-on / off control information is generated, the second switch-on / off control information is different from the corresponding first switch-on / off control information, and the second switch-on / off control information can be a switch-on / off control frame generated according to a custom rule. Since the second switch-on / off control information is different from the corresponding first switch-on / off control information, during subsequent transmission, relay control failure caused by communication confusion can be avoided.
[0043] Step S105, sending the second closing and pulling control information to the corresponding slave electric energy meter through the bidirectional transmission bus, so that the slave electric energy meter performs the closing and pulling operation of the relay based on the second closing and pulling control information.
[0044] Exemplarily, the master power meter sends the second closing and opening control information to the corresponding slave power meter through the bidirectional transmission bus, so that the slave power meter performs the closing and opening operation of the relay based on the received second closing and opening control information.
[0045] The relay control method for multi-user electric energy meters provided in this embodiment, each slave electric energy meter reports the closing and pulling request information to the master electric energy meter through the internal communication line, the master electric energy meter stores the received closing and pulling request information in a preset buffer area, reads the closing and pulling request information stored in the preset buffer area and the corresponding second closing and pulling control information in sequence, sends the second closing and pulling control information to the corresponding slave electric energy meter through a two-way transmission bus, the slave electric energy meter reports the closing and pulling request information through the internal communication line, and the master electric energy meter sends the second closing control information through the two-way transmission bus based on the reading result of the preset buffer area, thereby realizing sequential control of the corresponding relays of each slave electric energy meter, ensuring that multiple slave electric energy meters will not close and pull the switch at the same time, and the closing and pulling request information and the second closing control information can also be transmitted in an orderly manner through the internal communication line and the two-way transmission bus.
[0046] In some optional embodiments, the method further comprises:
[0047] Step a1: receiving first switch-on / off control information sent by the server through the communication module, wherein the first switch-on / off control information includes address information of the corresponding slave electric energy meter.
[0048] Specifically, the above step a1 includes:
[0049] Step a11, obtaining original switch-on and switch-off control information. Exemplarily, the original switch-on and switch-off information is generated by the server and is used to control the switch-on and switch-off of the relay in the corresponding electric energy meter.
[0050] Step a12, parsing the meter address information in the original switch-on / off control information. Exemplarily, the original switch-on / off control information includes the meter address of the corresponding electric energy meter.
[0051] Step a13, if the table address information in the original closing and pulling control information is inconsistent with the local table address information, the original closing and pulling control information is used as the first closing and pulling control information. Exemplarily, the local table address information refers to the table address information of the host electric energy meter. If the table address information in the original closing and pulling control information is different from the table address information of the host electric energy meter, the original closing and pulling control information is used as the first closing and pulling control information.
[0052] Step a2: based on the address information of the corresponding slave electric energy meter corresponding to the first closing and pulling control information, the first closing and pulling control information is sent to the corresponding slave electric energy meter through a bidirectional transmission bus.
[0053] In some optional embodiments, the method further comprises:
[0054] If the table address information in the original closing and closing control information is consistent with the local table address information, the closing and closing operation of the relay is performed based on the original closing and closing control information.
[0055] Exemplarily, in an embodiment of the present application, when the table address information in the original closing and closing control information is consistent with the local table address information, the host power meter generates corresponding closing and closing request information based on the original closing and closing control information, and stores the closing and closing request information in a preset cache area. When the host power meter reads the closing and closing request information, it executes the corresponding relay closing and closing operation.
[0056] In this embodiment, a relay control method for a multi-user electric energy meter is provided. The multi-user electric energy meter includes a host electric energy meter and multiple slave electric energy meters. Relays are arranged inside the host electric energy meter and each slave electric energy meter. The host electric energy meter is connected in series with a target slave electric energy meter through a wiring. Different slave electric energy meters are connected in series in sequence through wiring. The wiring includes a bidirectional transmission bus and an internal communication line. The method is applied to any slave electric energy meter. Figure 3 is a flow chart of a relay control method for a multi-user electric energy meter according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps:
[0057] Step S301: When corresponding first closing and pulling control information is received, a closing and pulling request information is generated. The first closing and pulling control information is generated by the server.
[0058] For example, in the embodiment of the present application, the closing and closing request information may be as shown in the following Table 1:
[0059] Table 1
[0060]
[0061] Among them, A0...A5 represent the table address of the slave electric energy meter; 22H represents the control code, 01H represents the data length, CMD equal to 1AH represents closing the switch, and equal to 1CH represents closing the switch.
[0062] Step S302, sending the switch request information to the host electric energy meter through the internal communication line. For example, please refer to the description of the relevant parts in the above embodiment, which will not be repeated here.
[0063] Step S303, when receiving the corresponding second switch control information returned by the host electric energy meter, the switch operation of the relay is executed. For example, in the embodiment of the present application, the second switch control information can be as shown in Table 2 below:
[0064] Table 2
[0065]
[0066] Among them, A0...A5 represent the table address of the slave electric energy meter; 82H represents the control code, 01H represents the data length, CMD equal to 1AH represents closing the switch, and equal to 1CH represents closing the switch.
[0067] The relay control method for multi-user electric energy meters provided in this embodiment realizes sequential control of the relays corresponding to each slave electric energy meter, and ensures that there will not be multiple electric energy meters in the multi-user electric energy meter that are opened and closed at the same time, and the opening and closing request information and the second closing control information can be transmitted in an orderly manner.
[0068] In this embodiment, a relay control method for a multi-user electric energy meter is provided. The multi-user electric energy meter includes a host electric energy meter and multiple slave electric energy meters. Relays are arranged inside the host electric energy meter and each slave electric energy meter. The host electric energy meter is connected in series with a target slave electric energy meter through a wiring. Different slave electric energy meters are connected in series in sequence through wiring. The wiring includes a bidirectional transmission bus and an internal communication line. The method is applied to any slave electric energy meter. Figure 4 is a flow chart of a relay control method for a multi-user electric energy meter according to an embodiment of the present invention. Figure 4 As shown, the process includes the following steps:
[0069] Step S401: When the corresponding first closing and pulling control information is received, a closing and pulling request information is generated. The first closing and pulling control information is generated by the server. Figure 2 Step S201 of the illustrated embodiment will not be described in detail here.
[0070] Step S402, sending the switch request information to the host power meter through the internal communication line.
[0071] Specifically, the internal communication line of the slave electric energy meter includes an internal communication line of the sending end and an internal communication line of the receiving end, and the internal communication line of the sending end and the internal communication line of the receiving end are not connected. The above step S302 includes:
[0072] Step S4021, when there is at least one upper-level slave electric energy meter, the closing and pulling request information is sent to the upper-level slave electric energy meter through the internal communication line of the sending end, so that the upper-level slave electric energy meter receives the closing and pulling request information through the internal communication line of the receiving end, and forwards the closing and pulling request information through the internal communication line of the sending end.
[0073] Exemplarily, when there is at least one upper-level slave power meter, the closing and closing request information is forwarded to the upper-level slave power meter through the internal communication line of the sending end. In the embodiment of the present application, the internal communication line close to one end of the host power meter is the internal communication line of the sending end, and the internal communication line far from one end of the host power meter is the internal communication line of the receiving end. The upper-level slave power meter is a slave power meter directly connected to the internal communication line of the sending end.
[0074] In some optional embodiments, the method further comprises:
[0075] Step b1, when there is at least one subordinate electric energy meter, receiving the switch request information sent by the subordinate electric energy. Exemplarily, in the embodiment of the present application, the subordinate electric energy meter may be a slave electric energy meter far away from one end of the master electric energy meter.
[0076] Step b2, storing the closing and pulling request information sent by the subordinate electric energy meter in the local cache. Exemplarily, in the embodiment of the present application, n cache areas are defined inside the slave electric energy meter to store the closing and pulling request information sent by the subordinate electric energy meter, which is used cyclically. Specifically, the closing and pulling request information generated locally can also be stored.
[0077] Step b3, sequentially read the closing and pulling request information sent by the lower-level electric energy stored in the local cache. In the embodiment of the present application, the local cache may store the closing and pulling request information generated locally, and sequentially read the closing and pulling request information sent by the lower-level electric energy or the locally generated closing and pulling request information stored in the local cache.
[0078] Step b3, when the internal communication line of the sending side is in an idle state, the read closing and pulling request information sent by the lower-level slave electric energy meter is sent to the upper-level slave electric energy meter through the internal communication line of the sending end. Exemplarily, in an embodiment of the present application, the read closing and pulling request information is sent to the upper-level slave electric energy meter.
[0079] Step S403: When receiving the corresponding second switch-on / off control information returned by the host electric energy meter, the relay switch-on / off operation is executed. Figure 2 Step S203 of the illustrated embodiment will not be described in detail here.
[0080] The relay control method of the multi-user electric energy meter provided by the present invention is described below through a specific embodiment.
[0081] Example:
[0082] In the embodiment of the present application, the standard DL / T645-2007 communication protocol does not contain a switch-on and switch-off reporting request frame, and a switch-on and switch-off reporting request frame needs to be customized. The standard DL / T645-2007 communication protocol contains a switch-on and switch-off control frame, but when the user sends a switch-on and switch-off control frame through a mobile phone APP or a Bluetooth gateway, the slave electric energy meter cannot immediately execute the switch-on and switch-off action after receiving it, but needs to report it through the internal communication line and then be uniformly controlled by the host electric energy meter; and when the host electric energy meter sends a switch-on and switch-off control frame to the slave electric energy meter through the 485 bus, the slave electric energy meter immediately executes the switch-on and switch-off action after receiving it. Since the two types of switch-on and switch-off control frames perform different actions, a switch-on and switch-off control frame needs to be customized inside the multi-user meter.
[0083] Figure 5The overall flow chart for reporting the closing and closing request information of the slave electric energy meter. Define n buffers inside the slave electric energy meter to store the custom closing and closing report request frames for circular use; define a buffer write counter WNT to record the number of buffers currently written to; define a buffer read counter RNT to record the number of buffers read. WNT and RNT are initialized to 0. When the internal communication line on the right side of the slave electric energy meter receives the custom closing and closing report request frame sent by the slave electric energy meter of the next level, first write the report request frame to the WNTth buffer, then WNT++, when WNT>=n, WNT=0; on the other hand, when the remaining amount in the meter is reduced to 0 and needs to trip, or when the remaining amount is reduced to 0 and the circuit breaker is tripped, after the user successfully pays the multi-user electric energy meter online using the mobile phone Bluetooth APP or Bluetooth gateway, when it is necessary to reclose the circuit breaker, edit the custom closing and closing report request frame. , write the report request frame into the WNTth buffer area, then WNT++, when WNT>=n, WNT=0; on the other hand, when the slave electric energy meter receives the standard closing and closing control frame on the 485 bus, it makes a comprehensive judgment with the closing and closing status inside the slave electric energy meter. If the received frame is a closing action, and the closing and closing status inside the slave electric energy meter is a closing status, then a closing and closing action is required; if the received frame is a closing action, and the closing and closing status inside the slave electric energy meter is a pending closing status, then a closing and closing action is required. If a closing / closing action is required, edit the custom closing / closing report request frame, write the report request frame into the WNTth buffer area, and then set WNT++. When WNT>=n, WNT=0. On the other hand, determine in real time whether the internal communication line on the left is idle. When the internal communication line on the left is idle, determine whether WNT and RNT are equal. If they are not equal, it means that there is data to be sent in the RNTth buffer area. Read the frame in the RNTth buffer area and send it to the upper-level slave power meter. Then set RNT++. When RNT>=n, RNT=0. On the other hand, when the slave power meter receives the custom closing / closing control frame on the 485 bus, it immediately executes the closing / closing action.
[0084] Figure 6The unified control flow chart for the closing and closing of the host electric energy meter. A table is defined inside the host electric energy meter. The length of the table is m, which is used to store the table address and closing and closing actions of the host / slave electric energy meter, and is used cyclically; a table write counter WTb is defined to record which table is currently written; a table read counter RTb is defined to record which table is currently read, and WTb and RTb are initialized to 0. When the internal communication line receives the self-defined closing and closing report request frame of the slave electric energy meter, the table address and CMD in the request frame are written into the WTb-th table, and then WTb++, when WTb>=m, WTb=0; on the other hand, when the remaining amount in the table is reduced to 0 and needs to be tripped, or when the remaining amount is reduced to 0 and the circuit breaker is tripped, the user uses the mobile phone Bluetooth APP or Bluetooth gateway to pay the multi-user electric energy meter online successfully, and needs to reclose the circuit breaker, and write its own table address and CMD into the WTb-th table, and then WTb++, when WTb>=m, WTb =0; On the other hand, when the host electric energy meter receives the standard closing and pulling control frame through the Bluetooth module, it compares the table address of the control frame. If the table address is not its own table address, it sends the control frame to the slave electric energy meter through the 485 bus. If the table address is its own table address, it makes a comprehensive judgment with the closing and pulling state inside the host electric energy meter. If the received action is a closing action, and the closing and pulling state inside the host electric energy meter is a closing state, then a closing and pulling action is required. If the received action is a closing action, and the closing and pulling state inside the host electric energy meter is a pending closing state, then a closing and pulling action is required. If a closing and pulling action is required, write its own table address and CMD into the WTbth table, and then WTb ++, when WTb>=m, WTb =0; The host electric energy meter opens a timer with a timing time of 100ms, defines a time counter TimeCNT, and TimeCNT increases by 1 every 100ms. It is stipulated that the time interval between the tripping and closing of multi-user meters must be greater than or equal to 1 second. Real-time judgment is made whether TimeCNT is greater than or equal to 10. If so, compare RTb and WTb. If RTb is not equal to WTb, it means that there are valid table addresses and closing and closing action data in the table. Read the table address and CMD in the RTb-th table, judge the table address in the table. If it is the table address of the slave electric energy meter, perform the closing and closing action according to CMD, and clear TimeCNT. If it is the table address of the slave electric energy meter, judge whether the 485 bus is idle. If the 485 bus is idle, edit the custom closing and closing control frame and send it to the corresponding slave electric energy meter through the 485 bus, and clear TimeCNT. Then RTb++, if RTb>=m, RTb=0.
[0085] In this embodiment, a relay control device for a multi-user electric energy meter is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made are not repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0086] The present embodiment provides a relay control device for a multi-user electric energy meter, wherein the multi-user electric energy meter includes a host electric energy meter and a plurality of slave electric energy meters, wherein relays are arranged inside the host electric energy meter and each slave electric energy meter, wherein the host electric energy meter is connected in series with a target slave electric energy meter via a wiring, and different slave electric energy meters are connected in series in sequence via wiring, wherein the wiring includes a bidirectional transmission bus and an internal communication line, such as Figure 7 As shown, including:
[0087] The first receiving module 701 is used to receive the closing and pulling request information sent by different slave electric energy meters through the internal communication line, the closing and pulling request information is determined by the corresponding slave electric energy meter according to the received first closing and pulling control information, and the first closing and pulling control information is generated by the server;
[0088] The first storage module 702 is used to store the switch request information sent by different slave electric energy meters into a preset buffer area;
[0089] The first reading module 703 is used to sequentially read the closing and closing request information in the preset buffer area;
[0090] A first generating module 704, configured to generate corresponding second closing and pulling control information based on the read closing and pulling request information;
[0091] The first sending module 705 is used to send the second closing and pulling control information to the corresponding slave electric energy meter through the bidirectional transmission bus, so that the slave electric energy meter performs the closing and pulling operation of the relay based on the second closing and pulling control information.
[0092] In some optional implementations, a communication module is provided inside the host electric energy meter, and the device further includes:
[0093] A second receiving module is used to receive the first switch-on / off control information sent by the server through the communication module, where the first switch-on / off control information includes the address information of the corresponding slave electric energy meter;
[0094] The third sending module sends the first closing and pulling control information to the corresponding slave electric energy meter through a bidirectional transmission bus based on the address information of the corresponding slave electric energy meter corresponding to the first closing and pulling control information.
[0095] In some optional implementations, the second receiving module includes:
[0096] The acquisition submodule is used to obtain the original closing and closing control information;
[0097] A parsing submodule, used for parsing the table address information in the original closing and closing control information;
[0098] The first determining submodule is used to use the original closing and pulling control information as the first closing and pulling control information if the table address information in the original closing and pulling control information is inconsistent with the local table address information.
[0099] In some optional embodiments, the device further comprises:
[0100] The execution module is used to execute the closing and closing operation of the relay based on the original closing and closing control information if the table address information in the original closing and closing control information is consistent with the local table address information.
[0101] The present embodiment provides a relay control device for a multi-user electric energy meter, wherein the multi-user electric energy meter includes a host electric energy meter and a plurality of slave electric energy meters, wherein relays are arranged inside the host electric energy meter and each slave electric energy meter, wherein the host electric energy meter is connected in series with a target slave electric energy meter via a wiring, and different slave electric energy meters are connected in series in sequence via wiring, wherein the wiring includes a bidirectional transmission bus and an internal communication line, such as Figure 8 As shown, including:
[0102] The second generating module 801 is used to generate a switch-on request message when receiving the corresponding first switch-on control information, where the first switch-on control information is generated by the server;
[0103] The second sending module 802 is used to send the closing and closing request information to the host electric energy meter through the internal communication line;
[0104] The execution module 803 is used to execute the closing and closing operation of the relay when receiving the corresponding second closing and closing control information returned by the host power meter.
[0105] In some optional implementations, the internal communication line of the slave electric energy meter includes an internal communication line of the sending end and an internal communication line of the receiving end, the internal communication line of the sending end and the internal communication line of the receiving end are not connected, and the second sending module includes:
[0106] The sending submodule is used to send the closing and pulling request information to the upper-level slave electric energy meter through the internal communication line of the sending end when there is at least one upper-level slave electric energy meter, so that the upper-level slave electric energy meter receives the closing and pulling request information through the internal communication line of the receiving end, and forwards the closing and pulling request information through the internal communication line of the sending end.
[0107] In some optional embodiments, the device further comprises:
[0108] A third receiving module is used to receive the closing and closing request information sent by the subordinate electric energy when there is at least one subordinate electric energy meter;
[0109] A second storage module is used to store the switch request information sent by the lower-level electric energy meter into a local cache;
[0110] The second reading module is used to sequentially read the closing and closing request information sent by the lower-level electric energy stored in the local cache;
[0111] The fourth sending module is used to send the switch request information sent by the lower-level slave electric energy meter to the upper-level slave electric energy meter through the internal communication line of the sending end when the internal communication line of the sending side is in an idle state.
[0112] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0113] The relay control device of the multi-user electric energy meter in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0114] The embodiment of the present invention also provides a computer device having the above Figure 7 The relay control device of the multi-user electric energy meter shown in the figure, or the relay control device having the above Figure 8 The relay control device of the multi-user electric energy meter is shown.
[0115] See also Fig. 9 , Fig. 9 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Fig. 9 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Fig. 9 A processor 10 is taken as an example.
[0116] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0117] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.
[0118] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0119] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0120] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0121] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0122] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A relay control method for a multi-user electric energy meter, characterized in that: The multi-user electric energy meter includes a host electric energy meter and a plurality of slave electric energy meters, wherein the host electric energy meter and each slave electric energy meter are provided with relays, the host electric energy meter is connected in series with a target slave electric energy meter through a wiring, and different slave electric energy meters are connected in series in sequence through wiring, wherein the wiring includes a bidirectional transmission bus and an internal communication line, and the method is applied to the host electric energy meter, and the method includes: Receiving the switch request information sent by different slave electric energy meters through the internal communication line, wherein the switch request information is determined by the corresponding slave electric energy meter according to the received first switch control information, wherein the first switch control information is generated by the service end; The switch request information respectively sent by the different slave electric energy meters is stored in a preset buffer area; Read the closing and closing request information in the preset buffer area in sequence; Generate corresponding second closing and pulling control information based on the read closing and pulling request information; The second closing and pulling control information is sent to the corresponding slave electric energy meter through the bidirectional transmission bus, so that the slave electric energy meter performs the closing and pulling operation of the relay based on the second closing and pulling control information.
2. The method according to claim 1, characterized in that The host electric energy meter is provided with a communication module inside, and the method further comprises: Receiving first switch-on / off control information sent by the server through the communication module, wherein the first switch-on / off control information includes address information of a corresponding slave electric energy meter; Based on the address information of the corresponding slave electric energy meter corresponding to the first closing and pulling control information, the first closing and pulling control information is sent to the corresponding slave electric energy meter through a bidirectional transmission bus.
3. The method according to claim 2, characterized in that The step of receiving the first closing and pulling control information sent by the service end through the communication module includes: Get the original closing and closing control information; Parsing the table address information in the original closing and closing control information; If the table address information in the original closing and pulling control information is inconsistent with the local table address information, the original closing and pulling control information is used as the first closing and pulling control information.
4. The method according to claim 3, characterized in that The method further comprises: If the table address information in the original closing and closing control information is consistent with the local table address information, the closing and closing operation of the relay is performed based on the original closing and closing control information.
5. A relay control method for a multi-user electric energy meter, characterized in that: The multi-user electric energy meter includes a host electric energy meter and a plurality of slave electric energy meters, wherein the host electric energy meter and each slave electric energy meter are provided with relays, the host electric energy meter is connected in series with a target slave electric energy meter through a wiring, and different slave electric energy meters are connected in series in sequence through wiring, wherein the wiring includes a bidirectional transmission bus and an internal communication line, and the method is applied to any of the slave electric energy meters, and the method includes: When receiving the corresponding first closing and pulling control information, generating a closing and pulling request information, wherein the first closing and pulling control information is generated by the server; The switch-on / off request information is sent to the master electric energy meter through the internal communication line, so that the master electric energy meter stores the switch-on / off request information in a preset buffer area, sequentially reads the switch-on / off request information in the preset buffer area, generates corresponding second switch-on / off control information based on the read switch-on / off request information, and sends the second switch-on / off control information to the corresponding slave electric energy meter through the bidirectional transmission bus; When the corresponding second closing and opening control information returned by the host power meter is received, the closing and opening operation of the relay is executed.
6. The method according to claim 5, characterized in that The step of sending the switch request information to the host electric energy meter through the internal communication line includes: When there is at least one upper-level slave electric energy meter, the closing and pulling request information is sent to the upper-level slave electric energy meter through the internal communication line of the sending end, so that the upper-level slave electric energy meter receives the closing and pulling request information through the internal communication line of the receiving end, and forwards the closing and pulling request information through the internal communication line of the sending end.
7. The method according to claim 6, characterized in that The method further comprises: When there is at least one lower-level electric energy meter, receiving the switch-on / off request information sent by the lower-level electric energy meter; The switch request information sent by the lower-level electric energy meter is stored in the local cache; Sequentially read the switch request information sent by the subordinate electric energy stored in the local cache; When the internal communication line at the sending side is in an idle state, the switch request information sent by the lower-level slave electric energy meter is sent to the upper-level slave electric energy meter through the internal communication line of the sending end.
8. A relay control device for a multi-user electric energy meter, characterized in that: The multi-user electric energy meter includes a host electric energy meter and a plurality of slave electric energy meters. The host electric energy meter and each slave electric energy meter are provided with relays. The host electric energy meter is connected in series with the target slave electric energy meter through a wiring. Different slave electric energy meters are connected in series in sequence through wiring. The wiring includes a bidirectional transmission bus and an internal communication line. The device includes: A first receiving module is used to receive the switch request information sent by different slave electric energy meters through the internal communication line, wherein the switch request information is determined by the corresponding slave electric energy meter according to the received first switch control information, and the first switch control information is generated by the service end; A first storage module is used to store the switch request information respectively sent by the different slave electric energy meters into a preset buffer area; A first reading module is used to sequentially read the closing and closing request information in a preset buffer area; A first generating module, configured to generate corresponding second closing and pulling control information based on the read closing and pulling request information; The first sending module is used to send the second closing and pulling control information to the corresponding slave electric energy meter through the bidirectional transmission bus, so that the slave electric energy meter performs the closing and pulling operation of the relay based on the second closing and pulling control information.
9. A relay control device for a multi-user electric energy meter, characterized in that: The multi-user electric energy meter includes a host electric energy meter and a plurality of slave electric energy meters. The host electric energy meter and each slave electric energy meter are provided with relays. The host electric energy meter is connected in series with the target slave electric energy meter through a wiring. Different slave electric energy meters are connected in series in sequence through wiring. The wiring includes a bidirectional transmission bus and an internal communication line. The device includes: A second generating module is used to generate a switch-on request message when receiving the corresponding first switch-on control information, wherein the first switch-on control information is generated by the server; a second sending module, configured to send the switch-on / off request information to the master electric energy meter through the internal communication line, so that the master electric energy meter stores the switch-on / off request information in a preset buffer area, sequentially reads the switch-on / off request information in the preset buffer area, generates corresponding second switch-on / off control information based on the read switch-on / off request information, and sends the second switch-on / off control information to the corresponding slave electric energy meter through the bidirectional transmission bus; The execution module is used to execute the closing and closing operation of the relay when receiving the corresponding second closing and opening control information returned by the host power meter.
10. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the relay control method for a multi-user electric energy meter according to any one of claims 1 to 4, or executes the relay control method for a multi-user electric energy meter according to any one of claims 5 to 7 by executing the computer instructions.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the relay control method for a multi-user electric energy meter described in any one of claims 1 to 4, or to execute the relay control method for a multi-user electric energy meter described in any one of claims 5 to 7.
