CN110784456B - Automatic identification method and communication method for communication protocol - Google Patents

Automatic identification method and communication method for communication protocol Download PDF

Info

Publication number
CN110784456B
CN110784456B CN201910985952.6A CN201910985952A CN110784456B CN 110784456 B CN110784456 B CN 110784456B CN 201910985952 A CN201910985952 A CN 201910985952A CN 110784456 B CN110784456 B CN 110784456B
Authority
CN
China
Prior art keywords
protocol
message
communication
protocol type
sub
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910985952.6A
Other languages
Chinese (zh)
Other versions
CN110784456A (en
Inventor
刘佳
张文瀚
陈洵
李祖湖
崔宇昊
张英楠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Southern Power Grid Digital Grid Technology Guangdong Co ltd
Original Assignee
Southern Power Grid Digital Grid Research Institute Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Southern Power Grid Digital Grid Research Institute Co Ltd filed Critical Southern Power Grid Digital Grid Research Institute Co Ltd
Priority to CN201910985952.6A priority Critical patent/CN110784456B/en
Priority to CN202010392560.1A priority patent/CN111786941B/en
Publication of CN110784456A publication Critical patent/CN110784456A/en
Application granted granted Critical
Publication of CN110784456B publication Critical patent/CN110784456B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Communication Control (AREA)

Abstract

The application relates to a communication protocol automatic identification method and a communication method, wherein the communication protocol automatic identification method comprises the following steps: the central coordinator module receives a message sent by a local interface of the concentrator; distinguishing protocol types according to received messages; when the protocol type has the sub-protocol version, the specific version of the protocol type is continuously distinguished until the protocol type does not have the sub-protocol version; and adopting the finally obtained protocol type as a communication protocol. The automatic identification method of the communication protocol can be self-adaptive to the local interface protocol of the concentrator, and particularly can automatically identify the south network or national network protocol and the specific protocol version thereof; and through the design of the self-adaptive communication protocol, manual intervention is not needed, the use is convenient, the condition that the protocols of the intelligent concentrator and the CCO module are inconsistent is avoided, the defect of data acquisition failure is further avoided, the manpower, the material resources and the time are effectively saved, and the power utilization condition of the power company statistics user is also facilitated.

Description

Automatic identification method and communication method for communication protocol
Technical Field
The present application relates to the field of communications, and in particular, to an automatic identification method and a communication method for a communication protocol.
Background
The smart grid, also known as the intellectualization of the grid, is established on the basis of an integrated, high-speed two-way communication network, and realizes the purposes of reliability, safety, economy, high efficiency, environmental friendliness and safe use of the grid through the application of advanced sensing and measuring technology, advanced equipment technology, advanced control method and advanced decision support system technology.
With the continuous development of the intelligent power grid, the intelligent centralized meter reading technology is completely spread and applied, and the power utilization management of the power company is greatly improved. In order to realize the intelligent centralized meter reading function, a master station, an intelligent concentrator and an intelligent terminal are generally required. The intelligent terminal is usually installed in a home user. The key of the intelligent centralized meter reading is that the intelligent concentrator collects data of the intelligent terminal through a power line or a wireless RF, and in order to realize the function, a Central Coordinator (CCO) module needs to be installed on the intelligent concentrator. With the change of technical protocols and the division of areas, for example, national network protocols and south network protocols exist according to regions, and the national network protocols successively release GDW09 and GDW13 protocols, so that local communication protocols of intelligent concentrators are in multiple versions. In the prior art, different CCO modules are provided for different intelligent concentrators, so as to achieve the purpose of data acquisition.
However, the way of configuring different CCO modules for different intelligent concentrators causes great troubles for operation and maintenance personnel and technical support personnel, because the intelligent concentrators and the CCO modules are not usually manufactured by one manufacturer, and there is no way to complete shipment when leaving a factory, the situation that protocols of the intelligent concentrators and the CCO modules are inconsistent is easily caused, and data collection fails. Therefore, a large amount of manpower, material resources and time are consumed, and the statistics of the power utilization condition of the user by the power company is delayed.
Disclosure of Invention
Accordingly, there is a need for an automatic communication protocol identification method and a communication method.
A communication protocol automatic identification method comprises the following steps:
the central coordinator module receives a message sent by a local interface of the concentrator;
distinguishing protocol types according to received messages;
when the protocol type has the sub-protocol version, the specific version of the protocol type is continuously distinguished until the protocol type does not have the sub-protocol version;
and adopting the finally obtained protocol type as a communication protocol.
The automatic identification method of the communication protocol can be self-adaptive to the local interface protocol of the concentrator, particularly automatically identify the protocol of a national network or a south network, and then further identify the specific protocol version; and through the design of the self-adaptive communication protocol, manual intervention is not needed, the use is convenient, the condition that the protocols of the intelligent concentrator and the CCO module are inconsistent is avoided, the defect of data acquisition failure is further avoided, the manpower, the material resources and the time are effectively saved, and the power utilization condition of the power company statistics user is also facilitated.
In one embodiment, the protocol types include a national network protocol and a southern network protocol.
In one embodiment, the national network protocol comprises a national network 09 protocol and a national network 13 protocol.
In one embodiment, the method specifically comprises the following steps:
the central coordinator module receives a message sent by a local interface of the concentrator;
distinguishing whether the protocol type is a national network protocol or a south network protocol according to the received message;
when the protocol type is a national network protocol, continuously distinguishing whether the sub-protocol version of the protocol type is a national network 09 protocol or a national network 13 protocol, and adopting the national network 09 protocol or the national network 13 protocol as a communication protocol;
when the protocol type is the south network protocol, the south network protocol is adopted as the communication protocol.
In one embodiment, the receiving, by the central coordinator module, a message sent by the local interface of the concentrator includes: the central coordinator module receives the message sent by the local interface of the concentrator by adopting a mode of receiving data by a circular queue.
In one embodiment, distinguishing protocol types according to received messages specifically includes: and automatically identifying the national network protocol or the south network protocol according to the received message.
In one embodiment, after the central coordinator module receives the message sent by the local interface of the concentrator, the method for automatically identifying the communication protocol further includes the following steps: adding the message into a circular queue buffer;
distinguishing protocol types according to received messages comprises the following steps: distinguishing protocol types according to the frame head, the frame tail, the data length and the CS check of the message;
and, when the protocol type has a sub-protocol version, continuously distinguishing the specific version of the protocol type comprises the steps of: the sub-protocol versions of a protocol type are distinguished according to the bit definition of a particular byte of the message.
In one embodiment, before distinguishing the protocol type according to the received message, the method for automatically identifying the communication protocol further includes the steps of: and carrying out frame format detection on the message, distinguishing protocol types according to the received message if the message is correct, and moving the current message to the tail of the circular queue if the message is wrong, and carrying out frame format detection on the next message.
In one embodiment, the frame format detection of the packet includes: and judging whether the verification of the frame head, the frame tail and the CS is correct or not.
In one embodiment, the communication method comprises any communication protocol automatic identification method.
In one embodiment, the communication method further includes the steps of: and carrying out communication by adopting the communication protocol.
Drawings
Fig. 1 is a flowchart illustrating an embodiment of an automatic communication protocol identification method according to the present application.
Fig. 2 is a flowchart illustrating another embodiment of an automatic identification method for a communication protocol according to the present application.
Fig. 3 is a flowchart illustrating another embodiment of an automatic identification method for a communication protocol according to the present application.
Fig. 4 is a schematic control step diagram of another embodiment of the communication protocol automatic identification method according to the present application.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, embodiments accompanying the present application are described in detail below with reference to the accompanying drawings. In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. This application is capable of embodiments in many different forms than those described herein and that modifications may be made by one skilled in the art without departing from the spirit and scope of the application and it is therefore not intended to be limited to the specific embodiments disclosed below.
It will be understood that when an element is referred to as being "secured to" or "disposed on" another element, it can be directly on the other element or intervening elements may also be present. When an element is referred to as being "connected" to another element, it can be directly connected to the other element or intervening elements may also be present. The terms "vertical," "horizontal," "left," "right," and the like as used in the description of the present application are for illustrative purposes only and do not denote a single embodiment.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the description of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the description of the present application, the term "and/or" includes any and all combinations of one or more of the associated listed items.
In one embodiment of the present application, a method for automatically identifying a communication protocol includes the following steps: the central coordinator module receives a message sent by a local interface of the concentrator; distinguishing protocol types according to received messages; when the protocol type has the sub-protocol version, the specific version of the protocol type is continuously distinguished until the protocol type does not have the sub-protocol version; and adopting the finally obtained protocol type as a communication protocol. The automatic identification method of the communication protocol can be self-adaptive to the local interface protocol of the concentrator, particularly automatically identify the protocol of a national network or a south network, and then further identify the specific protocol version; and through the design of the self-adaptive communication protocol, manual intervention is not needed, the use is convenient, the condition that the protocols of the intelligent concentrator and the CCO module are inconsistent is avoided, the defect of data acquisition failure is further avoided, the manpower, the material resources and the time are effectively saved, and the power utilization condition of the power company statistics user is also facilitated.
In one embodiment, the communication protocol automatic identification method comprises the following steps of part of or all of the steps of the embodiment; that is, the communication protocol automatic identification method includes some or all of the following technical features. In one embodiment, as shown in fig. 1, the method for automatically identifying a communication protocol includes the following steps: the central coordinator module receives a message sent by a local interface of the concentrator; distinguishing protocol types according to received messages; judging whether the protocol type has a sub-protocol version, if so, continuously distinguishing the specific version of the protocol type, and further judging whether the protocol type has the sub-protocol version; otherwise, the finally obtained protocol type is adopted as the communication protocol.
In one embodiment, the central coordinator module receives a message sent by a local interface of the concentrator; further, in one embodiment, the method for automatically identifying a communication protocol further includes: the format of the message is preset, and the message usually exists in the form of data, which may be referred to as message data or directly as data, such as a frame with a header, specific data information, a trailer, and/or a specific number of bits. Thus, a message may also be referred to as data. Further, in one embodiment, the format of the packet is provided with priority information, that is, priority data; further, in one embodiment, after the central coordinator module receives the message sent by the local interface of the concentrator, the method for automatically identifying the communication protocol further includes the steps of: adding the message into a circular queue buffer area according to the priority level information of the message; in one embodiment, a method for automatically identifying a communication protocol includes the following steps: presetting the format of a message; the central coordinator module receives a message sent by a local interface of the concentrator; distinguishing protocol types according to received messages; when the protocol type has the sub-protocol version, the specific version of the protocol type is continuously distinguished until the protocol type does not have the sub-protocol version; and adopting the finally obtained protocol type as a communication protocol. The rest of the examples are analogized. In one embodiment, the receiving, by the central coordinator module, a message sent by the local interface of the concentrator includes: the central coordinator module receives the message sent by the local interface of the concentrator by adopting a mode of receiving data by a circular queue. Further, in one embodiment, the erroneous packet is moved to the end of the queue to form the circular queue. Further, in one embodiment, the number of errors of the same message or the same message sending end is also recorded, and when the number of errors exceeds a preset number, an alarm signal is sent out and the wrong message and/or the sending end thereof is/are indicated. Such design is favorable to helping managers to discover the problem so that solve the problem in time. Further, in one embodiment, the method for automatically identifying a communication protocol further includes: presetting the maximum length of the circular queue; and, the central coordinator module adopts the way that the ring queue receives the data, receives the message that concentrator local interface sends, still include the step: when the current length of the ring queue is greater than the maximum length, automatically dividing the ring queue into two ring queues, wherein the length of one ring queue is the maximum length, and when a new message sent by a local interface of a concentrator is received, adding the new message to the tail of the ring queue with a shorter length; further, in one embodiment, when the current length of the circular queue is greater than the maximum length, the circular queue is automatically divided into two circular queues, wherein the length of one circular queue is the maximum length and is arranged according to the receiving time sequence, and the other circular queue is arranged again according to the priority information of the message; by the design, two queues with different processing sequences are formed, so that the subsequent messages can be processed preferentially in the other process. Further, in one embodiment, the central coordinator module is provided with a plurality of processing cores (cores), each for processing one of the circular queues. The design is favorable for meeting the requirement of processing a large number of messages in a short time, and is particularly suitable for data processing in an emergency state. Further, in one embodiment, the central coordinator module receives a message sent by the local interface of the concentrator through a serial port; further, in one embodiment, the central coordinator module puts the received message into a queue buffer; further, in one embodiment, the central coordinator module or the processor periodically inquires whether the queue buffer has data, and when the queue buffer has data, the subsequent steps are executed. Further, in one embodiment, the main function is used to periodically query the queue buffer for data. The design is beneficial to ensuring that the message is not lost on one hand, and is beneficial to finding out problems in time on the other hand, and can also ensure the processing efficiency on the other hand, and the program cannot be blocked due to an error.
In one embodiment, the protocol types are distinguished according to received messages; in one embodiment, the protocol types include a national network protocol and a southern network protocol. In practical applications, the protocol type may also include other protocols. In one embodiment, distinguishing protocol types according to received messages specifically includes: and automatically identifying the national network protocol or the south network protocol according to the received message. When multiple protocol types exist, each communication protocol is automatically identified according to the received message. Further, in one embodiment, when the queue buffer has data, the data of the queue buffer is subjected to frame format detection and protocol type differentiation in sequence. Further, in one embodiment, the data of the queue buffer is detected in frame format in sequence and the protocol type is distinguished when the detection passes. Further, in one embodiment, according to the preset bit or the preset structure, the data in the queue buffer are sequentially subjected to frame format detection, and the protocol type is distinguished when the detection passes. According to the design, on one hand, the protocol types are distinguished through frame format detection, on the other hand, various communication protocols can be automatically identified, the application is convenient, the rapid detection and the protocol types distinguishing are facilitated, the operation maintenance and technical support work is simplified, the automation and the accuracy of data acquisition are ensured, the problem that interface protocols between an intelligent concentrator and a CCO (central processing unit) module are inconsistent, which is possibly met by operation and maintenance personnel, is solved, the project delay is effectively avoided, and the labor and material resource costs are reduced.
In one embodiment, before distinguishing the protocol type according to the received message, the method for automatically identifying the communication protocol further includes the steps of: and carrying out frame format detection on the message, distinguishing protocol types according to the received message if the message is correct, and moving the current message to the tail of the circular queue if the message is wrong, and carrying out frame format detection on the next message. In one embodiment, the frame format detection of the packet includes: and judging whether the frame head, the frame tail and the CS (frame check sum) check are correct or not. The design is beneficial to automatically and rapidly determining the protocol type, so that the automatic identification of the communication protocol is really realized through the message.
In one embodiment, when the protocol type has the sub-protocol version, the specific version of the protocol type is continuously distinguished until the protocol type does not have the sub-protocol version; in one embodiment, the national network protocol includes a national network 09 protocol and a national network 13 protocol, that is, the national network protocol includes two sub-protocol versions, which are the national network 09 protocol and the national network 13 protocol, respectively. In practical application, the protocol type may have a sub-protocol version; there may also be a sub-protocol type. Further, in one embodiment, the continuously distinguishing the specific version of the protocol type when the protocol type has the sub-protocol version includes: when the protocol type has the sub-protocol type, whether the protocol type has the sub-protocol version is continuously judged according to the sub-protocol type, if yes, the specific version of the sub-protocol type of the protocol type is continuously distinguished until the protocol type does not have the sub-protocol version, otherwise, the subsequent step is executed, namely, the finally obtained protocol type is adopted as the communication protocol. The design avoids the disadvantage of direct communication after the protocol types are distinguished, and is beneficial to deeply excavating the last subprotocol type and/or subprotocol version layer by layer so as to ensure the agreement of the protocols and realize the intelligent centralized reading function.
In one embodiment, the resulting protocol type is used as the communication protocol. In one embodiment, the method for automatically identifying a communication protocol specifically includes the following steps: the central coordinator module receives a message sent by a local interface of the concentrator; distinguishing whether the protocol type is a national network protocol or a south network protocol according to the received message; when the protocol type is a national network protocol, continuously distinguishing whether the sub-protocol version of the protocol type is a national network 09 protocol or a national network 13 protocol, and adopting the national network 09 protocol or the national network 13 protocol as a communication protocol; when the protocol type is the south network protocol, the south network protocol is adopted as the communication protocol. In one embodiment, after the central coordinator module receives the message sent by the local interface of the concentrator, the method for automatically identifying the communication protocol further includes the following steps: adding the message into a circular queue buffer; distinguishing protocol types according to received messages comprises the following steps: distinguishing protocol types according to the frame head, the frame tail, the data length and the CS check of the message; and, when the protocol type has a sub-protocol version, continuously distinguishing the specific version of the protocol type comprises the steps of: the sub-protocol versions of a protocol type are distinguished according to the bit definition of a particular byte of the message. In one embodiment, the communication protocol automatic identification method comprises the following steps: the central coordinator module receives a message sent by a local interface of the concentrator and adds the message into a circular queue buffer area; distinguishing protocol types according to the frame head, the frame tail, the data length and the CS check of the received message; when the protocol type has the sub-protocol version, continuously distinguishing the specific version of the protocol type, wherein the sub-protocol version of the protocol type is distinguished according to the bit definition of the specific byte of the message until the protocol type does not have the sub-protocol version; and adopting the finally obtained protocol type as a communication protocol. Due to the design, different central coordinator modules do not need to be provided for different intelligent concentrators, operation maintenance and technical support work can be simplified, and automation and accuracy of data acquisition are ensured, so that manpower and material resources can be saved, operation and maintenance efficiency is improved, the power utilization condition of a power company statistical user is ensured, and timely response processing is facilitated, and power utilization safety and reliability are further ensured.
In one embodiment, an implementation flow of the communication protocol automatic identification method is shown in fig. 2, and includes the following steps:
(1) the CCO module receives a message sent by a local interface of the concentrator; furthermore, the CCO module puts data received by the serial port into a queue buffer, and the master function periodically queries whether the queue buffer has data.
(2) According to the received message, distinguishing the protocol type, whether the protocol is a national network protocol or a south network protocol; further, once the data is received, the frame format detection is performed on the data, and whether the check of the frame head, the frame tail and the CS is correct or not is judged. If correct, it is possible to distinguish between the national network protocol and the south network protocol type. Otherwise, the index in the queue is shifted backwards to judge the next frame data.
(3) According to the protocol type, different treatments are carried out; if the communication protocol is the south network protocol, the south network protocol is adopted as the communication protocol, and then the communication protocol can be adopted for communication; if the protocol is the national network protocol, the protocol is further distinguished from the national network 09 protocol or the national network 13 protocol, and the protocol is used as a communication protocol, and then communication can be carried out by adopting the communication protocol. Further, once the protocol type is determined, protocol parsing may be performed according to different protocol types. Of course, for the type of national network protocol, it is necessary to further distinguish whether the national network 09 protocol or the national network 13 protocol according to the bit definition of the specific byte.
In one embodiment, in an implementation flow of the communication protocol automatic identification method, a specific processing or analysis process, an encoding and decoding process, and a control process of software on data are shown in fig. 3. The CCO serial port receives the data and adds the data into a circular queue buffer area; according to the frame head, the frame tail, the data length and the CS verification, distinguishing whether the protocol type is a national network protocol or a south network protocol; the differentiated protocol version is the national network 09 protocol or the 13 protocol, depending on the bit definition of the particular byte. By the design, the problem that the interface protocol between the intelligent concentrator and the CCO module is inconsistent, which is possibly encountered by operation and maintenance personnel, is solved by self-adapting the local interface protocol of the intelligent concentrator, project delay is effectively avoided, and the cost of manpower and material resources is reduced.
Further, in one embodiment, after the finally obtained protocol type is adopted as the communication protocol, the method for automatically identifying the communication protocol further comprises a direct sampling step, and the direct sampling step is used for collecting the low-voltage user voltage. In one embodiment, the directly mining step includes: according to the communication protocol, the concentrator collects the voltage of the low-voltage user; in one embodiment, the concentrator preferentially ensures the reading integrity of the electric quantity data, the voltage reading is only read once, and complementary collection is not performed after failure. Meanwhile, the voltage acquisition is increased, the total overtime limit is set to be 5 minutes for example, and the voltage acquisition of the current round is terminated after the overtime. The design is favorable for realizing the direct voltage transmission and direct voltage collection function through automatically identifying the communication protocol.
Further, in one embodiment, after the finally obtained protocol type is used as the communication protocol, the method for automatically identifying the communication protocol further includes a control step, and the control step is used for controlling and realizing remote switching on and off. In one embodiment, the controlling step comprises: the central coordinator module receives a task message with a remote switching-on/off command and sends the task message to a site; the station repackages the task message according to the communication protocol, determines a table module according to the node address in the task message, and forwards the table module; and the meter module forwards the command to the meter end, and the meter end controls the switching-on and switching-off operation after confirming the validity of the remote switching-on and switching-off command. In one embodiment, when or after receiving a remote switching-on/off command issued by a master station, a concentrator encapsulates the switching-on/off command in a data field of a task message, and sends the task message to a central coordinator module. In one embodiment, after receiving a remote switching-on/off command issued by a master station, a concentrator encapsulates the switching-on/off command in a data field of a task message in a task mode and adds the switching-on/off command to a CCO, the CCO issues the switching-on/off command to an STA in the task execution process, the STA re-encapsulates the switching-on/off command into a protocol format which can be identified by an extended route, namely a protocol format which is identified by the STA in the previous stage, adds the switching-on/off command to the extended route, and the extended route sends the switching-on/off command according to a node address specified in the switching-on/off command, namely a table module address. After the meter module receives the command, the meter module sends the command to the meter end through the serial port, and the meter end judges the legality of the switching-on/off command, so that the aim of remotely switching-on/off is fulfilled finally. By the design, after the communication protocol is automatically identified, the remote switching-on and switching-off control function can be realized, and the device has the advantages of safety and reliability and can realize the remote control effect. Further, in one embodiment, as shown in fig. 4, the controlling step includes: the concentrator sends a switching-on/off command and issues a central coordinator module through a task; after receiving the task, the central coordinator module forwards the task to the site; the station repackages the task message according to the communication protocol, determines a table module according to the node address in the task message, and sends the task to the table module through the extended routing; the meter module sends a switching-on/off command to the electric meter through the serial port; the ammeter judges whether the switching-on and switching-off command is a plaintext, and if so, switching-on and switching-off operation is carried out according to the command; otherwise, further judging whether the switching-on/off password is correct, if so, performing switching-on/off operation. Due to the design, remote switching-on and switching-off control is more reliable, and particularly, the intelligent electric meter is used together, so that the safety, effectiveness and reliability of use of a user are ensured.
In one embodiment, a communication method comprises the communication protocol automatic identification method in any embodiment. In one embodiment, the communication method further includes the steps of: and carrying out communication by adopting the communication protocol. In one embodiment, a method of communication includes the steps of: the central coordinator module receives a message sent by a local interface of the concentrator; distinguishing protocol types according to received messages; when the protocol type has the sub-protocol version, the specific version of the protocol type is continuously distinguished until the protocol type does not have the sub-protocol version; and adopting the finally obtained protocol type as a communication protocol, and adopting the communication protocol to carry out communication. In one embodiment, a method of communication includes the steps of: presetting the format of a message, and receiving the message sent by a local interface of a concentrator by a central coordinator module; distinguishing protocol types according to received messages; when the protocol type has the sub-protocol version, the specific version of the protocol type is continuously distinguished until the protocol type does not have the sub-protocol version; and adopting the finally obtained protocol type as a communication protocol, and adopting the communication protocol to carry out communication. The rest of the examples are analogized. By the design, the local interface protocol of the concentrator can be self-adaptive, and the national network protocol or the south network protocol can be automatically identified; through a self-adaptive algorithm, the plug and play can be realized without human intervention; furthermore, data can be received through the annular queue, so that the problem of data packet loss can be effectively avoided; therefore, manpower and material resources are saved, the operation and maintenance efficiency is improved, the power utilization condition of the power company statistics user is guaranteed so as to make timely response and treatment, and the safety and reliability of power utilization are further guaranteed.
Other embodiments of the present application further include a communication protocol automatic identification method and a communication method, which are formed by combining technical features of the above embodiments with each other and can be implemented.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the claims. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims (10)

1. A communication protocol automatic identification method is characterized by comprising the following steps:
the central coordinator module receives a message sent by a local interface of the concentrator;
distinguishing protocol types according to received messages;
when the protocol type has the sub-protocol version, the specific version of the protocol type is continuously distinguished until the protocol type does not have the sub-protocol version;
adopting the finally obtained protocol type as a communication protocol;
when the protocol type has a sub-protocol version, the specific version of the protocol type is continuously distinguished, and the method comprises the following steps: when the protocol type has the sub-protocol type, whether the protocol type has the sub-protocol version is continuously judged according to the sub-protocol type, if yes, the specific version of the sub-protocol type of the protocol type is continuously distinguished until the protocol type does not have the sub-protocol version, and if not, the subsequent steps are executed.
2. The method according to claim 1, wherein the protocol types include a national network protocol and a south network protocol.
3. The method according to claim 2, wherein the national network protocol comprises national network 09 protocol and national network 13 protocol.
4. The method for automatically identifying a communication protocol according to claim 3, comprising the steps of:
the central coordinator module receives a message sent by a local interface of the concentrator;
distinguishing whether the protocol type is a national network protocol or a south network protocol according to the received message;
when the protocol type is a national network protocol, continuously distinguishing whether the sub-protocol version of the protocol type is a national network 09 protocol or a national network 13 protocol, and adopting the national network 09 protocol or the national network 13 protocol as a communication protocol;
when the protocol type is the south network protocol, the south network protocol is adopted as the communication protocol.
5. The method for automatically identifying a communication protocol according to claim 1, wherein the receiving, by the central coordinator module, the message sent by the local interface of the concentrator comprises: the central coordinator module receives a message sent by a local interface of the concentrator in a mode of receiving data by adopting a circular queue; adding the message into a circular queue buffer area according to the priority level information of the message; the method comprises the steps that for an error message, the error message is moved to the tail of a queue to form the annular queue, the error times of the same message or the same message sending end are recorded, and when the error times exceed the preset times, an alarm signal is sent out and the error message and/or the sending end thereof are/is indicated; when the current length of the ring queue is greater than the maximum length, automatically dividing the ring queue into two ring queues, wherein the length of one ring queue is the maximum length, and when a new message sent by a local interface of a concentrator is received, adding the new message to the tail of the ring queue with a shorter length; or when the current length of the circular queue is greater than the maximum length, automatically dividing the circular queue into two circular queues, wherein the length of one circular queue is the maximum length and is arranged according to the receiving time sequence, and the other circular queue is arranged again according to the priority information of the message; or, the central coordinator module is provided with a plurality of processing cores, and each processing core is used for processing one ring queue; or, the central coordinator module receives a message sent by the local interface of the concentrator through a serial port; or, the central coordinator module puts the received message into a queue buffer; or, the central coordinator module or the processor regularly inquires whether the queue buffer area has data, and executes the subsequent steps when the queue buffer area has data; or, the main function is adopted to inquire whether the queue buffer area has data or not at regular time.
6. The method according to claim 1, wherein the protocol type is distinguished according to the received packet, and specifically comprises: automatically identifying a national network protocol or a south network protocol according to the received message; when the queue buffer area has data, the frame format detection is carried out on the data of the queue buffer area in sequence and the protocol types are distinguished.
7. The method for automatically identifying a communication protocol according to claim 1, wherein after the central coordinator module receives the message sent by the local interface of the concentrator, the method for automatically identifying a communication protocol further comprises the steps of: adding the message into a circular queue buffer;
distinguishing protocol types according to received messages comprises the following steps: distinguishing protocol types according to the frame head, the frame tail, the data length and the CS check of the message;
and, when the protocol type has a sub-protocol version, continuously distinguishing the specific version of the protocol type comprises the steps of: the sub-protocol versions of a protocol type are distinguished according to the bit definition of a particular byte of the message.
8. The method for automatically identifying a communication protocol according to claim 7, wherein before distinguishing the protocol type from the received message, the method for automatically identifying a communication protocol further comprises the steps of: and carrying out frame format detection on the message, distinguishing protocol types according to the received message if the message is correct, and moving the current message to the tail of the circular queue if the message is wrong, and carrying out frame format detection on the next message.
9. The method of claim 8, wherein detecting the frame format of the message comprises: and judging whether the verification of the frame head, the frame tail and the CS is correct or not.
10. A communication method comprising the communication protocol automatic identification method according to any one of claims 1 to 9.
CN201910985952.6A 2019-10-17 2019-10-17 Automatic identification method and communication method for communication protocol Active CN110784456B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910985952.6A CN110784456B (en) 2019-10-17 2019-10-17 Automatic identification method and communication method for communication protocol
CN202010392560.1A CN111786941B (en) 2019-10-17 2019-10-17 Automatic identification method and communication method for communication protocol

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910985952.6A CN110784456B (en) 2019-10-17 2019-10-17 Automatic identification method and communication method for communication protocol

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202010392560.1A Division CN111786941B (en) 2019-10-17 2019-10-17 Automatic identification method and communication method for communication protocol

Publications (2)

Publication Number Publication Date
CN110784456A CN110784456A (en) 2020-02-11
CN110784456B true CN110784456B (en) 2020-06-02

Family

ID=69385851

Family Applications (2)

Application Number Title Priority Date Filing Date
CN201910985952.6A Active CN110784456B (en) 2019-10-17 2019-10-17 Automatic identification method and communication method for communication protocol
CN202010392560.1A Active CN111786941B (en) 2019-10-17 2019-10-17 Automatic identification method and communication method for communication protocol

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN202010392560.1A Active CN111786941B (en) 2019-10-17 2019-10-17 Automatic identification method and communication method for communication protocol

Country Status (1)

Country Link
CN (2) CN110784456B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111884876A (en) * 2020-07-22 2020-11-03 杭州安恒信息技术股份有限公司 Method, device, equipment and medium for detecting protocol type of network protocol
CN113129577B (en) * 2021-04-07 2022-02-15 国网河北省电力有限公司邯郸供电分公司 HPLC intelligent acquisition terminal and method based on multi-metadata transmission mode
CN113242059B (en) * 2021-06-09 2022-04-12 武汉中原电子信息有限公司 Lock-free multi-coordination processing thread concurrent meter reading method based on double-ring queue
CN115175015A (en) * 2022-05-31 2022-10-11 海南电网有限责任公司海口供电局 Communication conversion method and system for remote switching on and off of electric energy meter

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107204110A (en) * 2017-05-23 2017-09-26 北京盛大信通科技有限公司 A kind of method of the quick copy reading of meter data based on broadband network
CN108989111A (en) * 2018-07-23 2018-12-11 重庆物奇科技有限公司 A kind of method communicated between analog node

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7848306B2 (en) * 2005-07-27 2010-12-07 Sharp Laboratories Of America, Inc. Coexistence of access provider and in-home networks
US8625481B2 (en) * 2006-12-15 2014-01-07 Samsung Electronics Co., Ltd. Architecture for MANET over Bluetooth
CN104052758A (en) * 2014-07-14 2014-09-17 威胜集团有限公司 Self-adaptive method of multiple communication protocols of electric energy meter
CN104318750B (en) * 2014-10-20 2017-10-17 华为技术有限公司 A kind of methods, devices and systems of meter reading
US10686914B2 (en) * 2014-11-04 2020-06-16 Texas Instruments Incorporated Automatic selection of MAC protocol to support multiple prime PLC standards
CN105656600B (en) * 2015-12-29 2019-05-10 湖南先步信息股份有限公司 A kind of communication means of the adaptive two kinds of communication protocol of slave station
CN106453659A (en) * 2016-12-09 2017-02-22 国网冀北电力有限公司电力科学研究院 Method and device for collecting power consumer information
CN107146395B (en) * 2017-06-13 2020-05-08 珠海慧信微电子有限公司 Meter reading system and meter reading method based on broadband carrier communication
CN110034785A (en) * 2019-03-27 2019-07-19 国网山东省电力公司青岛供电公司 The method that power-off fault quickly positions is realized based on power line carrier communication

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107204110A (en) * 2017-05-23 2017-09-26 北京盛大信通科技有限公司 A kind of method of the quick copy reading of meter data based on broadband network
CN108989111A (en) * 2018-07-23 2018-12-11 重庆物奇科技有限公司 A kind of method communicated between analog node

Also Published As

Publication number Publication date
CN111786941A (en) 2020-10-16
CN110784456A (en) 2020-02-11
CN111786941B (en) 2022-07-29

Similar Documents

Publication Publication Date Title
CN110784456B (en) Automatic identification method and communication method for communication protocol
CN109067617B (en) V2X protocol consistency test method, device and system
CN106953902B (en) Method and device for upgrading firmware of electric energy meter
CN110474756B (en) Intelligent power grid electricity utilization information acquisition method
CN112822276B (en) Substation control layer communication method and system, electronic equipment and storage medium
EP3605881B1 (en) Method and device for transmitting and receiving network management information, transmitting apparatus and receiving apparatus
US10469620B2 (en) Method for transferring a new software version to at least one electricity meter via a communication network
CN103874227A (en) Method, device and system for setting up connection
CN103986615A (en) Testing method and device
CN112419701A (en) Telecontrol equipment data abnormity judgment method, telecontrol equipment data abnormity judgment device, telecontrol equipment data abnormity judgment equipment and storage medium
CN112053546A (en) Intelligent fusion terminal and communication method for marketing and distribution through service promotion
CN112000659A (en) Basic application system suitable for intelligent terminal equipment of power distribution station
CN101808011A (en) Telemechanical channel automatic switching method
CN108111578B (en) Method for accessing power distribution terminal data acquisition platform into terminal equipment based on NIO
CN117348900A (en) Electric energy meter matching upgrading method and related equipment
CN109920232A (en) Electric power multi service access terminal and management system based on NB-loT
CN113162819B (en) Joint debugging method and device for 10kV pole-mounted switch complete equipment and storage medium
CN111917182B (en) Method and system for directly transmitting data of double main stations of low-voltage distribution network
CN113660309A (en) Ubiquitous power-based multi-system converged communication protocol adaptation system for Internet of things
CN101950485B (en) Traffic signal lamp digital networking equipment
CN104778547B (en) A kind of power consumer electricity consumption information self-learning type meter register method
CN117857655B (en) Control method, device, terminal and medium of intelligent Internet of things terminal of cable channel
US20240349180A1 (en) Method and system for communicating in a communication network comprising nodes provided with radio and plc communication means and nodes provided with solely radio communication means
CN111383432A (en) Information receiving method and device, and information reporting method, device and system
CN114398299B (en) Data processing method of four-core cooperative measurement and control processor and processor

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20230412

Address after: Full Floor 14, Unit 3, Building 2, No. 11, Middle Spectra Road, Huangpu District, Guangzhou, Guangdong 510700

Patentee after: China Southern Power Grid Digital Grid Technology (Guangdong) Co.,Ltd.

Address before: Room 1301, Chengtou building, No. 106, Fengze East Road, Nansha District, Guangzhou City, Guangdong Province

Patentee before: Southern Power Grid Digital Grid Research Institute Co.,Ltd.

TR01 Transfer of patent right