Search

CN-121985057-A - Data analysis method, device, equipment and storage medium

CN121985057ACN 121985057 ACN121985057 ACN 121985057ACN-121985057-A

Abstract

The data analysis method, device and equipment and storage medium comprise the steps of receiving Modbus data of a plurality of sub-equipment, determining a target analysis strategy corresponding to the sub-equipment according to preset configuration parameters in each analysis strategy, the starting address of the sub-equipment and the equipment type of the sub-equipment for any sub-equipment, wherein the preset configuration parameters are used for representing register address distribution information of the sub-equipment in the equipment type, analyzing the register data of the sub-equipment according to the target analysis strategy to obtain analysis results, determining a target analysis strategy corresponding to the sub-equipment according to the regularity of register addresses of the sub-equipment, realizing automatic analysis of the sub-equipment, eliminating the need of manually maintaining a register mapping table of each sub-equipment, and reducing maintenance complexity.

Inventors

  • HUANG TENGDA
  • CHANG ZHONGZHENG
  • LI JIANJUN
  • HUANG HAO

Assignees

  • 宁波德业变频技术有限公司上海分公司

Dates

Publication Date
20260505
Application Date
20251218

Claims (11)

  1. 1. A data parsing method, comprising: Receiving Modbus data of a plurality of sub-devices, wherein the Modbus data comprises a starting address and register data of the sub-devices; determining a target analysis strategy corresponding to each piece of equipment according to preset configuration parameters in each analysis strategy, a starting address of the piece of equipment and the equipment type of the piece of equipment, wherein the corresponding analysis strategy exists in any piece of equipment; And analyzing the register data of the sub-equipment according to the target analysis strategy to obtain an analysis result.
  2. 2. The method of claim 1, wherein determining a target resolution policy corresponding to the child device according to preset configuration parameters in each resolution policy, a start address of the child device, and a device type of the child device, comprises: For any analysis strategy, determining whether the analysis strategy is matched with the sub-equipment according to corresponding preset configuration parameters and the starting address of the sub-equipment; And when the device types of the sub devices are matched with the target device types designated in the analysis strategy, determining the analysis strategy as the target analysis strategy.
  3. 3. The method of claim 2, wherein the predetermined configuration parameters include a resolution start address and a register length of a child device, and wherein determining whether the resolution policy matches the child device based on the corresponding predetermined configuration parameters and the start address of the child device comprises: determining a matching value according to the resolved starting address, the register length of the sub-equipment and the starting address of the sub-equipment; When the matching value is a preset value, determining that the analysis strategy is matched with the sub-equipment; the analysis starting address is the starting address of the first sub-device in the device type corresponding to the analysis strategy.
  4. 4. A method according to claim 3, wherein determining a match value based on the resolved start address, a register length of a child device, and a start address of the child device comprises: calculating a difference value between the starting address of the sub-equipment and the resolved starting address; performing remainder operation according to the difference value and the register length of the sub-equipment to obtain the matching value; Correspondingly, when the matching value is a preset value, determining that the parsing strategy is matched with the sub-equipment comprises the following steps: And when the matching value is 0, determining that the resolution strategy is matched with the sub-equipment.
  5. 5. The method of claim 3, wherein resolving the register data of the child device according to the target resolution policy to obtain a resolution result comprises: Mapping the starting address of the sub-equipment to the resolved starting address; obtaining each mapped register address of the sub-equipment according to the analysis starting address and the register length of the sub-equipment; and determining the corresponding relation between the mapped register address of the sub-equipment and the register data, and obtaining an analysis result of the sub-equipment according to the target analysis strategy and the corresponding relation, wherein the analysis strategy stores analysis information of each register address in the first sub-equipment in the corresponding equipment type.
  6. 6. The method of claim 5, wherein obtaining the resolution of the child device according to the target resolution policy and the correspondence, comprises: Aiming at the register address in any corresponding relation, according to the analysis data type corresponding to the register address in the target analysis strategy, analyzing the register data in the corresponding relation to obtain the analysis result of the sub-equipment.
  7. 7. The method according to any one of claims 1-6, further comprising: And when the newly added device type or the register address of the sub-device changes, updating the stored resolution strategy.
  8. 8. A data parsing apparatus, the apparatus comprising: the device comprises a receiving module, a receiving module and a processing module, wherein the receiving module is used for receiving Modbus data of a plurality of pieces of sub-equipment, and the Modbus data comprises a starting address and register data of the sub-equipment; The device comprises a determining module, a determining module and a judging module, wherein the determining module is used for determining a target analysis strategy corresponding to any piece of equipment according to preset configuration parameters in each analysis strategy, a starting address of the piece of equipment and the equipment type of the piece of equipment; and the analysis module is used for analyzing the register data of the sub-equipment according to the target analysis strategy to obtain an analysis result.
  9. 9. An electronic device comprising at least one processor and a memory; the memory stores computer-executable instructions; the at least one processor executing computer-executable instructions stored in the memory causes the at least one processor to perform the method of any one of claims 1 to 7.
  10. 10. A computer readable storage medium having stored therein computer executable instructions which when executed by a processor implement the method of any of claims 1 to 7.
  11. 11. A computer program product comprising a computer program which, when executed by a processor, implements the method of any one of claims 1 to 7.

Description

Data analysis method, device, equipment and storage medium Technical Field The present application relates to the technical field of industrial automation communications, and in particular, to a data parsing method, apparatus, device, and storage medium. Background The Modbus protocol is widely used as a serial communication protocol of an industrial control system and is widely used for data interaction among programmable logic controllers, sensors, actuators and other devices. In the context of new energy power generation, industrial automation production lines, etc., an inverter typically needs to communicate with multiple sub-devices (e.g., current sensors, temperature sensors, power modules, etc.) via a Modbus protocol. The register address distribution of the sub-devices is usually regular, but because of the difference of address space distribution rules of different manufacturers, a register mapping table is still required to be set for each sub-device independently during actual configuration, so that the cloud system can accurately analyze data. As the number of sub-devices in the system increases, the register mapping table needs to be manually updated, which significantly increases the complexity of system maintenance. Disclosure of Invention The application provides a data analysis method, a device, equipment and a storage medium, which are capable of remarkably reducing the complexity of system maintenance without performing the system maintenance when the number of sub-equipment is increased. In a first aspect, the present application provides a data parsing method, including: receiving Modbus data of a plurality of sub-devices, wherein the Modbus data comprises a starting address and register data of the sub-devices; Determining a target analysis strategy corresponding to the sub-equipment according to preset configuration parameters in each analysis strategy, the starting address of the sub-equipment and the equipment type of the sub-equipment aiming at any sub-equipment, wherein the corresponding analysis strategy exists in any equipment type; and analyzing the register data of the sub-equipment according to the target analysis strategy to obtain an analysis result. Optionally, determining the target resolution policy corresponding to the sub-device according to the preset configuration parameter in each resolution policy, the start address of the sub-device and the device type of the sub-device includes: aiming at any analysis strategy, determining whether the analysis strategy is matched with the sub-equipment according to corresponding preset configuration parameters and the initial address of the sub-equipment; and when the device types of the sub devices are matched with the target device types designated in the analysis strategy, determining the analysis strategy as the target analysis strategy. Optionally, the preset configuration parameters comprise a resolving start address and a register length of the sub-device, and determining whether the resolving strategy is matched with the sub-device according to the corresponding preset configuration parameters and the start address of the sub-device comprises: Determining a matching value according to the resolved starting address, the register length of the sub-equipment and the starting address of the sub-equipment; when the matching value is a preset value, determining that the analysis strategy is matched with the sub-equipment; the resolving start address is the start address of the first sub-device in the device type corresponding to the resolving strategy. Optionally, determining the matching value according to the resolved start address, the register length of the sub-device and the start address of the sub-device includes: calculating a difference value between a starting address of the sub-equipment and the resolved starting address; performing remainder operation according to the difference value and the register length of the sub-equipment to obtain a matching value; Correspondingly, when the matching value is a preset value, determining that the analysis strategy is matched with the sub-equipment comprises the following steps: When the matching value is 0, then the resolution policy is determined to match the child device. Optionally, resolving the register data of the child device according to the target resolving policy to obtain a resolving result, including: Mapping the starting address of the sub-equipment into a resolved starting address; according to the analysis starting address and the register length of the sub-equipment, obtaining each register address of the mapped sub-equipment; And determining the corresponding relation between the register address and the register data of the mapped sub-equipment, and obtaining an analysis result of the sub-equipment according to a target analysis strategy and the corresponding relation, wherein the analysis strategy stores analysis information of each register address in the f