CN118054988A - Networking method, electronic equipment and networking system of electric energy meter - Google Patents
Networking method, electronic equipment and networking system of electric energy meter Download PDFInfo
- Publication number
- CN118054988A CN118054988A CN202410192312.0A CN202410192312A CN118054988A CN 118054988 A CN118054988 A CN 118054988A CN 202410192312 A CN202410192312 A CN 202410192312A CN 118054988 A CN118054988 A CN 118054988A
- Authority
- CN
- China
- Prior art keywords
- address
- electric energy
- information
- address data
- address information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 230000006855 networking Effects 0.000 title claims abstract description 202
- 238000000034 method Methods 0.000 title claims abstract description 120
- 238000004891 communication Methods 0.000 claims abstract description 146
- 238000012795 verification Methods 0.000 claims abstract description 53
- 230000000875 corresponding effect Effects 0.000 claims description 125
- 230000004044 response Effects 0.000 claims description 51
- 238000012790 confirmation Methods 0.000 claims description 41
- 230000005540 biological transmission Effects 0.000 claims description 20
- 230000002596 correlated effect Effects 0.000 claims description 7
- 230000008569 process Effects 0.000 abstract description 14
- 230000001934 delay Effects 0.000 abstract description 8
- 238000010586 diagram Methods 0.000 description 14
- 238000012545 processing Methods 0.000 description 11
- 230000006870 function Effects 0.000 description 6
- 238000004590 computer program Methods 0.000 description 5
- 239000002131 composite material Substances 0.000 description 4
- 238000001514 detection method Methods 0.000 description 4
- 230000003993 interaction Effects 0.000 description 4
- 238000007726 management method Methods 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 3
- 230000002159 abnormal effect Effects 0.000 description 2
- 230000008901 benefit Effects 0.000 description 2
- 238000013500 data storage Methods 0.000 description 2
- 238000007689 inspection Methods 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000013480 data collection Methods 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 238000005265 energy consumption Methods 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 230000011664 signaling Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
- H04L12/40006—Architecture of a communication node
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/004—Arrangements for detecting or preventing errors in the information received by using forward error control
- H04L1/0045—Arrangements at the receiver end
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/28—Flow control; Congestion control in relation to timing considerations
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/50—Address allocation
- H04L61/5038—Address allocation for local use, e.g. in LAN or USB networks, or in a controller area network [CAN]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/12—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Arrangements For Transmission Of Measured Signals (AREA)
Abstract
The application provides a networking method, electronic equipment and a networking system. The method comprises the following steps: the power meter transmits the first address information to the first device over the communication bus based on the delay to minimize overlapping of signals of the first address information on the communication bus. If the delays of the sending of the first address information by the electric energy meters are different, the signals of the first address information on the communication bus are not overlapped, and the second address information is the first address information which can be successfully checked; if the delays of the first address information sent by any two electric energy meters are the same, signals of the first address information on the communication bus are overlapped, and the second address information is formed by overlapping signals of a plurality of first address information, and verification may fail. And checking the received second address information, and networking when all the second address information corresponding to the electric energy meters participating in networking are checked successfully. The process does not need to be manually participated, and the accuracy of the first equipment for acquiring the address of the electric energy meter in the networking process is ensured.
Description
Technical Field
The present application relates to the field of communications, and in particular, to a networking method, an electronic device, and a networking system for an electric energy meter.
Background
The electric energy meter can provide functions such as electric energy metering, monitoring and management. Networking operation can be performed between a plurality of electric energy meters and a host. Through the network deployment, the energy consumption information of each electric energy meter can be collected and monitored in real time, and remote intelligent management and control are carried out on the electric energy meter.
To implement networking operations, the host needs to know the address information of the electric energy meter to which it is connected. In the prior art, when the electric energy meter is installed, the addresses of the electric energy meters are manually input into the host computer and then are networked, the time for networking by manually inputting the addresses of the electric energy meters is more, errors are easy to occur, and the accuracy is low.
Therefore, how to make the host quickly and accurately obtain the address of the electric energy meter participating in networking and improve the networking efficiency is a current problem to be solved urgently.
Disclosure of Invention
The application provides a networking method of electric energy meters, the electric energy meters and a networking system, wherein each electric energy meter sends first address information based on delay, so that the situation that the first equipment cannot obtain accurate electric energy meter address information due to overlapping of signals of the address information on a communication bus is reduced as much as possible, and the first equipment can quickly and accurately acquire electric energy meter addresses participating in networking by checking and guaranteeing the correctness of the received address information, thereby improving networking efficiency.
In a first aspect, the present application provides a networking method of an electric energy meter, where the method is applied to a first device, and the first device and a plurality of electric energy meters are all connected to a communication bus, and the method includes: the first device broadcasting first information to the plurality of electric energy meters through the communication bus; the first information is used for indicating the electric energy meter to send first address information to the first device based on delay time length corresponding to the electric energy meter; the first address information includes: the first address data and the first check data of the electric energy meter; the first verification data is used for verifying the first address data; the first device receives second address information through the communication bus; the second address information includes second address data and second check data; the second address information is one piece of first address information on the communication bus, and the signal of the first address information is completely not overlapped with the signals of the first address information sent by other electric energy meters participating in networking; or the second address information is address information obtained by superposing a plurality of signals of first address information on the communication bus, wherein the signals of the plurality of first address information are superposed; the first device verifies the second address data based on the second verification data; if the verification is successful, the first device determines that the second address information is one piece of the first address information on the communication bus, and stores second address data in the second address information into a cache; if verification fails, the first device determines that the second address information is address information obtained by superposition of signals of a plurality of first address information on the communication bus, and broadcasts the first information through the communication bus; the first equipment performs verification based on the received second address information until the second address data corresponding to the first address data of all the electric energy meters participating in networking are successfully verified, writes all the second address data in the cache into a first memory, and performs networking according to all the second address data in the first memory; wherein all the electric energy meters participating in networking comprise all or part of electric energy meters connected to the communication bus.
In some embodiments, before the first device writes all of the second address data in the cache to the first memory, the method further comprises: the first device outputting a first request; the first request comprises the total number of the second address data stored in the cache, and is used for requesting to determine whether networking is allowed for the electric energy meters corresponding to all the second address data; the first device writing all of the second address data in the cache to a first memory, comprising: the first device receives a first instruction; the first instruction indicates that networking is allowed for the electric energy meters corresponding to all the second address data; the first device responds to the first instruction and writes all the second address data stored in the cache into the first memory; the method further comprises the steps of: the first device receives a second instruction; the second instruction indicates that networking is not allowed for the electric energy meter corresponding to the second address data; and the first equipment responds to the second instruction, broadcasts first information through the communication bus, and performs verification based on the received second address information until the second address data corresponding to the first address data of all the electric energy meters participating in networking are successfully verified.
In some embodiments, before the first device outputs the first request, the method further comprises: the first device sends address confirmation request information to the communication bus in a unicast mode aiming at each second address data in the cache, so that the communication bus transmits the address confirmation response information according to the second address data; the first device determines that address confirmation response information exists in the second address data according to the received address confirmation response information aiming at the second address data, and the address confirmation response information exists in the second address data to indicate that one electric energy meter exists in the electric energy meters participating in networking and corresponds to the second address data; the first device determines that the address confirmation response information does not exist in the second address data according to the fact that the address confirmation response information for the second address data is not received; the address confirmation response information of the second address data does not exist, which indicates that one electric energy meter does not exist in the electric energy meters participating in networking and corresponds to the second address data; the first device outputting a first request comprising: the first device outputs the first request under the condition that the first device determines that all second address data in the cache have corresponding address confirmation response information; the method further comprises the steps of: and under the condition that the first equipment determines that the corresponding address confirmation response information does not exist in part of the second address data in the cache or under the condition that the first equipment determines that the corresponding address confirmation response information does not exist in all the second address data in the cache, the first equipment broadcasts the first information through the communication bus, and checks based on the received second address information until the second address data corresponding to the first address data of all the electric energy meters participating in networking are successfully checked.
In some embodiments, the first device verifying the second address data based on the second verification data comprises: the first equipment checks the second address information received in a preset time after broadcasting the first information; the preset duration is positively correlated with the number of the electric energy meters participating in networking; the method further comprises the steps of: and if the second address information is not received within a preset time after the first information is broadcast, the first device broadcasts the first information through the communication bus until the second address information is received.
In some embodiments, before the first device broadcasts first information to the at least one power meter via the communication bus, the method further comprises: the first device determining whether one or more third address data are stored in the first memory in response to a power-on operation; wherein a third address data indicates an address of an electric energy meter; the first device broadcasting first information to the plurality of power meters via the communication bus, comprising: the first device broadcasting the first information to the plurality of electric energy meters through the communication bus under the condition that the third address data is not stored in the first memory; or under the condition that one or more third address data are stored in the first memory, the first device determines whether the electric energy meter corresponding to the third address data is on line or not according to each third address data; and if the electric energy meter corresponding to each third address data in the one or more third address data is online, the first equipment broadcasts the first information to the plurality of electric energy meters through the communication bus.
In some embodiments, the method further comprises: if all or part of the electric energy meters corresponding to the one or more third address data are offline, the first equipment outputs a second request; the second request is used for requesting to confirm to delete third address data corresponding to the offline electric energy meter or confirming whether the electric energy meter corresponding to the third address data is online or not according to each third address data; the first device receives a third instruction, wherein the third instruction is used for indicating to delete third address data corresponding to the offline electric energy meter; the first equipment responds to a third instruction and deletes third address data corresponding to the offline electric energy meter; or the first equipment broadcasts the first information to the plurality of electric energy meters through the communication bus, and checks the received second address information until the second address data corresponding to the first address data of all the electric energy meters participating in networking are checked successfully; or the first equipment receives a fourth instruction, wherein the fourth instruction is used for indicating whether the electric energy meter corresponding to each third address data is on line or not; the first equipment responds to the fourth instruction, determines whether the electric energy meters corresponding to the third address data are on line or not according to each third address data until all the electric energy meters corresponding to the one or more third address data are on line; and the first equipment broadcasts the first information to the plurality of electric energy meters through the communication bus, and checks the received second address information until the second address data corresponding to the first address data of all the electric energy meters participating in networking are checked successfully.
In a second aspect, an embodiment of the present application provides a networking method of an electric energy meter, applied to the electric energy meter, where a first device and a plurality of electric energy meters are connected to a communication bus, the method includes: the electric energy meter receives first information broadcast by the first equipment through the communication bus; the first information is used for indicating the electric energy meter to send first address information to the first equipment; the electric energy meter determines delay time length for sending the first address information based on the first information; the electric energy meter sends the first address information to the first device through the communication bus based on the delay time length; the first address information comprises first address data and first verification data, and the first verification data is used for verifying the first address data; the first address information is related to second address information received by the first device; if the signal of the first address information is not overlapped with the signals of the first address information sent by other electric energy meters participating in networking, the second address information is one first address information on the communication bus; if the first address information is overlapped with signals of the first address information sent by other electric energy meters participating in networking, the second address information is address information obtained by overlapping signals of a plurality of first address information on the communication bus; the second address information includes second address data and second check data; if the second verification data can successfully verify the second address data, storing the second address data in the second address information into a cache of the first device; if the second verification data cannot successfully verify the second address data, the electric energy meter receives first information broadcasted by the first equipment through the communication bus; and under the condition that all second address data corresponding to the first address data of all the electric energy meters participating in networking are successfully checked, all second address data in the first equipment cache are written into a first memory of the first equipment, so that the first equipment can perform networking according to all the second address data in the first memory.
In some embodiments, before the electric energy meter sends the first address information to the first device through the communication bus based on the delay time, the method further comprises: the electric energy meter detects that no data is transmitted on the communication bus; the method further comprises the steps of: and when the electric energy meter detects that data transmission exists on the communication bus, the electric energy meter waits until no data transmission exists on the communication bus, and based on the delay time, the first address information is sent to the first device through the communication bus.
In a third aspect, embodiments of the present application provide an apparatus comprising means for performing the method of the first or second aspect of the present application.
In a fourth aspect, an embodiment of the present application provides a chip, where the chip includes an interface circuit and a logic circuit, where the interface circuit is configured to receive signals from other chips outside the chip and transmit the signals to the logic circuit, or send the signals from the logic circuit to the other chips outside the chip, where the logic circuit is configured to implement the method according to the first aspect or the second aspect of the present application.
In a fifth aspect, an embodiment of the present application provides an electronic device, which is an electric energy meter or a first device, including a memory and a processor, the memory storing a computer program executable on the processor; when the electronic device is a first device, the method according to the first aspect of the present application is implemented when the processor executes the program, and when the electronic device is an electric energy meter, the method according to the second aspect of the present application is implemented when the processor executes the program.
In a sixth aspect, the present application provides a computer readable storage medium having stored thereon a computer program which when executed by a processor implements a method according to the first or second aspect of the present application.
In a seventh aspect, the present application provides a networking system, including the electric energy meter according to the fourth aspect of the present application and the first device according to the fourth aspect of the present application.
According to the networking method provided by the application, the electric energy meter participating in networking responds to the first information, and transmits the first address information to the first equipment through the communication bus based on the corresponding delay, and correspondingly, the first equipment receives the second address information. If the delays of the sending of the first address information by the electric energy meters are different, signals of the first address information on the communication bus are not overlapped, the second address information is the first address information, and the second address information can be checked successfully. If the delays of the first address information sent by any two electric energy meters are the same, signals of the first address information on the communication bus are overlapped, the second address information is formed by overlapping signals of a plurality of first address information, and verification of the second address information may fail. The networking method provided by the application checks the accessed second address information, and networking is performed when all the second address information corresponding to the first address information sent by the electric energy meter participating in networking is checked successfully. The whole process does not need to be manually participated, and automatic networking can be realized to improve networking efficiency. Each electric energy meter sends first address information based on time delay, so that the situation that the first equipment cannot obtain accurate electric energy meter address information due to the fact that signals of the address information are overlapped on a communication bus as much as possible is reduced, the accuracy of the received address information is guaranteed through inspection, the first equipment can acquire the electric energy meter addresses participating in networking rapidly and accurately, and networking efficiency is improved.
Drawings
Fig. 1 is a schematic implementation flow chart of a networking method of an electric energy meter according to an embodiment of the present application;
FIG. 2A is a signal timing diagram of two first address information signals according to an embodiment of the present application;
FIG. 2B is a signal timing diagram of two first address information signals according to an embodiment of the present application;
FIG. 2C is a signal timing diagram of the case where signals of two first address information provided by the embodiment of the application are completely overlapped;
fig. 3 is a schematic implementation flow chart of a networking method of an electric energy meter according to an embodiment of the present application;
fig. 4 is a schematic implementation flow chart of a networking method of an electric energy meter according to an embodiment of the present application;
Fig. 5 is a schematic implementation flow chart of a networking method of an electric energy meter according to an embodiment of the present application;
Fig. 6 is a schematic implementation flow chart of a networking method of an electric energy meter according to an embodiment of the present application;
fig. 7 is a schematic implementation flow chart of a networking method of an electric energy meter according to an embodiment of the present application;
Fig. 8 is a signaling interaction schematic diagram of a networking method of an electric energy meter according to an embodiment of the present application;
Fig. 9 is a schematic structural diagram of a networking device of an electric energy meter according to an embodiment of the present application;
Fig. 10 is a schematic structural diagram of a networking device of an electric energy meter according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In the present application, "at least one" means one or more, and "a plurality" means two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a alone, a and B together, and B alone, wherein a, B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship. "at least one of" or the like means any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one (one) of a, b, or c alone may represent: a alone, b alone, c alone, a combination of a and b, a combination of a and c, b and c, or a combination of a, b and c, wherein a, b, c may be single or plural. Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
The terms "center," "longitudinal," "transverse," "upper," "lower," "left," "right," "front," "rear," and the like refer to an orientation or positional relationship based on that shown in the drawings, merely for convenience of description and to simplify the description, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore should not be construed as limiting the application.
The terms "connected," "connected," and "connected" are to be construed broadly, and may refer to, for example, electrical or signal connections in addition to physical connections, e.g., direct connections, i.e., physical connections, or indirect connections via at least one element therebetween, such as long as electrical circuit communication is achieved, and communications within two elements; signal connection may refer to signal connection through a medium such as radio waves, in addition to signal connection through a circuit. The specific meaning of the above terms in the present application will be understood in specific cases by those of ordinary skill in the art.
The networking of the electric energy meters means that a plurality of electric energy meters and a first device are deployed in the same network, and the first device is used for realizing centralized management and monitoring on the plurality of electric energy meters.
In order to realize networking of the electric energy meters, the first equipment needs to acquire address information of each electric energy meter participating in networking. In the prior art, the addresses of the electric energy meters can be manually input into the first equipment during installation, the equipment is restarted to carry out networking, the mode of manually inputting the addresses of the electric energy meters is more in time consumption, the accuracy is low, and errors are easy to occur.
Based on the method, in the method, the first equipment and the plurality of electric energy meters are connected to the communication bus, the first equipment can acquire address data of each electric energy meter participating in networking from the communication bus, manual participation is not needed, and the efficiency of the first equipment for acquiring the addresses of the electric energy meters is improved. The electric energy meters participating in networking send the first address information based on the delay, so that the situation that the first equipment cannot obtain accurate electric energy meter address information due to the fact that signals of the address information are overlapped on a communication bus is reduced as much as possible, the accuracy of the received address information is guaranteed through inspection, the first equipment can acquire the electric energy meter addresses participating in networking rapidly and accurately, and networking efficiency is improved.
Fig. 1 is a schematic implementation flow chart of a networking method according to an embodiment of the present application, as shown in fig. 1, the method includes the following steps S101 to S106:
S101, first equipment broadcasts first information to a plurality of electric energy meters through a communication bus, wherein the first information is used for indicating the electric energy meters to send first address information to the first equipment based on delay time corresponding to the electric energy meters.
The first device is an electronic device having data collection, storage and signal processing capabilities. The first device may be, for example, a concentrator, or a power meter or other electronic device having concentrator functionality.
The first address information is determined by the power meter. The first address information includes: the first address data and the first check data of the electric energy meter; the first verification data is used for verifying the first address data.
The first check data may be odd check data, even check data, redundancy check data, or the like, which may perform odd check, even check, redundancy check, or the like, respectively, on the first address data.
Illustratively, the first parity data is odd parity data for odd parity of the first address data. I.e. the first check data is used to make the sum of the numbers of 1 in the first address data and the first check data odd. Assume that the first address data is: 1001, the first check data is: 1. thus, the first address information may include 5 bits, the first 4 bits are used to represent the first address data, the last 1 bit is used to represent the first check data, and the first address information is: 10011.
It should be noted that the number of bits of the first address data and the number of bits of the first check data are only an example of the present application, and do not constitute a limitation of the technical solution of the present application. In the present application, the number of bits of the first address data and the first check data may be determined according to actual conditions.
After the first device broadcasts the first information, part or all of the plurality of electric energy meters respond to the first information and send first address information to the first device based on corresponding delay. And responding the first information, and successfully sending the first address information to the first equipment, wherein the electric energy meter is the electric energy meter participating in networking.
In some embodiments, the time delay durations corresponding to different electric energy meters may be the same or different.
The method for determining the delay time length for transmitting the first address information by the electric energy meter is not limited. In some embodiments, the electric energy meter may generate the delay time length by using a preset algorithm, or may randomly select a time length within a time length range specified by the host. The duration range may be 0 to a preset duration mentioned below.
In some embodiments, the particular duration range may be carried in the first information. The host computer pre-determines a preset time length before sending the first information, determines a time length range according to the preset time length, and then adds the time length range into the first information and sends the first information to the electric energy meter.
S102, the first device receives second address information through a communication bus.
The first address information is transmitted through the communication bus and becomes second address information.
The second address information includes second address data and second check data.
The delay time of the first address information sent by the plurality of electric energy meters or the time when the plurality of electric energy meters send the first address information are related to the overlapping state of the signals of the plurality of first address information transmitted through the communication bus.
In some embodiments, the manner in which the electric energy meter transmits the first address information through the communication bus is serial transmission, i.e., the communication bus transmits one bit at a time. If the time delay duration/sending time difference of any two first address information is larger than a first threshold value, signals of the two first address information are not overlapped at all. If the difference between the delay time length/the sending time of any two pieces of first address information is greater than 0 and less than the first threshold, signals of the two pieces of first address information may partially overlap. If the delay time/the transmission time of any two pieces of first address information are identical, signals of the two pieces of first address information are completely overlapped.
The first threshold may be the same as a time period between transmission of a start bit in the first address information and transmission of a last bit of the first address information.
In other embodiments, the electric energy meter transmits the first address information through the communication bus in parallel, and the number of bits that can be transmitted by the communication bus at a time is the same as the number of bits of the first address information. In this case, if the delays/times of transmission of the first address information by the electric energy meters participating in the networking are different, the signals of the respective first address information do not overlap at all. If the delay/time of the first address information sent by any two electric energy meters participating in networking is the same, signals of the first address information sent by any two electric energy meters participating in networking are completely overlapped.
The overlapping state of the signals of the first address information is correlated with the acquired second address information.
As described above, if the signal of the first address information is not overlapped with the signal of the first address information sent by another electric energy meter participating in the networking, the second address information is one first address information on the communication bus.
If the signals of the plurality of first address information are overlapped (including the case of partial overlapping and complete overlapping), the second address information is address information obtained by overlapping the signals of the plurality of first address information on the communication bus. Specifically, the signal of the second address information is a composite signal obtained by superimposing the signals of the plurality of first address information.
Fig. 2A, 2B, and 2C show signal timing diagrams in three cases where signals of two first address information are completely non-overlapping, partially overlapping, and completely overlapping, respectively.
As shown in fig. 2A, the first address information sent by the electric energy meter 1 participating in the networking is 10101, the signal waveform thereof is S1, the first address information sent by the electric energy meter 2 participating in the networking is 11001, and the signal waveform thereof is S2. S1 and S2 do not overlap at all. Both S1 and S2 can be accurately received by the first device. I.e. the second address information currently received by the communication bus is a first address information. In which case the second verification data can successfully verify the second address data.
As shown in fig. 2B or fig. 2C, there is an overlap of S1 and S3, in which case neither S1 nor S3 can be received accurately.
Illustratively, in fig. 2B, the manner in which the power meter transmits the first address information is serial transmission. If the electric energy meter 1 is transmitting the 2 nd bit 0 of S1, the electric energy meter 2 starts transmitting the1 st bit 1 of S2. Thus, S1 and S2 partially overlap. After the electric energy meter 1 sends S1, the signal of the second address information corresponding to the first address information sent by the electric energy meter 1 and received by the first device is a composite signal S3 formed by overlapping all bits of S1 and part bits (2 nd to 4 th) of S2, and the second address information corresponding to S3 is: 10100.
The data structure of the second address information is the same as the data structure of the first address information, and the types of the second check data and the first check data are the same. In the second address information 10100, the first 4 bits correspond to second address data, the last bit corresponds to second check data, the number of 1 s in the second address data is 2, and the second check data is 0. The second verification data cannot successfully verify the second address data.
In fig. 2C, S1 and S2 are all overlapped, after the electric energy meter 1 and the electric energy meter 2 send the first address information, the signal S4 of the second address information corresponding to the first address information sent by the electric energy meter 1 or the electric energy meter 2 and received by the first device, S4 is a composite signal formed by overlapping all bits of S1 and all bits of S2, and the second address information is: 10001. wherein the first 4 bits 1000 correspond to the second address data, the last bit 1 corresponds to the second check data, and the second check data cannot successfully check the second address data.
S103, the first device verifies the second address data based on the second verification data; if the verification is successful, executing S104 to continue to verify the next second address data; if the verification fails, the first device determines that the second address information is address information obtained by superposition of signals of a plurality of first address information on the communication bus, and the second address information is not the first address information. In this case, the first device performs S101.
As described above, if the second verification data can successfully verify the second address data, it is indicated that the signal of the first address information sent by the current electric energy meter and the signal of the first address information sent by the other electric energy meters participating in the networking are not overlapped at all, and the first address information can be accurately received by the first device, and one second address information is identical to one first address information.
If the second verification data cannot successfully verify the second address data, it is indicated that the signal of the first address information sent by the current electric energy meter may overlap with the signals of the first address information sent by other electric energy meters participating in networking, and the second address information may be address information formed by overlapping a plurality of signals of the first address information, instead of the first address information itself. That is, the first address information may not be accurately received by the first device.
S104, the first device determines the second address information as first address information on the communication bus, and stores second address data in the second address information into a cache.
The cache may be a static random access memory (Static Random Access Memory, SRAM). Which has a high access speed.
SRAM is a volatile memory that relies on power supplied by a power source. Data in SRAM is also lost when power is lost.
S105, the first equipment performs verification based on the received second address information, and whether second address data corresponding to the first address data of all the electric energy meters participating in networking are successfully verified or not is determined; if yes, executing S106; otherwise, continuing to execute S101 to S105 until the second address data corresponding to the first address data of all the electric energy meters participating in networking are checked successfully.
S104 describes a procedure of checking one second address information received currently, S105 describes checking at least one second address information received subsequently.
The second address information is checked, that is, the second address data is checked using the second check data.
When the second address information is checked, it may be that the second address information is checked after being received. And if the verification is successful, storing the second address data into the cache, and then verifying the next address data, and the like until whether the second address data corresponding to the first address data of all the electric energy meters participating in networking are verified successfully or not. If the second address information received fails to be checked during the checking process, the process returns to S101 after the second address information fails to be checked, and the second address data received next does not need to be checked again.
In some embodiments, the verification of the second address data corresponding to the first address data of all the electric energy meters participating in the networking may be determined to be successful by the following method:
The first device checks all second address information received within a preset time after broadcasting the first information, and the second address information is checked successfully.
In some embodiments, the preset duration is related to the number of meters participating in the networking and a delay threshold for the meter transmission delay.
Specifically, the preset threshold is positively correlated with the number of electric energy meters participating in the networking. And the preset time length is larger than a delay threshold value of the transmission delay of the electric energy meter.
And S106, the first equipment writes all second address data in the cache into the first memory, and networking is carried out according to all second address data in the first memory.
If any second address data received is checked, and the check is unsuccessful, the second address data in the cache is not written into the first memory, and when the execution is returned to S101, all the second address data stored in the cache are released.
It will be appreciated that only after the second address data has been successfully verified, the second address data that has been fully verified is written into the first memory. And writing one instead of checking success, checking again, and checking success and writing again. The mode of writing the second address data into the first memory in batches can save the waiting time of the first memory, and is beneficial to saving electricity of the first memory.
The first Memory may be a nonvolatile Memory such as an EEPROM (ELECTRICALLY ERASABLE PROGRAMMABLE READ-Only Memory) FLASH Memory (Firmware, lighting-ACCELERATED STORAGE, hot-pluggable, FLASH) or a ferroelectric random access Memory (Ferroelectric Random Access Memory, FRAM), which does not lose data when power is turned off. And the stability of data storage is ensured.
After the second address data is written into the first memory, the second address data is always present if not actively deleted by the first device. After each power-on, the first equipment can perform communication connection and data interaction according to own requirements and the second address data and the electric energy meter corresponding to the second address data so as to realize management and control of the electric energy meter.
The electric energy meter sends first address information to the first device through the communication bus, and accordingly, the first device receives second address information. If the delays of the sending of the first address information by the electric energy meters are different, signals of the first address information on the communication bus are not overlapped, the second address information is the first address information, and the second address information can be checked successfully. If the delays of the first address information sent by any two electric energy meters are the same, signals of the first address information on the communication bus are overlapped, the second address information is formed by overlapping signals of a plurality of first address information, and verification of the second address information may fail. The networking method provided by the application checks the accessed second address information, and networking is performed when all the second address information corresponding to the first address information sent by the electric energy meter participating in networking is checked successfully. The whole process does not need to be manually participated, and automatic networking can be realized to improve networking efficiency. And the delay of the electric energy meter for sending the first address information does not need to be specially planned and calculated to ensure that the delay of each electric energy meter for sending the first address information is different. Even if the delay of the first address information is the same, the electric energy meter further checks the second address information after receiving the second address information, networking is performed only after the second address information corresponding to all the electric energy meters participating in networking is successfully checked, and networking accuracy is guaranteed while calculation resources of the electric energy meters are saved.
As described above, the communication bus is connected with the first device and the plurality of electric energy meters, address information of any electric energy meter may not be stored in the first device, address information of part of electric energy meters may also be stored in the first device, and electric energy meters not stored with address information are all electric energy meters needing networking. After the first device broadcasts the first information, ideally, each electric energy meter needing to be networked successfully sends the first address information to the first device to participate in the networking so as to participate in the networking.
In some special cases, for example: if a certain electric energy meter which needs networking is in poor contact with an interface connected with a communication bus, and data transmission is abnormal or data cannot be transmitted, the electric energy meter may not successfully send first address information to first equipment. And the second address data corresponding to the electric energy meter is not included in the second address data successfully checked by the first equipment. In this case, the first device needs to request the user whether to continue the networking operation, continue the networking operation according to the user instruction, or rebroadcast the first information to re-network.
The fig. 3 and 4 embodiments describe the process flow of the first device in the case where the user indicates that networking operation is allowed and the user indicates that networking operation is not allowed, respectively.
Fig. 3 is a schematic implementation flow chart of a networking method according to an embodiment of the present application. As shown in fig. 3, the networking method further includes S106a to S106b before S106 in the embodiment of fig. 1:
And S106a, the first equipment outputs a first request, wherein the first request comprises the total number of the second address data stored in the cache, and the first request is used for requesting a user to confirm whether networking is allowed for the electric energy meters corresponding to all the second address data.
The total number of the second address data stored in the cache is the number of the second address data which is received and checked successfully after the first device broadcasts the first information.
The first request may be output in the form of text prompt information or in the form of voice prompt information, which is not limited in the present application.
Illustratively, the first request is output in the form of a text prompt, and the first request may further include two options: allowing and disallowing continued networking.
And S106b, the first equipment receives a first instruction, and the first instruction indicates that networking of the electric energy meters corresponding to all the second address data is allowed.
The first instruction is sent by the user. In some embodiments, the user may send the first instruction to the first device in the form of voice. In other embodiments, the option for allowing to continue networking corresponds to a first instruction. The user may send the first instruction by touching the option or clicking a key corresponding to the option.
Illustratively, if the user sends the first instruction to the first device in the form of voice, the first device starts the voice detection function, and when voice information related to "allow to continue networking" is detected, S106 is performed.
Or if the user transmits the first instruction by touching/clicking the option/key associated with the first instruction, the first device performs S106 after detecting the touch/key operation of the user in the specific area.
In this embodiment, before writing the second address data in the buffer memory into the first memory for networking, the first device requests the user to determine whether to allow networking according to the number of the second address data, and if the user allows networking, S106 is executed to write the second address data into the first memory for networking.
Fig. 4 is a schematic implementation flow chart of another networking method of an electric energy meter according to the embodiment of the present application, fig. 4 mainly describes an execution flow of the first device when the user indicates that networking is not allowed, and fig. 4 further includes S106c after S106 a:
s106c, the first equipment receives a second instruction; the second instruction indicates that networking of the electric energy meter corresponding to the second address data is not allowed.
The first device returns to execute S101 in response to the second instruction.
The second instruction is sent by the user. In some embodiments, the user may send the second instruction to the first device in the form of voice. In other embodiments, the option that does not allow to continue networking corresponds to a second instruction. The user may send the second instruction by touching the option or clicking a key corresponding to the option.
Illustratively, if the user sends the second instruction to the first device in the form of voice, the second device starts the voice detection function, and when voice information related to "no network connection is allowed" is detected, S101 is executed.
Or if the user transmits the second instruction by touching/clicking the option/key associated with the second instruction, the first device performs S101 after detecting the touch/key operation of the user in the specific area.
In this embodiment, before writing the second address data in the buffer memory into the first memory to perform networking, the first device requests the user to determine whether to allow networking according to the number of the second address data, and returns to execute S101 if the user does not allow networking, and rebroadcasts the first information to reacquire the address data of the electric energy meters participating in networking.
In some embodiments, the user may send a fifth instruction, the fifth instruction indicating that the first device ends networking. The first device ends the current flow in response to the fifth instruction after receiving the fifth instruction.
As described in the previous embodiment, if the signal of the second address information is obtained by overlapping the signals of the plurality of first address information, the verification of the second address information may fail. However, the signal verification of the second address information obtained by superimposing the signals of the plurality of first address information is not excluded. For example, the signal S5 of one first address information 11001 and the signal S6 of the other first address information 10110 are superimposed in such a manner that the 2 nd bit to the 5 th bit of S5 are respectively superimposed with the 1 st bit to the 4 th bit of S6, and the second address information corresponding to the superimposed composite signal is 11001. In the second address information, although the second verification data may successfully verify the second address data. However, the second address information and the two first address information are not identical, and there is no electric energy meter which can correspond to the second address information among the plurality of electric energy meters.
To avoid this, it is necessary to determine whether the second address data can correspond to one of the plurality of electric energy meters after checking all the second address data.
Based on this, the embodiment of the application provides a networking method of an electric energy meter, and fig. 5 is a schematic implementation flow diagram of the networking method of the electric energy meter provided by the embodiment of the application. As shown in fig. 5, the method further needs to perform the following S1061a to S1062a before S106 a.
S1061a, the first device sends address acknowledgement response information to the communication bus in a unicast manner for each second address data in the cache, so that the communication bus transmits the address acknowledgement response information according to the second address data.
S1062a, the first device confirms whether all the second address data in the cache have corresponding address confirmation response information. If yes, executing S106a to request the user to indicate whether to continue networking; otherwise, S101 is performed to rebroadcast the first information to reorganize the network.
The conditions for executing S106a are specifically: the first device confirms that all second address data in the cache have corresponding address confirmation response information.
The conditions for executing S101 specifically include: and all the second address data in the first equipment confirmation buffer memory does not have corresponding address confirmation response information, or part of the second address data in the first equipment confirmation buffer memory has corresponding address confirmation response information.
For each second address data, if the first device receives address confirmation response information for the second address data, the first device determines that the second address data has the corresponding address confirmation response information. The second address data exists address confirmation response information indicates that one electric energy meter exists in the electric energy meters participating in networking and corresponds to the second address data.
If the first device does not receive the address confirmation response information for the second address data, the first device determines that the second address data does not have the corresponding address confirmation response information. The absence of the corresponding address confirmation response information of the second address data indicates that one electric energy meter which participates in networking does not exist in the electric energy meters corresponding to the second address data.
In this embodiment, before the first device requests the user to confirm whether to continue networking, for each second address data in the cache, it is determined whether the electric energy meter participating in networking exists in the electric energy meter corresponding to the second address data, and if the electric energy meter corresponding to each second address data exists, the networking operation is continuously executed. Otherwise, continuing to broadcast the first information to reacquire the address data of each electric energy meter participating in the networking.
In the embodiment of fig. 1, after the first device broadcasts the first information to the plurality of power meters via the communication bus, there are two cases: case 1: the first device receives at least one second address information through the communication bus within a preset time period. Case 2: the first device does not receive the second address information within a preset duration. The first device receives the second address information differently, and the first device executes the process.
The application provides a networking method of an electric energy meter, which aims at the two different conditions and shows two different processing flows of first equipment.
Fig. 6 is a schematic implementation flow chart of a networking method of an electric energy meter according to an embodiment of the present application, as shown in fig. 6, in case 1, a first device implements S102 through the following S1021. In case 2, the first device continues to return to executing S101 after S101.
S1021, the first device receives the second address information through the communication bus within a preset time period.
The preset time length is positively correlated with the number of the electric energy meters participating in networking, or the preset time length is correlated with the number of the electric energy meters needing networking.
And the slave electric energy meter sends the first address information to the first equipment based on the delay, and the delay generated by the slave electric energy meter participating in networking is smaller than or equal to a delay threshold value.
The preset time period is longer than the delay threshold.
It can be understood that if the number of electric energy meters participating in networking or needing networking is large, if each electric energy meter sends first address information to first equipment according to different delays, the first equipment needs to wait for a long time to receive second address information corresponding to the last first address information; in this case, the preset time period may be set longer. If the number of the electric energy meters participating in networking or needing networking is smaller, the waiting time of the first equipment for receiving the second address information corresponding to the last first address information is shorter; in this case, the preset time period may be set shorter.
In this embodiment, if the first device receives the second address information within the preset time period, the second address information is checked. If the second address information is not received after waiting for the preset time, rebroadcasting the first information.
Before S101 is not performed, the first device may be networked with some of the electric energy meters, and thus the first memory may store therein the third address data of the historically networked electric energy meters, or the first device may not store therein the third address data. The first memory has different storage states for the third address data, and the processing flow of the first device is different.
Fig. 7 is a schematic implementation flow diagram of the networking method of the electric energy meter, as shown in fig. 7, before S101, the method further needs to execute the following S101a to determine a storage state of the first memory for the third address data. When the first memory stores one or more third address data, S101 is performed. If the third address data is not stored in the first memory, the following S101b is performed.
S101a, the first device responds to a power-on operation and determines whether one or more third address data are stored in a first memory; if yes, executing S101b; otherwise, S101 is performed.
The third address data may be address data of an electric energy meter which is historically completed to form a network before the current power-on, and the electric energy meter may be connected to the communication bus at present or disconnected from the communication bus.
The conditions for executing S101b are specifically: one or more third address data are stored in the first memory.
The conditions for executing S101 are specifically: the third address data is not stored in the first memory.
S101b, the first equipment determines whether an electric energy meter corresponding to the third address data is on line or not according to each third address data; if all the corresponding electric energy meters in the one or more third address data are online, S101 is executed. If the corresponding electric energy meter in the one or more third address data is partially or entirely on-line, S101c is executed.
In some embodiments, the first device may determine whether the electric energy meter corresponding to the third address data is online by:
The first device sends an address confirmation request to the communication bus based on the third address data, and if response information for the address confirmation request can be received within a certain time, the electric energy meter corresponding to the third address data is determined to be online. If the response information for the address confirmation request is not received within a certain time, determining that the electric energy meter corresponding to the third address data is offline.
And S101c, the first equipment outputs a second request, wherein the second request is used for requesting a user to confirm whether the third address data corresponding to the offline electric energy meter are deleted or whether the electric energy meter corresponding to the third address data are online or not according to each third address data.
It will be appreciated that the electric energy meter corresponding to the third address data is offline, and it may be that the electric energy meter corresponding to the third address data is not on the communication bus, or is connected to the communication bus but is abnormally connected. At this time, the user may respond to the first request based on the state of the electric energy meter corresponding to the third address data.
If the electric energy meter corresponding to the third address data is not on the communication bus, the user can instruct the first device to delete the third address data. If the electric energy meter corresponding to the third address data is on the communication bus but is abnormally connected with the communication bus, a user can perform abnormal processing on the electric energy meter which is abnormally connected, so that whether the electric energy meter is on line is confirmed again after the electric energy meter works normally.
Specifically, if the user confirms that the third address data corresponding to the offline electric energy meter is deleted for the case where the corresponding electric energy meter in the one or more third address data is partially or entirely offline, the first device performs the following S101d to S101e, and if the user confirms that the electric energy meter corresponding to the third address data is again confirmed for each third address data for the case where the corresponding electric energy meter in the one or more third address data is partially or entirely offline, the first device performs the following S101f to S101g.
S101d, the first device receives a third instruction. The third instruction is used for indicating to delete third address data corresponding to the offline electric energy meter.
The electric energy meter is offline, i.e. the electric energy meter is not online.
S101e, the first equipment responds to a third instruction, deletes third address data corresponding to the offline electric energy meter, and then executes S101 to start networking operation.
It should be noted that, when the networking flow of S101 to S106 is executed, the electric energy meter that sends the first address information to the first device is the electric energy meter that participates in the networking, where the electric energy meter includes the electric energy meter that the history of connection on the communication bus is not successful in networking with the first device, and the memory of the first device has no address data stored therein.
S101f, the first equipment receives a fourth instruction, wherein the fourth instruction is used for indicating whether the electric energy meter corresponding to each third address data is on line or not.
Accordingly, the first device returns to execute S101b in response to the fourth instruction.
The embodiment of the application provides a networking method of an electric energy meter, which describes an interaction flow of the electric energy meter participating in networking and first equipment.
Fig. 8 is an interaction schematic diagram of a networking method of an electric energy meter provided by an embodiment of the present application, and fig. 8 illustrates a first device and any electric energy meter participating in networking as an example. As shown in fig. 8, the method includes the following S801 to S808:
s801, the first device broadcasts first information to the electric energy meter through the communication bus.
Accordingly, the electric energy meter receives the first information.
S802, the electric energy meter determines delay time length for sending the first address information.
The determination mode of the delay time length of the electric energy meter is not limited, and the delay time length can be randomly generated based on a delay threshold value, so that the generated delay time length is smaller than the delay threshold value.
S803, the electric energy meter detects that no data is transmitted on the current communication bus, and sends first address information to the first device based on the delay time length.
It will be appreciated that if the first device transmits the first address information when there is a data transmission on the communication bus, the signal of the first address information overlaps with the data signal on the bus after the first device transmits the first address information, and the data signal on the communication bus detected by the first device is different from the signal of the first address information.
And sending the first address information to the first device based on the delay time length, namely starting timing from 0, and sending the first address information when the timing time length reaches the delay time length.
If the electric energy meter detects that data transmission exists on the current communication bus, the electric energy meter waits for sending first address information based on delay time length when the data transmission exists on the communication bus.
S804, the first device receives the second address information through the communication bus.
The second address information includes second address data and second check data.
S805, the first device verifies the second address data based on the second verification data; if the verification is successful, S806 is performed, otherwise S801 is performed.
S806, the first device stores the second address data in the second address information in the buffer, and S807 is executed.
S807, the first equipment performs verification based on the received second address information, and determines whether second address data corresponding to the first address data of all the electric energy meters participating in networking are successfully verified; if so, S807 is performed; otherwise, S801 is executed.
And S808, the first device writes all second address data in the cache into the first memory, and networking is performed according to all second address data in the first memory.
Based on the foregoing embodiments, the embodiments of the present application provide a networking device for an electric energy meter, where the networking device includes each module included, and each unit included in each module may be implemented by a processor; of course, the method can also be realized by a specific logic circuit; in an implementation, the processor may be a Central Processing Unit (CPU), a Microprocessor (MPU), a Digital Signal Processor (DSP), a Field Programmable Gate Array (FPGA), or the like.
Fig. 9 is a schematic structural diagram of a networking device of an electric energy meter according to an embodiment of the present application, as shown in fig. 9, where the networking device 90 of the electric energy meter includes a first sending module 91, a first receiving module 92, a first determining module 93, and a processing module 94, where:
A first transmitting module 91, configured to broadcast first information to the plurality of electric energy meters through the communication bus; the first information is used for indicating the electric energy meter to send first address information to the first device based on delay time length corresponding to the electric energy meter; the first address information includes: the first address data and the first check data of the electric energy meter; the first verification data is used for verifying the first address data.
A first receiving module 92, configured to receive second address information through the communication bus; the second address information includes second address data and second check data; the second address information is one piece of first address information on the communication bus, and the signal of the first address information is completely not overlapped with the signals of the first address information sent by other electric energy meters participating in networking; or the second address information is address information obtained by superposing a plurality of signals of the first address information on the communication bus, and the signals of the plurality of first address information are superposed.
A first determining module 93 for checking the second address data based on the second checking data; if the verification is successful, determining the second address information as one piece of the first address information on the communication bus, and storing second address data in the second address information into a cache; if verification fails, determining that the second address information is address information obtained by superposition of signals of a plurality of first address information on the communication bus, and broadcasting the first information through the communication bus; and verifying based on the received second address information until the second address data corresponding to the first address data of all the electric energy meters participating in networking are successfully verified.
The processing module 94 is configured to write all second address data in the cache into the first memory when verification of second address data corresponding to the first address data of all the electric energy meters participating in networking is successful, and perform networking according to all the second address data in the first memory; wherein all the electric energy meters participating in networking comprise all or part of electric energy meters connected to the communication bus.
In some embodiments, the networking device 90 of the electric energy meter includes an output module for outputting the first request; the first request comprises the total number of the second address data stored in the cache, and is used for requesting to determine whether networking is allowed for the electric energy meters corresponding to all the second address data; a processing module 94 for receiving a first instruction by the first device; the first instruction indicates that networking is allowed for the electric energy meters corresponding to all the second address data; the first device responds to the first instruction and writes all the second address data stored in the cache into the first memory; a first receiving module 92, configured to receive a second instruction; the second instruction indicates that networking is not allowed for the electric energy meter corresponding to the second address data; and the first sending module 91 is configured to respond to the second instruction, broadcast first information through the communication bus, and perform verification based on the received second address information until all second address data corresponding to the first address data of all the electric energy meters participating in networking are successfully verified.
In some embodiments, the first sending module 91 is further configured to send, for each of the second address data in the cache, address acknowledgement request information to the communication bus in a unicast manner, so that the communication bus transmits the address acknowledgement response information according to the second address data; a first determining module 93, configured to determine, according to the received address acknowledgement response information for the second address data, that the second address data has address acknowledgement response information, where the second address data has address acknowledgement response information indicates that one of the electric energy meters participating in the networking has an electric energy meter corresponding to the second address data; according to the fact that address confirmation response information aiming at the second address data is not received, the first device determines that the address confirmation response information does not exist in the second address data; the address confirmation response information of the second address data does not exist, which indicates that one electric energy meter does not exist in the electric energy meters participating in networking and corresponds to the second address data; the output module is used for outputting the first request under the condition that all second address data in the cache are determined to have corresponding address confirmation response information; and the first sending module 91 is configured to broadcast, through the communication bus, first information when it is determined that no corresponding address acknowledgement response information exists in part of the second address data in the cache, or when it is determined that no corresponding address acknowledgement response information exists in all the second address data in the cache, and perform verification based on the received second address information until verification of all second address data corresponding to the first address data of all the electric energy meters participating in networking is successful.
In some embodiments, the first determining module 93 is configured to verify the second address information received within a preset period after broadcasting the first information; the preset duration is positively correlated with the number of the electric energy meters participating in networking; and if the second address information is not received within a preset time after the first information is broadcast, the first device broadcasts the first information through the communication bus until the second address information is received.
In some embodiments, the first determining module 93 is configured to determine, in response to a power-up operation, whether one or more third address data are stored in the first memory; wherein a third address data indicates an address of an electric energy meter; and a first transmitting module 91, configured to broadcast the first information to the plurality of electric energy meters through the communication bus when the third address data is not stored in the first memory. Or a first determining module 93, configured to determine, for each third address data, whether an electric energy meter corresponding to the third address data is online, where one or more third address data are stored in the first memory; and a first sending module 91, configured to broadcast, if the electric energy meter corresponding to each third address data in the one or more third address data is online, the first information to the plurality of electric energy meters through the communication bus.
In some embodiments, the output module is further configured to output a second request if all or part of the electric energy meters corresponding to the one or more third address data are offline; the second request is used for requesting to confirm to delete third address data corresponding to the offline electric energy meter or confirming whether the electric energy meter corresponding to the third address data is online or not according to each third address data; the first receiving module is used for receiving a third instruction, and the third instruction is used for indicating to delete third address data corresponding to the offline electric energy meter; the networking device 90 of the electric energy meter comprises a deleting module, which is used for responding to a third instruction and deleting third address data corresponding to the offline electric energy meter; or the first receiving module 92 is configured to receive a fourth instruction, where the fourth instruction is used to instruct, for each third address data, whether the electric energy meter corresponding to the third address data is online or not; a first determining module 93, configured to determine, for each third address data, whether the electric energy meters corresponding to the third address data are online, until all the electric energy meters corresponding to the one or more third address data are online, in response to the fourth instruction; and the first sending module 91 is configured to broadcast the first information to the plurality of electric energy meters through the communication bus, and check the received second address information until all second address data corresponding to the first address data of all electric energy meters participating in the networking are checked successfully.
Based on the foregoing embodiments, the embodiments of the present application further provide a networking device for an electric energy meter, where the networking device includes each module included, and each unit included in each module may be implemented by a processor; of course, the method can also be realized by a specific logic circuit; in an implementation, the processor may be a Central Processing Unit (CPU), a Microprocessor (MPU), a Digital Signal Processor (DSP), a Field Programmable Gate Array (FPGA), or the like.
Fig. 10 is a schematic structural diagram of a networking device of an electric energy meter according to an embodiment of the present application, as shown in fig. 10, where the networking device 100 of an electric energy meter includes a second receiving module 101, a second determining module 102, and a second sending module 103, where:
a second receiving module 101, configured to receive, through the communication bus, first information broadcast by the first device; the first information is used for indicating the electric energy meter to send first address information to the first device.
The second determining module 102 determines a delay time length for transmitting the first address information based on the first information.
A second sending module 103, configured to send, based on the delay time length, the first address information to the first device through the communication bus; the first address information comprises first address data and first verification data, and the first verification data is used for verifying the first address data; the first address information is related to second address information received by the first device; if the signal of the first address information is not overlapped with the signals of the first address information sent by other electric energy meters participating in networking, the second address information is one first address information on the communication bus; if the first address information is overlapped with signals of the first address information sent by other electric energy meters participating in networking, the second address information is address information obtained by overlapping signals of a plurality of first address information on the communication bus; the second address information includes second address data and second check data; if the second verification data can successfully verify the second address data, storing the second address data in the second address information into a cache of the first device; if the second verification data cannot successfully verify the second address data, the electric energy meter receives first information broadcasted by the first equipment through the communication bus; and under the condition that all second address data corresponding to the first address data of all the electric energy meters participating in networking are successfully checked, all second address data in the first equipment cache are written into a first memory of the first equipment, so that the first equipment can perform networking according to all the second address data in the first memory.
In some embodiments, the networking device 100 of the electric energy meter further includes a detection module, where the detection module is configured to detect whether there is data transmission on the communication bus; and the second sending module 103 is configured to send, when detecting that there is no data transmission on the communication bus, the first address information to the first device through the communication bus based on the delay time, and wait until there is no data transmission on the communication bus after detecting that there is data transmission on the communication bus, and send, based on the delay, the first address information to the first device through the communication bus.
The description of the apparatus embodiments above is similar to that of the method embodiments above, with similar advantageous effects as the method embodiments. For technical details not disclosed in the embodiments of the apparatus of the present application, please refer to the description of the embodiments of the method of the present application.
It should be noted that, in the embodiment of the present application, the division of the modules by the networking device of the electric energy meter shown in fig. 9 or fig. 10 is schematic, and only one logic function is divided, and another division manner may be adopted in actual implementation. In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units. Or in a combination of software and hardware.
It should be noted that, in the embodiment of the present application, if the above-mentioned image processing method is implemented in the form of a software functional module, and sold or used as a separate product, it may also be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially or partly contributing to the related art, embodied in the form of a software product stored in a storage medium, including several instructions for causing an electronic device to execute all or part of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read Only Memory (ROM), a magnetic disk, an optical disk, or other various media capable of storing program codes. Thus, embodiments of the application are not limited to any specific combination of hardware and software.
The embodiment of the application provides a chip, which comprises an interface circuit and a logic circuit, wherein the interface circuit is used for receiving signals from other chips outside the chip and transmitting the signals to the logic circuit, or sending the signals from the logic circuit to the other chips outside the chip, and the logic circuit is used for realizing the method disclosed by the embodiment of the application.
The embodiment of the application provides electronic equipment, which can be first equipment or an electric energy meter. Fig. 11 is a schematic structural diagram of an electronic device according to an embodiment of the present application, as shown in fig. 11, the electronic device 110 includes a memory 1101 and a processor 1102, where the memory 1101 stores a computer program that can be executed by the processor 1102, and the processor 1102 implements steps in the method provided in the foregoing embodiment when executing the program.
It should be noted that the memory 1101 is configured to store instructions and applications executable by the processor 1102, and may also be cached in the processor 1102 and data (e.g., image data, audio data, voice communication data, and video communication data) to be processed or already processed by each module in the electronic device 110, and may be implemented by a FLASH memory (FLASH) or a random access memory 1101 (Random Access Memory, RAM).
An embodiment of the present application provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps in the networking method of an electric energy meter provided in the above embodiment.
The embodiment of the application provides a computer program product containing instructions, which when run on a computer, cause the computer to execute the steps in the networking method of the electric energy meter provided by the embodiment of the method.
It should be noted here that: the description of the storage medium and apparatus embodiments above is similar to that of the method embodiments described above, with similar benefits as the method embodiments. For technical details not disclosed in the storage medium, the storage medium and the device embodiments of the present application, please refer to the description of the method embodiments of the present application.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" or "some embodiments" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present application. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" or "in some embodiments" in various places throughout this specification are not necessarily referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. It should be understood that, in various embodiments of the present application, the sequence numbers of the foregoing processes do not mean the order of execution, and the order of execution of the processes should be determined by the functions and internal logic thereof, and should not constitute any limitation on the implementation process of the embodiments of the present application. The foregoing embodiment numbers of the present application are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments. The foregoing description of various embodiments is intended to highlight differences between the various embodiments, which may be the same or similar to each other by reference, and is not repeated herein for the sake of brevity.
The term "and/or" is herein merely an association relation describing associated objects, meaning that there may be three relations, e.g. object a and/or object B, may represent: there are three cases where object a alone exists, object a and object B together, and object B alone exists.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments are merely illustrative, and the division of the modules is merely a logical function division, and other divisions may be implemented in practice, such as: multiple modules or components may be combined, or may be integrated into another system, or some features may be omitted, or not performed. In addition, the various components shown or discussed may be coupled or directly coupled or communicatively coupled to each other via some interface, whether indirectly coupled or communicatively coupled to devices or modules, whether electrically, mechanically, or otherwise.
The modules described above as separate components may or may not be physically separate, and components shown as modules may or may not be physical modules; can be located in one place or distributed to a plurality of system units; some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in each embodiment of the present application may be integrated in one processing unit, or each module may be separately used as one unit, or two or more modules may be integrated in one unit; the integrated modules may be implemented in hardware or in hardware plus software functional units.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the above method embodiments may be implemented by hardware related to program instructions, and the foregoing program may be stored in a computer readable storage medium, where the program, when executed, performs steps including the above method embodiments; and the aforementioned storage medium includes: a mobile storage device, a Read Only Memory (ROM), a magnetic disk or an optical disk, or the like, which can store program codes.
Or the above-described integrated units of the application may be stored in a computer-readable storage medium if implemented in the form of software functional modules and sold or used as separate products. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially or partly contributing to the related art, embodied in the form of a software product stored in a storage medium, including several instructions for causing an electronic device to execute all or part of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a removable storage device, a ROM, a magnetic disk, or an optical disk.
The methods disclosed in the method embodiments provided by the application can be arbitrarily combined under the condition of no conflict to obtain a new method embodiment.
The features disclosed in the several product embodiments provided by the application can be combined arbitrarily under the condition of no conflict to obtain new product embodiments.
The features disclosed in the embodiments of the method or the apparatus provided by the application can be arbitrarily combined without conflict to obtain new embodiments of the method or the apparatus.
The foregoing is merely an embodiment of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the present application, and the changes and substitutions are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims (10)
1. A networking method of electric energy meters, the method being applied to a first device, the first device and a plurality of electric energy meters each being connected to a communication bus, the method comprising:
The first device broadcasting first information to the plurality of electric energy meters through the communication bus; the first information is used for indicating the electric energy meter to send first address information to the first device based on delay time length corresponding to the electric energy meter; the first address information includes: the first address data and the first check data of the electric energy meter; the first verification data is used for verifying the first address data;
The first device receives second address information through the communication bus; the second address information includes second address data and second check data; the second address information is one piece of first address information on the communication bus, and the signal of the first address information is completely not overlapped with the signals of the first address information sent by other electric energy meters participating in networking; or the second address information is address information obtained by superposing a plurality of signals of first address information on the communication bus, wherein the signals of the plurality of first address information are superposed;
The first device verifies the second address data based on the second verification data;
if the verification is successful, the first device determines that the second address information is one piece of the first address information on the communication bus, and stores second address data in the second address information into a cache;
if verification fails, the first device determines that the second address information is address information obtained by superposition of signals of a plurality of first address information on the communication bus, and broadcasts the first information through the communication bus;
The first equipment performs verification based on the received second address information until the second address data corresponding to the first address data of all the electric energy meters participating in networking are successfully verified, writes all the second address data in the cache into a first memory, and performs networking according to all the second address data in the first memory; wherein all the electric energy meters participating in networking comprise all or part of electric energy meters connected to the communication bus.
2. The method of claim 1, wherein before the first device writes all of the second address data in the cache to the first memory, the method further comprises:
The first device outputting a first request; the first request comprises the total number of the second address data stored in the cache, and is used for requesting to determine whether networking is allowed for the electric energy meters corresponding to all the second address data;
The first device writing all of the second address data in the cache to a first memory, comprising:
The first device receives a first instruction; the first instruction indicates that networking is allowed for the electric energy meters corresponding to all the second address data;
The first device responds to the first instruction and writes all the second address data stored in the cache into the first memory;
The method further comprises the steps of:
The first device receives a second instruction; the second instruction indicates that networking is not allowed for the electric energy meter corresponding to the second address data;
and the first equipment responds to the second instruction, broadcasts first information through the communication bus, and performs verification based on the received second address information until the second address data corresponding to the first address data of all the electric energy meters participating in networking are successfully verified.
3. The method of claim 2, wherein prior to the first device outputting the first request, the method further comprises:
The first device sends address confirmation request information to the communication bus in a unicast mode aiming at each second address data in the cache, so that the communication bus transmits the address confirmation response information according to the second address data;
The first device determines that address confirmation response information exists in the second address data according to the received address confirmation response information aiming at the second address data, and the address confirmation response information exists in the second address data to indicate that one electric energy meter exists in the electric energy meters participating in networking and corresponds to the second address data;
The first device determines that the address confirmation response information does not exist in the second address data according to the fact that the address confirmation response information for the second address data is not received; the address confirmation response information of the second address data does not exist, which indicates that one electric energy meter does not exist in the electric energy meters participating in networking and corresponds to the second address data;
The first device outputting a first request comprising:
The first device outputs the first request under the condition that the first device determines that all second address data in the cache have corresponding address confirmation response information;
The method further comprises the steps of:
And under the condition that the first equipment determines that the corresponding address confirmation response information does not exist in part of the second address data in the cache or under the condition that the first equipment determines that the corresponding address confirmation response information does not exist in all the second address data in the cache, the first equipment broadcasts the first information through the communication bus, and checks based on the received second address information until the second address data corresponding to the first address data of all the electric energy meters participating in networking are successfully checked.
4. The method of claim 1, wherein the first device verifying the second address data based on the second verification data comprises:
The first equipment checks the second address information received in a preset time after broadcasting the first information; the preset duration is positively correlated with the number of the electric energy meters participating in networking;
The method further comprises the steps of:
And if the second address information is not received within a preset time after the first information is broadcast, the first device broadcasts the first information through the communication bus until the second address information is received.
5. The method of claim 1, wherein prior to the first device broadcasting first information to the at least one power meter via the communication bus, the method further comprises:
The first device determining whether one or more third address data are stored in the first memory in response to a power-on operation; wherein a third address data indicates an address of an electric energy meter;
The first device broadcasting first information to the plurality of power meters via the communication bus, comprising:
The first device broadcasting the first information to the plurality of electric energy meters through the communication bus under the condition that the third address data is not stored in the first memory;
Or alternatively
Under the condition that one or more third address data are stored in the first memory, the first equipment determines whether an electric energy meter corresponding to each third address data is on line or not according to each third address data;
And if the electric energy meter corresponding to each third address data in the one or more third address data is online, the first equipment broadcasts the first information to the plurality of electric energy meters through the communication bus.
6. The method of claim 5, wherein the method further comprises:
If all or part of the electric energy meters corresponding to the one or more third address data are offline, the first equipment outputs a second request; the second request is used for requesting to confirm to delete third address data corresponding to the offline electric energy meter or confirming whether the electric energy meter corresponding to the third address data is online or not according to each third address data;
the first device receives a third instruction, wherein the third instruction is used for indicating to delete third address data corresponding to the offline electric energy meter;
The first equipment responds to a third instruction and deletes third address data corresponding to the offline electric energy meter;
The first device broadcasts the first information to the plurality of electric energy meters through the communication bus, and checks the received second address information until second address data corresponding to the first address data of all the electric energy meters participating in networking are checked successfully;
Or alternatively
The first equipment receives a fourth instruction, wherein the fourth instruction is used for indicating whether the electric energy meter corresponding to each third address data is on line or not;
The first equipment responds to the fourth instruction, determines whether the electric energy meters corresponding to the third address data are on line or not according to each third address data until all the electric energy meters corresponding to the one or more third address data are on line;
And the first equipment broadcasts the first information to the plurality of electric energy meters through the communication bus, and checks the received second address information until the second address data corresponding to the first address data of all the electric energy meters participating in networking are checked successfully.
7. A networking method of an electric energy meter, wherein the method is applied to the electric energy meter, a first device and a plurality of electric energy meters are connected to a communication bus, and the method comprises:
the electric energy meter receives first information broadcast by the first equipment through the communication bus; the first information is used for indicating the electric energy meter to send first address information to the first equipment;
The electric energy meter determines delay time length for sending the first address information based on the first information;
The electric energy meter sends the first address information to the first device through the communication bus based on the delay time length; the first address information comprises first address data and first verification data, and the first verification data is used for verifying the first address data; the first address information is related to second address information received by the first device; if the signal of the first address information is not overlapped with the signals of the first address information sent by other electric energy meters participating in networking, the second address information is one first address information on the communication bus; if the first address information is overlapped with signals of the first address information sent by other electric energy meters participating in networking, the second address information is address information obtained by overlapping signals of a plurality of first address information on the communication bus; the second address information includes second address data and second check data; if the second verification data can successfully verify the second address data, storing the second address data in the second address information into a cache of the first device; if the second verification data cannot successfully verify the second address data, the electric energy meter receives first information broadcasted by the first equipment through the communication bus; and under the condition that all second address data corresponding to the first address data of all the electric energy meters participating in networking are successfully checked, all second address data in the first equipment cache are written into a first memory of the first equipment, so that the first equipment can perform networking according to all the second address data in the first memory.
8. The method of claim 7, wherein the power meter is further configured to, prior to transmitting the first address information to the first device via the communication bus based on the delay period, the method further comprising:
The electric energy meter detects that no data is transmitted on the communication bus;
The method further comprises the steps of:
And when the electric energy meter detects that data transmission exists on the communication bus, the electric energy meter waits until no data transmission exists on the communication bus, and based on the delay time, the first address information is sent to the first device through the communication bus.
9. An electronic device, characterized in that it is a first device or a power meter, the first device being adapted to perform the method of any of claims 1 to 6; the electric energy meter is used for executing the method of claim 7 or 8.
10. The networking system of the electric energy meter is characterized by comprising first equipment and the electric energy meter; wherein the first device is adapted to perform the method of any of claims 1 to 6; the electric energy meter is used for executing the method described in 7 or 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410192312.0A CN118054988A (en) | 2024-02-21 | 2024-02-21 | Networking method, electronic equipment and networking system of electric energy meter |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410192312.0A CN118054988A (en) | 2024-02-21 | 2024-02-21 | Networking method, electronic equipment and networking system of electric energy meter |
Publications (1)
Publication Number | Publication Date |
---|---|
CN118054988A true CN118054988A (en) | 2024-05-17 |
Family
ID=91047766
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410192312.0A Pending CN118054988A (en) | 2024-02-21 | 2024-02-21 | Networking method, electronic equipment and networking system of electric energy meter |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN118054988A (en) |
-
2024
- 2024-02-21 CN CN202410192312.0A patent/CN118054988A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR101926276B1 (en) | Internet of Things network managing methed for managing large scale facilities based on LoRaWAN and Internet of Things network server and terminal applying the same | |
CN111540190B (en) | Data distribution method and device based on double-core intelligent electric meter and computer equipment | |
CN109981279B (en) | Block chain system, communication method, device, equipment and medium | |
CN102571850B (en) | Transaction committing system, method and equipment | |
CN112130881A (en) | Firmware remote upgrading method and device | |
CN110995513A (en) | Data sending and receiving method in Internet of things system, Internet of things equipment and platform | |
CN114328034B (en) | Control method and device of storage equipment, electronic equipment and storage medium | |
CN111355600B (en) | Main node determining method and device | |
CN111541596A (en) | Relay response automatic numbering method, device, equipment and storage medium | |
CN114338464A (en) | Fault diagnosis method, device, equipment and computer readable storage medium | |
CN103685501A (en) | Data processing method, device and system | |
JPH104373A (en) | Method for giving identification number to transmission device, transmitter and management equipment for transmission system | |
CN109150587B (en) | Maintenance method and device | |
CN118054988A (en) | Networking method, electronic equipment and networking system of electric energy meter | |
CN109743703A (en) | Communication method, data acquisition terminal and monitoring system | |
KR20160106064A (en) | Method for starting a battery management system | |
CN108958989A (en) | A kind of system failure recovery method and device | |
JP4013592B2 (en) | Vehicle communication system | |
CN116319712A (en) | Wireless upgrading method and device for slave nodes of power equipment body area network | |
CN116233125A (en) | Method, device, equipment and medium for storing data related to nucleic acid detection | |
CN111585844B (en) | Test method, system, server and storage medium based on verification code | |
CN112888063B (en) | Remote terminal network access method, system, electronic device and storage medium | |
CN105652858B (en) | OBD device identification methods and system based on request of data interval | |
CN113824620A (en) | Partition switching method, device, vehicle and storage medium | |
CN102984160A (en) | Distributed network scan task processing method and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |