Intelligent breaking analysis method and device for data frames of power monitoring equipment and medium
By monitoring and analyzing the communication data streams of power monitoring equipment, filtering and establishing communication protocols, the problem of data silos in low-voltage DC systems was solved, enabling unified collection and efficient monitoring of data from equipment from different manufacturers, and improving the operational reliability of the system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-14
- Publication Date
- 2026-03-13
AI Technical Summary
Poor data compatibility between power monitoring equipment from different manufacturers in low-voltage DC systems leads to data silos. Some equipment cannot be identified due to lost communication protocols, resulting in low equipment utilization and affecting monitoring efficiency and system reliability.
By monitoring the communication data stream of power monitoring equipment, raw data frames are obtained, target data frames are filtered, and byte-level analysis is performed to establish communication protocols, enabling real-time analysis of power monitoring equipment, breaking down data silos, and collecting monitoring data in a unified manner.
It improved the efficiency of monitoring data collection, shortened the data collection time, reduced costs, solved the problem of inconsistent data collection between equipment from different manufacturers, and achieved efficient utilization of equipment.
Smart Images

Figure CN121664899A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power monitoring equipment technology, specifically to a method, equipment, and medium for intelligent data frame parsing of power monitoring equipment. Background Technology
[0002] Low-voltage DC systems, as a key component of the power system, primarily provide stable DC power to signaling equipment, protection devices, and automatic devices. Their operational stability directly impacts the level of safe power production. To ensure reliable system operation, the industry commonly equips itself with various power monitoring devices, such as centralized monitoring devices and insulation monitoring devices.
[0003] However, these power monitoring devices often come from different manufacturers and use independent communication systems, resulting in poor data compatibility between devices, forming "data silos," and increasing the difficulty of data collection. At the same time, some older devices have lost their communication protocols, making the data unreadable and forcing them to remain idle, resulting in low equipment utilization.
[0004] These issues collectively affect the monitoring efficiency of low-voltage DC systems, and solutions are urgently needed to improve overall operational reliability. Summary of the Invention
[0005] In view of this, embodiments of the present invention provide a method, device and medium for intelligent data frame parsing of power monitoring equipment.
[0006] The first aspect of this invention provides a method for intelligently decrypting data frames of power monitoring equipment, comprising the following steps: Monitor the communication data stream of the power monitoring equipment and obtain the raw data frames; Filter target data frames from the original data frames; Perform byte-level analysis on the target data frame to obtain the position and length of each field in the target data frame; A communication protocol is established based on the position and length of each field in the target data frame. The established communication protocol is used to perform real-time analysis on the original data frames of the power monitoring equipment to determine the monitoring data transmitted by the power monitoring equipment.
[0007] Furthermore, the process of monitoring the communication data stream of the power monitoring equipment and obtaining the original data frames specifically includes the following steps: The communication parameters of the power monitoring equipment are determined based on the communication protocol used by the equipment; the communication parameters include baud rate, data bits, stop bits, and parity bits. Configure communication parameters in the listening host; The monitoring host is used to listen to the communication data stream of the power monitoring equipment and obtain the raw data frames.
[0008] Furthermore, when the communication protocol of the power monitoring equipment is lost, the communication parameters of the power monitoring equipment are determined through the following steps: Generate multiple sets of communication parameter combinations; The priority range of communication parameters is determined based on the equipment type of the power monitoring equipment, and the order of calling the communication parameter combination is determined based on the deviation of each communication parameter in the combination from the priority range. The communication parameter combinations are configured in the listening host according to the order of invocation. The monitoring host listens to the communication data stream of the power monitoring equipment to determine whether the original data frame can be obtained. If not, the next set of communication parameter combinations is configured until the monitoring host can obtain the original data frame.
[0009] Furthermore, the step of filtering target data frames from the original data frames specifically includes the following steps: Based on the functional type of the power monitoring equipment, determine the key data corresponding to the power monitoring equipment; Convert the key data into a sequence of keyword sections; The keyword segment sequence is used to search the original data frame, and the data frames in the original data frame with a similarity higher than a preset threshold to the keyword segment sequence are taken as target data frames.
[0010] Furthermore, the byte-level analysis of the target data frame specifically includes the following steps: Analyze the start and end portions of all target data frames to find recurring fixed byte sequences. Combine this with the regularity of the total length of the data frames to determine the frame header and frame tail in the target data frames. By comparing the target data frames transmitted by multiple power monitoring devices of the same model, the address code in the target data frame is determined; By comparing the target data frames collected by the power monitoring equipment under different operating conditions, the function codes in the target data frames are determined. Use one or two bytes following the function code as the data length field of the target data frame; The multiple bytes following the data length field are used as the data segment range. The key data corresponding to the power monitoring equipment is used to search and match within the data segment range. Combined with the data length parsed from the data length field, the data segment in the target data frame is determined. The first one or two bytes before the end of the frame are used as the check bit range. The frame header, address code, function code, data length and data segment in the target data frame are combined for check calculation. The check result is compared with the check bit range to determine the type and position of the check bit.
[0011] Furthermore, the key data corresponding to the power monitoring equipment is searched and matched within the data segment range, and combined with the data length parsed from the data length field, the data segment in the target data frame is determined. This specifically includes the following steps: Obtain the plaintext values of key data from power monitoring equipment input by the user; The plaintext values of key data are converted into formats using different encoding algorithms to generate multiple sets of candidate data. A sliding window of the same length is established using the data length parsed from the data length field. Sliding matching is performed within the data segment to obtain multiple sets of data byte sequences. Multiple sets of data byte sequences are matched with multiple sets of candidate data to find target data byte sequences and target candidate data with exactly the same byte values; The position of the target data byte sequence is determined as the position of the data segment in the target data frame, and the encoding algorithm used by the target candidate data is used as the encoding algorithm for the data segment in the target data frame.
[0012] Furthermore, the communication protocol includes communication parameters, data frame structure definitions, field descriptions, data segment encoding rules, and checksum calculation methods; The communication parameters represent the communication protocol used by the power monitoring equipment; the data frame structure definition represents the complete structure of the power monitoring equipment's data frame; the field descriptions describe the different fields of the power monitoring equipment's data frame; the data segment encoding rules describe the encoding algorithms used by the data segments in the power monitoring equipment's data frame; and the checksum calculation method describes the checksum algorithm used by the checksum segment in the data frame.
[0013] Furthermore, the real-time analysis of the raw data frames from the power monitoring equipment using the established communication protocol specifically includes the following steps: Establish a real-time monitoring link with all power monitoring devices through the aforementioned communication parameters, and obtain the original data frames of the devices; The original data frames of each power monitoring device are parsed in real time by defining the data frame structure, field descriptions, data segment encoding rules, and check code calculation methods to determine the monitoring data transmitted by the power monitoring device. The monitoring data transmitted by each power monitoring device is aggregated to form a unified report.
[0014] Another aspect of the present invention discloses an electronic device, including a processor and a memory; The memory is used to store programs; The processor executes the program to implement the above-described intelligent data frame parsing method for power monitoring equipment.
[0015] In another aspect, the present invention discloses a computer-readable storage medium storing a program that is executed by a processor to implement the above-described intelligent data frame parsing method for power monitoring equipment.
[0016] This invention also discloses a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, causing the computer device to perform the aforementioned method.
[0017] The embodiments of the present invention have the following beneficial effects: The present invention provides an intelligent data frame parsing method for power monitoring equipment. Through a combination of "parameter polling + key information positioning," the equipment and media significantly shorten data collection time. The present invention enables rapid filtering of target data frames based on communication parameter priority and key data, and performs byte-level analysis on the target data frames, greatly improving the data collection efficiency of power monitoring equipment and saving data collection costs. The embodiments of the present invention do not require hardware modifications to existing power monitoring equipment; data parsing can be achieved solely through external data monitoring. It effectively breaks down the "data silos" between power monitoring equipment from different manufacturers, solving the problem of inconsistent data collection caused by differences in equipment brand and model.
[0018] Additional aspects and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description or may be learned by practice of the invention. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a schematic diagram of the steps of the intelligent data frame parsing method for power monitoring equipment according to the present invention; Figure 2 This is a schematic diagram of the implementation process for obtaining the original data frame in the method of the present invention; Figure 3 This is a schematic diagram of the implementation process of performing byte-level analysis on the target data frame in the method of the present invention; Figure 4 This is a schematic diagram of the structure of an electronic device according to the present invention; Figure 5This is a schematic diagram of a computer-readable storage medium structure according to the present invention. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0022] Currently, there are two core problems in the field of DC monitoring of power systems, which seriously restrict the efficiency and safety of DC power supply operation and maintenance: First, there is the problem of data silos: the online monitoring equipment operating in a DC system often comes from different manufacturers. Each manufacturer's equipment uses an independently designed communication system, resulting in poor data communication compatibility between the equipment. Most of the equipment is in a "data silo" state, with only a few equipment able to achieve partial data exchange, making it impossible to form a complete DC system operation data chain. Secondly, there is the issue of technical barriers to data collection: Currently, the power system lacks a unified DC power supply operation status analysis system, resulting in an online monitoring equipment utilization rate of less than 30%. Furthermore, some equipment has been in operation for a long time, and the original communication protocol documents have been lost, making it impossible to read data through conventional methods. In addition, some equipment manufacturers, in order to maintain their technological monopoly, have set up strict technical barriers and refused to open up their communication protocols, further leading to outdated DC power supply operation and maintenance methods and frequent failures.
[0023] Therefore, solving the problem of DC power supply operation data collection and improving the efficiency of monitoring data collection have become the primary tasks for improving the DC power supply operation status monitoring system.
[0024] The first embodiment of the present invention provides a method for intelligently decrypting data frames of power monitoring equipment, such as... Figure 1 As shown, it includes the following steps: S1. Monitor the communication data stream of the power monitoring equipment and obtain the raw data frames; S2. Filter the target data frame from the original data frame; S3. Perform byte-level analysis on the target data frame to obtain the position and length of each field in the target data frame; S4. Establish a communication protocol based on the position and length of each field in the target data frame, and use the established communication protocol to perform real-time analysis on the original data frame of the power monitoring equipment to determine the monitoring data transmitted by the power monitoring equipment.
[0025] This invention, without the need for a device communication protocol, breaks down "data silos" through intelligent data analysis technology at the communication transmission layer, enabling unified collection of data from all types of monitoring devices and effectively improving the efficiency of monitoring data collection.
[0026] The implementation process of each step of this invention is described in detail below: S1. Monitor the communication data stream of the power monitoring equipment and obtain the raw data frames.
[0027] In step S1, the communication data stream of the power monitoring equipment is monitored to obtain the raw data frames, specifically including the following steps: S1-a1 determines the communication parameters of the power monitoring equipment based on the communication protocol used by the power monitoring equipment; S1-a2. Configure communication parameters in the listening host; S1-a3. Use a monitoring host to listen to the communication data stream of the power monitoring equipment and obtain the raw data frames.
[0028] The process of acquiring raw data frames is as follows: Figure 2 As shown. In this embodiment of the invention, the power monitoring equipment to be monitored includes, but is not limited to, DC system data acquisition modules, centralized monitoring devices, insulation monitoring devices, and online battery monitoring devices; by configuring the communication parameters of the corresponding power monitoring equipment in the monitoring host, the communication data stream of the power monitoring equipment can be monitored, and the original data frames can be obtained.
[0029] Preferably, the communication parameters include baud rate, data bits, stop bits, and parity bits. The baud rate represents the number of symbols transmitted per second, reflecting the communication speed. Data bits refer to the number of binary bits contained in each character or data block, used to determine the data range that a single data frame can represent. Stop bits are used to indicate the end of a data frame, distinguishing between consecutive data frames. Parity bits are used to determine whether errors occurred during data transmission. These communication parameters can normally be obtained through the communication protocol corresponding to the power monitoring equipment. After determining the communication parameters of the power monitoring equipment through the communication protocol, configuring the communication parameters of the power monitoring equipment in the monitoring host allows for monitoring of the communication data stream of the power monitoring equipment and acquisition of raw data frames.
[0030] In some embodiments, when the communication protocol of the power monitoring equipment is lost, the communication parameters of the power monitoring equipment are determined through the following steps: S1-b1. Generate multiple sets of communication parameter combinations; S1-b2. Determine the priority range of communication parameters based on the equipment type of the power monitoring equipment, and determine the order of calling the communication parameter combination based on the deviation of each communication parameter in the communication parameter combination from the priority range; S1-b3. Configure the communication parameter combinations in the listening host according to the order of their invocation; S1-b4. Use the monitoring host to monitor the communication data stream of the power monitoring equipment and determine whether the original data frame can be obtained; if not, configure the next set of communication parameter combinations until the monitoring host can obtain the original data frame.
[0031] When the communication protocol of power monitoring equipment is lost due to its age or other reasons, the monitoring host determines the multiple communication parameters used by the power monitoring equipment through a polling configuration method. Specifically, it first generates all possible combinations of communication parameters. Taking RS485 communication as an example, its baud rate has 5 possible parameter values, data bits have 4 possible parameter values, stop bits have 3 possible parameter values, and parity bits have 5 possible parameter values; therefore, there are a total of 300 possible parameter combinations for RS485 communication.
[0032] After generating all possible combinations of communication parameters, the order in which these combinations are invoked is determined according to the priority of "industry priority value → full value range". Taking RS485 communication as an example, the parameter values and priority values are shown in Table 1 below: Table 1
[0033] The communication host configures parameters sequentially according to the order of communication parameter combinations, maintaining a listening time of 10-30 seconds for each combination (adjustable based on device data update frequency). During the listening period, the communication host detects whether the data stream from the power monitoring equipment is continuous and stable (to eliminate random interference data). Once a stable data stream is detected, the host confirms that the current configuration is correct and stops polling.
[0034] With the correct communication parameter configuration, the monitoring host can continuously monitor the data streams of different power monitoring devices and obtain complete raw data frames.
[0035] S2. Filter the target data frame from the original data frame.
[0036] In step S2, the target data frame is filtered from the original data frame, which specifically includes the following steps: S2-1. Determine the key data corresponding to the power monitoring equipment based on its functional type; S2-2. Convert key data into a sequence of keyword sections; S2-3. Use the keyword segment sequence to search in the original data frame, and take the data frame in the original data frame whose similarity to the keyword segment sequence is higher than a preset threshold as the target data frame.
[0037] In step S2, the user needs to input 1-3 fixed key data according to the function type of the monitoring device (such as "insulation resistance to ground (999.9kΩ)" and "bus voltage (220V)" for insulation monitoring device, and "single cell voltage (2.25V)" for battery monitoring device). The key data must be physical quantities that the device monitors in real time and can be directly read.
[0038] After inputting key data, embodiments of the present invention convert this key data into a sequence of key bytes. For example, strings with units can be converted into pure numbers (e.g., converting "220.0V" into the floating-point number 220.0); or, according to common encoding habits in the power industry (e.g., the 32-bit floating-point format commonly used in the Modbus protocol), numbers can be converted into the expected sequence of key bytes (e.g., hexadecimal representation 43 6C 00 00).
[0039] Finally, in this embodiment of the invention, the key byte sequence is searched within the original data frame. For example, a sliding search algorithm can be used to search for consecutive byte blocks that match or closely approximate the key information byte sequence, thereby finding the target data frame.
[0040] In some embodiments, when there are multiple key input data, the present invention can prioritize finding a data frame that contains all the key data. If no data frame contains all the key data, then a data frame containing the single key data with the highest priority is found, and finally the successfully matched data frame is marked as the target data frame.
[0041] This invention, through user-inputted prior knowledge, searches through massive amounts of raw data to identify target data frames with clear directionality. This eliminates the need for byte-level analysis to traverse all raw data frames, allowing focus on analyzing the structure of these confirmed valuable data frames, thus significantly improving the efficiency and accuracy of data decryption.
[0042] S3. Perform byte-level analysis on the target data frame to obtain the position and length of each field in the target data frame.
[0043] Taking RS485 communication as an example, its general data frame structure is frame header + address code + function code + data length + data segment + check bit + frame trailer; the embodiment of the present invention determines the position and length of each field of the target data frame by performing byte-level analysis of the target data frame.
[0044] like Figure 3 As shown, in step S3, byte-level analysis of the target data frame is performed, specifically including the following steps: S3-1. Analyze the start and end parts of all target data frames, find the recurring fixed byte sequences, and combine them with the regularity of the total length of the data frames to determine the frame header and frame tail in the target data frames.
[0045] In this embodiment of the invention, by analyzing the start and end portions of all target data frames, a recurring fixed byte sequence (such as 0xAA 0x55) is identified. Combined with the regularity of the total data frame length (e.g., all valid data frames are 16 bytes long), the positions and lengths of the frame header (typically 1-2 bytes) and frame trailer (typically 1-2 bytes) are determined.
[0046] S3-2. Compare the target data frames transmitted by multiple power monitoring devices of the same model to determine the address code in the target data frame.
[0047] In this embodiment of the invention, data frames from multiple devices from the same manufacturer but configured with different addresses are analyzed. By comparing these data frames, the address code is identified as one or two bytes that have changed.
[0048] S3-3. Compare the target data frames collected by the power monitoring equipment under different operating conditions, and determine the function codes in the target data frames.
[0049] In this embodiment of the invention, the location of the function code is determined by acquiring target data frames of the device in different operating states. Comparing the target data frames in different operating states, the byte that changes is the function code (typically 1 byte). In some embodiments, different data content can also be triggered by changing the monitoring state of the device. For example, disconnecting the sampling line of the insulation monitoring device to make it report "voltage is 0" data; or simulating a fault to observe changes in the data frame.
[0050] S3-4. Use one or two bytes following the function code as the data length field of the target data frame.
[0051] The bytes or words following the function code (usually 1-2 bytes) often directly indicate the length of the subsequent data segment. In this embodiment of the invention, one or two bytes following the function code are directly obtained as the data length field of the target data frame.
[0052] S3-5. Take the multiple bytes following the data length field as the data segment range, use the key data corresponding to the power monitoring equipment to search and match within the data segment range, and combine the data length parsed from the data length field to determine the data segment in the target data frame.
[0053] As a specific embodiment, the key data corresponding to the power monitoring equipment is used to search and match within the data segment range. Combined with the data length parsed from the data length field, the data segment in the target data frame is determined. This specifically includes the following steps: S3-5-1. Obtain the plaintext values of key data from the power monitoring equipment input by the user.
[0054] The key data plaintext value in step S3-5-1 is obtained through user input, and the input process is similar to that in step S2.
[0055] S3-5-2. Convert the plaintext values of key data according to different encoding algorithms to generate multiple sets of candidate data; In this embodiment of the invention, known plaintext values of key information (such as 220.0) are converted according to various preset common encoding formats to generate multiple sets of candidate data. The encoding formats of the candidate data typically include: Integer classes: 16-bit signed / unsigned integers, 32-bit signed / unsigned integers.
[0056] Floating-point number class: 32-bit single-precision floating-point number.
[0057] Byte order: For each numeric type, generate byte sequences in both big-endian and little-endian modes.
[0058] S3-5-3. Use the data length parsed from the data length field to create a sliding window of the same length, and perform sliding matching within the data segment range to obtain multiple sets of data byte sequences.
[0059] In this embodiment of the invention, a sliding window algorithm is used to perform sliding matching within a data segment. Starting from the initial position, the window slides in units of bytes; by extracting a byte sequence of the same length as the current candidate byte pattern at each sliding window position, multiple sets of data byte sequences are obtained.
[0060] S3-5-4. Match multiple sets of data byte sequences with multiple sets of candidate data to find the target data byte sequence and the target candidate data with exactly the same byte value; After obtaining multiple sets of data byte sequences and multiple sets of candidate data, this embodiment of the invention matches the multiple sets of data byte sequences with the multiple sets of candidate data. If a certain encoding format fails to match, it is automatically replaced with the next candidate encoding format in the list, and finally the target data byte sequence and target candidate data with completely identical byte values are retrieved.
[0061] S3-5-5. Determine the position of the target data byte sequence as the position of the data segment in the target data frame, and use the encoding algorithm used by the target candidate data as the encoding algorithm of the data segment in the target data frame.
[0062] After determining the target data byte sequence and the target candidate data, this embodiment of the invention determines the position of the target data byte sequence as the position of the data segment in the target data frame, and uses the encoding algorithm used by the target candidate data as the encoding algorithm of the data segment in the target data frame.
[0063] S3-6. Take one or two bytes before the frame end as the check bit range, perform check calculation on the combination of frame header, address code, function code, data length and data segment in the target data frame, compare the check result in the check bit range, and determine the type and position of the check bit.
[0064] In this embodiment of the invention, common verification algorithms (such as CRC-16, Modbus CRC, LRC, etc.) are first used to calculate the data in the "frame header + address code + function code + data length + data segment". The calculation result is compared with the corresponding fields in the check bit range in the data frame. The algorithm that matches successfully is the verification method used by the device, and the field that matches successfully is the check bit.
[0065] This invention significantly improves the efficiency of power monitoring equipment in collecting monitoring data and saves the cost of collecting monitoring data by performing byte-level analysis on target data frames.
[0066] S4. Establish a communication protocol based on the position and length of each field in the target data frame, and use the established communication protocol to perform real-time analysis on the original data frame of the power monitoring equipment to determine the monitoring data transmitted by the power monitoring equipment.
[0067] In step S4, the communication protocol includes communication parameters, data frame structure definition, field description, data segment encoding rules, and checksum calculation method.
[0068] The communication parameters represent the communication protocol used by the power monitoring equipment to ensure that the communication link can be established. The data frame structure definition represents the complete structure of the power monitoring equipment's data frame, including the byte offset, length, function description, and example value of each field. The field description describes the different fields of the power monitoring equipment's data frame, such as function code 0x03 representing "read monitoring data" and 0x04 representing "read device status". The data segment encoding rules describe the encoding algorithm used in the data segments of the power monitoring equipment's data frame to clarify the encoding format (e.g., 32-bit big-endian floating-point number) of various monitoring values (e.g., voltage, resistance) within the data segment. The checksum calculation method describes the checksum algorithm used in the checksum section of the data frame, such as the polynomial, initial value, and input-output reversal of the CRC-16 algorithm.
[0069] After establishing the communication protocol, this embodiment of the invention uses the established communication protocol to perform real-time analysis of the raw data frames of the power monitoring equipment, specifically including the following steps: S4-1. Establish a real-time monitoring link with all power monitoring devices through communication parameters and obtain the raw data frames of the devices; S4-2. The original data frames of each power monitoring device are parsed in real time by defining the data frame structure, field descriptions, data segment encoding rules and check code calculation methods to determine the monitoring data transmitted by the power monitoring device; S4-3. Summarize the monitoring data transmitted by each power monitoring device to form a unified report.
[0070] This invention enables real-time and accurate data reading from each power monitoring device via a communication protocol. It is compatible with mainstream DC monitoring device types in power systems (centralized monitoring devices, insulation monitoring devices, online battery monitoring devices, etc.) and requires no hardware modifications to existing equipment; data analysis can be achieved simply through external data listening. This effectively breaks down "data silos" between devices from different manufacturers and solves the problem of inconsistent data collection caused by differences in device brand and model.
[0071] In traditional scenarios, data collection for a single device typically takes 72 hours due to repeated parameter trials and manual data pattern checking. However, with this invention, by prioritizing parameters (adopting industry-standard values) and quickly filtering target data frames using key information, the data collection time per device can be reduced to 2-4 hours, improving efficiency by over 90%. Furthermore, it eliminates the need for long-term manual monitoring, reducing labor costs. Simultaneously, this invention saves on protocol licensing fees by independently deciphering communication protocols. By achieving unified data collection, idle monitoring equipment can also be deployed for power system monitoring, avoiding waste of equipment resources.
[0072] Figure 4 This is a schematic diagram of the electronic device proposed in the second embodiment of the present invention. The memory in this embodiment stores program instructions for implementing the intelligent data frame parsing method for power monitoring equipment in any of the above embodiments. The processor executes the program instructions stored in the memory to perform intelligent data frame parsing for power monitoring equipment. The processor can also be called a CPU (Central Processing Unit). The processor may be an integrated circuit chip with signal processing capabilities. The processor can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor or any conventional processor, etc.
[0073] The methods described in the first embodiment of the present invention are applicable to the embodiments of the present electronic device. The specific functions implemented by the embodiments of the present electronic device are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above methods.
[0074] Figure 5 This is a schematic diagram of the structure of a computer-readable storage medium according to the third embodiment of the present invention. The computer-readable storage medium of the fourth embodiment of the present invention stores program instructions capable of implementing the above-described intelligent data frame parsing method for power monitoring equipment. These program instructions can be stored in the storage medium in the form of a software product, including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of various embodiments of the present invention. The aforementioned computer-readable storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks, or terminal devices such as computers, servers, mobile phones, and tablets.
[0075] The methods described in the first embodiment of the present invention are applicable to the computer-readable storage medium embodiment. The specific functions implemented by the computer-readable storage medium embodiment are the same as those in the above method embodiment, and the beneficial effects achieved are also the same as those achieved by the above method.
[0076] This embodiment also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned related steps to implement the intelligent data frame parsing method for power monitoring equipment provided in the above embodiment.
[0077] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the embodiments of the present invention are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0078] Those skilled in the art will understand that modules in the device of the embodiments of the present invention can be adaptively modified and placed in one or more devices different from those embodiments. Modules, units, or components in the embodiments of the present invention can be combined into a single module, unit, or component, and further, they can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed in this specification (including the corresponding claims, abstract, and drawings) and all processes or units of any method or device so disclosed. Unless expressly stated otherwise, each feature disclosed in this specification (including the corresponding claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.
[0079] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0080] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0081] Furthermore, the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to mutually. In particular, for embodiments such as apparatus and devices, since they are basically similar to the method embodiments, the relevant parts can be referred to the description of the method embodiments. The apparatus, devices, and other embodiments described above are merely illustrative, and the modules, units, etc., described as separate components may or may not be physically separate, that is, they may be located in one place or distributed in multiple places, such as nodes in a system network. Specifically, some or all of the modules and units can be selected according to actual needs to achieve the purpose of the above-described embodiment solutions. Those skilled in the art can understand and implement this without creative effort.
[0082] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0083] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0084] Furthermore, the terms "first," "second," etc., used in the embodiments of this invention are for descriptive purposes only and should not be construed as indicating or implying relative importance, or implicitly specifying the number of technical features indicated in this embodiment. Therefore, features defined with terms such as "first" and "second" in the embodiments of this invention can explicitly or implicitly indicate that the embodiment includes at least one of those features. In the description of this invention, the word "multiple" means at least two or more, such as two, three, four, etc., unless otherwise explicitly specified in the embodiments.
[0085] In embodiments of the present invention, the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, components, features, and elements with the same names in different embodiments of the present invention may have the same meaning or different meanings, the specific meaning of which must be determined by its interpretation in that specific embodiment or further in conjunction with the context of that specific embodiment.
[0086] Although embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present invention. Other embodiments of the present invention will readily conceive of by considering the specification and practicing the invention. This application is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of the invention are indicated by the following claims.
Claims
1. A method for intelligently decrypting data frames of power monitoring equipment, characterized in that, Includes the following steps: Monitor the communication data stream of the power monitoring equipment and obtain the raw data frames; Filter target data frames from the original data frames; Perform byte-level analysis on the target data frame to obtain the position and length of each field in the target data frame; A communication protocol is established based on the position and length of each field in the target data frame. The established communication protocol is then used to perform real-time analysis on the original data frames of the power monitoring equipment to determine the monitoring data transmitted by the power monitoring equipment.
2. The intelligent data frame parsing method for power monitoring equipment according to claim 1, characterized in that, The process of monitoring the communication data stream of the power monitoring equipment and obtaining the raw data frames includes the following steps: The communication parameters of the power monitoring equipment are determined based on the communication protocol used by the equipment; the communication parameters include baud rate, data bits, stop bits, and parity bits. Configure communication parameters in the listening host; The monitoring host is used to listen to the communication data stream of the power monitoring equipment and obtain the raw data frames.
3. The intelligent data frame parsing method for power monitoring equipment according to claim 2, characterized in that, When the communication protocol of a power monitoring device is lost, the communication parameters of the power monitoring device can be determined by following these steps: Generate multiple sets of communication parameter combinations; The priority range of communication parameters is determined based on the equipment type of the power monitoring equipment, and the order of calling the communication parameter combination is determined based on the deviation of each communication parameter in the combination from the priority range. The communication parameter combinations are configured in the listening host according to the order of invocation. The monitoring host listens to the communication data stream of the power monitoring equipment to determine whether the original data frame can be obtained. If not, the next set of communication parameter combinations is configured until the monitoring host can obtain the original data frame.
4. The intelligent data frame parsing method for power monitoring equipment according to claim 1, characterized in that, The process of filtering target data frames from raw data frames specifically includes the following steps: Based on the functional type of the power monitoring equipment, determine the key data corresponding to the power monitoring equipment; Convert the key data into a sequence of keyword sections; The keyword segment sequence is used to search the original data frame, and the data frames in the original data frame with a similarity higher than a preset threshold to the keyword segment sequence are taken as target data frames.
5. The intelligent data frame parsing method for power monitoring equipment according to claim 1, characterized in that, The byte-level analysis of the target data frame specifically includes the following steps: Analyze the start and end portions of all target data frames to find recurring fixed byte sequences. Combine this with the regularity of the total length of the data frames to determine the frame header and frame tail in the target data frames. By comparing the target data frames transmitted by multiple power monitoring devices of the same model, the address code in the target data frame is determined; By comparing the target data frames collected by the power monitoring equipment under different operating conditions, the function codes in the target data frames are determined. Use one or two bytes following the function code as the data length field of the target data frame; The multiple bytes following the data length field are used as the data segment range. The key data corresponding to the power monitoring equipment is used to search and match within the data segment range. Combined with the data length parsed from the data length field, the data segment in the target data frame is determined. The first one or two bytes before the end of the frame are used as the check bit range. The frame header, address code, function code, data length and data segment in the target data frame are combined for check calculation. The check result is compared with the check bit range to determine the type and position of the check bit.
6. The intelligent data frame parsing method for power monitoring equipment according to claim 5, characterized in that, The key data corresponding to the power monitoring equipment is searched and matched within the data segment range. Combined with the data length parsed from the data length field, the data segment in the target data frame is determined. This specifically includes the following steps: Obtain the plaintext values of key data from power monitoring equipment input by the user; The plaintext values of key data are converted into formats using different encoding algorithms to generate multiple sets of candidate data. A sliding window of the same length is established using the data length parsed from the data length field. Sliding matching is performed within the data segment to obtain multiple sets of data byte sequences. Multiple sets of data byte sequences are matched with multiple sets of candidate data to find target data byte sequences and target candidate data with exactly the same byte values; The position of the target data byte sequence is determined as the position of the data segment in the target data frame, and the encoding algorithm used by the target candidate data is used as the encoding algorithm for the data segment in the target data frame.
7. The intelligent data frame parsing method for power monitoring equipment according to claim 1, characterized in that, The communication protocol includes communication parameters, data frame structure definitions, field descriptions, data segment encoding rules, and checksum calculation methods. The communication parameters represent the communication protocol used by the power monitoring equipment; the data frame structure definition represents the complete structure of the power monitoring equipment's data frame; the field descriptions describe the different fields of the power monitoring equipment's data frame; the data segment encoding rules describe the encoding algorithms used by the data segments in the power monitoring equipment's data frame; and the checksum calculation method describes the checksum algorithm used by the checksum segment in the data frame.
8. The intelligent data frame parsing method for power monitoring equipment according to claim 7, characterized in that, The real-time analysis of raw data frames from power monitoring equipment using the established communication protocol specifically includes the following steps: Establish a real-time monitoring link with all power monitoring devices through the aforementioned communication parameters, and obtain the original data frames of the devices; The original data frames of each power monitoring device are parsed in real time by defining the data frame structure, field descriptions, data segment encoding rules, and check code calculation methods to determine the monitoring data transmitted by the power monitoring device. The monitoring data transmitted by each power monitoring device is aggregated to form a unified report.
9. An electronic device, characterized in that, Including the processor and memory; The memory is used to store programs; The processor executes the program to implement the intelligent data frame parsing method for power monitoring equipment as described in any one of claims 1-8.
10. A computer-readable storage medium, characterized in that, The storage medium stores a program, which is executed by a processor to implement a method for intelligent data frame parsing of a power monitoring device as described in any one of claims 1-8.