A DL / T719 protocol analysis method and power collection terminal

By generating data identification mapping files and establishing protocol standard communication procedures, the problem of incompatibility of DL/T 719 protocol versions and inconsistent data identification definitions is solved, and data communication compatibility between power master station systems and power collection terminals of different manufacturers is achieved. , improving installation and debugging efficiency and reducing operation and maintenance costs.

CN115633107BActive Publication Date: 2024-09-10YANTAI DONGFANG WISDOM ELECTRIC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211454289.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-21
Publication Date
2024-09-10
Estimated Expiration
2042-11-21

AI Technical Summary

Technical Problem

In practical applications, the DL/T 719 protocol has problems such as incompatibility of protocol versions and inconsistent data identification definitions, which results in the inability of data communication between the power master station systems and power collection terminals of different manufacturers, and the protocol upgrade efficiency is low, affecting system stability. Run and develop.

Method used

By generating a data identification mapping file, establishing a protocol standard communication program, importing the data identification mapping file, creating a communication protocol processing thread, receiving data test commands and performing protocol parsing processing, determining the test data, and uploading message frames to achieve Compatibility and data communication of different versions of protocols.

Benefits of technology

It achieves barrier-free data communication between master and substations of different manufacturers, avoids the risk of program upgrades, improves installation and debugging efficiency, reduces operation and maintenance costs, and ensures the stable operation and development of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115633107B
    Figure CN115633107B
Patent Text Reader

Abstract

The present invention discloses a DL / T719 protocol parsing method and a power collection terminal, wherein the protocol parsing method comprises: generating a data identification mapping file according to the data communication requirements between the master and substations; establishing a protocol standard communication program, importing the data identification mapping file, creating and starting a communication protocol processing thread between the master and substations, waiting for and receiving a data call command issued by the master station; when receiving a data call command issued by the master station, performing protocol parsing processing according to the data identification mapping file, determining the call data, performing message framing and uploading to the master station. The present invention solves the problem that data communication cannot be performed between the master and substations due to different protocol versions and the DL / T719 protocol program upgrade is inefficient and unstable.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a DL / T719 protocol parsing method and a power collection terminal. Background Art

[0002] DL / T 719 protocol is an industry standard launched by my country in 2000 based on the IEC60870-5-102 international standard. It is widely used for data communication between the power master station system and the power collection terminal (hereinafter referred to as the master substation). The power master station system sends a data call command to request data items within the selected time range and address range from the power collection terminal. The power collection terminal searches for qualified data from the database according to the data call command and transmits it to the power master station system.

[0003] Although the DL / T 719 industry standard has been launched and used for many years, there are still many obstacles in its actual promotion and application. It is very difficult for more than 20 manufacturers at home and abroad who specialize in developing and producing power collection systems to fully freely realize the interconnection and interoperability of the DL / T 719 protocol. This is mainly because the IEC60870-5-102 standard only stipulates the communication protocol format, and does not standardize the specific data identification, information description, etc., which leads to large differences in understanding among manufacturers. Problems such as different data identification definitions, different data length definitions, and incompatibility between new and old versions are common, which brings great inconvenience to data interchangeability and interoperability. In actual applications, it is impossible to avoid the problem of mutual access between power master station systems and power collection terminals of different manufacturers, and the data interaction between the master and substations can only be communicated smoothly under the premise that the content of the communication protocol is completely consistent, which leads to the inability to communicate data between equipment from different manufacturers on site.

[0004] Furthermore, upgrading and maintaining the DL / T 719 protocol of the master substation involves changes to the application software program, which requires a large amount of code modification, low development efficiency, and frequent upgrades may introduce other unknown risks, which seriously restricts the development of power collection business and is not conducive to the stable operation and development of the system. Summary of the invention

[0005] The present invention proposes a DL / T719 protocol parsing method and a power collection terminal, the purpose of which is to solve the problems in the prior art that data communication between master and substations cannot be performed due to different protocol versions and that the DL / T719 protocol program upgrade is inefficient and unstable.

[0006] The technical solution of the present invention is as follows:

[0007] A DL / T719 protocol parsing method comprises the following steps:

[0008] S1: Generate a data identification mapping file according to the data communication requirements between the master and slave stations;

[0009] S2: Establish a protocol standard communication program, import the data identification mapping file, create and start the communication protocol processing thread between the master and slave stations, and wait for and receive the data call command issued by the master station;

[0010] S3: When receiving the data call test command issued by the master station, perform protocol parsing processing according to the data identification mapping file, determine the call test data, perform message framing and upload to the master station.

[0011] Furthermore, the data identification mapping file includes one or more groups of application service data unit attributes, the application service data unit attributes include function descriptions, control direction data unit attributes and monitoring direction data unit attributes, the control direction data unit attributes include control direction type identification, record address, starting address and number of rates, the monitoring direction data unit attributes include monitoring direction type identification, transmission reason and number of data objects N, the number of data objects N represents the maximum number of data contents that can be uploaded in one frame message when uploading data; the function description is used to describe the function of the current application service data unit attribute, the control direction data unit attributes are used to describe the call data type and command information sent by the master station to the substation, and the monitoring direction data unit attributes are used to describe the response data type, maximum number of data and data format definition uploaded by the substation to the master station.

[0012] Furthermore, after importing the data identification mapping file, the step S2 obtains the information in the application service data unit attributes, and generates an attribute information summary table for all the information; when the step S3 performs protocol parsing processing, the control direction type identifier in the attribute information summary table is traversed for matching. If the data type of the data call command issued by the main station is consistent with the control direction type identifier in the attribute information summary table, the protocol parsing processing is performed according to the data identification mapping file, otherwise the protocol parsing processing is performed based on the default method in the protocol standard communication program.

[0013] Further, in the step S3, the call test data is determined based on the control direction data unit attributes, specifically including: determining the data interval of the call test data based on the record address, determining the data point number corresponding to the query data based on the starting address, determining the number of rates that the power data should include when reading data based on the number of rates, performing data query based on the data interval, data point number, the number of rates that the power data should include, and the data start and end time in the data call test command issued by the master station, and saving the query data results as the call test data.

[0014] Furthermore, in the step S3, message framing is performed based on the monitoring direction data unit attributes, specifically including: using the monitoring direction type identifier and the content defined in the transmission reason to directly replace the default monitoring direction type identifier and transmission reason content in the protocol standard communication program, based on the number of data objects N, reading M data contents from the query data result into the current data area, and performing message framing on the current data area content, where M≤N.

[0015] Furthermore, the monitoring direction data unit attribute also includes an invalid data flag. When the invalid data flag is 1, the validity of the current data area content is judged. If the data in the current data area is invalid data, an invalid flag is added to the first byte position after the current data area content.

[0016] Furthermore, the monitoring direction data unit attribute also includes a data protection check flag. When the data protection check flag is 1, a data protection check calculation is performed on the current data area content, and the calculation result is added to the second byte position after the current data area content.

[0017] Furthermore, in the step S3, after completing uploading a frame of data to the main station, the main station is queried whether it has issued a subsequent data call command. If so, the remaining data to be sent in the query data result is continued to be read into the current data area, and the message is framed and uploaded to the main station based on the monitoring direction data unit attribute until all the call data required by the main station are uploaded. Otherwise, the reading, message framing and uploading of the remaining data to be sent will no longer be performed.

[0018] If there is no remaining data to be sent in the query data result when the subsequent data call command sent by the master station is received, an activation termination mirror frame command is returned to the master station, indicating that a complete data interaction process is completed.

[0019] The present invention also discloses a power collection terminal for implementing the DL / T719 protocol parsing method, comprising a data identification management unit and a data communication interaction unit, wherein the data identification management unit is used to generate the data identification mapping file, and the data communication interaction unit comprises an information loading module, a task starting module, a communication protocol parsing module, a data query module and a communication protocol framing module, wherein the information loading module is used to import the data identification mapping file into the protocol standard communication program, the task starting module is used to create and start the communication protocol processing thread between the master and substations, the communication protocol parsing module is used to receive the data call command issued by the master station, and perform protocol parsing processing according to the data identification mapping file, the data query module is used to query the data results and determine the call data; the communication protocol framing module is used to frame the query data results into messages and upload them to the master station.

[0020] The present invention also discloses an electronic device, comprising at least one processor and a memory communicatively connected to the at least one processor, wherein the memory stores a computer program executable by the at least one processor, and when the computer program is executed by the at least one processor, the DL / T719 protocol parsing method can be implemented.

[0021] Compared with the prior art, the present invention has the following beneficial effects: by establishing a data identification mapping file, the functional configuration and definition of data communication is realized, and the problem that different manufacturers cannot communicate due to inconsistent data identification definitions in actual applications is solved; by introducing application service data unit attributes, the call test data is determined based on the control direction data unit attributes, and the message is framed based on the monitoring direction data unit attributes, which provides an optional solution for differentiated functional requirements in different versions of the protocol, so that the power master station system and the power collection terminal can be compatible with different versions of the DL / T719 protocol, and barrier-free data communication between master and substations of different manufacturers is realized; during on-site debugging, there is no need to upgrade the program or modify the existing program code, which effectively avoids other unknown risks introduced by program upgrades or secondary development, improves installation and debugging efficiency, reduces product operation and maintenance costs, and is conducive to the stable operation and development of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 It is a flow chart of DL / T719 protocol analysis method;

[0023] Figure 2 A schematic diagram of the content of the data identification mapping file;

[0024] Figure 3 This is the structural block diagram of the power collection terminal. DETAILED DESCRIPTION

[0025] The technical solution of the present invention is described in detail below with reference to the accompanying drawings:

[0026] Embodiment 1:

[0027] like Figure 1 , a DL / T719 protocol parsing method, comprising the following steps:

[0028] S1: Generate a data identification mapping file based on the data communication requirements between the master and slave stations.

[0029] like Figure 2, the data identification mapping file includes one or more groups of application service data unit attributes, and the application service data unit attributes are used to describe the implementation method of the data communication function between the master and the substation. The application service data unit attributes include function description, control direction data unit attributes and monitoring direction data unit attributes. The function description is used to describe the function of the current application service data unit attribute. The control direction data unit attributes include control direction type identification, record address, start address and number of rates. The control direction data unit attributes are used to describe the type of call test data and command information sent by the master station to the substation; the monitoring direction data unit attributes include monitoring direction type identification, transmission reason, number of data objects N, invalid data flag and data protection check flag. The number of data objects N represents the maximum number of data contents that can be uploaded in a frame message when uploading data. The monitoring direction data unit attributes are used to describe the response data type, maximum number of data and data format definition uploaded by the substation to the master station.

[0030] S2: Establish a protocol standard communication program, import the data identification mapping file, obtain the information in the application service data unit attributes, and generate an attribute information summary table for all information; create and start the communication protocol processing thread between the master and substations, wait for and receive the data call command issued by the master station.

[0031] S3: When receiving the data call test command issued by the master station, perform protocol parsing processing according to the data identification mapping file, determine the call test data, perform message framing and upload to the master station.

[0032] Specifically, when a data call command is received from the master station, the control direction type identifier in the attribute information table is first traversed for matching. If the data type of the data call command sent by the master station is consistent with the control direction type identifier in the attribute information table, protocol parsing is performed according to the data identifier mapping file. Otherwise, protocol parsing is performed based on the default method in the protocol standard communication program.

[0033] Preferably, when performing protocol parsing processing according to the data identification mapping file, the call data is first determined based on the control direction data unit attributes, specifically including: determining the data interval of the call data based on the record address, for example: record address = 15 indicates that the data interval is 15 minutes; determining the data point number corresponding to the query data based on the starting address, starting address = 0 or 1, data point number = information body address - starting address; determining the number of rates that the electricity data should include when reading data based on the number of rates; performing data query in the database of the electricity collection terminal based on the parameters established by the above method (data interval, data point number, number of rates that the electricity data should include) and the data start and end time in the data call command issued by the master station, and saving the query data results as call data.

[0034] Then, based on the monitoring direction data unit attributes, the message framing of the substation response command is completed, specifically including: using the monitoring direction type identifier and the content defined in the transmission reason to directly replace the default monitoring direction type identifier and the transmission reason content in the protocol standard communication program; based on the number of data objects N, reading M data contents from the query data result into the current data area, and performing message framing on the current data area content, where M≤N.

[0035] Furthermore, when the message is framed based on the monitoring direction data unit attribute, the validity of the current data area content is also judged. Specifically, when the invalid data flag is 1, the validity of the current data area content is judged, and if the data in the current data area is invalid data, an invalid flag 0x80 is added to the first byte position after the current data area content.

[0036] When performing message framing based on the monitoring direction data unit attribute, a data protection check calculation is also performed on the current data area content. Specifically, when the data protection check flag is 1, a data protection check calculation is performed on the current data area content, and the calculation result is added to the second byte position after the current data area content.

[0037] After completing the message framing of the current data area, upload it to the main station. After a frame of data is uploaded, query the main station whether it has issued a subsequent data call command. If it has, continue to read the remaining data to be sent in the query data result into the current data area, frame the message based on the monitoring direction data unit attribute and upload it to the main station until all the call data required by the main station have been uploaded. Otherwise, the reading, message framing and uploading of the remaining data to be sent will no longer be performed.

[0038] When reading the remaining data to be sent in the query data result in each round, if the current number of remaining data to be sent in the query data result is greater than or equal to the number of data objects N, then M data contents are read into the current data area, and M=N at this time; if the current number of remaining data to be sent in the query data result is less than the number of data objects N, then M data contents (that is, all the current remaining data contents to be sent in the query data result) are read into the current data area, and M<N at this time.

[0039] Preferably, if there is no remaining data to be sent in the query data result when the subsequent data call command issued by the master station is received, an activation termination mirror frame command is returned to the master station, indicating that a complete data interaction process is completed.

[0040] like Figure 3 The present invention also discloses a power acquisition terminal for implementing the DL / T719 protocol parsing method, including a data identification management unit and a data communication interaction unit, wherein the data identification management unit is used to generate the data identification mapping file, and the data communication interaction unit is used to load the data identification mapping file into the protocol standard communication program, and realize the data communication between the master and the substation based on the application service data unit attribute. Preferably, the data communication interaction unit includes an information loading module, a task starting module, a communication protocol parsing module, a data query module and a communication protocol framing module, wherein the information loading module is used to import the data identification mapping file into the protocol standard communication program and obtain the application service data unit attribute information; the task starting module is used to create and start the communication protocol processing thread between the master and the substation, the communication protocol parsing module is used to receive the data call command issued by the master station, and perform protocol parsing processing according to the data identification mapping file, the data query module is used to query the data result and determine the call data; the communication protocol framing module is used to frame the query data result and upload it to the master station.

[0041] Based on the above-mentioned DL / T719 protocol parsing method, the present invention also proposes an electronic device. In this embodiment, the electronic device includes at least one processor and a memory connected to the at least one processor in communication, the memory stores a computer program executable by the at least one processor, and when the computer program is executed by the at least one processor, the above-mentioned DL / T719 protocol parsing method is implemented.

[0042] Embodiment 2:

[0043] Assuming that there are two types of data communication requirements between the master and substations, namely, power and demand, the data identification mapping file contains two sets of application service data unit attributes, among which:

[0044] The first set of ASDU attributes are:

[0045] Function description: Electricity load curve recording;

[0046] Control direction data unit attributes: control direction type identifier = 120, record address = 15, start address = 1, number of rates = 4;

[0047] Monitoring direction data unit attributes: monitoring direction type identifier = 2, transmission reason = 5, number of data objects = 8, invalid data flag = 1, data protection check flag = 1.

[0048] The second set of ASDU attributes are:

[0049] Function description: Monthly maximum demand data;

[0050] Control direction data unit attributes: control direction type identifier = 170, record address = 0, number of rates = 4;

[0051] Monitoring direction data unit attributes: monitoring direction type identifier = 160, transmission reason = 5, number of data objects = 4, invalid data flag = 1, data protection check flag = 0.

[0052] Taking the first group of application service data unit attributes as an example, the data communication steps between the power collection terminal and the power master station system are explained:

[0053] S1: The data identification management unit of the power collection terminal generates a data identification mapping file, and the data identification mapping file includes the above two groups of application service data unit attributes.

[0054] S2: The data communication interaction unit of the power collection terminal creates a DL / T 719 protocol standard communication program, the information loading module imports the data identification mapping file, and loads the application service data unit attribute information in the file, and generates an attribute information summary table for all information, and the task startup module creates and starts the communication protocol processing thread between the master and substations.

[0055] S3: The communication protocol parsing module waits for and receives the data call command issued by the master station. If the data call command issued by the master station is received, the data type identifier in the data call command is read first, and the control direction type identifier in the attribute information table is traversed for comparison. If the data type identifier issued by the master station = 120, the parsing process based on the application service data unit attribute is entered; the default processing of the protocol standard communication program is not described here.

[0056] The database query module determines the call test data based on the control direction data unit attributes: from the record address = 15, the starting address = 1, and the number of rates = 4, it can be seen that the master station call test command is to read the accumulated electric energy in a selected time range and address range, and the data interval is 15 minutes, the data point number starts from 1, and each information body needs to contain 4 rate electric quantities; according to the above conditions, the electric quantity data that meets the requirements is queried from the electric quantity collection terminal database, and the query results are saved for use.

[0057] The communication protocol framing module implements message framing and uploads it to the main station based on the format defined by the monitoring direction data unit attribute. When framing the message, the monitoring direction type identifier and the transmission reason are passed to the corresponding data position in the protocol standard communication program; from the data query result, M data are read into the current data area, where M≤N, and N is the number of data objects in the monitoring direction data unit attribute; if the invalid data flag = 1, then the invalid flag 0x80 is added to the first byte position after the current data area content; if the data protection check flag = 1, the data protection check value is calculated, and the calculation result is added to the second byte position after the current data area content; the current data area content is framed and uploaded to the main station according to the above method.

[0058] After a frame of data is uploaded, query whether the main station has issued a subsequent data call command. If yes, continue to read the remaining data to be sent in the query data result into the current data area, frame the message based on the monitoring direction data unit attribute and upload it to the main station until all the call data required by the main station have been uploaded. Otherwise, the reading, message framing and uploading of the remaining data to be sent will no longer be performed.

[0059] Preferably, if there is no remaining data to be sent in the query data result when the subsequent data call command issued by the master station is received, an activation termination mirror frame command is returned to the master station, indicating that a complete data interaction process is completed.

[0060] This method provides an optional solution to the differentiated functional requirements in different versions of the protocol by introducing the attributes of the application service data unit (for example: the data intervals represented by the record address in the control direction are not equal, the number of call rates is inconsistent; the data identification and transmission reasons returned in the monitoring direction are inconsistent, whether data protection verification is required, whether invalid data needs to add an invalid flag, etc.). Through the application of this method, the smooth access of the power collection terminal and the master station system of domestic and foreign manufacturers is achieved, avoiding the interconnection problems caused by different protocol versions and understanding deviations. According to statistical data analysis, through the use of this method, the efficiency of on-site installation and debugging has increased by more than 25% compared with the original, bringing direct economic benefits.

Claims

1. A DL / T719 protocol parsing method, characterized in that: The steps include: S1: Generate a data identification mapping file according to the data communication requirements between the master and slave stations; S2: Establish a protocol standard communication program, import the data identification mapping file, create and start the communication protocol processing thread between the master and slave stations, and wait for and receive the data call command issued by the master station; S3: When receiving the data call test command issued by the master station, perform protocol parsing according to the data identification mapping file, determine the call test data, perform message framing and upload to the master station; The data identification mapping file includes one or more groups of application service data unit attributes, the application service data unit attributes include function description, control direction data unit attributes and monitoring direction data unit attributes, the control direction data unit attributes include control direction type identification, record address, start address and rate number, the monitoring direction data unit attributes include monitoring direction type identification, transmission reason and data object number N, the data object number N represents the maximum number of data content that can be uploaded in one frame message when uploading data; the function description is used to describe the function of the current application service data unit attribute, the control direction data unit attributes are used to describe the call test data type and command information sent by the master station to the substation, and the monitoring direction data unit attributes are used to describe the response data type, maximum data number and data format definition uploaded by the substation to the master station; After importing the data identification mapping file, the step S2 obtains information in the attributes of the application service data unit, and generates an attribute information summary table for all the information; when performing protocol parsing processing, the step S3 traverses the control direction type identifier in the attribute information summary table for matching, and if the data type of the data call command issued by the master station is consistent with the control direction type identifier in the attribute information summary table, the protocol parsing processing is performed according to the data identification mapping file, otherwise the protocol parsing processing is performed based on the default method in the protocol standard communication program; In the step S3, determining the call test data based on the control direction data unit attribute specifically includes: determining the data interval of the call test data based on the record address, determining the data point number corresponding to the query data based on the start address, determining the number of rates that the power data should include when reading data based on the number of rates, performing data query based on the data interval, the data point number, the number of rates that the power data should include, and the data start and end time in the data call test command issued by the master station, and saving the query data result as the call test data; In the step S3, message framing is performed based on the monitoring direction data unit attributes, specifically including: using the monitoring direction type identifier and the content defined in the transmission reason to directly replace the default monitoring direction type identifier and the transmission reason content in the protocol standard communication program, based on the number of data objects N, reading M data contents from the query data result into the current data area, and performing message framing on the current data area content, wherein M≤N.

2. The DL / T719 protocol parsing method according to claim 1, characterized in that: The monitoring direction data unit attribute also includes an invalid data flag. When the invalid data flag is 1, the validity of the current data area content is judged. If the data in the current data area is invalid data, an invalid flag is added to the first byte position after the current data area content.

3. The DL / T719 protocol analysis method according to claim 1, characterized in that: The monitoring direction data unit attribute also includes a data protection check flag. When the data protection check flag is 1, a data protection check calculation is performed on the current data area content, and the calculation result is added to the second byte position after the current data area content.

4. The DL / T719 protocol analysis method according to claim 1, characterized in that: In the step S3, after a frame of data is uploaded to the master station, the master station is queried whether it has issued a subsequent data call command. If yes, the remaining data to be sent in the query data result is continued to be read into the current data area, and the message is framed and uploaded to the master station based on the monitoring direction data unit attribute until all the call data required by the master station are uploaded. Otherwise, the reading, message framing and uploading of the remaining data to be sent are no longer performed; If there is no remaining data to be sent in the query data result when the subsequent data call command sent by the master station is received, an activation termination mirror frame command is returned to the master station, indicating that a complete data interaction process is completed.

5. A power collection terminal for implementing the DL / T719 protocol parsing method according to any one of claims 1 to 4, characterized in that: It includes a data identification management unit and a data communication interaction unit. The data identification management unit is used to generate the data identification mapping file. The data communication interaction unit includes an information loading module, a task starting module, a communication protocol parsing module, a data query module and a communication protocol framing module. The information loading module is used to import the data identification mapping file into the protocol standard communication program. The task starting module is used to create and start the communication protocol processing thread between the master and the slave stations. The communication protocol parsing module is used to receive the data call command issued by the master station and perform protocol parsing processing according to the data identification mapping file. The data query module is used to query data results and determine the call data; the communication protocol framing module is used to frame the query data results into messages and upload them to the master station.

6. An electronic device, characterized in that: It includes at least one processor and a memory that is communicatively connected to the at least one processor, the memory stores a computer program that can be executed by the at least one processor, and when the computer program is executed by the at least one processor, it implements the DL / T719 protocol parsing method as described in any one of claims 1 to 4.