CN118714202A - A method, system, device and storage medium for communication protocol data conversion - Google Patents
A method, system, device and storage medium for communication protocol data conversion Download PDFInfo
- Publication number
- CN118714202A CN118714202A CN202410839495.0A CN202410839495A CN118714202A CN 118714202 A CN118714202 A CN 118714202A CN 202410839495 A CN202410839495 A CN 202410839495A CN 118714202 A CN118714202 A CN 118714202A
- Authority
- CN
- China
- Prior art keywords
- data
- telemetry
- target
- preset
- array
- 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
- 238000004891 communication Methods 0.000 title claims abstract description 141
- 238000006243 chemical reaction Methods 0.000 title claims abstract description 106
- 238000000034 method Methods 0.000 title claims abstract description 96
- 238000012544 monitoring process Methods 0.000 claims abstract description 73
- 230000011664 signaling Effects 0.000 claims abstract description 27
- 238000013507 mapping Methods 0.000 claims description 27
- 230000006870 function Effects 0.000 claims description 21
- 125000004122 cyclic group Chemical group 0.000 claims description 6
- 238000005259 measurement Methods 0.000 claims 1
- 238000004806 packaging method and process Methods 0.000 claims 1
- 238000012545 processing Methods 0.000 description 48
- 230000005540 biological transmission Effects 0.000 description 31
- 230000008569 process Effects 0.000 description 31
- 230000007246 mechanism Effects 0.000 description 9
- 238000005538 encapsulation Methods 0.000 description 8
- 238000003491 array Methods 0.000 description 6
- 238000013500 data storage Methods 0.000 description 6
- 238000013461 design Methods 0.000 description 6
- 238000012423 maintenance Methods 0.000 description 6
- 230000004044 response Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 238000004458 analytical method Methods 0.000 description 4
- 238000007726 management method Methods 0.000 description 4
- 230000004048 modification Effects 0.000 description 4
- 238000012986 modification Methods 0.000 description 4
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 3
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 3
- 230000009471 action Effects 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000013480 data collection Methods 0.000 description 3
- 230000010354 integration Effects 0.000 description 3
- 238000003672 processing method Methods 0.000 description 3
- 238000013024 troubleshooting Methods 0.000 description 3
- 238000013523 data management Methods 0.000 description 2
- 230000014509 gene expression Effects 0.000 description 2
- 238000012795 verification Methods 0.000 description 2
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 1
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 1
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000006978 adaptation Effects 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 230000000903 blocking effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000013075 data extraction Methods 0.000 description 1
- 238000013506 data mapping Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 238000013467 fragmentation Methods 0.000 description 1
- 238000006062 fragmentation reaction Methods 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 238000010223 real-time analysis Methods 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 230000008439 repair process Effects 0.000 description 1
- 230000008685 targeting Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/08—Protocols for interworking; Protocol conversion
-
- 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/2866—Architectures; Arrangements
- H04L67/30—Profiles
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/22—Parsing or analysis of headers
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Communication Control (AREA)
- Computer And Data Communications (AREA)
Abstract
Description
技术领域Technical Field
本申请涉及数据转换的技术领域,具体涉及一种通讯规约数据转换的方法、系统、电子设备及存储介质。The present application relates to the technical field of data conversion, and in particular to a method, system, electronic device and storage medium for communication protocol data conversion.
背景技术Background Art
在现代电力系统中,数据的采集与监控是确保电网稳定运行的关键环节。通讯规约数据转换作为数据采集与监控系统中的重要一环,其转换效率和准确性直接影响到监控系统的性能和可靠性。目前电力系统主要为有线通讯,其中包括串口,网口,串口常用通讯规约是modbus,网口常用通讯规约是IEC104。这些规约之间的数据格式和传输方式各不相同,因此需要进行数据转换以适应不同的系统需求。In modern power systems, data collection and monitoring are key links to ensure stable operation of the power grid. Communication protocol data conversion is an important part of the data collection and monitoring system. Its conversion efficiency and accuracy directly affect the performance and reliability of the monitoring system. At present, the power system is mainly wired communication, including serial port and network port. The commonly used communication protocol for serial port is modbus, and the commonly used communication protocol for network port is IEC104. The data formats and transmission methods between these protocols are different, so data conversion is required to adapt to different system requirements.
目前,将modbus规约数据转成IEC104规约数据的方法是针对具体的modbus通讯设备,定制开发程序实现IEC104规约数据的转换功能,但是,当modbus通讯设备数据点表有变化时,则需要重新定制开发规约转换程序。At present, the method of converting modbus protocol data into IEC104 protocol data is to customize and develop a program for a specific modbus communication device to realize the conversion function of IEC104 protocol data. However, when the data point table of the modbus communication device changes, it is necessary to customize and develop the protocol conversion program again.
因此,如何提供一种高效、灵活的通讯规约数据转换方法,以适应不同规约之间的数据转换需求,提高数据处理的实时性和准确性,成为当前亟待解决的问题。Therefore, how to provide an efficient and flexible communication protocol data conversion method to adapt to the data conversion needs between different protocols and improve the real-time and accuracy of data processing has become a problem that needs to be solved urgently.
发明内容Summary of the invention
本申请提供一种通讯规约数据转换的方法、系统、设备及存储介质,能够适应不同规约之间的数据转换需求,提高数据处理的实时性和准确性。The present application provides a method, system, device and storage medium for communication protocol data conversion, which can adapt to the data conversion requirements between different protocols and improve the real-time and accuracy of data processing.
在本申请的第一方面提供了一种通讯规约数据转换的方法,应用于通讯规约数据转换平台,所述方法包括:In a first aspect of the present application, a method for communication protocol data conversion is provided, which is applied to a communication protocol data conversion platform, and the method comprises:
读取串口的第一配置文件,以获取命令,所述命令用于读取目标设备的遥测、遥信数据,读取网口的第二配置文件,以获取远程终端单元地址和遥测、遥信数据的基地址;Reading a first configuration file of the serial port to obtain a command, wherein the command is used to read telemetry and telesignaling data of the target device, and reading a second configuration file of the network port to obtain a remote terminal unit address and a base address of the telemetry and telesignaling data;
通过串口逐一将所述命令发送到所述目标设备,将所述目标设备回复的遥测和遥信数据存储到预设第一数组中;Sending the commands to the target devices one by one through the serial port, and storing the telemetry and telesignaling data replied by the target devices into a preset first array;
根据所述第二配置文件确定需要转发给监控后台的目标遥测和遥信数据,在所述第一数组中查找所述目标遥测和遥信数据的目标索引,将所述目标索引存储到预设第二数组中;Determine the target telemetry and telesignaling data that need to be forwarded to the monitoring background according to the second configuration file, search the target index of the target telemetry and telesignaling data in the first array, and store the target index in a preset second array;
当与监控后台建立连接后,根据所述预设第二数组中的所述目标索引,从所述预设第一数组中读取所述目标遥测和遥信数据,将所述目标遥测和遥信数据按照IEC104协议规定的格式进行封装,并根据所述远程终端单元地址和遥测、遥信数据的基地址将封装后的数据发送到所述监控后台。After establishing a connection with the monitoring background, the target telemetry and telesignaling data are read from the preset first array according to the target index in the preset second array, the target telemetry and telesignaling data are packaged according to the format specified by the IEC104 protocol, and the packaged data are sent to the monitoring background according to the remote terminal unit address and the base address of the telemetry and telesignaling data.
通过采用上述技术方案,读取串口和网口的配置文件,可以灵活地设置目标设备的遥测、遥信数据读取命令以及远程终端单元地址和遥测、遥信数据的基地址。这种方法允许用户根据实际需求进行配置,提高了通讯规约数据转换平台的灵活性。逐一通过串口发送命令到目标设备,并将设备回复的数据存储到预设数组中,确保了数据传输的准确性。同时,通过预设的索引数组,可以快速定位到需要转发给监控后台的目标数据,进一步保证了数据传输的准确性。将目标遥测和遥信数据按照IEC104协议规定的格式进行封装,并根据远程终端单元地址和遥测、遥信数据的基地址将封装后的数据发送到监控后台,这种方法提高了数据的封装和发送效率。IEC104协议作为一种成熟的远动通信协议,其规定的格式能够确保数据的正确解析和高效传输。该方法不仅适用于当前的通讯规约数据转换平台配置,还可以根据未来需求进行扩展。例如,当需要增加新的目标设备或修改现有设备的配置时,只需更新相应的配置文件即可,无需对通讯规约数据转换平台代码进行大量修改。通过配置文件和预设数组的使用,减少了通讯规约数据转换平台硬编码的依赖,提高了通讯规约数据转换平台的可靠性。同时,通过串口和网口的通信方式,可以确保数据在不同设备之间的可靠传输。By adopting the above technical solution, the configuration files of the serial port and the network port are read, and the telemetry and telesignaling data reading commands of the target device, as well as the remote terminal unit address and the base address of the telemetry and telesignaling data can be flexibly set. This method allows users to configure according to actual needs, which improves the flexibility of the communication protocol data conversion platform. Commands are sent to the target device through the serial port one by one, and the data replied by the device is stored in the preset array, ensuring the accuracy of data transmission. At the same time, through the preset index array, the target data that needs to be forwarded to the monitoring background can be quickly located, further ensuring the accuracy of data transmission. The target telemetry and telesignaling data are encapsulated in the format specified by the IEC104 protocol, and the encapsulated data is sent to the monitoring background according to the remote terminal unit address and the base address of the telemetry and telesignaling data. This method improves the efficiency of data encapsulation and transmission. As a mature telecontrol communication protocol, the IEC104 protocol specifies a format that can ensure the correct parsing and efficient transmission of data. This method is not only applicable to the current communication protocol data conversion platform configuration, but can also be expanded according to future needs. For example, when you need to add a new target device or modify the configuration of an existing device, you only need to update the corresponding configuration file without making a lot of changes to the communication protocol data conversion platform code. Through the use of configuration files and preset arrays, the reliance on hard coding of the communication protocol data conversion platform is reduced, and the reliability of the communication protocol data conversion platform is improved. At the same time, through the communication methods of serial ports and network ports, reliable data transmission between different devices can be ensured.
可选的,在所述读取串口的第一配置文件之前,所述方法还包括配置第一配置文件和第二配置文件,所述配置第一配置文件和第二配置文件包括:Optionally, before reading the first configuration file of the serial port, the method further includes configuring the first configuration file and the second configuration file, wherein configuring the first configuration file and the second configuration file includes:
在所述第一配置文件中定义与Modbus设备通信的串口参数、第一协议设置和命令设置,所述第一协议设置包括选择Modbus协议类型、设置设备ID以及选择连接方式,所述命令设置包括设置读取遥测、遥信数据的Modbus命令中的功能码和寄存器地址;In the first configuration file, serial port parameters, first protocol settings and command settings for communicating with the Modbus device are defined, wherein the first protocol settings include selecting a Modbus protocol type, setting a device ID and selecting a connection mode, and the command settings include setting a function code and a register address in a Modbus command for reading telemetry and telesignaling data;
在所述第二配置文件中定义与IEC104设备通信的网络参数和第二协议设置,所述第二协议设置包括在IEC104网络中唯一标识远程终端单元设备的地址以及定义在远程终端单元设备中遥测、遥信数据的起始地址。The second configuration file defines network parameters and second protocol settings for communicating with the IEC104 device, wherein the second protocol settings include an address that uniquely identifies the remote terminal unit device in the IEC104 network and a starting address that defines telemetry and telesignaling data in the remote terminal unit device.
通过采用上述技术方案,通过第一配置文件和第二配置文件的定义,使得与Modbus设备和IEC104设备的通信参数、协议设置以及数据读取命令等得到了明确的管理和定义。这种管理方式提高了通讯规约数据转换平台的可读性和可维护性。在第一配置文件中,可以灵活地选择Modbus协议类型、设置设备ID和连接方式等,以满足与不同Modbus设备通信的需求。这种灵活性使得通讯规约数据转换平台能够适应多种Modbus设备,增强了通讯规约数据转换平台的通用性。在第一配置文件中设置读取遥测、遥信数据的Modbus命令的功能码和寄存器地址,确保了数据读取的精确性。这种精确控制使得通讯规约数据转换平台能够准确地获取目标设备的数据,提高了数据的准确性和可靠性。在第二配置文件中定义远程终端单元设备在IEC104网络中的唯一地址,确保了数据在发送和接收过程中的准确性。同时,定义遥测、遥信数据的起始地址,使得通讯规约数据转换平台能够准确地定位到需要发送的数据段,提高了数据发送的效率和准确性。通过配置文件的方式管理通信参数和协议设置,使得通讯规约数据转换平台在扩展新设备或修改现有设备配置时变得更加简单。只需要更新相应的配置文件即可,无需修改通讯规约数据转换平台代码,提高了通讯规约数据转换平台的可扩展性和可维护性。明确的配置管理和精确的命令控制减少了由于配置错误或命令错误导致的通讯规约数据转换平台故障和数据错误。同时,配置文件的易读性和可维护性也有助于快速定位和解决通讯规约数据转换平台问题。By adopting the above technical solution, through the definition of the first configuration file and the second configuration file, the communication parameters, protocol settings and data reading commands with Modbus devices and IEC104 devices are clearly managed and defined. This management method improves the readability and maintainability of the communication protocol data conversion platform. In the first configuration file, the Modbus protocol type, device ID and connection method can be flexibly selected to meet the needs of communicating with different Modbus devices. This flexibility enables the communication protocol data conversion platform to adapt to a variety of Modbus devices and enhances the versatility of the communication protocol data conversion platform. The function code and register address of the Modbus command for reading telemetry and telesignaling data are set in the first configuration file to ensure the accuracy of data reading. This precise control enables the communication protocol data conversion platform to accurately obtain the data of the target device, improving the accuracy and reliability of the data. The unique address of the remote terminal unit device in the IEC104 network is defined in the second configuration file to ensure the accuracy of the data during the sending and receiving process. At the same time, the starting address of the telemetry and telesignaling data is defined so that the communication protocol data conversion platform can accurately locate the data segment to be sent, improving the efficiency and accuracy of data transmission. Managing communication parameters and protocol settings through configuration files makes it easier to expand new devices or modify existing device configurations. You only need to update the corresponding configuration files without modifying the code of the communication protocol data conversion platform, which improves the scalability and maintainability of the communication protocol data conversion platform. Clear configuration management and precise command control reduce communication protocol data conversion platform failures and data errors caused by configuration errors or command errors. At the same time, the readability and maintainability of the configuration files also help to quickly locate and solve communication protocol data conversion platform problems.
可选的,所述通过串口逐一将所述命令发送到所述目标设备,将所述目标设备回复的遥测和遥信数据存储到预设第一数组中包括:Optionally, sending the commands to the target devices one by one through the serial port, and storing the telemetry and telesignaling data replied by the target devices into a preset first array comprises:
读取所述第一配置文件,根据所述第一配置文件中的串口参数对目标串口进行初始化;Reading the first configuration file, and initializing the target serial port according to the serial port parameters in the first configuration file;
获取需要发送给目标设备的遥测、遥信命令列表;Get the list of telemetry and telesignaling commands that need to be sent to the target device;
通过已初始化的所述目标串口,逐一将所述遥测、遥信命令列表中的命令以预设帧格式发送到目标设备,并持续监听所述目标串口;Through the initialized target serial port, the commands in the telemetry and telesignaling command list are sent to the target device one by one in a preset frame format, and the target serial port is continuously monitored;
当检测到来自目标设备的回复时,根据所述第一配置文件中的映射关系确定回复的数据存储到所述预设第一数组的第一位置,并根据所述第一位置将所述目标设备回复的遥测和遥信数据存储到预设第一数组中。When a reply from the target device is detected, the reply data is determined to be stored in the first position of the preset first array according to the mapping relationship in the first configuration file, and the telemetry and telesignaling data replied by the target device are stored in the preset first array according to the first position.
通过采用上述技术方案,通过读取第一配置文件并根据其中的串口参数对目标串口进行初始化,确保了与目标设备的精确通信。这避免了因串口配置错误而导致的数据传输问题。获取需要发送给目标设备的遥测、遥信命令列表,并通过已初始化的目标串口逐一发送,确保了命令的有序执行。这有助于避免命令冲突或遗漏,提高了数据获取的准确性和完整性。在发送命令后,持续监听目标串口以等待设备的回复。这种实时监听机制确保了通讯规约数据转换平台能够及时处理设备的响应,提高了通讯规约数据转换平台的响应速度和数据处理效率。根据第一配置文件中的映射关系,确定目标设备回复的数据在预设第一数组中的存储位置,并将数据存储到该位置。这种数据映射方式确保了数据的准确存储和后续处理的便捷性。将目标设备回复的遥测和遥信数据存储到预设第一数组中,便于后续的数据处理和转发。这种集中存储的方式减少了数据处理的复杂性和时间成本,提高了整体的数据处理效率。通过配置文件管理串口参数和映射关系,使得通讯规约数据转换平台在扩展新设备或修改现有设备配置时变得更加简单。只需要更新相应的配置文件即可,无需修改通讯规约数据转换平台代码,提高了通讯规约数据转换平台的可扩展性和可维护性。By adopting the above technical solution, accurate communication with the target device is ensured by reading the first configuration file and initializing the target serial port according to the serial port parameters therein. This avoids data transmission problems caused by serial port configuration errors. A list of telemetry and telesignaling commands that need to be sent to the target device is obtained, and sent one by one through the initialized target serial port, ensuring the orderly execution of the commands. This helps to avoid command conflicts or omissions and improves the accuracy and completeness of data acquisition. After sending the command, the target serial port is continuously monitored to wait for the device's reply. This real-time monitoring mechanism ensures that the communication protocol data conversion platform can process the device's response in a timely manner, improving the response speed and data processing efficiency of the communication protocol data conversion platform. According to the mapping relationship in the first configuration file, the storage location of the data replied by the target device in the preset first array is determined, and the data is stored in the location. This data mapping method ensures accurate data storage and convenience of subsequent processing. The telemetry and telesignaling data replied by the target device are stored in the preset first array, which is convenient for subsequent data processing and forwarding. This centralized storage method reduces the complexity and time cost of data processing and improves the overall data processing efficiency. By managing serial port parameters and mapping relationships through configuration files, the communication protocol data conversion platform becomes easier when expanding new devices or modifying existing device configurations. It only needs to update the corresponding configuration files without modifying the communication protocol data conversion platform code, which improves the scalability and maintainability of the communication protocol data conversion platform.
可选的,所述预设第一数组包括预设第一子数组和预设第二子数组,所述将所述目标设备回复的遥测和遥信数据存储到预设第一数组包括:Optionally, the preset first array includes a preset first sub-array and a preset second sub-array, and storing the telemetry and telesignaling data replied by the target device into the preset first array includes:
查找与设备地址和寄存器地址匹配的第一条目,并获取所述第一条目对应的第一索引,根据所述第一索引将遥测数据存储到预设第一子数组对应的位置;Find a first entry that matches the device address and the register address, obtain a first index corresponding to the first entry, and store the telemetry data to a position corresponding to a preset first subarray according to the first index;
查找与设备地址和状态位匹配的第二条目,并获取所述第二条目对应的第二索引,根据所述第二索引将遥信数据存储到预设第二子数组对应的位置。A second entry matching the device address and the status bit is searched, and a second index corresponding to the second entry is obtained, and the remote signaling data is stored in a position corresponding to a preset second sub-array according to the second index.
通过采用上述技术方案,将遥测数据存储到预设第一子数组,遥信数据存储到预设第二子数组,实现了数据的分类存储。这种分类方式使得不同类型的数据能够清晰地分离,便于后续的数据处理和分析。根据设备地址、寄存器地址和状态位进行索引匹配,能够快速定位到目标数据在预设子数组中的位置。这种索引匹配方式减少了数据检索的时间,提高了数据处理效率。由于数据已经按照类型存储在对应的子数组中,因此在进行数据处理时,只需要针对特定的子数组进行操作,减少了数据处理的复杂性。这有助于降低通讯规约数据转换平台错误率,提高数据处理准确性。数据的分类存储和索引匹配方式使得数据管理和维护变得更加容易。当需要修改或扩展数据时,只需要针对特定的子数组进行操作,无需对整个数组进行重构或修改。这种数据结构的设计使得通讯规约数据转换平台能够轻松扩展以支持更多的设备和数据类型。只需增加相应的子数组和索引匹配规则,即可实现新设备和数据类型的集成。通过明确的索引匹配规则和数据存储结构,能够确保数据的准确性和一致性。这有助于减少数据传输过程中的错误和丢失,提高通讯规约数据转换平台的可靠性和稳定性。By adopting the above technical solution, the telemetry data is stored in the preset first sub-array, and the telesignaling data is stored in the preset second sub-array, so that the classified storage of data is realized. This classification method enables different types of data to be clearly separated, which is convenient for subsequent data processing and analysis. According to the device address, register address and status bit, index matching can be performed to quickly locate the position of the target data in the preset sub-array. This index matching method reduces the time of data retrieval and improves the efficiency of data processing. Since the data has been stored in the corresponding sub-array according to the type, when processing the data, it is only necessary to operate on a specific sub-array, which reduces the complexity of data processing. This helps to reduce the error rate of the communication protocol data conversion platform and improve the accuracy of data processing. The classified storage and index matching method of data makes data management and maintenance easier. When it is necessary to modify or expand the data, it is only necessary to operate on a specific sub-array without reconstructing or modifying the entire array. The design of this data structure enables the communication protocol data conversion platform to be easily expanded to support more devices and data types. The integration of new devices and data types can be achieved by simply adding corresponding sub-arrays and index matching rules. The accuracy and consistency of the data can be ensured through clear index matching rules and data storage structure. This helps reduce errors and losses during data transmission and improves the reliability and stability of the communication protocol data conversion platform.
可选的,所述根据所述第二配置文件确定需要转发给监控后台的目标遥测和遥信数据,在所述第一数组中查找所述目标遥测和遥信数据的目标索引,将所述目标索引存储到预设第二数组中包括:Optionally, determining the target telemetry and telesignaling data to be forwarded to the monitoring background according to the second configuration file, searching the first array for a target index of the target telemetry and telesignaling data, and storing the target index in a preset second array comprises:
提取出需要转发给监控后台的目标遥测和遥信数据的标识信息,将所述标识信息存储到预设数据结构中;Extracting identification information of target telemetry and telesignaling data that needs to be forwarded to the monitoring background, and storing the identification information in a preset data structure;
遍历所述预设第一数组,对于所述预设第一数组中的每个数据项,检查是否能够匹配所述预设数据结构中的标识信息;Traversing the preset first array, and for each data item in the preset first array, checking whether it can match the identification information in the preset data structure;
将能够匹配所述预设数据结构中的标识信息的数据项在所述预设第一数组中的下标映射到所述预设第二数组中。The subscripts of the data items that can match the identification information in the preset data structure in the preset first array are mapped to the preset second array.
通过采用上述技术方案,提取第二配置文件中需要转发给监控后台的目标遥测和遥信数据的标识信息,通讯规约数据转换平台能够明确知道需要转发的数据,避免了不必要的数据传输,提高了数据转发的效率。通过遍历预设第一数组,并检查其中的每个数据项是否能匹配预设数据结构中的标识信息,通讯规约数据转换平台能够快速地找到需要转发的目标数据。这种高效的数据匹配机制减少了数据处理时间,提高了数据转发的实时性。将能够匹配标识信息的数据项在第一数组中的下标映射到预设第二数组中,为后续的数据转发提供了便利。通过索引映射,通讯规约数据转换平台可以直接从预设第一数组中读取目标数据,而无需再次进行遍历和匹配操作,进一步提高了数据转发的效率。通过配置文件和预设数据结构的方式管理需要转发的数据和其标识信息,使得通讯规约数据转换平台在维护和扩展时变得更加简单。当需要修改或增加需要转发的数据时,只需要更新配置文件或预设数据结构即可,无需修改通讯规约数据转换平台代码。由于通讯规约数据转换平台只转发需要的数据,而不是将整个第一数组的数据都发送给监控后台,因此减少了数据传输量,降低了网络带宽的占用。这对于网络资源有限的环境尤为重要。通过明确的数据转发需求和高效的数据匹配机制,通讯规约数据转换平台能够确保转发的数据是准确和完整的。这有助于提高通讯规约数据转换平台的可靠性和稳定性,减少因数据传输错误而导致的通讯规约数据转换平台问题。By adopting the above technical solution, the identification information of the target telemetry and telesignaling data that needs to be forwarded to the monitoring background in the second configuration file is extracted, and the communication protocol data conversion platform can clearly know the data that needs to be forwarded, avoiding unnecessary data transmission and improving the efficiency of data forwarding. By traversing the preset first array and checking whether each data item therein can match the identification information in the preset data structure, the communication protocol data conversion platform can quickly find the target data that needs to be forwarded. This efficient data matching mechanism reduces the data processing time and improves the real-time performance of data forwarding. The subscripts of the data items that can match the identification information in the first array are mapped to the preset second array, which provides convenience for subsequent data forwarding. Through index mapping, the communication protocol data conversion platform can directly read the target data from the preset first array without having to traverse and match again, further improving the efficiency of data forwarding. The data that needs to be forwarded and its identification information are managed by the configuration file and the preset data structure, making the communication protocol data conversion platform simpler when maintaining and expanding. When it is necessary to modify or increase the data that needs to be forwarded, it is only necessary to update the configuration file or the preset data structure without modifying the communication protocol data conversion platform code. Since the communication protocol data conversion platform only forwards the required data instead of sending the entire first array of data to the monitoring background, the amount of data transmission is reduced and the network bandwidth usage is reduced. This is especially important in an environment with limited network resources. Through clear data forwarding requirements and an efficient data matching mechanism, the communication protocol data conversion platform can ensure that the forwarded data is accurate and complete. This helps to improve the reliability and stability of the communication protocol data conversion platform and reduce communication protocol data conversion platform problems caused by data transmission errors.
可选的,所述预设第二数组包括预设第三子数组和预设第四子数组,所述将能够匹配所述预设数据结构中的标识信息的数据项在所述预设第一数组中的下标映射到所述预设第二数组中包括:Optionally, the preset second array includes a preset third subarray and a preset fourth subarray, and mapping the subscripts of the data items that can match the identification information in the preset data structure in the preset first array to the preset second array includes:
对于每个能够匹配所述预设数据结构中的标识信息的目标遥测数据项,获取所述目标遥测数据项在预设第一子数组中的第三索引,将所述第三索引存储到所述预设第三子数组;For each target telemetry data item that can match the identification information in the preset data structure, obtain the third index of the target telemetry data item in the preset first sub-array, and store the third index in the preset third sub-array;
对于每个能够匹配所述预设数据结构中的标识信息的目标遥信数据项,获取所述目标遥信数据项在预设第二子数组中的第四索引,将所述第四索引存储到所述预设第四子数组。For each target telesignaling data item that can match the identification information in the preset data structure, a fourth index of the target telesignaling data item in the preset second subarray is obtained, and the fourth index is stored in the preset fourth subarray.
通过采用上述技术方案,将目标遥测数据项的索引存储在预设第三子数组中,将目标遥信数据项的索引存储在预设第四子数组中,实现了数据的分类存储。这种分类方式使得不同类型的数据能够清晰地分离,便于后续的数据处理和分析。由于数据已经按照类型存储在对应的子数组中,因此在进行数据处理时,通讯规约数据转换平台只需要关注特定子数组中的索引,而无需对整个数组进行遍历。这种针对性处理的方式显著提高了数据处理效率。分类存储和索引映射的方式降低了通讯规约数据转换平台的复杂性。通讯规约数据转换平台不需要处理混合在一起的数据,而只需要针对特定类型的数据进行操作,降低了通讯规约数据转换平台的复杂度和错误率。数据的分类存储和索引映射方式使得数据管理和维护变得更加容易。通讯规约数据转换平台可以轻松添加、修改或删除特定类型的数据,而无需对整个通讯规约数据转换平台进行调整。当通讯规约数据转换平台需要支持更多的数据类型或设备时,只需要增加相应的子数组和索引映射规则即可。这种设计使得通讯规约数据转换平台具有良好的扩展性,能够适应不断变化的需求。由于数据已经按照类型和索引进行组织,因此在向监控后台发送数据时,通讯规约数据转换平台可以直接根据索引从相应的子数组中读取数据,而无需进行额外的数据处理或转换。这有助于优化数据传输过程,减少网络带宽的占用。By adopting the above technical solution, the index of the target telemetry data item is stored in the preset third sub-array, and the index of the target telesignal data item is stored in the preset fourth sub-array, so as to realize the classified storage of data. This classification method enables different types of data to be clearly separated, which is convenient for subsequent data processing and analysis. Since the data has been stored in the corresponding sub-array according to the type, when processing the data, the communication protocol data conversion platform only needs to pay attention to the index in the specific sub-array without traversing the entire array. This targeted processing method significantly improves the data processing efficiency. The classified storage and index mapping method reduces the complexity of the communication protocol data conversion platform. The communication protocol data conversion platform does not need to process mixed data, but only needs to operate on specific types of data, which reduces the complexity and error rate of the communication protocol data conversion platform. The classified storage and index mapping method of data makes data management and maintenance easier. The communication protocol data conversion platform can easily add, modify or delete specific types of data without adjusting the entire communication protocol data conversion platform. When the communication protocol data conversion platform needs to support more data types or devices, it only needs to add corresponding sub-arrays and index mapping rules. This design makes the communication protocol data conversion platform highly scalable and adaptable to changing needs. Since the data is organized by type and index, when sending data to the monitoring background, the communication protocol data conversion platform can directly read the data from the corresponding sub-array according to the index without additional data processing or conversion. This helps to optimize the data transmission process and reduce the network bandwidth usage.
可选的,所述将所述目标遥测和遥信数据按照IEC104协议规定的格式进行封装,并根据所述远程终端单元地址和遥测、遥信数据的基地址将封装后的数据发送到所述监控后台包括:Optionally, encapsulating the target telemetry and telesignaling data in a format specified by the IEC104 protocol, and sending the encapsulated data to the monitoring background according to the remote terminal unit address and the base address of the telemetry and telesignaling data includes:
根据IEC104协议的规定,创建应用服务数据单元,并将所述目标遥测和遥信数据嵌入到所述应用服务数据单元;According to the provisions of the IEC104 protocol, an application service data unit is created, and the target telemetry and telesignaling data are embedded into the application service data unit;
根据IEC104协议计算并设置所述应用服务数据单元的校验和或循环冗余校验值,以对所述应用服务数据单元的数据进行封装;Calculating and setting a checksum or cyclic redundancy check value of the application service data unit according to the IEC104 protocol to encapsulate data of the application service data unit;
使用已建立的网络连接,将封装好的所述应用服务数据单元的数据发送到所述监控后台。The encapsulated data of the application service data unit is sent to the monitoring background using the established network connection.
通过采用上述技术方案,创建应用服务数据单元(ASDU)并将目标遥测和遥信数据嵌入其中,确保了数据封装的标准化。这种标准化封装使得数据能够在不同的系统之间兼容和互操作,提高了系统的通用性和可靠性。根据IEC104协议计算并设置应用服务数据单元的校验和或循环冗余校验值(CRC),这可以有效检测数据传输过程中的错误,保证数据的完整性和准确性。这种校验机制对于确保电力系统监控与数据采集系统的稳定运行至关重要。使用已建立的网络连接将封装好的应用服务数据单元发送到监控后台,实现了数据的高效传输。这种传输方式减少了数据传输的延迟,确保了监控系统能够实时获取电力设备的运行状态和数据,从而及时作出响应。通过IEC104协议将数据发送到监控后台,使得后台能够远程监控和控制电力系统中的设备。这种远程监控与控制能力提高了电力系统的管理效率和响应速度,降低了运维成本。IEC104协议作为一种国际标准的通信协议,具有良好的可扩展性和兼容性。这意味着通讯规约数据转换平台可以轻松地与其他使用相同协议的设备或系统进行集成,从而实现更大范围的监控与控制。By adopting the above technical solution, an application service data unit (ASDU) is created and the target telemetry and telesignaling data are embedded in it, ensuring the standardization of data encapsulation. This standardized encapsulation enables data to be compatible and interoperable between different systems, improving the versatility and reliability of the system. The checksum or cyclic redundancy check value (CRC) of the application service data unit is calculated and set according to the IEC104 protocol, which can effectively detect errors in the data transmission process and ensure the integrity and accuracy of the data. This verification mechanism is essential to ensure the stable operation of the power system monitoring and data acquisition system. The encapsulated application service data unit is sent to the monitoring background using the established network connection, realizing efficient data transmission. This transmission method reduces the delay of data transmission and ensures that the monitoring system can obtain the operating status and data of the power equipment in real time, so as to respond in time. Sending data to the monitoring background through the IEC104 protocol enables the background to remotely monitor and control the equipment in the power system. This remote monitoring and control capability improves the management efficiency and response speed of the power system and reduces the operation and maintenance costs. As an international standard communication protocol, the IEC104 protocol has good scalability and compatibility. This means that the communication protocol data conversion platform can be easily integrated with other devices or systems using the same protocol, thereby achieving a wider range of monitoring and control.
在本申请的第二方面提供了一种通讯规约数据转换的系统,包括读取模块、存储模块、索引模块以及执行模块,其中:In a second aspect of the present application, a system for communication protocol data conversion is provided, including a reading module, a storage module, an indexing module and an execution module, wherein:
读取模块,配置用于读取串口的第一配置文件,以获取命令,所述命令用于读取目标设备的遥测、遥信数据,读取网口的第二配置文件,以获取远程终端单元地址和遥测、遥信数据的基地址;A reading module is configured to read a first configuration file of the serial port to obtain a command, wherein the command is used to read telemetry and telecommunication data of a target device, and read a second configuration file of the network port to obtain a remote terminal unit address and a base address of the telemetry and telecommunication data;
存储模块,配置用于通过串口逐一将所述命令发送到所述目标设备,将所述目标设备回复的遥测和遥信数据存储到预设第一数组中;A storage module, configured to send the commands to the target devices one by one through the serial port, and store the telemetry and telesignaling data replied by the target devices into a preset first array;
索引模块,配置用于根据所述第二配置文件确定需要转发给监控后台的目标遥测和遥信数据,在所述第一数组中查找所述目标遥测和遥信数据的目标索引,将所述目标索引存储到预设第二数组中;An indexing module configured to determine the target telemetry and telesignaling data to be forwarded to the monitoring background according to the second configuration file, search the target index of the target telemetry and telesignaling data in the first array, and store the target index in a preset second array;
执行模块,配置用于当与监控后台建立连接后,根据所述预设第二数组中的所述目标索引,从所述预设第一数组中读取所述目标遥测和遥信数据,将所述目标遥测和遥信数据按照IEC104协议规定的格式进行封装,并根据所述远程终端单元地址和遥测、遥信数据的基地址将封装后的数据发送到所述监控后台。The execution module is configured to read the target telemetry and telecommunication data from the preset first array according to the target index in the preset second array after establishing a connection with the monitoring background, encapsulate the target telemetry and telecommunication data in accordance with the format specified by the IEC104 protocol, and send the encapsulated data to the monitoring background according to the remote terminal unit address and the base address of the telemetry and telecommunication data.
在本申请的第三方面提供了一种电子设备,包括处理器、存储器、用户接口以及网络接口,所述存储器用于存储指令,所述用户接口和所述网络接口均用于与其他设备通信,所述处理器用于执行所述存储器中存储的指令,以使所述电子设备执行如上述任意一项所述的方法。In the third aspect of the present application, an electronic device is provided, including a processor, a memory, a user interface and a network interface, the memory is used to store instructions, the user interface and the network interface are both used to communicate with other devices, and the processor is used to execute the instructions stored in the memory so that the electronic device executes any one of the methods described above.
在本申请的第四方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储有指令,当所述指令被执行时,执行如上述任意一项所述的方法。In a fourth aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores instructions, and when the instructions are executed, any of the methods described above is executed.
综上所述,本申请实施例中提供的一个或多个技术方案,至少具有如下技术效果或优点:In summary, one or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:
1、通过读取串口和网络接口的配置文件,该方法能够灵活地适应不同的设备和网络环境,配置文件的使用使得系统能够轻松地修改和扩展,以适应不同的数据转换需求;1. By reading the configuration files of the serial port and network interface, this method can flexibly adapt to different devices and network environments. The use of configuration files enables the system to be easily modified and expanded to meet different data conversion requirements;
2、将目标设备回复的遥测和遥信数据存储到预设第一数组中,便于后续的数据处理和检索,通过索引方式存储和管理数据,提高了数据访问的效率;2. The telemetry and telesignaling data replied by the target device are stored in the preset first array to facilitate subsequent data processing and retrieval. The data is stored and managed by indexing to improve the efficiency of data access;
3、根据第二配置文件确定需要转发给监控后台的目标数据,有效地筛选了关键信息,减少了不必要的数据传输,这种机制降低了网络带宽的占用,同时确保了监控后台只接收到重要和相关的信息;3. Determine the target data to be forwarded to the monitoring background according to the second configuration file, effectively filter the key information and reduce unnecessary data transmission. This mechanism reduces the network bandwidth usage and ensures that the monitoring background only receives important and relevant information;
4、按照IEC104协议规定的格式封装目标遥测和遥信数据,实现了数据的标准化,这种标准化封装保证了数据的一致性和互操作性,便于不同系统之间的数据交换和集成;4. Encapsulate target telemetry and telesignaling data in the format specified by the IEC104 protocol, achieving data standardization. This standardized encapsulation ensures data consistency and interoperability, and facilitates data exchange and integration between different systems;
5、将封装后的数据根据远程终端单元地址和数据基地址发送到监控后台,实现了远程监控功能,这种方法确保了监控后台能够实时接收并处理来自目标设备的数据,提高了监控系统的实时性和响应速度;5. The encapsulated data is sent to the monitoring background according to the remote terminal unit address and the data base address, realizing the remote monitoring function. This method ensures that the monitoring background can receive and process the data from the target device in real time, improving the real-time performance and response speed of the monitoring system;
6、具有良好的可扩展性和兼容性,可以轻松支持更多的设备和数据类型,通过更新配置文件和扩展数组结构,即可实现新设备和数据类型的集成,无需对整个系统进行大规模的修改。6. It has good scalability and compatibility, and can easily support more devices and data types. By updating configuration files and expanding array structures, the integration of new devices and data types can be achieved without large-scale modifications to the entire system.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1是本申请实施例公开的通讯规约数据转换的方法的流程示意图;FIG1 is a flow chart of a method for converting communication protocol data disclosed in an embodiment of the present application;
图2是本申请实施例公开的设备连接拓扑示意图;FIG2 is a schematic diagram of a device connection topology disclosed in an embodiment of the present application;
图3是本申请实施例公开的通讯规约数据转换的系统的模块示意图;FIG3 is a module diagram of a system for communication protocol data conversion disclosed in an embodiment of the present application;
图4是本申请实施例公开的一种电子设备的结构示意图。FIG. 4 is a schematic diagram of the structure of an electronic device disclosed in an embodiment of the present application.
附图标记说明:301、读取模块;302、存储模块;303、索引模块;304、执行模块;401、处理器;402、通信总线;403、用户接口;404、网络接口;405、存储器。Explanation of the reference numerals: 301, reading module; 302, storage module; 303, indexing module; 304, execution module; 401, processor; 402, communication bus; 403, user interface; 404, network interface; 405, memory.
具体实施方式DETAILED DESCRIPTION
为了使本领域的技术人员更好地理解本说明书中的技术方案,下面将结合本说明书实施例中的附图,对本说明书实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅是本申请一部分实施例,而不是全部的实施例。In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments.
在本申请实施例的描述中,“例如”或者“举例来说”等词用于表示作例子、例证或说明。本申请实施例中被描述为“例如”或者“举例来说”的任何实施例或设计方案不应被解释为比其他实施例或设计方案更优选或更具优势。确切而言,使用“例如”或者“举例来说”等词旨在以具体方式呈现相关概念。In the description of the embodiments of the present application, words such as "for example" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "for example" or "for example" is intended to present related concepts in a specific way.
在本申请实施例的描述中,术语“多个”的含义是指两个或两个以上。例如,多个系统是指两个或两个以上的系统,多个屏幕终端是指两个或两个以上的屏幕终端。此外,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。In the description of the embodiments of the present application, the meaning of the term "multiple" refers to two or more. For example, multiple systems refer to two or more systems, and multiple screen terminals refer to two or more screen terminals. In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. The terms "include", "comprise", "have" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.
本实施例公开了一种通讯规约数据转换的方法,应用于通讯规约数据转换平台,图1是本申请实施例公开的通讯规约数据转换的方法的流程示意图,如图1所示,方法包括步骤S110-S140。This embodiment discloses a method for communication protocol data conversion, which is applied to a communication protocol data conversion platform. FIG1 is a flow chart of the method for communication protocol data conversion disclosed in the embodiment of the present application. As shown in FIG1 , the method includes steps S110-S140.
S110、读取串口的第一配置文件,以获取命令,所述命令用于读取目标设备的遥测、遥信数据,读取网口的第二配置文件,以获取远程终端单元地址和遥测、遥信数据的基地址;S110, reading a first configuration file of the serial port to obtain a command, wherein the command is used to read telemetry and telecommunication data of the target device, and reading a second configuration file of the network port to obtain a remote terminal unit address and a base address of the telemetry and telecommunication data;
图2是本申请实施例公开的设备连接拓扑示意图,如图2所示,通过串口配置文件和网口配置文件将modbus规约转换为IEC104规约,结合图2对本申请实施例进行说明。Figure 2 is a schematic diagram of the device connection topology disclosed in the embodiment of the present application. As shown in Figure 2, the modbus protocol is converted into the IEC104 protocol through the serial port configuration file and the network port configuration file. The embodiment of the present application is explained in conjunction with Figure 2.
从第一配置文件中提取出用于读取目标设备遥测、遥信数据的命令。这些命令可能是预定义的字符串或需要进一步处理的模板。第二配置文件可能包含网络设置、设备地址、数据地址等信息,需要找到包含RTU(远程终端单元)地址和遥测、遥信数据基地址的部分。从配置文件中提取出RTU的地址和遥测、遥信数据的基地址。这些信息可能是IP地址、端口号或内存地址等。Extract the commands for reading the telemetry and telesignaling data of the target device from the first configuration file. These commands may be predefined strings or templates that need further processing. The second configuration file may contain information such as network settings, device addresses, data addresses, etc. It is necessary to find the part containing the RTU (remote terminal unit) address and the base address of the telemetry and telesignaling data. Extract the RTU address and the base address of the telemetry and telesignaling data from the configuration file. This information may be an IP address, port number, or memory address, etc.
可选的,在所述读取串口的第一配置文件之前,所述方法还包括配置第一配置文件和第二配置文件,所述配置第一配置文件和第二配置文件包括:Optionally, before reading the first configuration file of the serial port, the method further includes configuring the first configuration file and the second configuration file, wherein configuring the first configuration file and the second configuration file includes:
在所述第一配置文件中定义与Modbus设备通信的串口参数、第一协议设置和命令设置,所述第一协议设置包括选择Modbus协议类型、设置设备ID以及选择连接方式,所述命令设置包括设置读取遥测、遥信数据的Modbus命令中的功能码和寄存器地址;In the first configuration file, serial port parameters, first protocol settings and command settings for communicating with the Modbus device are defined, wherein the first protocol settings include selecting a Modbus protocol type, setting a device ID and selecting a connection mode, and the command settings include setting a function code and a register address in a Modbus command for reading telemetry and telesignaling data;
在所述第二配置文件中定义与IEC104设备通信的网络参数和第二协议设置,所述第二协议设置包括在IEC104网络中唯一标识远程终端单元设备的地址以及定义在远程终端单元设备中遥测、遥信数据的起始地址。The second configuration file defines network parameters and second protocol settings for communicating with the IEC104 device, wherein the second protocol settings include an address that uniquely identifies the remote terminal unit device in the IEC104 network and a starting address that defines telemetry and telesignaling data in the remote terminal unit device.
第一配置文件主要用于定义与Modbus设备通信的参数和命令。Modbus是一种串行通信协议,常用于工业自动化系统。串口参数包括串口编号、波特率、数据位、停止位、校验位。第一协议设置包括选择Modbus协议类型、设置设备ID、选择连接方式。Modbus协议有两种主要类型——Modbus RTU和Modbus TCP,这里需要指定使用的类型。如果使用的是Modbus RTU,还需要指定是轮询方式还是监听方式。每个Modbus设备都有一个唯一的设备ID,用于在通信中标识自己。Modbus协议使用功能码来定义不同的操作。例如,读取线圈状态(遥信数据)通常使用功能码01,而读取保持寄存器(遥测数据)通常使用功能码03。对于每个需要读取的遥测或遥信数据,都需要指定其在Modbus设备中的寄存器地址。The first configuration file is mainly used to define the parameters and commands for communicating with Modbus devices. Modbus is a serial communication protocol commonly used in industrial automation systems. Serial port parameters include serial port number, baud rate, data bit, stop bit, and parity bit. The first protocol setting includes selecting the Modbus protocol type, setting the device ID, and selecting the connection method. There are two main types of Modbus protocols - Modbus RTU and Modbus TCP. Here you need to specify the type to use. If you are using Modbus RTU, you also need to specify whether it is polling or listening mode. Each Modbus device has a unique device ID to identify itself in communication. The Modbus protocol uses function codes to define different operations. For example, reading the coil status (telemetering data) usually uses function code 01, while reading the holding register (telemetry data) usually uses function code 03. For each telemetry or telemetering data that needs to be read, you need to specify its register address in the Modbus device.
第二配置文件主要用于定义与IEC104设备通信的网络参数和协议设置。IEC104是电力系统通信协议,用于远程监控和控制。网络参数包括IP地址、端口号、其他可能的网络设置,如网关、子网掩码等。第二协议设置包括远程终端单元(RTU)地址,遥测、遥信数据的起始地址。远程终端单元(RTU)地址是用于在IEC104网络中唯一标识RTU设备的地址,遥测、遥信数据的起始地址是用于定义在RTU设备中遥测和遥信数据的起始位置。这些数据通常按照IEC104协议的规定进行编码和组织。The second configuration file is mainly used to define the network parameters and protocol settings for communicating with IEC104 devices. IEC104 is a power system communication protocol used for remote monitoring and control. Network parameters include IP address, port number, and other possible network settings such as gateway, subnet mask, etc. The second protocol settings include the remote terminal unit (RTU) address, and the starting address of telemetry and telesignaling data. The remote terminal unit (RTU) address is the address used to uniquely identify the RTU device in the IEC104 network, and the starting address of telemetry and telesignaling data is used to define the starting position of telemetry and telesignaling data in the RTU device. These data are usually encoded and organized in accordance with the provisions of the IEC104 protocol.
通过配置文件的方式,用户可以灵活地设置与Modbus设备和IEC104设备通信的相关参数。无论是串口参数、网络参数还是协议设置,都可以根据具体设备和网络环境进行调整。第一配置文件支持Modbus协议的设置,用户可以选择Modbus协议类型、设置设备ID以及选择连接方式。这种兼容性使得平台能够与多种Modbus设备进行通信。第二配置文件支持IEC104协议的设置,用户可以定义在IEC104网络中唯一标识远程终端单元设备的地址以及遥测、遥信数据的起始地址。这确保了平台能够与IEC104设备进行数据交换。配置文件的方式使得用户无需修改代码或进行复杂的设置,只需要编辑相应的配置文件即可完成参数和协议的设置。这大大降低了使用的难度,提高了易用性。通过配置文件的方式,可以方便地添加新的设备和协议支持。只需定义新的配置文件,并在平台中添加相应的解析和处理逻辑即可。这种可扩展性使得平台能够适应未来更多的设备和协议需求。通过明确的配置,可以确保平台在与设备通信时使用正确的参数和协议设置。这有助于减少数据传输中的错误和丢失,提高数据的准确性。Through the configuration file, users can flexibly set the relevant parameters for communication with Modbus devices and IEC104 devices. Whether it is serial port parameters, network parameters or protocol settings, they can be adjusted according to the specific device and network environment. The first configuration file supports the setting of Modbus protocol. Users can select the Modbus protocol type, set the device ID and select the connection method. This compatibility enables the platform to communicate with a variety of Modbus devices. The second configuration file supports the setting of IEC104 protocol. Users can define the address that uniquely identifies the remote terminal unit device in the IEC104 network and the starting address of telemetry and telesignaling data. This ensures that the platform can exchange data with IEC104 devices. The configuration file method allows users to complete the parameter and protocol settings by editing the corresponding configuration file without modifying the code or making complex settings. This greatly reduces the difficulty of use and improves ease of use. Through the configuration file method, new device and protocol support can be easily added. Just define a new configuration file and add the corresponding parsing and processing logic in the platform. This scalability enables the platform to adapt to more device and protocol requirements in the future. Through clear configuration, it can be ensured that the platform uses the correct parameter and protocol settings when communicating with the device. This helps reduce errors and losses in data transmission and improves data accuracy.
S120、通过串口逐一将所述命令发送到所述目标设备,将所述目标设备回复的遥测和遥信数据存储到预设第一数组中;S120, sending the commands to the target devices one by one through the serial port, and storing the telemetry and telesignaling data replied by the target devices into a preset first array;
初始化与目标设备连接的串口,这包括设置串口的通信参数,如波特率、数据位、停止位和校验位等,以确保与目标设备的通信参数一致。从之前配置好的第一配置文件中读取读取目标设备的遥测、遥信数据的命令。这些命令通常是基于特定通信协议(如Modbus)的,并且包含了设备地址、功能码、寄存器地址等信息。通过初始化好的串口连接,将解析出来的命令逐一发送到目标设备。发送命令时,需要确保命令的格式和编码与目标设备的通信协议一致。发送命令后,平台需要等待目标设备的回复。目标设备在接收到命令后,会根据命令的内容执行相应的操作,并将结果通过串口回复给平台。当平台接收到目标设备的回复后,需要解析回复数据。解析过程通常包括校验数据的完整性和正确性(如CRC校验),然后提取出遥测和遥信数据。解析出遥测和遥信数据后,需要将这些数据存储到预设第一数组中。预设第一数组是平台内部用于存储和处理数据的数据结构,通常是一个动态数组或列表,可以根据需要扩展容量。在存储数据时,可以根据数据的类型和重要性进行分类存储,以便后续的数据处理和转发。同时,也可以为每个数据项添加时间戳等元数据信息,以便于数据追踪和故障排查。在整个过程中,还需要考虑错误处理机制。如果串口通信出现错误(如连接中断、数据丢失等),平台需要能够识别并处理这些错误,例如重新连接串口、重发命令等。如果平台需要同时与多个目标设备进行通信,还需要考虑线程同步和并发处理的问题。可以通过多线程或异步编程技术来实现并发处理,提高平台的处理能力和响应速度。Initialize the serial port connected to the target device, which includes setting the communication parameters of the serial port, such as baud rate, data bit, stop bit and check bit, to ensure that the communication parameters are consistent with those of the target device. Read the commands for reading the telemetry and telesignaling data of the target device from the previously configured first configuration file. These commands are usually based on a specific communication protocol (such as Modbus) and contain information such as device address, function code, register address, etc. Send the parsed commands to the target device one by one through the initialized serial port connection. When sending commands, it is necessary to ensure that the format and encoding of the commands are consistent with the communication protocol of the target device. After sending the command, the platform needs to wait for the target device to reply. After receiving the command, the target device will perform the corresponding operation according to the content of the command and reply the result to the platform through the serial port. When the platform receives the reply from the target device, it needs to parse the reply data. The parsing process usually includes verifying the integrity and correctness of the data (such as CRC check), and then extracting the telemetry and telesignaling data. After parsing the telemetry and telesignaling data, these data need to be stored in the preset first array. The preset first array is a data structure used to store and process data within the platform. It is usually a dynamic array or list, and the capacity can be expanded as needed. When storing data, it can be classified and stored according to the type and importance of the data for subsequent data processing and forwarding. At the same time, metadata information such as timestamps can be added to each data item to facilitate data tracking and troubleshooting. Throughout the process, error handling mechanisms also need to be considered. If errors occur in serial communication (such as connection interruption, data loss, etc.), the platform needs to be able to identify and handle these errors, such as reconnecting the serial port, reissuing commands, etc. If the platform needs to communicate with multiple target devices at the same time, thread synchronization and concurrent processing issues also need to be considered. Concurrent processing can be achieved through multi-threading or asynchronous programming technology to improve the processing power and response speed of the platform.
可选的,所述通过串口逐一将所述命令发送到所述目标设备,将所述目标设备回复的遥测和遥信数据存储到预设第一数组中包括:Optionally, sending the commands to the target devices one by one through the serial port, and storing the telemetry and telesignaling data replied by the target devices into a preset first array comprises:
读取所述第一配置文件,根据所述第一配置文件中的串口参数对目标串口进行初始化;Reading the first configuration file, and initializing the target serial port according to the serial port parameters in the first configuration file;
获取需要发送给目标设备的遥测、遥信命令列表;Get the list of telemetry and telesignaling commands that need to be sent to the target device;
通过已初始化的所述目标串口,逐一将所述遥测、遥信命令列表中的命令以预设帧格式发送到目标设备,并持续监听所述目标串口;Through the initialized target serial port, the commands in the telemetry and telesignaling command list are sent to the target device one by one in a preset frame format, and the target serial port is continuously monitored;
当检测到来自目标设备的回复时,根据所述第一配置文件中的映射关系确定回复的数据存储到所述预设第一数组的第一位置,并根据所述第一位置将所述目标设备回复的遥测和遥信数据存储到预设第一数组中。When a reply from the target device is detected, the reply data is determined to be stored in the first position of the preset first array according to the mapping relationship in the first configuration file, and the telemetry and telesignaling data replied by the target device are stored in the preset first array according to the first position.
从预定的文件路径加载第一配置文件,第一配置文件包含了与Modbus设备通信所需的串口参数。平台解析配置文件中的串口参数,这些参数通常包括串口端口号、波特率、数据位、停止位、校验位等。使用解析得到的串口参数,平台对目标串口进行初始化,建立与目标设备的通信连接。平台从第一配置文件中读取与遥测、遥信数据读取相关的命令设置,这些设置通常包括Modbus功能码、设备地址、寄存器地址等。根据读取的命令设置,平台构建出需要发送给目标设备的遥测、遥信命令列表。每个命令都包含了完整的Modbus请求帧信息。平台通过已初始化的目标串口,逐一将遥测、遥信命令列表中的命令以预设的帧格式(如Modbus RTU或Modbus TCP帧格式)发送到目标设备。在发送命令后,平台持续监听目标串口,等待来自目标设备的回复。当平台检测到来自目标设备的回复时,它会开始处理这些回复数据。平台首先验证回复数据的完整性和正确性(如CRC校验),然后解析出其中的遥测和遥信数据。根据第一配置文件中的映射关系(这通常是预定义的,将设备回复的特定数据与第一数组中的位置相对应),平台确定这些数据在预设第一数组中存储的位置。平台根据确定的位置将解析出来的遥测和遥信数据存储到预设的第一数组中。如果平台在发送命令后一段时间内没有收到目标设备的回复,它应该能够处理这种情况,例如通过重发命令或记录错误日志。如果平台需要同时与多个目标设备通信,应该使用适当的并发技术(如多线程或异步I/O)来避免阻塞和提高效率。在处理数据时要特别注意数据的一致性,确保存储到第一数组中的数据与原始回复数据一致,并且没有遗漏或错误。在整个过程中,平台应该能够识别和处理各种错误情况,例如串口通信错误、配置文件错误、解析错误等,并给出相应的错误提示或日志记录。The first configuration file is loaded from a predetermined file path. The first configuration file contains the serial port parameters required for communication with the Modbus device. The platform parses the serial port parameters in the configuration file. These parameters usually include the serial port number, baud rate, data bit, stop bit, check bit, etc. Using the parsed serial port parameters, the platform initializes the target serial port and establishes a communication connection with the target device. The platform reads the command settings related to telemetry and telesignaling data reading from the first configuration file. These settings usually include Modbus function code, device address, register address, etc. According to the command settings read, the platform constructs a telemetry and telesignaling command list to be sent to the target device. Each command contains complete Modbus request frame information. The platform sends the commands in the telemetry and telesignaling command list to the target device one by one in a preset frame format (such as Modbus RTU or Modbus TCP frame format) through the initialized target serial port. After sending the command, the platform continues to listen to the target serial port and waits for a reply from the target device. When the platform detects a reply from the target device, it starts processing the reply data. The platform first verifies the integrity and correctness of the reply data (such as CRC check), and then parses out the telemetry and telesignaling data therein. Based on the mapping relationship in the first configuration file (which is usually predefined, corresponding to the specific data replied by the device with the position in the first array), the platform determines the location where these data are stored in the preset first array. The platform stores the parsed telemetry and telesignaling data in the preset first array according to the determined location. If the platform does not receive a reply from the target device within a period of time after sending a command, it should be able to handle this situation, such as by resending the command or recording an error log. If the platform needs to communicate with multiple target devices at the same time, appropriate concurrency techniques (such as multithreading or asynchronous I/O) should be used to avoid blocking and improve efficiency. Pay special attention to data consistency when processing data, and ensure that the data stored in the first array is consistent with the original reply data, and there are no omissions or errors. Throughout the process, the platform should be able to identify and handle various error situations, such as serial port communication errors, configuration file errors, parsing errors, etc., and give corresponding error prompts or log records.
通过读取第一配置文件并初始化目标串口,确保了与目标设备的通信参数的精确设置,从而保证了通信的可靠性和稳定性。逐一发送遥测、遥信命令列表中的命令,减少了因并发发送可能导致的命令混乱或冲突。同时,持续监听目标串口,能够确保在第一时间捕获到目标设备的回复。根据第一配置文件中的映射关系,能够精确地确定目标设备回复的数据在预设第一数组中存储的位置。这种精确性保证了后续数据处理和转发的准确性。通过配置文件来定义通信参数和命令,使得系统更加易于扩展和维护。当需要添加新的设备或调整通信参数时,只需要修改配置文件即可,无需修改程序代码。持续的串口监听和精确的数据存储机制,使得系统能够更好地应对各种异常情况,如设备故障、通信中断等。即使在这种情况下,系统也能够准确地记录和处理数据,保证了数据的完整性和准确性。通过将目标设备回复的数据直接存储到预设数组中,避免了多次数据处理和转换的复杂性。这不仅提高了数据处理的速度,还减少了因数据转换可能引入的错误。By reading the first configuration file and initializing the target serial port, the communication parameters with the target device are accurately set, thereby ensuring the reliability and stability of communication. The commands in the telemetry and telesignaling command list are sent one by one, reducing the confusion or conflict of commands that may be caused by concurrent sending. At the same time, the target serial port is continuously monitored to ensure that the reply of the target device is captured at the first time. According to the mapping relationship in the first configuration file, the location where the data replied by the target device is stored in the preset first array can be accurately determined. This accuracy ensures the accuracy of subsequent data processing and forwarding. Defining communication parameters and commands through configuration files makes the system easier to expand and maintain. When it is necessary to add new devices or adjust communication parameters, only the configuration file needs to be modified without modifying the program code. Continuous serial port monitoring and precise data storage mechanism enable the system to better cope with various abnormal situations, such as device failure, communication interruption, etc. Even in this case, the system can accurately record and process data, ensuring the integrity and accuracy of the data. By directly storing the data replied by the target device in the preset array, the complexity of multiple data processing and conversion is avoided. This not only improves the speed of data processing, but also reduces the errors that may be introduced by data conversion.
可选的,所述预设第一数组包括预设第一子数组和预设第二子数组,所述将所述目标设备回复的遥测和遥信数据存储到预设第一数组包括:Optionally, the preset first array includes a preset first sub-array and a preset second sub-array, and storing the telemetry and telesignaling data replied by the target device into the preset first array includes:
查找与设备地址和寄存器地址匹配的第一条目,并获取所述第一条目对应的第一索引,根据所述第一索引将遥测数据存储到预设第一子数组对应的位置;Find a first entry that matches the device address and the register address, obtain a first index corresponding to the first entry, and store the telemetry data to a position corresponding to a preset first subarray according to the first index;
查找与设备地址和状态位匹配的第二条目,并获取所述第二条目对应的第二索引,根据所述第二索引将遥信数据存储到预设第二子数组对应的位置。A second entry matching the device address and the status bit is searched, and a second index corresponding to the second entry is obtained, and the remote signaling data is stored in a position corresponding to a preset second sub-array according to the second index.
为modbus采集数据开辟了两个数组存储空间,cjyc[1024](即预设第一子数组)和cjyx[1024](即预设第二子数组)。在开始存储数据之前,需要对预设的第一数组(包括第一子数组和第二子数组)进行初始化。这通常意味着为数组分配适当的内存空间,并设置初始值(如零或空值)。当从目标设备接收到回复时,需要解析回复数据。这通常涉及解码通信帧,提取出设备地址、寄存器地址、数据值以及可能的状态位等信息。遍历预设的索引映射表或配置文件中的条目,查找与接收到的设备地址和寄存器地址匹配的第一条目。第一条目应该包含了用于定位预设第一子数组中遥测数据存储位置的信息。当找到匹配的第一条目时,就获取第一条目对应的第一索引。根据获取的第一索引,将解析出的遥测数据存储到预设第一子数组对应的位置。同样地,遍历预设的索引映射表或配置文件中的条目,查找与接收到的设备地址和状态位匹配的第二条目。第二条目应该包含了用于定位预设第二子数组中遥信数据存储位置的信息。当找到匹配的第二条目时,就获取第二条目对应的第二索引。根据获取的第二索引,将解析出的遥信数据存储到预设第二子数组对应的位置。索引映射表或配置文件是确保数据能够准确存储到子数组中的关键。因此,需要确保这些映射表或配置文件是最新且准确的。当设备地址、寄存器地址或状态位发生变化时,应及时更新这些映射表或配置文件。如果在存储过程中遇到任何问题(如索引越界、数据格式错误等),应该实施适当的错误处理机制,并记录详细的日志文件以供后续分析和调试。确保索引映射表或配置文件的准确性对于避免数据错位和混乱至关重要。在处理大量数据时,可能需要考虑性能优化,如使用哈希表或其他高效的数据结构来加速索引查找过程。如果目标设备的回复中包含多个数据项,可能需要按照特定的顺序或优先级进行解析和存储。Two array storage spaces are opened for modbus data collection, cjyc[1024] (i.e., the preset first subarray) and cjyx[1024] (i.e., the preset second subarray). Before starting to store data, the preset first array (including the first subarray and the second subarray) needs to be initialized. This usually means allocating appropriate memory space for the array and setting initial values (such as zero or null values). When a reply is received from the target device, the reply data needs to be parsed. This usually involves decoding the communication frame and extracting information such as the device address, register address, data value, and possible status bits. Traverse the entries in the preset index mapping table or configuration file to find the first entry that matches the received device address and register address. The first entry should contain information for locating the location of the telemetry data storage in the preset first subarray. When a matching first entry is found, the first index corresponding to the first entry is obtained. According to the obtained first index, the parsed telemetry data is stored in the location corresponding to the preset first subarray. Similarly, traverse the entries in the preset index mapping table or configuration file to find the second entry that matches the received device address and status bit. The second entry should contain information for locating the storage location of the telesignal data in the preset second subarray. When a matching second entry is found, the second index corresponding to the second entry is obtained. According to the obtained second index, the parsed telesignal data is stored in the location corresponding to the preset second subarray. The index mapping table or configuration file is the key to ensure that the data can be accurately stored in the subarray. Therefore, it is necessary to ensure that these mapping tables or configuration files are up-to-date and accurate. When the device address, register address or status bit changes, these mapping tables or configuration files should be updated in a timely manner. If any problems are encountered during the storage process (such as index out of bounds, data format error, etc.), appropriate error handling mechanisms should be implemented and detailed log files should be recorded for subsequent analysis and debugging. Ensuring the accuracy of the index mapping table or configuration file is critical to avoiding data misalignment and confusion. When processing large amounts of data, performance optimization may need to be considered, such as using hash tables or other efficient data structures to speed up the index lookup process. If the target device's reply contains multiple data items, they may need to be parsed and stored in a specific order or priority.
通过将遥测数据和遥信数据分别存储到预设第一子数组和预设第二子数组中,实现了数据的有序存储。这种分类存储方式使得后续的数据处理和查询更加高效,因为可以直接定位到相应的子数组进行操作。根据设备地址和寄存器地址或状态位匹配条目,并获取相应的索引,能够精确地定位到预设第一子数组和预设第二子数组中应该存储数据的位置。这种精确的索引定位避免了数据的错放或覆盖,保证了数据的完整性和准确性。由于遥测和遥信数据分别存储在不同的子数组中,并且每个数据项都有明确的索引位置,因此可以方便地根据索引进行数据查询和处理。这对于需要实时分析或统计遥测和遥信数据的场景非常有用。当需要添加新的目标设备或数据类型时,只需在配置文件中添加相应的条目,并调整预设第一数组的结构即可。这种可扩展性使得系统能够适应不断变化的需求,保持长期的稳定性和可靠性。By storing telemetry data and telesignaling data in the preset first subarray and the preset second subarray respectively, orderly storage of data is achieved. This classified storage method makes subsequent data processing and query more efficient because the corresponding subarray can be directly located for operation. According to the device address and register address or status bit matching entries, and obtaining the corresponding index, the location where the data should be stored in the preset first subarray and the preset second subarray can be accurately located. This precise index positioning avoids misplacement or overwriting of data and ensures the integrity and accuracy of the data. Since telemetry and telesignaling data are stored in different subarrays respectively, and each data item has a clear index position, it is convenient to query and process data according to the index. This is very useful for scenarios that require real-time analysis or statistics of telemetry and telesignaling data. When a new target device or data type needs to be added, just add the corresponding entry in the configuration file and adjust the structure of the preset first array. This scalability enables the system to adapt to changing needs and maintain long-term stability and reliability.
S130、根据所述第二配置文件确定需要转发给监控后台的目标遥测和遥信数据,在所述第一数组中查找所述目标遥测和遥信数据的目标索引,将所述目标索引存储到预设第二数组中;S130, determining the target telemetry and telesignaling data that needs to be forwarded to the monitoring background according to the second configuration file, searching the target index of the target telemetry and telesignaling data in the first array, and storing the target index in a preset second array;
读取第二配置文件,第二配置文件可能包含了多个规则或条件,用于确定需要被转发给监控后台的遥测和遥信数据。这些规则可能基于数据的类型、范围、时间戳、设备ID等多种因素。通讯规约数据转换平台接着解析第二配置文件中的转发规则。这些规则可能以不同的形式存在,如正则表达式、逻辑表达式、范围条件等。通讯规约数据转换平台需要理解并应用这些规则来筛选出需要转发的数据。在确定了转发规则之后,通讯规约数据转换平台开始遍历预设的第一数组。这个数组存储了从目标设备接收到的所有遥测和遥信数据。通讯规约数据转换平台需要遍历这个数组,检查每一个数据项是否符合转发规则。在遍历第一数组的过程中,通讯规约数据转换平台会检查每一个数据项,看它是否符合转发规则中定义的条件。如果数据项满足某个转发规则,那么它就被认为是需要转发给监控后台的目标遥测或遥信数据。当确定了某个数据项是需要转发的目标数据,通讯规约数据转换平台就需要找到这个数据项在第一数组中的索引位置。这个索引位置就是目标索引,它用于标识数据项在数组中的具体位置。当通讯规约数据转换平台找到了目标数据的目标索引后,它会将这个索引存储到预设的第二数组中。这个第二数组用于记录所有需要转发给监控后台的数据项在第一数组中的索引位置。通讯规约数据转换平台可以使用预设的第二数组中的索引位置,从第一数组中提取出需要转发的数据,并将其发送给监控后台。这个过程可能涉及到网络通信、数据编码和解码等多个步骤。The second configuration file is read. The second configuration file may contain multiple rules or conditions for determining the telemetry and telesignaling data that needs to be forwarded to the monitoring background. These rules may be based on various factors such as data type, range, timestamp, device ID, etc. The communication protocol data conversion platform then parses the forwarding rules in the second configuration file. These rules may exist in different forms, such as regular expressions, logical expressions, range conditions, etc. The communication protocol data conversion platform needs to understand and apply these rules to filter out the data that needs to be forwarded. After determining the forwarding rules, the communication protocol data conversion platform begins to traverse the preset first array. This array stores all telemetry and telesignaling data received from the target device. The communication protocol data conversion platform needs to traverse this array and check whether each data item meets the forwarding rules. In the process of traversing the first array, the communication protocol data conversion platform will check each data item to see if it meets the conditions defined in the forwarding rules. If the data item meets a forwarding rule, it is considered to be the target telemetry or telesignaling data that needs to be forwarded to the monitoring background. When a data item is determined to be the target data that needs to be forwarded, the communication protocol data conversion platform needs to find the index position of the data item in the first array. This index position is the target index, which is used to identify the specific position of the data item in the array. When the communication protocol data conversion platform finds the target index of the target data, it will store this index in the preset second array. This second array is used to record the index positions of all data items that need to be forwarded to the monitoring background in the first array. The communication protocol data conversion platform can use the preset index position in the second array to extract the data to be forwarded from the first array and send it to the monitoring background. This process may involve multiple steps such as network communication, data encoding and decoding.
可选的,所述根据所述第二配置文件确定需要转发给监控后台的目标遥测和遥信数据,在所述第一数组中查找所述目标遥测和遥信数据的目标索引,将所述目标索引存储到预设第二数组中包括:Optionally, determining the target telemetry and telesignaling data to be forwarded to the monitoring background according to the second configuration file, searching the first array for a target index of the target telemetry and telesignaling data, and storing the target index in a preset second array comprises:
提取出需要转发给监控后台的目标遥测和遥信数据的标识信息,将所述标识信息存储到预设数据结构中;Extracting identification information of target telemetry and telesignaling data that needs to be forwarded to the monitoring background, and storing the identification information in a preset data structure;
遍历所述预设第一数组,对于所述预设第一数组中的每个数据项,检查是否能够匹配所述预设数据结构中的标识信息;Traversing the preset first array, and for each data item in the preset first array, checking whether it can match the identification information in the preset data structure;
将能够匹配所述预设数据结构中的标识信息的数据项在所述预设第一数组中的下标映射到所述预设第二数组中。The subscripts of the data items that can match the identification information in the preset data structure in the preset first array are mapped to the preset second array.
根据第二配置文件,提取出需要转发给监控后台的目标遥测和遥信数据的标识信息。这些标识信息可能是设备ID、数据类型、数据标签等能够唯一标识数据项的属性。提取出的标识信息将被存储到一个预设的数据结构中,以便后续进行匹配和查找。这个预设数据结构可以是一个列表、字典或其他类型的数据结构,其设计应能高效地存储和检索标识信息。例如,如果标识信息包含设备ID和数据类型,可以使用字典(在编程语言中如Python的dict)来存储这些信息,其中设备ID作为键(key),数据类型作为值(value)或者与之相关的另一个数据结构(如列表)。平台开始遍历预设的第一数组。第一数组存储了从目标设备接收到的所有遥测和遥信数据,每个数据项都包含了一个或多个标识信息。在遍历第一数组的过程中,平台会对每个数据项进行检查,以确定其是否包含预设数据结构中的标识信息。这通常涉及到比较数据项中的标识信息与预设数据结构中的键或值。如果数据项中的标识信息与预设数据结构中的某个条目匹配,那么该数据项就被视为需要转发的目标数据。对于每一个匹配到标识信息的数据项,平台需要找到它在第一数组中的下标(索引位置)。这个下标标识了数据项在数组中的具体位置,是后续数据提取和转发所必需的。平台会将这个下标映射到预设的第二数组中。映射过程可以是将下标直接添加到第二数组作为一个元素,也可以是将下标与数据项的其他信息(如数据类型、时间戳等)一起封装成一个新的数据结构,然后将这个新结构添加到第二数组中。在整个过程中,平台还需要进行验证和错误处理。例如,如果某个数据项的标识信息无法与预设数据结构中的任何条目匹配,平台可能需要记录一个错误或警告,以便后续分析和排查问题。同样,如果第二数组已满或无法存储新的下标信息,平台也需要采取适当的错误处理措施。According to the second configuration file, the identification information of the target telemetry and telesignaling data to be forwarded to the monitoring background is extracted. This identification information may be attributes that can uniquely identify the data item, such as device ID, data type, data tag, etc. The extracted identification information will be stored in a preset data structure for subsequent matching and search. This preset data structure can be a list, dictionary, or other type of data structure, and its design should be able to efficiently store and retrieve identification information. For example, if the identification information contains the device ID and data type, a dictionary (such as Python's dict in a programming language) can be used to store this information, where the device ID is used as the key, the data type is used as the value, or another data structure related to it (such as a list). The platform begins to traverse the preset first array. The first array stores all telemetry and telesignaling data received from the target device, and each data item contains one or more identification information. In the process of traversing the first array, the platform checks each data item to determine whether it contains the identification information in the preset data structure. This usually involves comparing the identification information in the data item with the key or value in the preset data structure. If the identification information in the data item matches an entry in the preset data structure, then the data item is regarded as the target data that needs to be forwarded. For each data item that matches the identification information, the platform needs to find its subscript (index position) in the first array. This subscript identifies the specific position of the data item in the array and is required for subsequent data extraction and forwarding. The platform will map this subscript to the preset second array. The mapping process can be to add the subscript directly to the second array as an element, or to encapsulate the subscript together with other information of the data item (such as data type, timestamp, etc.) into a new data structure, and then add this new structure to the second array. Throughout the process, the platform also needs to perform verification and error handling. For example, if the identification information of a data item cannot match any entry in the preset data structure, the platform may need to record an error or warning for subsequent analysis and troubleshooting. Similarly, if the second array is full or cannot store new subscript information, the platform also needs to take appropriate error handling measures.
通过提取第二配置文件中定义的需要转发的目标遥测和遥信数据的标识信息,并将其存储到预设数据结构中,通讯规约数据转换平台能够快速识别出需要转发的目标数据。这种基于标识信息的匹配方式相比遍历整个数据集进行条件判断要更加高效。在遍历预设第一数组时,通讯规约数据转换平台通过检查每个数据项是否能够匹配预设数据结构中的标识信息来确定是否为目标数据项。当确认为目标数据项时,通讯规约数据转换平台就会将其在下标(索引)映射到预设第二数组中。这种索引映射的方式能够确保后续快速准确地从预设第一数组中提取出需要转发的数据。通过将目标数据项的下标映射到预设第二数组中,通讯规约数据转换平台可以优化数据转发的流程。在需要转发数据时,通讯规约数据转换平台只需遍历预设第二数组,根据其中的索引从预设第一数组中提取出对应的数据项进行转发,而无需再次遍历整个预设第一数组。这大大提高了数据转发的效率和速度。第二配置文件允许用户根据需要定义转发规则,并提取出对应的标识信息。这种灵活的规则配置方式使得系统能够适应不同的业务场景和需求变化,只需要修改配置文件即可实现对转发规则的修改和扩展。整个过程基于预设数据结构和数组进行操作,使得系统易于维护和扩展。如果需要添加新的转发规则或修改现有规则,只需要修改第二配置文件即可,无需修改系统代码。同时,预设数据结构和数组的设计也使得系统具有良好的可扩展性,可以方便地支持更大规模的数据处理需求。By extracting the identification information of the target telemetry and telesignaling data to be forwarded defined in the second configuration file and storing it in a preset data structure, the communication protocol data conversion platform can quickly identify the target data to be forwarded. This matching method based on identification information is more efficient than traversing the entire data set for conditional judgment. When traversing the preset first array, the communication protocol data conversion platform determines whether it is a target data item by checking whether each data item can match the identification information in the preset data structure. When it is confirmed to be a target data item, the communication protocol data conversion platform will map it to the preset second array in the subscript (index). This index mapping method can ensure that the data to be forwarded can be extracted from the preset first array quickly and accurately in the future. By mapping the subscript of the target data item to the preset second array, the communication protocol data conversion platform can optimize the process of data forwarding. When it is necessary to forward data, the communication protocol data conversion platform only needs to traverse the preset second array and extract the corresponding data item from the preset first array according to the index therein for forwarding without traversing the entire preset first array again. This greatly improves the efficiency and speed of data forwarding. The second configuration file allows users to define forwarding rules as needed and extract corresponding identification information. This flexible rule configuration method enables the system to adapt to different business scenarios and changes in demand. You only need to modify the configuration file to modify and expand the forwarding rules. The entire process is based on preset data structures and arrays, making the system easy to maintain and expand. If you need to add new forwarding rules or modify existing rules, you only need to modify the second configuration file without modifying the system code. At the same time, the design of preset data structures and arrays also makes the system scalable and can easily support larger-scale data processing needs.
可选的,所述预设第二数组包括预设第三子数组和预设第四子数组,所述将能够匹配所述预设数据结构中的标识信息的数据项在所述预设第一数组中的下标映射到所述预设第二数组中包括:Optionally, the preset second array includes a preset third subarray and a preset fourth subarray, and mapping the subscripts of the data items that can match the identification information in the preset data structure in the preset first array to the preset second array includes:
对于每个能够匹配所述预设数据结构中的标识信息的目标遥测数据项,获取所述目标遥测数据项在预设第一子数组中的第三索引,将所述第三索引存储到所述预设第三子数组;For each target telemetry data item that can match the identification information in the preset data structure, obtain the third index of the target telemetry data item in the preset first sub-array, and store the third index in the preset third sub-array;
对于每个能够匹配所述预设数据结构中的标识信息的目标遥信数据项,获取所述目标遥信数据项在预设第二子数组中的第四索引,将所述第四索引存储到所述预设第四子数组。For each target telesignaling data item that can match the identification information in the preset data structure, a fourth index of the target telesignaling data item in the preset second subarray is obtained, and the fourth index is stored in the preset fourth subarray.
为IEC104转发数据开辟了两个数组空间,zfyc[1024](即预设第三子数组)和zfyx[1024](即预设第四子数组)。根据第二配置文件中的规则,提取出需要转发给监控后台的目标遥测和遥信数据的标识信息。这些标识信息可能包括设备ID、数据类型、寄存器地址等,用于唯一标识一个特定的遥测或遥信数据项。这些标识信息被存储在一个预设的数据结构中,以便后续进行匹配操作。平台开始遍历预设第一数组。由于预设第一数组包含预设第一子数组(用于存储遥测数据)和预设第二子数组(用于存储遥信数据),平台需要分别遍历这两个子数组。在遍历预设第一子数组(遥测数据)时,平台检查每个数据项是否能够匹配预设数据结构中的标识信息。这通常是通过比较数据项中的关键字段(如设备ID、数据类型、寄存器地址等)与标识信息中的对应字段来实现的。如果某个数据项与标识信息匹配,那么它就被认为是需要转发的目标遥测数据项。对于每个匹配到的目标遥测数据项,通讯规约数据转换平台获取它在预设第一子数组中的下标(即第三索引)。这个下标用于标识该数据项在预设第一子数组中的位置。然后,通讯规约数据转换平台将这个第三索引存储到预设第三子数组中。预设第三子数组专门用于存储目标遥测数据项的索引。类似地,在遍历预设第二子数组(遥信数据)时,通讯规约数据转换平台也检查每个数据项是否能够匹配预设数据结构中的标识信息。如果某个数据项与标识信息匹配,那么它就被认为是需要转发的目标遥信数据项。对于每个匹配到的目标遥信数据项,通讯规约数据转换平台获取它在预设第二子数组中的下标(即第四索引)。这个下标用于标识该数据项在预设第二子数组中的位置。然后,通讯规约数据转换平台将这个第四索引存储到预设第四子数组中。预设第四子数组专门用于存储目标遥信数据项的索引。通过上述步骤,通讯规约数据转换平台完成了将能够匹配预设数据结构中的标识信息的数据项在预设第一数组中的下标映射到预设第二数组(具体为预设第三子数组和预设第四子数组)中的过程。这样,在后续的数据转发操作中,通讯规约数据转换平台只需根据预设第二数组中的索引,就可以快速定位到需要转发的数据项,并进行相应的处理。Two array spaces are opened for IEC104 forwarding data, zfyc[1024] (i.e., the preset third subarray) and zfyx[1024] (i.e., the preset fourth subarray). According to the rules in the second configuration file, the identification information of the target telemetry and telesignaling data to be forwarded to the monitoring background is extracted. These identification information may include device ID, data type, register address, etc., which are used to uniquely identify a specific telemetry or telesignaling data item. These identification information are stored in a preset data structure for subsequent matching operations. The platform starts to traverse the preset first array. Since the preset first array contains the preset first subarray (for storing telemetry data) and the preset second subarray (for storing telesignaling data), the platform needs to traverse these two subarrays separately. When traversing the preset first subarray (telemetry data), the platform checks whether each data item can match the identification information in the preset data structure. This is usually achieved by comparing the key fields in the data item (such as device ID, data type, register address, etc.) with the corresponding fields in the identification information. If a data item matches the identification information, it is considered to be the target telemetry data item that needs to be forwarded. For each matched target telemetry data item, the communication protocol data conversion platform obtains its subscript (i.e., the third index) in the preset first subarray. This subscript is used to identify the position of the data item in the preset first subarray. Then, the communication protocol data conversion platform stores this third index in the preset third subarray. The preset third subarray is specifically used to store the index of the target telemetry data item. Similarly, when traversing the preset second subarray (telesignaling data), the communication protocol data conversion platform also checks whether each data item can match the identification information in the preset data structure. If a data item matches the identification information, it is considered to be a target telesignaling data item that needs to be forwarded. For each matched target telesignaling data item, the communication protocol data conversion platform obtains its subscript (i.e., the fourth index) in the preset second subarray. This subscript is used to identify the position of the data item in the preset second subarray. Then, the communication protocol data conversion platform stores this fourth index in the preset fourth subarray. The preset fourth subarray is specifically used to store the index of the target telesignaling data item. Through the above steps, the communication protocol data conversion platform completes the process of mapping the index of the data item that can match the identification information in the preset data structure in the preset first array to the preset second array (specifically the preset third subarray and the preset fourth subarray). In this way, in the subsequent data forwarding operation, the communication protocol data conversion platform can quickly locate the data item to be forwarded and perform corresponding processing based on the index in the preset second array.
通过将目标遥测数据项和目标遥信数据项的索引分别存储到预设第三子数组和预设第四子数组中,通讯规约数据转换平台实现了对这两类数据的明确分类和管理。这种分类方式使得数据在后续处理时更加清晰、有序,降低了因数据类型混淆而导致的错误风险。由于目标遥测数据项和目标遥信数据项被分别存储在不同的子数组中,通讯规约数据转换平台在进行数据处理时可以直接针对相应的子数组进行操作,而无需遍历整个预设第二数组。这种针对性的处理方式可以显著提高数据处理效率,特别是在处理大规模数据集时效果更为明显。将不同类型的数据索引分开存储,使得通讯规约数据转换平台能够更加方便地对各类数据进行监控和调试。例如,当通讯规约数据转换平台发生异常或错误时,开发人员可以快速地定位到问题所在的数据类型,并进行针对性的排查和修复。随着业务需求的变化,可能需要添加新的数据类型或修改现有数据类型的处理逻辑。通过将不同类型的数据索引分开存储,通讯规约数据转换平台可以更加灵活地应对这些变化。开发人员只需在相应的子数组中添加或修改索引信息,而无需对整个通讯规约数据转换平台进行大规模的修改,从而降低了维护成本。由于数据分类明确、处理流程清晰,通讯规约数据转换平台整体稳定性得到增强。即使在面临高并发、大数据量等挑战时,通讯规约数据转换平台也能够保持稳定的运行状态,确保数据的实时、准确转发。By storing the indexes of the target telemetry data items and the target telesignaling data items in the preset third subarray and the preset fourth subarray respectively, the communication protocol data conversion platform realizes the clear classification and management of these two types of data. This classification method makes the data clearer and more orderly in subsequent processing, and reduces the risk of errors caused by confusion of data types. Since the target telemetry data items and the target telesignaling data items are stored in different subarrays respectively, the communication protocol data conversion platform can directly operate on the corresponding subarray when processing data without traversing the entire preset second array. This targeted processing method can significantly improve the efficiency of data processing, especially when processing large-scale data sets. Storing different types of data indexes separately enables the communication protocol data conversion platform to monitor and debug various types of data more conveniently. For example, when an exception or error occurs in the communication protocol data conversion platform, developers can quickly locate the data type where the problem is located and conduct targeted troubleshooting and repair. As business needs change, it may be necessary to add new data types or modify the processing logic of existing data types. By storing different types of data indexes separately, the communication protocol data conversion platform can respond to these changes more flexibly. Developers only need to add or modify index information in the corresponding sub-arrays without making large-scale modifications to the entire communication protocol data conversion platform, thereby reducing maintenance costs. Due to clear data classification and clear processing flow, the overall stability of the communication protocol data conversion platform is enhanced. Even in the face of challenges such as high concurrency and large data volumes, the communication protocol data conversion platform can maintain a stable operating state to ensure real-time and accurate forwarding of data.
S140、当与监控后台建立连接后,根据所述预设第二数组中的所述目标索引,从所述预设第一数组中读取所述目标遥测和遥信数据,将所述目标遥测和遥信数据按照IEC104协议规定的格式进行封装,并根据所述远程终端单元地址和遥测、遥信数据的基地址将封装后的数据发送到所述监控后台。S140. After establishing a connection with the monitoring background, the target telemetry and telesignaling data are read from the preset first array according to the target index in the preset second array, the target telemetry and telesignaling data are packaged according to the format specified by the IEC104 protocol, and the packaged data are sent to the monitoring background according to the remote terminal unit address and the base address of the telemetry and telesignaling data.
参照预设第二数组中的目标索引。目标索引对应于预设第一数组中需要转发的目标遥测和遥信数据的位置。通讯规约数据转换平台会根据这些索引从预设第一数组中准确地读取出目标遥测和遥信数据。由于已经通过索引进行了精确的定位,这一步骤能够高效、准确地完成。读取出的目标遥测和遥信数据需要按照IEC104协议规定的格式进行封装。IEC104协议,也称为远动通信协议,定义了电力通讯规约数据转换平台自动化中远程终端单元(RTU)与主站之间通信的标准格式。封装过程包括将数据转换为协议规定的帧结构,添加必要的控制信息和校验码等,以确保数据的完整性和准确性。在封装完成后,通讯规约数据转换平台会根据远程终端单元地址(RTU地址)和遥测、遥信数据的基地址来确定数据的发送目标。RTU地址用于标识特定的远程终端单元,而数据的基地址则用于在监控后台中定位数据的存储位置。通过这些地址信息,通讯规约数据转换平台能够将封装好的数据准确地发送到监控后台的指定位置。这一步骤确保了数据在传输过程中的目标性和准确性。上述过程实现了从远程终端单元到监控后台的高效、准确数据传输。通过预设的索引和地址映射机制,通讯规约数据转换平台能够快速地定位并读取需要转发的数据,并按照IEC104协议规定的格式进行封装和发送。这种处理方式不仅提高了数据传输的效率,还确保了数据的完整性和准确性。同时,由于采用了标准化的通信协议,通讯规约数据转换平台能够与其他遵循相同协议的设备进行无缝对接,增强了通讯规约数据转换平台的兼容性和可扩展性。Refer to the target index in the preset second array. The target index corresponds to the location of the target telemetry and telesignaling data to be forwarded in the preset first array. The communication protocol data conversion platform will accurately read the target telemetry and telesignaling data from the preset first array according to these indexes. Since the precise positioning has been carried out through the index, this step can be completed efficiently and accurately. The read target telemetry and telesignaling data need to be encapsulated in the format specified by the IEC104 protocol. The IEC104 protocol, also known as the telecontrol communication protocol, defines the standard format for communication between the remote terminal unit (RTU) and the master station in the automation of the power communication protocol data conversion platform. The encapsulation process includes converting the data into the frame structure specified by the protocol, adding necessary control information and checksums, etc. to ensure the integrity and accuracy of the data. After the encapsulation is completed, the communication protocol data conversion platform will determine the data sending target based on the remote terminal unit address (RTU address) and the base address of the telemetry and telesignaling data. The RTU address is used to identify a specific remote terminal unit, and the base address of the data is used to locate the storage location of the data in the monitoring background. Through these address information, the communication protocol data conversion platform can accurately send the encapsulated data to the specified location of the monitoring background. This step ensures the targeting and accuracy of data during transmission. The above process realizes efficient and accurate data transmission from the remote terminal unit to the monitoring background. Through the preset index and address mapping mechanism, the communication protocol data conversion platform can quickly locate and read the data to be forwarded, and encapsulate and send it in the format specified by the IEC104 protocol. This processing method not only improves the efficiency of data transmission, but also ensures the integrity and accuracy of the data. At the same time, due to the use of standardized communication protocols, the communication protocol data conversion platform can seamlessly connect with other devices that follow the same protocol, enhancing the compatibility and scalability of the communication protocol data conversion platform.
可选的,所述将所述目标遥测和遥信数据按照IEC104协议规定的格式进行封装,并根据所述远程终端单元地址和遥测、遥信数据的基地址将封装后的数据发送到所述监控后台包括:Optionally, encapsulating the target telemetry and telesignaling data in a format specified by the IEC104 protocol, and sending the encapsulated data to the monitoring background according to the remote terminal unit address and the base address of the telemetry and telesignaling data includes:
根据IEC104协议的规定,创建应用服务数据单元,并将所述目标遥测和遥信数据嵌入到所述应用服务数据单元;According to the provisions of the IEC104 protocol, an application service data unit is created, and the target telemetry and telesignaling data are embedded into the application service data unit;
根据IEC104协议计算并设置所述应用服务数据单元的校验和或循环冗余校验值,以对所述应用服务数据单元的数据进行封装;Calculating and setting a checksum or cyclic redundancy check value of the application service data unit according to the IEC104 protocol to encapsulate data of the application service data unit;
使用已建立的网络连接,将封装好的所述应用服务数据单元的数据发送到所述监控后台。The encapsulated data of the application service data unit is sent to the monitoring background using the established network connection.
IEC104协议定义了多种类型的应用服务数据单元(ASDU),每种ASDU用于传输不同类型的信息。系统需要根据目标遥测和遥信数据的类型和特点,选择合适的ASDU类型。系统创建所选类型的ASDU,并将目标遥测和遥信数据嵌入到该ASDU中。这通常涉及到将数据按照ASDU的格式要求进行排列和编码,确保数据能够正确地被监控后台解析。为了确保数据传输的可靠性,IEC104协议要求在每个ASDU中包含校验和或循环冗余校验(CRC)值。这些值用于检测数据在传输过程中是否发生错误。系统会根据IEC104协议的规定,使用适当的算法(如CRC-16或CRC-32)计算ASDU的校验和或CRC值。这个计算过程通常涉及对整个ASDU(或其中某部分)进行特定的位操作,并产生一个固定长度的校验码。计算出的校验和或CRC值会被添加到ASDU的相应字段中,完成对数据单元的封装。这样,当监控后台收到数据后,就可以通过重新计算校验和或CRC值来验证数据的完整性。当ASDU被封装完成后,系统就可以通过已建立的网络连接将其发送到监控后台。这通常涉及到将数据单元转换为适合网络传输的格式(如TCP/IP数据包),并通过网络协议栈进行发送。在发送过程中,系统可能需要处理一些网络层的细节,如数据包的分片、重传、流量控制等。这些处理过程取决于所使用的网络协议和通信环境。监控后台在收到数据包后,会按照IEC104协议的规定进行解析和验证。如果数据包中的ASDU校验和或CRC值正确,且数据内容符合协议要求,则监控后台会进一步处理这些数据,如更新显示界面、触发警报等。The IEC104 protocol defines multiple types of application service data units (ASDUs), each of which is used to transmit different types of information. The system needs to select the appropriate ASDU type based on the type and characteristics of the target telemetry and telesignaling data. The system creates the selected type of ASDU and embeds the target telemetry and telesignaling data into the ASDU. This usually involves arranging and encoding the data according to the format requirements of the ASDU to ensure that the data can be correctly parsed by the monitoring background. In order to ensure the reliability of data transmission, the IEC104 protocol requires that a checksum or cyclic redundancy check (CRC) value be included in each ASDU. These values are used to detect whether errors occur during data transmission. The system calculates the checksum or CRC value of the ASDU using an appropriate algorithm (such as CRC-16 or CRC-32) according to the provisions of the IEC104 protocol. This calculation process usually involves performing specific bit operations on the entire ASDU (or a part of it) and generating a fixed-length check code. The calculated checksum or CRC value is added to the corresponding field of the ASDU to complete the encapsulation of the data unit. In this way, when the monitoring background receives the data, it can verify the integrity of the data by recalculating the checksum or CRC value. Once the ASDU is encapsulated, the system can send it to the monitoring background through the established network connection. This usually involves converting the data unit into a format suitable for network transmission (such as TCP/IP data packets) and sending it through the network protocol stack. During the transmission process, the system may need to handle some network layer details, such as data packet fragmentation, retransmission, flow control, etc. These processing processes depend on the network protocol and communication environment used. After receiving the data packet, the monitoring background will parse and verify it in accordance with the provisions of the IEC104 protocol. If the ASDU checksum or CRC value in the data packet is correct and the data content meets the protocol requirements, the monitoring background will further process the data, such as updating the display interface, triggering an alarm, etc.
通过遵循IEC104协议进行数据的封装和发送,可以确保数据传输的标准化和兼容性。这意味着使用相同协议的不同系统之间可以无障碍地进行数据交换,提高了系统的灵活性和可扩展性。校验和或CRC值的使用增强了数据传输的可靠性。即使在网络环境不稳定或存在干扰的情况下,只要校验和或CRC值正确,就可以认为数据在传输过程中没有发生错误,从而保证了数据的准确性和完整性。封装和发送过程的高效性对于实时监控和远程控制等应用场景至关重要。通过优化数据传输流程和协议实现方式,可以显著降低数据传输的延迟和丢包率,提高系统的响应速度和稳定性。By encapsulating and sending data in accordance with the IEC104 protocol, the standardization and compatibility of data transmission can be ensured. This means that different systems using the same protocol can exchange data without obstacles, improving the flexibility and scalability of the system. The use of checksum or CRC values enhances the reliability of data transmission. Even in an unstable network environment or in the presence of interference, as long as the checksum or CRC value is correct, it can be assumed that no error occurred during the data transmission process, thereby ensuring the accuracy and integrity of the data. The efficiency of the encapsulation and sending process is crucial for application scenarios such as real-time monitoring and remote control. By optimizing the data transmission process and protocol implementation method, the delay and packet loss rate of data transmission can be significantly reduced, and the response speed and stability of the system can be improved.
本申请实施例通过引入配置文件使得通讯规约的转换过程变得更加灵活和可定制。开发人员可以通过编辑配置文件来定义不同的规约转换规则,而无需重新编写代码,从而大大减少了开发时间和工作量。一旦配置文件完成,后续的维护和扩展工作变得相对简单。只需要修改配置文件中的规则,而无需对整个系统进行修改。这使得系统的升级和改进更加容易,同时也降低了维护成本。The embodiment of the present application makes the conversion process of the communication protocol more flexible and customizable by introducing the configuration file. Developers can define different protocol conversion rules by editing the configuration file without rewriting the code, thereby greatly reducing the development time and workload. Once the configuration file is completed, the subsequent maintenance and expansion work becomes relatively simple. Only the rules in the configuration file need to be modified without modifying the entire system. This makes it easier to upgrade and improve the system, and also reduces the maintenance cost.
本实施例还公开了一种通讯规约数据转换的系统,图3是本申请实施例公开的通讯规约数据转换的系统的模块示意图,如图3所示,系统包括读取模块301、存储模块302、索引模块303以及执行模块304,其中:This embodiment also discloses a system for communication protocol data conversion. FIG. 3 is a module diagram of the system for communication protocol data conversion disclosed in the embodiment of the present application. As shown in FIG. 3 , the system includes a reading module 301, a storage module 302, an indexing module 303, and an execution module 304, wherein:
读取模块301,配置用于读取串口的第一配置文件,以获取命令,所述命令用于读取目标设备的遥测、遥信数据的命令,读取网口的第二配置文件,以获取远程终端单元地址和遥测、遥信数据的基地址;The reading module 301 is configured to read a first configuration file of the serial port to obtain a command, wherein the command is used to read the telemetry and telecommunication data of the target device, and read a second configuration file of the network port to obtain the remote terminal unit address and the base address of the telemetry and telecommunication data;
存储模块302,配置用于通过串口逐一将所述命令发送到所述目标设备,将所述目标设备回复的遥测和遥信数据存储到预设第一数组中;The storage module 302 is configured to send the commands to the target devices one by one through the serial port, and store the telemetry and telesignaling data replied by the target devices into a preset first array;
索引模块303,配置用于根据所述第二配置文件确定需要转发给监控后台的目标遥测和遥信数据,在所述第一数组中查找所述目标遥测和遥信数据的目标索引,将所述目标索引存储到预设第二数组中;An index module 303 is configured to determine the target telemetry and telesignaling data that needs to be forwarded to the monitoring background according to the second configuration file, search the target index of the target telemetry and telesignaling data in the first array, and store the target index in a preset second array;
执行模块304,配置用于当与监控后台建立连接后,根据所述预设第二数组中的所述目标索引,从所述预设第一数组中读取所述目标遥测和遥信数据,将所述目标遥测和遥信数据按照IEC104协议规定的格式进行封装,并根据所述远程终端单元地址和遥测、遥信数据的基地址将封装后的数据发送到所述监控后台。The execution module 304 is configured to read the target telemetry and telecommunication data from the preset first array according to the target index in the preset second array after establishing a connection with the monitoring background, encapsulate the target telemetry and telecommunication data in accordance with the format specified by the IEC104 protocol, and send the encapsulated data to the monitoring background according to the remote terminal unit address and the base address of the telemetry and telecommunication data.
可选的,系统还包括配置模块,所述配置模块配置用于:Optionally, the system further includes a configuration module, wherein the configuration module is configured to:
在所述第一配置文件中定义与Modbus设备通信的串口参数、第一协议设置和命令设置,所述第一协议设置包括选择Modbus协议类型、设置设备ID以及选择连接方式,所述命令设置包括设置读取遥测、遥信数据的Modbus命令中的功能码和寄存器地址;In the first configuration file, serial port parameters, first protocol settings and command settings for communicating with the Modbus device are defined, wherein the first protocol settings include selecting a Modbus protocol type, setting a device ID and selecting a connection mode, and the command settings include setting a function code and a register address in a Modbus command for reading telemetry and telesignaling data;
在所述第二配置文件中定义与IEC104设备通信的网络参数和第二协议设置,所述第二协议设置包括在IEC104网络中唯一标识远程终端单元设备的地址以及定义在远程终端单元设备中遥测、遥信数据的起始地址。The second configuration file defines network parameters and second protocol settings for communicating with the IEC104 device, wherein the second protocol settings include an address that uniquely identifies the remote terminal unit device in the IEC104 network and a starting address that defines telemetry and telesignaling data in the remote terminal unit device.
可选的,所述存储模块302配置用于:Optionally, the storage module 302 is configured to:
读取所述第一配置文件,根据所述第一配置文件中的串口参数对目标串口进行初始化;Reading the first configuration file, and initializing the target serial port according to the serial port parameters in the first configuration file;
获取需要发送给目标设备的遥测、遥信命令列表;Get the list of telemetry and telesignaling commands that need to be sent to the target device;
通过已初始化的所述目标串口,逐一将所述遥测、遥信命令列表中的命令以预设帧格式发送到目标设备,并持续监听所述目标串口;Through the initialized target serial port, the commands in the telemetry and telesignaling command list are sent to the target device one by one in a preset frame format, and the target serial port is continuously monitored;
当检测到来自目标设备的回复时,根据所述第一配置文件中的映射关系确定回复的数据存储到所述预设第一数组的第一位置,并根据所述第一位置将所述目标设备回复的遥测和遥信数据存储到预设第一数组中。When a reply from the target device is detected, the reply data is determined to be stored in the first position of the preset first array according to the mapping relationship in the first configuration file, and the telemetry and telesignaling data replied by the target device are stored in the preset first array according to the first position.
可选的,所述预设第一数组包括预设第一子数组和预设第二子数组,所述存储模块302配置用于:Optionally, the preset first array includes a preset first sub-array and a preset second sub-array, and the storage module 302 is configured to:
查找与设备地址和寄存器地址匹配的第一条目,并获取所述第一条目对应的第一索引,根据所述第一索引将遥测数据存储到预设第一子数组对应的位置;Find a first entry that matches the device address and the register address, obtain a first index corresponding to the first entry, and store the telemetry data to a position corresponding to a preset first subarray according to the first index;
查找与设备地址和状态位匹配的第二条目,并获取所述第二条目对应的第二索引,根据所述第二索引将遥信数据存储到预设第二子数组对应的位置。A second entry matching the device address and the status bit is searched, and a second index corresponding to the second entry is obtained, and the remote signaling data is stored in a position corresponding to a preset second sub-array according to the second index.
可选的,所述索引模块303配置用于:Optionally, the index module 303 is configured to:
提取出需要转发给监控后台的目标遥测和遥信数据的标识信息,将所述标识信息存储到预设数据结构中;Extracting identification information of target telemetry and telesignaling data that needs to be forwarded to the monitoring background, and storing the identification information in a preset data structure;
遍历所述预设第一数组,对于所述预设第一数组中的每个数据项,检查是否能够匹配所述预设数据结构中的标识信息;Traversing the preset first array, and for each data item in the preset first array, checking whether it can match the identification information in the preset data structure;
将能够匹配所述预设数据结构中的标识信息的数据项在所述预设第一数组中的下标映射到所述预设第二数组中。The subscripts of the data items that can match the identification information in the preset data structure in the preset first array are mapped to the preset second array.
可选的,所述预设第二数组包括预设第三子数组和预设第四子数组,所述索引模块303配置用于:Optionally, the preset second array includes a preset third sub-array and a preset fourth sub-array, and the index module 303 is configured to:
对于每个能够匹配所述预设数据结构中的标识信息的目标遥测数据项,获取所述目标遥测数据项在预设第一子数组中的第三索引,将所述第三索引存储到所述预设第三子数组;For each target telemetry data item that can match the identification information in the preset data structure, obtain the third index of the target telemetry data item in the preset first sub-array, and store the third index in the preset third sub-array;
对于每个能够匹配所述预设数据结构中的标识信息的目标遥信数据项,获取所述目标遥信数据项在预设第二子数组中的第四索引,将所述第四索引存储到所述预设第四子数组。For each target telesignaling data item that can match the identification information in the preset data structure, a fourth index of the target telesignaling data item in the preset second subarray is obtained, and the fourth index is stored in the preset fourth subarray.
可选的,所述执行模块304配置用于:Optionally, the execution module 304 is configured to:
根据IEC104协议的规定,创建应用服务数据单元,并将所述目标遥测和遥信数据嵌入到所述应用服务数据单元;According to the provisions of the IEC104 protocol, an application service data unit is created, and the target telemetry and telesignaling data are embedded into the application service data unit;
根据IEC104协议计算并设置所述应用服务数据单元的校验和或循环冗余校验值,以对所述应用服务数据单元的数据进行封装;Calculating and setting a checksum or cyclic redundancy check value of the application service data unit according to the IEC104 protocol to encapsulate data of the application service data unit;
使用已建立的网络连接,将封装好的所述应用服务数据单元的数据发送到所述监控后台。The encapsulated data of the application service data unit is sent to the monitoring background using the established network connection.
需要说明的是:上述实施例提供的装置在实现其功能时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的装置和方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that: when the device provided in the above embodiment realizes its function, only the division of the above functional modules is used as an example. In actual application, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
本实施例还公开了一种电子设备,参照图4,电子设备可以包括:至少一个处理器401,至少一个通信总线402,用户接口403,网络接口404,至少一个存储器405。This embodiment further discloses an electronic device. Referring to FIG. 4 , the electronic device may include: at least one processor 401 , at least one communication bus 402 , a user interface 403 , a network interface 404 , and at least one memory 405 .
其中,通信总线402用于实现这些组件之间的连接通信。The communication bus 402 is used to realize the connection and communication between these components.
其中,用户接口403可以包括显示屏(Display)、摄像头(Camera),可选用户接口403还可以包括标准的有线接口、无线接口。The user interface 403 may include a display screen (Display) and a camera (Camera). Optionally, the user interface 403 may also include a standard wired interface and a wireless interface.
其中,网络接口404可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。The network interface 404 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
其中,处理器401可以包括一个或者多个处理核心。处理器401利用各种接口和线路连接整个服务器内的各个部分,通过运行或执行存储在存储器405内的指令、程序、代码集或指令集,以及调用存储在存储器405内的数据,执行服务器的各种功能和处理数据。可选的,处理器401可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable LogicArray,PLA)中的至少一种硬件形式来实现。处理器401可集成中央处理器(CentralProcessing Unit,CPU)、图像处理器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示屏所需要显示的内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器401中,单独通过一块芯片进行实现。Among them, the processor 401 may include one or more processing cores. The processor 401 uses various interfaces and lines to connect various parts in the entire server, and executes various functions of the server and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 405, and calling data stored in the memory 405. Optionally, the processor 401 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 401 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 401, and it can be implemented separately through a chip.
其中,存储器405可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory)。可选的,该存储器405包括非瞬时性计算机可读介质(non-transitory computer-readable storage medium)。存储器405可用于存储指令、程序、代码、代码集或指令集。存储器405可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现上述各个方法实施例的指令等;存储数据区可存储上面各个方法实施例中涉及的数据等。存储器405可选的还可以是至少一个位于远离前述处理器401的存储装置。如图4所示,作为一种计算机存储介质的存储器405中可以包括操作系统、网络通信模块、用户接口模块以及通讯规约数据转换的方法的应用程序。Among them, the memory 405 may include a random access memory (RAM) or a read-only memory (Read-Only Memory). Optionally, the memory 405 includes a non-transitory computer-readable storage medium. The memory 405 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 405 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 405 may also be at least one storage device located away from the aforementioned processor 401. As shown in Figure 4, the memory 405 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an application program for a method of converting communication protocol data.
在图4所示的电子设备中,用户接口403主要用于为用户提供输入的接口,获取用户输入的数据;而处理器401可以用于调用存储器405中存储通讯规约数据转换的方法的应用程序,当由一个或多个处理器401执行时,使得电子设备执行如上述实施例中一个或多个的方法。In the electronic device shown in FIG. 4 , the user interface 403 is mainly used to provide an input interface for the user and obtain data input by the user; and the processor 401 can be used to call an application program for storing a method for converting communication protocol data in the memory 405. When executed by one or more processors 401, the electronic device executes one or more methods in the above-mentioned embodiments.
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本申请所必需的。It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required for the present application.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
在本申请所提供的几个实施例中,应该理解到,所披露的装置,可通过其他的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些服务接口,装置或单元的间接耦合或通信连接,可以是电性或其他的形式。In the several embodiments provided in this application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储器中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储器405中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本申请各个实施例方法的全部或部分步骤。而前述的存储器405包括:U盘、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory 405, including a number of instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned memory 405 includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk.
以上所述者,仅为本公开的示例性实施例,不能以此限定本公开的范围。即但凡依本公开教导所作的等效变化与修饰,皆仍属本公开涵盖的范围内。本领域技术人员在考虑说明书的公开后,将容易想到本公开的其他实施方案。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未记载的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的范围和精神由权利要求限定。The above is only an exemplary embodiment of the present disclosure, and the scope of the present disclosure cannot be limited thereto. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the disclosure of the specification, those skilled in the art will easily think of other embodiments of the present disclosure. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the technical field that are not recorded in the present disclosure. The description and examples are regarded as exemplary only, and the scope and spirit of the present disclosure are defined by the claims.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410839495.0A CN118714202A (en) | 2024-06-26 | 2024-06-26 | A method, system, device and storage medium for communication protocol data conversion |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410839495.0A CN118714202A (en) | 2024-06-26 | 2024-06-26 | A method, system, device and storage medium for communication protocol data conversion |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN118714202A true CN118714202A (en) | 2024-09-27 |
Family
ID=92807469
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202410839495.0A Pending CN118714202A (en) | 2024-06-26 | 2024-06-26 | A method, system, device and storage medium for communication protocol data conversion |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN118714202A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN119232818A (en) * | 2024-12-02 | 2024-12-31 | 上海融和元储能源有限公司 | Data processing method and device |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107069968A (en) * | 2017-05-05 | 2017-08-18 | 国家电网公司 | A kind of method, main website, stability control device and the system of remotely modifying definite value |
| CN107547475A (en) * | 2016-06-28 | 2018-01-05 | 沈阳源通智能电力科技有限公司 | A kind of data processing equipment and its system for supporting more communication protocol conversions |
| CN115858520A (en) * | 2021-09-23 | 2023-03-28 | 比亚迪股份有限公司 | Data processing method, front-end processor and comprehensive monitoring system |
| CN115913825A (en) * | 2022-11-18 | 2023-04-04 | 许昌继电器研究所有限公司 | Communication method for mixed connection of different serial port protocols |
-
2024
- 2024-06-26 CN CN202410839495.0A patent/CN118714202A/en active Pending
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107547475A (en) * | 2016-06-28 | 2018-01-05 | 沈阳源通智能电力科技有限公司 | A kind of data processing equipment and its system for supporting more communication protocol conversions |
| CN107069968A (en) * | 2017-05-05 | 2017-08-18 | 国家电网公司 | A kind of method, main website, stability control device and the system of remotely modifying definite value |
| CN115858520A (en) * | 2021-09-23 | 2023-03-28 | 比亚迪股份有限公司 | Data processing method, front-end processor and comprehensive monitoring system |
| CN115913825A (en) * | 2022-11-18 | 2023-04-04 | 许昌继电器研究所有限公司 | Communication method for mixed connection of different serial port protocols |
Non-Patent Citations (1)
| Title |
|---|
| 华丽云;金珺;孙坚栋;张江丰;李泉;苏烨;: "IEC104规约在综合能源控制系统数据通讯中的应用", 仪器仪表用户, no. 01, 6 January 2020 (2020-01-06) * |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN119232818A (en) * | 2024-12-02 | 2024-12-31 | 上海融和元储能源有限公司 | Data processing method and device |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN112822276B (en) | Substation control layer communication method and system, electronic equipment and storage medium | |
| CN109768970B (en) | Configurable universal protocol generation method | |
| CN103428627B (en) | The transfer approach of data, Internet of things system and related device in Internet of things system | |
| CN115277348B (en) | Server management method, server and server management system | |
| WO2024108940A1 (en) | Performance supervision method, apparatus and system, and device and medium | |
| CN118714202A (en) | A method, system, device and storage medium for communication protocol data conversion | |
| CN113495915A (en) | Information processing method and device of Internet of things equipment and cloud server | |
| CN113596017B (en) | A protocol parsing method, device, soft gateway and storage medium | |
| CN113259268A (en) | Network port and serial port data forwarding gateway and method supporting redundancy architecture | |
| CN117648379A (en) | Method and device for collecting and synchronizing time sequence data of different protocols | |
| CN119232748B (en) | A universal thermal power plant computer room DCS equipment data transmission method, equipment, medium and product | |
| CN114301988B (en) | Distributed calling method, device, storage medium and electronic device | |
| US20220052902A1 (en) | Method for managing remote device through management device | |
| CN114040018A (en) | Data receiving and transmitting method and device based on JSON data format | |
| WO2025118547A1 (en) | Interaction data transmission method, system and apparatus, storage medium and electronic device | |
| CN118474214A (en) | Energy storage data processing method, device and electronic equipment | |
| US11216424B2 (en) | Dynamically rendering an application programming interface for internet of things applications | |
| CN117411950A (en) | Information processing methods and devices, electronic equipment and media | |
| CN119728817B (en) | Terminal equipment data transmission method, system, equipment and storage medium | |
| CN116418810A (en) | Method and control system for connecting networked equipment to cloud platform | |
| CN120371357B (en) | Firmware upgrading system, method, computing device and electronic device | |
| CN118984345B (en) | IP message analysis method and system suitable for Internet of things | |
| CN115617370B (en) | Data refreshing method and device, electronic equipment and storage medium | |
| CN120751029A (en) | Multi-protocol device data conversion method, device, equipment and medium based on Kuanghong system | |
| CN117336389A (en) | Data analysis method, device, equipment and storage medium |
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 |