Photovoltaic inverter identification method and device, computer equipment and storage medium

By creating a script execution environment and importing protocol script files in the photovoltaic inverter monitoring system, adaptive adaptation to photovoltaic inverter protocols of different manufacturers is solved, communication compatibility issues are improved, data acquisition and regulation efficiency is improved, and protocol shortens The development cycle has been completed.

CN119298401AActive Publication Date: 2025-01-10ZHEJIANG CHINT INSTR & METER
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411825569.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-12
Publication Date
2025-01-10
Estimated Expiration
2044-12-12

AI Technical Summary

Technical Problem

Due to the different protocols of different manufacturers, the existing photovoltaic inverter monitoring system has caused communication compatibility issues, which cannot effectively collect and regulate photovoltaic inverters. The protocol adaptation requires frequent modification of the program, which increases the development cycle and upgrade. Difficulty.

Method used

By creating a script execution environment, importing protocol script files for multiple photovoltaic inverters, using script files to achieve adaptive adaptation to photovoltaic inverters protocols of different manufacturers, reducing the difficulty of acquisition, and realizing data acquisition and Regulate and solve communication compatibility issues.

Benefits of technology

It improves the efficiency of photovoltaic inverter data acquisition and regulation, shortens the project development cycle, reduces the upgrade problems caused by protocol mismatch, and realizes flexible adaptation of photovoltaic inverter protocols from different manufacturers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119298401A_ABST
    Figure CN119298401A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of power acquisition terminals, and discloses a photovoltaic inverter identification method and device, computer equipment and a storage medium, and the method comprises the steps: creating a script execution environment, and importing a plurality of script protocol files corresponding to photovoltaic inverter protocols of a plurality of photovoltaic inverters through the script execution environment; when a photovoltaic inverter acquisition task thread is started, enabling the concentrator to communicate with any specified photovoltaic inverter based on each script protocol file, and judging whether the communication succeeds or not; and after the communication succeeds, collecting the data of the photovoltaic inverter which succeeds in communication, and regulating and controlling the photovoltaic inverter. According to the method, the photovoltaic inverter protocol library is built in and is issued to the concentrator in a script file manner, so that the photovoltaic inverter protocol of each manufacturer is adaptively adapted, and the data acquisition and regulation and control of the photovoltaic inverter are realized through the correctly identified photovoltaic inverter manufacturer protocol.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power collection terminals, and in particular to a photovoltaic inverter identification method, device, computer equipment and storage medium. Background Art

[0002] With the rapid development and widespread application of renewable energy, especially photovoltaic power generation technology, distributed photovoltaic systems play an increasingly important role in the energy field. However, since photovoltaic inverter power generation depends on external environmental factors such as solar radiation, its output power has certain volatility and uncertainty, which brings challenges to the safe and stable operation of the power grid. In order to improve the reliability and economy of distributed photovoltaics, the research on distributed photovoltaic control aims to flexibly control the operation of photovoltaic systems in real-time scheduling, achieve the optimal utilization of photovoltaic power generation, and improve the efficiency and stability of distributed photovoltaic systems. It is of great significance.

[0003] At present, there are some photovoltaic monitoring systems, but these systems have some defects and shortcomings, mainly in the following aspects: ① As photovoltaic inverters are an industry that has developed in recent years, photovoltaic inverters from different manufacturers use different standards and communication protocols. Therefore, there are compatibility issues in the communication between photovoltaic inverters and concentrators, resulting in the inability to collect and analyze photovoltaic inverters and the inability to control photovoltaic inverters.

[0004] ② Due to the large number of photovoltaic inverters on site, the concentrator cannot adapt to many manufacturer protocols when it leaves the factory. It is often necessary to remotely upgrade the entire concentrator engineering program to add adaptation to more manufacturer protocols.

[0005] At present, the acquisition terminal generally uses the Modbus RTU protocol (the Modbus RTU protocol is an open serial communication protocol) to communicate with the photovoltaic inverter. The acquisition terminal acts as the host and the photovoltaic inverter acts as the slave. The host request frame structure is: slave address, function code, register start address, number of registers, CRC (Cyclic Redundancy Check, CRC) check code. The register start address and number of registers are customized by the photovoltaic inverter manufacturer, and there are large differences between manufacturers. Therefore, adapting to the photovoltaic inverter protocols of different manufacturers is the focus and difficulty of photovoltaic inverter acquisition.

[0006] At present, the conventional practice for data acquisition terminals to adapt to photovoltaic inverter protocols is to hard-code the register starting addresses and register numbers in photovoltaic inverter protocols of different manufacturers into the program. If the photovoltaic inverter protocol changes or needs to be adapted to other photovoltaic inverter protocols, the program needs to be modified. This practice prolongs the project development cycle, increases the number of program version changes, and is not conducive to subsequent upgrades. Summary of the invention

[0007] In view of this, the present invention provides a photovoltaic inverter identification method, device, computer equipment and storage medium to solve the problem of photovoltaic inverter collection and regulation caused by communication difficulties between photovoltaic inverters of different manufacturers and concentrators.

[0008] In a first aspect, the present invention provides a photovoltaic inverter identification method, which is applied to a concentrator; the method comprises: Creating a script execution environment, and importing multiple script protocol files corresponding to photovoltaic inverter protocols of multiple photovoltaic inverters through the script execution environment; When starting the PV inverter acquisition task thread, the concentrator communicates with any specified PV inverter based on each script protocol file, and determines whether the communication is successful; When the communication is successful, the data of the photovoltaic inverter that has successfully communicated is collected, and the photovoltaic inverter is regulated.

[0009] The photovoltaic inverter identification method provided by the present invention realizes adaptive adaptation of photovoltaic inverter protocols of various manufacturers by using a built-in photovoltaic inverter protocol library and sending it to a concentrator in the form of a script file, thereby reducing the difficulty of collecting photovoltaic inverter data, and realizing data collection and regulation of photovoltaic inverters by correctly identifying the photovoltaic inverter manufacturer's protocol, effectively improving the development efficiency of photovoltaic inverters, shortening the project development cycle, overcoming the difficult problem of spending a lot of time to upgrade the program due to the incompatibility of the inverter protocol, and solving the problem of collecting and regulating photovoltaic inverters caused by the difficulty in communication between photovoltaic inverters of different manufacturers and the concentrator.

[0010] In an optional implementation, the concentrator includes a FLASH storage space; and importing multiple script protocol files corresponding to the photovoltaic inverter protocols of the multiple photovoltaic inverters through the script execution environment includes: A plurality of script protocol files corresponding to the photovoltaic inverter protocols of the plurality of photovoltaic inverters are imported from the script protocol library in the form of a string file according to the script sequence number through the script execution environment, and the plurality of script protocol files are decompressed and verified and then stored in the FLASH storage space.

[0011] The photovoltaic inverter identification method provided by the present invention separates the photovoltaic inverter protocol from the program, and stores the script protocol file corresponding to the photovoltaic inverter protocol as a configuration file in the FLASH storage space, thereby providing conditions for adapting to photovoltaic inverter protocols of different manufacturers.

[0012] In an optional implementation, decompressing and verifying multiple script protocol files includes: Decompress multiple script protocol files and verify the header information of each script protocol file; the header information includes CRC checksum, photovoltaic inverter protocol file name, photovoltaic inverter version information, script file original length, script file compressed length and magic word; When the header information is consistent with the header information of the corresponding script protocol file recorded in the script protocol library, the corresponding script protocol file is determined to be legal, otherwise the corresponding script protocol file is discarded and multiple script protocol files in the script protocol library are received again.

[0013] The photovoltaic inverter identification method provided by the present invention decompresses multiple script protocol files and verifies the header information of each script protocol file to determine the legitimacy of the script protocol file, thereby ensuring the correctness and reliability of the script protocol file during the transmission process and providing conditions for adapting to photovoltaic inverter protocols of different manufacturers.

[0014] In an optional implementation, the concentrator further includes a function interface, and the function interface includes an inverter identification function interface; Based on each script protocol file, the concentrator communicates with any specified PV inverter and determines whether the communication is successful, including: Get the PV inverter protocol of the specified PV inverter, read the first script protocol file from the FLASH storage space based on the PV inverter protocol and according to the script sequence number, and call the inverter identification function of the first script protocol file through the inverter identification function interface for registration and loading. If the inverter identification function is sent to the specified PV inverter and there is return data, it is determined that the concentrator communicates successfully with any specified PV inverter; otherwise, it is determined that the communication has failed.

[0015] The photovoltaic inverter identification method provided by the present invention obtains the photovoltaic inverter protocol and adapts it through a script protocol file, and sends it to the photovoltaic inverter to determine whether the communication is successful based on whether there is return data, thereby solving the problem of spending a lot of time to upgrade the program due to the incompatibility of the photovoltaic inverter protocol.

[0016] In an optional implementation, enabling the concentrator to communicate with any specified photovoltaic inverter based on each script protocol file, and determining whether the communication is successful further includes: If the communication fails, the script sequence number is incremented to continue reading the next script protocol file from the FLASH storage space, and the inverter identification function of the corresponding script protocol file is called again through the inverter identification function interface to register and load until the communication is successful.

[0017] The photovoltaic inverter identification method provided by the present invention reads the next script protocol file from the FLASH storage space in sequence according to the script sequence number, and again calls the inverter identification function of the corresponding script protocol file through the inverter identification function interface to register and load it until the communication is successful, thereby achieving the purpose of adapting different photovoltaic inverter protocols through multiple script protocol files, so that there is no compatibility problem in the communication between the concentrator and the photovoltaic inverter.

[0018] In an optional implementation, the concentrator further includes an EEPROM storage space, and the EEPROM storage space stores a plurality of script protocol files of the concentrator when it leaves the factory in the order of script sequence numbers. Based on each script protocol file, the concentrator communicates with any specified photovoltaic inverter, and judging whether the communication is successful also includes: If the communication fails and the script number is incremented again and exceeds the maximum script number of the FLASH storage space, the first script protocol file is read from the EEPROM storage space, and the inverter identification function of the corresponding script protocol file is called through the inverter identification function interface for registration and loading until the communication is successful. If the communication fails and the script number is incremented again and exceeds the maximum script number of the EEPROM storage space, a new script protocol file of the photovoltaic inverter protocol corresponding to the photovoltaic inverter where the communication failed is added to the FLASH storage space through the script execution environment, and the inverter identification function of the new script protocol file is called through the inverter identification function interface for registration and loading, so that the concentrator and photovoltaic inverter communicate successfully.

[0019] The photovoltaic inverter identification method provided by the present invention adds a new script protocol file of the photovoltaic inverter protocol corresponding to the photovoltaic inverter with communication failure in the FLASH storage space, and calls the inverter identification function of the new script protocol file through the inverter identification function interface to register and load it, so that the concentrator and the photovoltaic inverter can communicate successfully. According to the photovoltaic inverter protocol, the corresponding script protocol file is written and sent to the concentrator to adapt to the photovoltaic inverter protocols of different manufacturers, and the script protocol file is updated in real time to better adapt to the photovoltaic inverters of different manufacturers.

[0020] In an optional implementation, the function interface also includes an interface for reading basic information of a photovoltaic inverter, an interface for reading real-time data of a photovoltaic inverter, an interface for reading electric energy of a photovoltaic inverter, an interface for reading status of a photovoltaic inverter, an interface for reading events of a photovoltaic inverter, an interface for regulating active power of an inverter, and an interface for executing an inverter command; When the communication is successful, the concentrator is used to collect the data of the photovoltaic inverter that has successfully communicated, and the photovoltaic inverter is regulated, including: When the communication is successful, the photovoltaic inverter basic information reading function, photovoltaic inverter real-time data reading function, photovoltaic inverter electric energy reading function, photovoltaic inverter state reading function and photovoltaic inverter event reading function in the corresponding script protocol file are called in sequence through the photovoltaic inverter basic information reading interface, photovoltaic inverter real-time data reading interface, photovoltaic inverter electric energy reading interface, photovoltaic inverter state reading interface and photovoltaic inverter event reading interface according to the preset cycle to read the photovoltaic inverter basic information, read the photovoltaic inverter real-time data, read the photovoltaic inverter electric energy, read the photovoltaic inverter state and read the photovoltaic inverter event; When the photovoltaic inverter needs to be regulated, the inverter active power regulation function and the inverter execution command function in the corresponding script protocol file are called through the inverter active power regulation interface and the inverter execution command interface to regulate the inverter active power and / or the inverter execution command.

[0021] The photovoltaic inverter identification method provided by the present invention adopts a corresponding functional function interface to call a corresponding function, thereby realizing the collection of photovoltaic inverter data from different manufacturers and the regulation of the photovoltaic inverter.

[0022] In an optional implementation, the photovoltaic inverter identification method further includes: upgrading multiple script protocol files in the FLASH storage space by differential upgrading.

[0023] The photovoltaic inverter identification method provided by the present invention differentially upgrades multiple script protocol files in the FLASH storage space, greatly reduces the size of the transmission file, and avoids the risks brought by the concentrator upgrade.

[0024] In a second aspect, the present invention provides a photovoltaic inverter identification device, which is applied to a concentrator; the device comprises: A script protocol file import module, used to create a script execution environment, and import multiple script protocol files corresponding to photovoltaic inverter protocols of multiple photovoltaic inverters through the script execution environment; The communication module is used to start the photovoltaic inverter acquisition task thread, enable the concentrator to communicate with any specified photovoltaic inverter based on each script protocol file, and determine whether the communication is successful; The acquisition and control module is used to collect the data of the photovoltaic inverter with successful communication and control the photovoltaic inverter after the communication is successful.

[0025] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the photovoltaic inverter identification method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0026] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the photovoltaic inverter identification method of the first aspect or any corresponding embodiment thereof.

[0027] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions, wherein the computer instructions are used to enable a computer to execute the photovoltaic inverter identification method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0029] Figure 1 is a schematic flow chart of a photovoltaic inverter identification method according to an embodiment of the present invention; Figure 2 is a flow chart of another photovoltaic inverter identification method according to an embodiment of the present invention; Figure 3 is a schematic flow chart of another photovoltaic inverter identification method according to an embodiment of the present invention; Figure 4 is a flow chart of yet another photovoltaic inverter identification method according to an embodiment of the present invention; Figure 5 is a flow chart of another photovoltaic inverter identification method according to an embodiment of the present invention; Figure 6 is a schematic diagram of the internal protocol library space allocation of the concentrator according to an embodiment of the present invention; Figure 7 is another schematic diagram of the internal protocol library space allocation of a concentrator according to an embodiment of the present invention; Figure 8 is a structural block diagram of a photovoltaic inverter identification device according to an embodiment of the present invention; Fig. 9 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0030] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0031] According to an embodiment of the present invention, an embodiment of a photovoltaic inverter identification method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0032] In this embodiment, a photovoltaic inverter identification method is provided, which can be used for a concentrator. Figure 1 is a flow chart of a photovoltaic inverter identification method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps: Step S101: create a script execution environment, and import multiple script protocol files corresponding to photovoltaic inverter protocols of multiple photovoltaic inverters through the script execution environment.

[0033] Specifically, Figure 4 As shown, the script execution environment is a Lua (a lightweight scripting language written in standard C language) script environment, and multiple script protocol files are all Lua script protocol files corresponding to photovoltaic inverter protocols of different photovoltaic inverters.

[0034] For example, Figure 6 As shown, the concentrator can import multiple script protocol files of the Lua script protocol library into the internal EEPROM storage space and external FLASH storage space when it leaves the factory. In the protocol library storage space of the Lua execution environment, try to import the Lua script protocol file by script sequence number, and each Lua script protocol file is filled with 4K space.

[0035] like Figure 7 As shown, the concentrator contains a series of function interfaces, such as the inverter identification function interface and the inverter information reading function interface. Each Lua script protocol file also contains a function interface corresponding to the concentrator, that is, the function interface names of these function interfaces in different Lua script protocol files are consistent. The concentrator uses the corresponding function operation interface and string matching to replace the corresponding function inside the function interface, thereby achieving the purpose of replacing the photovoltaic inverter protocol.

[0036] Step S102, when starting the photovoltaic inverter acquisition task thread, based on each script protocol file, the concentrator communicates with any designated photovoltaic inverter and determines whether the communication is successful.

[0037] For example, Figure 4 As shown in the figure, when the PV inverter acquisition task thread is started, the Lua script file is first read from the FLASH storage space, and the function interface is registered, loaded, and replaced. The thread calls the inverter identification function through the function interface and executes the inverter identification function, trying to communicate with the PV inverter. If the inverter identification function is sent to the PV inverter and there is return data, the communication is considered successful.

[0038] More specific process such as Figure 5 As shown in the figure, if the inverter identification function is sent to the photovoltaic inverter without returning data and the timeout occurs, the communication is considered to have failed. The thread will read the next Lua script file from the FLASH storage space in ascending order according to the script sequence number, and register and load the inverter identification function again according to the same operation. If it fails and exceeds the maximum Lua script sequence number in the FLASH storage space, the Lua script protocol file in the EEPROM storage space is used to register, load and communicate according to the same process. After successful communication with the photovoltaic inverter, the protocol adaptation is considered to be successful.

[0039] Step S103, when the communication is successful, the data of the photovoltaic inverter with successful communication is collected, and the photovoltaic inverter is regulated.

[0040] Specifically, when the communication is successful, the concentrator collects the data of the photovoltaic inverter and monitors the photovoltaic inverter periodically. Figure 5 shown.

[0041] The photovoltaic inverter identification method provided in this embodiment uses a built-in photovoltaic inverter protocol library and sends it to the concentrator in the form of a script file to achieve adaptive adaptation of the photovoltaic inverter protocols of various manufacturers, thereby reducing the difficulty of collecting photovoltaic inverter data, and through correctly identifying the photovoltaic inverter manufacturer's protocol, realizes data collection and regulation of the photovoltaic inverter, effectively improves the development efficiency of the photovoltaic inverter, shortens the project development cycle, overcomes the problem of spending a lot of time to upgrade the program due to the incompatibility of the inverter protocol, and solves the problem of collecting and regulating the photovoltaic inverter due to the difficulty in communication between photovoltaic inverters from different manufacturers and the concentrator.

[0042] In this embodiment, a photovoltaic inverter identification method is provided, which can be used for a concentrator. Figure 2 is a flow chart of a photovoltaic inverter identification method according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps: Step S201: create a script execution environment, and import multiple script protocol files corresponding to photovoltaic inverter protocols of multiple photovoltaic inverters through the script execution environment.

[0043] Specifically, the above step S201 includes: Step a. Import multiple script protocol files corresponding to the photovoltaic inverter protocols of multiple photovoltaic inverters from the script protocol library in the form of a string file according to the script sequence number through the script execution environment, and decompress and verify the multiple script protocol files and store them in the FLASH storage space.

[0044] Multiple script protocol files are Lua script protocol files. When creating a Lua script protocol file, download the latest version of Lua source code from the Lua official website, decompress it and add it to the already created C language project. The Lua script protocol files corresponding to the photovoltaic inverter protocols of different manufacturers are sent to the concentrator through the 698 message (referring to a specific data transmission format in the DLT645-2007 protocol). The concentrator verifies and decompresses the Lua script protocol file, stores it in the FLASH storage space and / or EEPROM storage space, and updates the valid file bitmap. Read the valid file bitmap stored in the FLASH storage space and / or EEPROM storage space, and read and verify the Lua script protocol file stored in the FLASH storage space / or EEPROM storage space according to the valid file bitmap.

[0045] In some optional implementations, decompressing and verifying the multiple script protocol files in step a. includes: Step a1, decompress multiple script protocol files and verify the header information of each script protocol file; the header information includes CRC check code, photovoltaic inverter protocol file name, photovoltaic inverter version information, script file original length, script file compressed length and magic word.

[0046] Specifically, Figure 6 As shown, the Lua script protocol file with added header information is stored in the FLASH storage space and / or the EEPROM storage space.

[0047] Step a2: when the header information is consistent with the header information of the corresponding script protocol file recorded in the script protocol library, the corresponding script protocol file is determined to be legal; otherwise, the corresponding script protocol file is discarded and multiple script protocol files in the script protocol library are received again.

[0048] Specifically, after receiving the 698 message for sending the Lua script protocol file, the concentrator verifies the file header magic word and the file CRC check code in the file header information respectively, and then searches the FLASH storage space and the EEPROM storage space according to the file name to see whether a file with the same name has been sent from the script protocol library. If a file with the same name has been sent, compare whether the file contents are consistent (if the file contents are consistent, exit the process; if the file contents are inconsistent, write the new file content to the original storage location). If a file with the same name has not been sent, find a new space in the FLASH storage space or the EEPROM storage space for storage, and then update the valid file bitmap.

[0049] The photovoltaic inverter identification method provided in this embodiment decompresses multiple script protocol files and verifies the header information of each script protocol file to determine the legitimacy of the script protocol file, thereby ensuring the correctness and reliability of the script protocol file during the transmission process and providing conditions for adapting to photovoltaic inverter protocols of different manufacturers.

[0050] Step S202, when starting the photovoltaic inverter acquisition task thread, based on each script protocol file, the concentrator communicates with any designated photovoltaic inverter and determines whether the communication is successful.

[0051] Specifically, the concentrator further includes a function interface, and the function interface includes an inverter identification function interface; the above step S202 includes: Step S2021, obtain the photovoltaic inverter protocol of the specified photovoltaic inverter, read the first script protocol file from the FLASH storage space based on the photovoltaic inverter protocol and according to the script sequence number, and call the inverter identification function of the first script protocol file through the inverter identification function interface for registration and loading. If the inverter identification function is sent to the specified photovoltaic inverter and there is return data, it is determined that the concentrator communicates successfully with any specified photovoltaic inverter; otherwise, it is determined that the communication has failed.

[0052] Specifically, Figure 4 As shown in the figure, when the concentrator starts the PV inverter acquisition task thread, it will first read the Lua script file from the FLASH storage space, register, load and replace the function interface. The thread calls the inverter identification function through the function interface and executes the inverter identification function, trying to communicate with the PV inverter. If the inverter identification function is sent to the PV inverter and there is return data, the communication is considered successful. If the inverter identification function is sent to the PV inverter and there is no return data and the timeout occurs, the communication is considered to have failed.

[0053] For example, when creating a Lua script protocol file, it first defines that there are 10 working states in the inverter acquisition process, namely idle, pre-acquisition preparation, protocol identification, reading inverter basic information, reading inverter real-time data, reading inverter electric energy, reading inverter status, reading inverter events, adjusting inverter active power, and inverter execution commands.

[0054] Next, nine functions are defined in the Lua script to implement different functions, corresponding to the nine working states except idle, namely prepare (idle, preparation state before collection), identify (inverter protocol identification state), readInfo (read inverter basic information), readReal (read inverter real-time data state), readEnergy (read inverter electric energy state), readState (read inverter state), readEvent (read inverter event), adjPower (regulate inverter active power), cmd (regulate inverter execution command).

[0055] Define the valid file bitmap as a uint8 array (size is the maximum number of files / 8), and the 8 bits in each byte of the array can be used to indicate whether the 8 files are valid. Download the latest version of Lua source code from the Lua official website, unzip it and add it to the created C language project.

[0056] The Lua script protocol files corresponding to the inverter protocols of different manufacturers are sent to the acquisition terminal through the 698 message (referring to a specific data transmission format in the DLT645-2007 protocol). The acquisition terminal verifies and decompresses the Lua script, stores it in FLASH and EEPROM, and updates the valid file bitmap. Read the valid file bitmap stored in FLASH and EEPROM, and read and verify the Lua script protocol files stored in FLASH and EEPROM according to the valid file bitmap. Then use the function provided by the Lua source code to create a Lua virtual machine instance, and set the inverter acquisition state to the pre-acquisition preparation state. Call the prepare function in the Lua script protocol file through the function provided by the Lua source code (the input parameter is prepare), and set the slave address in the prepare function.

[0057] When the concentrator starts the photovoltaic inverter acquisition task thread, the inverter acquisition state is switched to the inverter protocol identification state, and the identify function in the Lua script protocol file is called through the function provided by the Lua source code (the input parameter is identify). The inverter model is read in the identify function, and the inverter protocol identification result is judged according to the return value of the identify function. If the identification fails, the next Lua script protocol file is read from the FLASH storage space, that is, step S2022 is executed.

[0058] Step S2022, if the communication fails, the script sequence number is incremented to continue reading the next script protocol file from the FLASH storage space, and the inverter identification function of the corresponding script protocol file is called again through the inverter identification function interface to register and load until the communication is successful.

[0059] Specifically, the thread will read the next Lua script file from the FLASH storage space in ascending order according to the script sequence number, and register and load the inverter identification function again according to the same operation until the communication is successful.

[0060] The photovoltaic inverter identification method provided in this embodiment reads the next script protocol file from the FLASH storage space in sequence according to the script sequence number, and again calls the inverter identification function of the corresponding script protocol file through the inverter identification function interface to register and load it until the communication is successful, thereby achieving the purpose of adapting different photovoltaic inverter protocols through multiple script protocol files, so that there is no compatibility problem in the communication between the concentrator and the photovoltaic inverter.

[0061] Step S2023, the concentrator also includes an EEPROM storage space, and the EEPROM storage space stores multiple script protocol files when the concentrator leaves the factory in the order of script serial numbers. If the communication fails and the script serial number is incremented again to exceed the maximum script serial number of the FLASH storage space, the first script protocol file is read from the EEPROM storage space, and the inverter identification function of the corresponding script protocol file is called through the inverter identification function interface to register and load until the communication is successful. If the communication fails and the script serial number is incremented again to exceed the maximum script serial number of the EEPROM storage space, a new script protocol file of the photovoltaic inverter protocol corresponding to the photovoltaic inverter where the communication fails is added to the FLASH storage space through the script execution environment, and the inverter identification function of the new script protocol file is called through the inverter identification function interface to register and load, so that the concentrator and the photovoltaic inverter communicate successfully.

[0062] Specifically, Figure 5As shown, if the communication fails and exceeds the maximum Lua script sequence number in the FLASH storage space, the Lua script protocol file in the EEPROM storage space is used to register, load and communicate according to the same process. After successful communication with the PV inverter, the protocol adaptation is considered successful.

[0063] The photovoltaic inverter identification method provided in this embodiment adds a new script protocol file of the photovoltaic inverter protocol corresponding to the photovoltaic inverter with failed communication in the FLASH storage space, and calls the inverter identification function of the new script protocol file through the inverter identification function interface to register and load it, so that the concentrator and the photovoltaic inverter can communicate successfully. According to the photovoltaic inverter protocol, the corresponding script protocol file is written and sent to the concentrator to adapt to the photovoltaic inverter protocols of different manufacturers. The script protocol file is updated in real time to better adapt to photovoltaic inverters of different manufacturers.

[0064] Step S203: When the communication is successful, collect the data of the photovoltaic inverter that has successfully communicated, and adjust the photovoltaic inverter. Figure 1 Step S103 of the illustrated embodiment will not be described in detail here.

[0065] The photovoltaic inverter identification method provided in this embodiment separates the photovoltaic inverter protocol from the program, and stores the script protocol file corresponding to the photovoltaic inverter protocol as a configuration file in the FLASH storage space and the EEPROM storage space, providing conditions for adapting the photovoltaic inverter protocols of different manufacturers. The photovoltaic inverter protocol is obtained and adapted through the script protocol file, and the return data sent to the photovoltaic inverter determines whether the communication is successful, which solves the problem of taking a lot of time to upgrade the program due to the incompatibility of the photovoltaic inverter protocol.

[0066] In this embodiment, a photovoltaic inverter identification method is provided, which can be used for a concentrator. Figure 3 is a flow chart of a photovoltaic inverter identification method according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps: Step S301: Create a script execution environment, and import multiple script protocol files corresponding to multiple photovoltaic inverters through the script execution environment. Figure 2 Step S201 of the illustrated embodiment will not be described in detail here.

[0067] Step S302: When the PV inverter acquisition task thread is started, the concentrator communicates with any specified PV inverter based on each script protocol file, and determines whether the communication is successful. Figure 2 Step S202 of the illustrated embodiment will not be described in detail here.

[0068] Step S303, when the communication is successful, collect the data of the photovoltaic inverter with successful communication, and adjust the photovoltaic inverter.

[0069] Specifically, Figure 7 As shown, the function interface also includes an interface for reading basic information of a photovoltaic inverter, an interface for reading real-time data of a photovoltaic inverter, an interface for reading electric energy of a photovoltaic inverter, an interface for reading status of a photovoltaic inverter, an interface for reading events of a photovoltaic inverter, an interface for regulating active power of an inverter, and an interface for executing an inverter command; the above step S303 includes: Step S3031, when the communication is successful, the photovoltaic inverter basic information reading interface, photovoltaic inverter real-time data reading interface, photovoltaic inverter electric energy reading interface, photovoltaic inverter status interface and photovoltaic inverter event reading interface are sequentially called in the corresponding script protocol file according to the preset cycle to read the photovoltaic inverter basic information function, the photovoltaic inverter real-time data reading interface, the photovoltaic inverter electric energy reading interface, the photovoltaic inverter status interface and the photovoltaic inverter event reading interface to read the photovoltaic inverter basic information, read the photovoltaic inverter real-time data, read the photovoltaic inverter electric energy, read the photovoltaic inverter status and read the photovoltaic inverter event.

[0070] Specifically, after the PV inverter protocol is successfully identified, the PV inverter acquisition state is switched to reading the inverter basic information, reading the inverter real-time data, reading the inverter electric energy, reading the inverter state, and reading the inverter event in sequence. The readInfo function, readReal function, readEnergy function, readState function, and readEvent function in the Lua script are called through the functions provided by the Lua source code, and the returned data is stored in the FLASH storage space.

[0071] Step S3032, when the photovoltaic inverter needs to be regulated, the inverter active power regulation function and the inverter execution command function in the corresponding script protocol file are called through the inverter active power regulation interface and the inverter execution command interface to regulate the inverter active power and / or the inverter execution command.

[0072] Specifically, when it is necessary to adjust the inverter active power or the inverter execution command, the photovoltaic inverter acquisition state is switched to the inverter active power adjustment state, and the adjPower function and cmd function in the Lua script protocol file are called through the functions provided by the Lua source code (the input parameters are adjPower and cmd respectively) to achieve the adjustment of the inverter active power and the inverter execution command.

[0073] Step S304: upgrading multiple script protocol files in the FLASH storage space by differential upgrading.

[0074] Specifically, differential upgrade, also known as incremental upgrade or patch upgrade, is a technology for updating software versions on multiple computers. Its core principle is to generate a special file (differential file or incremental file) containing these differences by comparing the differences between the current version and the latest version. The user only needs to download this differential file and apply it to the current version to complete the upgrade. For subsequent on-site maintenance, the main methods used are Bluetooth transmission upgrade and master station remote transparent transmission upgrade. This embodiment uses the LUA script protocol file of the differential upgrade FLASH space.

[0075] The photovoltaic inverter identification method provided in this embodiment uses the corresponding function interface to call the corresponding function to realize the collection of photovoltaic inverter data from different manufacturers and the regulation of photovoltaic inverters. Differentially upgrading multiple script protocol files in the FLASH storage space greatly reduces the size of the transmission file and avoids the risks brought by the concentrator upgrade.

[0076] As one or more specific application embodiments of the embodiments of the present invention, the photovoltaic inverter identification method provided by the present invention is further described in detail, as follows: The specific creation process of the Lua script protocol file is as follows: A. Definition: There are 10 working states in the PV inverter acquisition process, namely, idle, pre-acquisition preparation, protocol identification, reading inverter basic information, reading inverter real-time data, reading inverter electric energy, reading inverter status, reading inverter events, regulating inverter active power, and inverter execution command.

[0077] B. Define 9 functions in the Lua script protocol file to implement different functions, corresponding to the 9 working states except idle, namely prepare function (preparation state before collection), identify function (inverter protocol identification state), readInfo function (read inverter basic information), readReal function (read inverter real-time data state), readEnergy function (read inverter electric energy state), readState (read inverter state), readEvent function (read inverter event), adjPower function (regulate inverter active power), cmd function (regulate inverter execution command).

[0078] C. Define the valid file bitmap as a uint8 array (size is the maximum number of files / 8). The 8 bits in each byte in the array can be used to indicate whether the 8 files are valid.

[0079] D. Download the latest version of Lua source code from the Lua official website, decompress it and add it to the created C language project.

[0080] E. The Lua script protocol files corresponding to the photovoltaic inverter protocols of different manufacturers are sent to the concentrator through the 698 message (referring to a specific data transmission format in the DLT645-2007 protocol). The concentrator verifies and decompresses the Lua script protocol files and stores them in the FLASH storage space and EEPROM storage space, and updates the valid file bitmap.

[0081] F. Read the valid file bitmap stored in the FLASH storage space and the EEPROM storage space, and read and verify the Lua script protocol file stored in the FLASH and EEPROM according to the valid file bitmap.

[0082] G. Use the function provided by the Lua source code to create a Lua virtual machine instance, and set the PV inverter acquisition state to the pre-acquisition preparation state. Call the prepare function in the Lua script protocol file through the function provided by the Lua source code (the input parameter is prepare), and set the slave address in the prepare function.

[0083] H. Switch the PV inverter acquisition state to the inverter protocol identification state, call the identify function in the Lua script protocol file through the function provided by the Lua source code (the input parameter is identify), read the PV inverter model in the identify function, and judge the PV inverter protocol identification result according to the return value of the identify function. If the identification fails, that is, the communication fails, return to step E to read the next Lua script protocol file.

[0084] I. After the PV inverter protocol is successfully identified, the PV inverter acquisition state is switched to reading inverter basic information, reading inverter real-time data, reading inverter electric energy, reading inverter status, and reading inverter events in sequence. The readInfo function, readReal function, readEnergy function, readState function, and readEvent function in the Lua script protocol file are called through the functions provided by the Lua source code, and the data returned by the PV inverter is stored in the FLASH storage space.

[0085] J. When it is necessary to adjust the active power of the photovoltaic inverter or the inverter execution command, the photovoltaic inverter acquisition state is switched to the inverter active power adjustment state, and the adjPower function and cmd function in the Lua script protocol file are called through the functions provided by the Lua source code (the input parameters are adjPower and cmd respectively) to achieve the adjustment of the inverter active power and the inverter execution command.

[0086] In step E, if the Lua script protocol file is too large (greater than 4K) to be sent as a single-frame message, the spaces and line breaks in the Lua script protocol file can be deleted and the file can be compressed using algorithms such as minilzo or lzma. Then, the file information (file header magic word, file name, version information, compressed length, original length, file CRC checksum (cyclic redundancy check)) is added to the beginning of the file. Finally, the file content is read in string format and composed into a 698 message.

[0087] In step E, after receiving the 698 message for sending the Lua script protocol file, the concentrator verifies the file header magic word and the file CRC check code in the file header information respectively, and then searches the FLASH and EEPROM for whether a file with the same name has been sent according to the file name. If a file with the same name has been sent, compare whether the file contents are consistent (if the file contents are consistent, exit the process; if the file contents are inconsistent, write the new file content to the original storage location). If a file with the same name has not been sent, find a new space in the FLASH storage space or the EEPROM storage space for storage, and then update the valid file bitmap.

[0088] In step F, the bit 0 of the first byte in the valid file bitmap represents the file with script number 1, the bit 0 of the second byte represents the file with script number 9, and so on, the offsets of all valid files stored in the FLASH storage space or EEPROM storage space can be found; for example, if the file with script number X in the EEPROM storage space is valid, the starting offset of the configuration file is M and the file block size is N (M<=N), then the offset of the file in the EEPROM is .

[0089] In step F, after reading the file content according to the valid file bitmap, the file header magic word and the file CRC check code in the file header information need to be checked respectively. In addition, if the compressed length is less than the original length, the file content except the file header information needs to be decompressed using the compression algorithm in step E.

[0090] This embodiment takes the photovoltaic inverter in the photovoltaic monitoring system platform as an example to communicate using the modbus protocol to further describe the photovoltaic inverter identification method provided by the present invention. The concentrator uses C language as the host language, and the specific process is as follows: ① When the concentrator starts the PV inverter collection task, it will initialize the PV inverter port structure, which contains the PV inverter information under the only port, because there are concentrators with multiple PV inverters.

[0091] ②Register the Lua interpreter by port to create a Lua execution thread, and import the standard library and custom base library into the Lua script protocol library loading function. The custom base library includes custom operations such as feeding the dog and register operations of the modbus protocol. These library functions are for the Lua script protocol file program to call these library functions to achieve communication with the photovoltaic inverter when the Lua script protocol file is called later.

[0092] ③ The Lua language is used in the Lua script protocol file to implement 6 functions, including: 1. Reading operation of basic information of photovoltaic inverter. 2. Reading operation of real-time data of photovoltaic inverter. 3. Reading operation of electric energy data. 4. Reading operation of state quantity of photovoltaic inverter. 5. Reading operation of event data of photovoltaic inverter. 6. Execution operation of control command of photovoltaic inverter.

[0093] ④After the Lua script protocol file is registered, the main program macro defines the string function name, searches for the corresponding function operation in the Lua script protocol file by string index, executes and calls the library function, and finally returns the data to the main program. The main program reorganizes through the protocol and stores or reports to the main station in the form of 698 protocol. The main program obtains functions 1 to 5 in step ③ in a cycle.

[0094] ⑤ When the master station needs to directly control the photovoltaic inverter, the main program can directly control the photovoltaic inverter by calling the interface of function 6.

[0095] ⑥ When on-site, if the concentrator is connected to a PV inverter protocol that has not been entered into the protocol library first, the Lua script protocol file forwarded by Bluetooth or the master station can be used to replace the Lua script protocol file in the FLASH protocol library to adapt the protocol to the inverter.

[0096] The photovoltaic inverter identification method provided in this embodiment, by building a photovoltaic inverter protocol library into the concentrator, uses Lua scripts to achieve adaptive adaptation of photovoltaic inverter protocols of various manufacturers, thereby reducing the difficulty of collecting photovoltaic inverter data, and through correctly identifying the photovoltaic inverter manufacturer protocol, realizes data collection and regulation of the photovoltaic inverter.

[0097] In this embodiment, a photovoltaic inverter identification device is also provided, which is used to implement the above embodiments and preferred implementations, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0098] This embodiment provides a photovoltaic inverter identification device, which is applied to a concentrator; Figure 8As shown, including: The script protocol file importing module 801 is used to create a script execution environment, and import multiple script protocol files corresponding to the photovoltaic inverter protocols of multiple photovoltaic inverters through the script execution environment.

[0099] The communication module 802 is used to start the photovoltaic inverter acquisition task thread, enable the concentrator to communicate with any specified photovoltaic inverter based on each script protocol file, and determine whether the communication is successful.

[0100] The collection and control module 803 is used to collect the data of the photovoltaic inverter with successful communication and control the photovoltaic inverter after the communication is successful.

[0101] In some optional implementations, the concentrator includes a FLASH storage space; the script protocol file import module 801 includes: The import storage unit is used to import multiple script protocol files corresponding to the photovoltaic inverter protocols of multiple photovoltaic inverters from the script protocol library according to the script sequence number in the form of a string file through the script execution environment, and decompress and verify the multiple script protocol files and then store them in the FLASH storage space.

[0102] In some optional implementations, importing the storage unit includes: The decompression verification subunit is used to decompress multiple script protocol files and verify the header information of each script protocol file; the header information includes CRC check code, photovoltaic inverter protocol file name, photovoltaic inverter version information, script file original length, script file compressed length and magic word.

[0103] The legality judgment subunit is used to determine that the corresponding script protocol file is legal when the header information is consistent with the header information of the corresponding script protocol file recorded in the script protocol library; otherwise, the corresponding script protocol file is discarded and multiple script protocol files in the script protocol library are received again.

[0104] In some optional implementations, the concentrator further includes a function interface, the function interface includes an inverter identification function interface; the concentrator further includes an EEPROM storage space, the EEPROM storage space stores multiple script protocol files of the concentrator when it leaves the factory in the order of script sequence numbers, and the communication module 802 includes: The first communication unit is used to obtain the photovoltaic inverter protocol of the specified photovoltaic inverter, read the first script protocol file from the FLASH storage space based on the photovoltaic inverter protocol and according to the script sequence number, and call the inverter identification function of the first script protocol file through the inverter identification function interface for registration and loading. If the inverter identification function is sent to the specified photovoltaic inverter and there is return data, it is determined that the concentrator communicates successfully with any specified photovoltaic inverter; otherwise, it is determined that the communication has failed.

[0105] The second communication unit is used to increment the script number and continue to read the next script protocol file from the FLASH storage space if the communication fails, and again call the inverter identification function of the corresponding script protocol file through the inverter identification function interface to register and load it until the communication is successful.

[0106] The third communication unit is used for reading the first script protocol file from the EEPROM storage space if the communication fails and the script number is increased again and exceeds the maximum script number of the FLASH storage space, calling the inverter identification function of the corresponding script protocol file through the inverter identification function interface for registration and loading until the communication is successful; if the communication fails and the script number is increased again and exceeds the maximum script number of the EEPROM storage space, a new script protocol file of the photovoltaic inverter protocol corresponding to the photovoltaic inverter where the communication fails is added to the FLASH storage space through the script execution environment, and calling the inverter identification function of the new script protocol file through the inverter identification function interface for registration and loading, so that the concentrator and the photovoltaic inverter communicate successfully.

[0107] In some optional implementations, the function interface also includes an interface for reading basic information of a photovoltaic inverter, an interface for reading real-time data of a photovoltaic inverter, an interface for reading electric energy of a photovoltaic inverter, an interface for reading status of a photovoltaic inverter, an interface for reading events of a photovoltaic inverter, an interface for regulating active power of an inverter, and an interface for executing an inverter command; the acquisition and regulation module 803 includes: The acquisition unit is used to call the corresponding script protocol file to read the basic information function of the photovoltaic inverter, read the real-time data function of the photovoltaic inverter, read the electric energy function of the photovoltaic inverter, read the state function of the photovoltaic inverter and read the event function of the photovoltaic inverter in sequence according to the preset cycle after the communication is successful, so as to read the basic information of the photovoltaic inverter, read the real-time data of the photovoltaic inverter, read the electric energy of the photovoltaic inverter, read the state of the photovoltaic inverter and read the event of the photovoltaic inverter.

[0108] The control unit is used to control the inverter active power and / or the inverter execution command by calling the inverter active power control function and the inverter execution command function in the corresponding script protocol file through the inverter active power control interface and the inverter execution command interface when the photovoltaic inverter needs to be controlled.

[0109] In some optional implementations, the photovoltaic inverter identification device further includes: The differential upgrade module is used to upgrade multiple script protocol files in the FLASH storage space by differential upgrade.

[0110] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0111] The photovoltaic inverter identification device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0112] The embodiment of the present invention also provides a computer device having the above Figure 8 The PV inverter identification device shown.

[0113] See also Fig. 9 , Fig. 9 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Fig. 9 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Fig. 9 A processor 10 is taken as an example.

[0114] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0115] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0116] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0117] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0118] The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Fig. 9 The example of connecting through bus is taken in the following.

[0119] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device may be a touch screen.

[0120] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0121] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0122] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A photovoltaic inverter identification method, characterized in that: Applied to a concentrator; the method comprises: Creating a script execution environment, and importing multiple script protocol files corresponding to photovoltaic inverter protocols of multiple photovoltaic inverters through the script execution environment; When starting the PV inverter acquisition task thread, the concentrator communicates with any specified PV inverter based on each script protocol file, and determines whether the communication is successful; When the communication is successful, the data of the photovoltaic inverter that has successfully communicated is collected, and the photovoltaic inverter is regulated.

2. The method according to claim 1, characterized in that The concentrator includes a FLASH storage space; The step of importing multiple script protocol files corresponding to the photovoltaic inverter protocols of multiple photovoltaic inverters through the script execution environment includes: A plurality of script protocol files corresponding to the photovoltaic inverter protocols of a plurality of photovoltaic inverters are imported from a script protocol library in the form of a string file according to the script sequence number through a script execution environment, and the plurality of script protocol files are decompressed and verified and then stored in a FLASH storage space.

3. The method according to claim 2, characterized in that Decompressing and verifying the multiple script protocol files includes: Decompress the multiple script protocol files, and verify the header information of each script protocol file; the header information includes a CRC check code, a photovoltaic inverter protocol file name, a photovoltaic inverter version information, an original length of the script file, a compressed length of the script file, and a magic word; When the header information is consistent with the header information of the corresponding script protocol file recorded in the script protocol library, the corresponding script protocol file is determined to be legal, otherwise the corresponding script protocol file is discarded and multiple script protocol files in the script protocol library are received again.

4. The method according to claim 3, characterized in that The concentrator further comprises a function interface, wherein the function interface comprises an inverter identification function interface; Based on each script protocol file, the concentrator communicates with any specified PV inverter and determines whether the communication is successful, including: Obtain the photovoltaic inverter protocol of the specified photovoltaic inverter, read the first script protocol file from the FLASH storage space based on the photovoltaic inverter protocol and according to the script sequence number, and call the inverter identification function of the first script protocol file through the inverter identification function interface to register and load it. If the inverter identification function is sent to the specified photovoltaic inverter and there is return data, it is determined that the concentrator communicates successfully with any specified photovoltaic inverter; otherwise, it is determined that the communication has failed.

5. The method according to claim 4, characterized in that Based on each script protocol file, the concentrator communicates with any specified photovoltaic inverter, and judging whether the communication is successful also includes: If the communication fails, the script sequence number is incremented to continue reading the next script protocol file from the FLASH storage space, and the inverter identification function of the corresponding script protocol file is called again through the inverter identification function interface to register and load until the communication is successful.

6. The method according to claim 5, characterized in that The concentrator further includes an EEPROM storage space, wherein the EEPROM storage space stores a plurality of script protocol files of the concentrator when it leaves the factory in the order of script serial numbers, and the concentrator communicates with any specified photovoltaic inverter based on each script protocol file, and determines whether the communication is successful, and further includes: If the communication fails and the script number is incremented again and exceeds the maximum script number of the FLASH storage space, the first script protocol file is read from the EEPROM storage space, and the inverter identification function of the corresponding script protocol file is called through the inverter identification function interface for registration and loading until the communication is successful. If the communication fails and the script number is incremented again and exceeds the maximum script number of the EEPROM storage space, a new script protocol file of the photovoltaic inverter protocol corresponding to the photovoltaic inverter where the communication failed is added to the FLASH storage space through the script execution environment, and the inverter identification function of the new script protocol file is called through the inverter identification function interface for registration and loading, so that the concentrator and photovoltaic inverter communicate successfully.

7. The method according to claim 4, characterized in that The function interface also includes an interface for reading basic information of photovoltaic inverters, an interface for reading real-time data of photovoltaic inverters, an interface for reading electric energy of photovoltaic inverters, an interface for reading status of photovoltaic inverters, an interface for reading events of photovoltaic inverters, an interface for regulating active power of inverters, and an interface for executing commands of inverters; When the communication is successful, collecting the data of the photovoltaic inverter that has successfully communicated and regulating the photovoltaic inverter include: When the communication is successful, the photovoltaic inverter basic information reading function, photovoltaic inverter real-time data reading function, photovoltaic inverter electric energy reading function, photovoltaic inverter state reading function and photovoltaic inverter event reading function in the corresponding script protocol file are called in sequence through the photovoltaic inverter basic information reading interface, photovoltaic inverter real-time data reading interface, photovoltaic inverter electric energy reading interface, photovoltaic inverter state reading interface and photovoltaic inverter event reading interface according to the preset cycle to read the photovoltaic inverter basic information, read the photovoltaic inverter real-time data, read the photovoltaic inverter electric energy, read the photovoltaic inverter state and read the photovoltaic inverter event; When the photovoltaic inverter needs to be regulated, the inverter active power regulation function and the inverter execution command function are called through the inverter active power regulation interface and the inverter execution command interface to regulate the inverter active power and / or the inverter execution command.

8. The method according to claim 2, characterized in that: The method further comprises: upgrading the multiple script protocol files in the FLASH storage space by a differential upgrade method.

9. A photovoltaic inverter identification device, characterized in that: Application concentrator; the device comprises: A script protocol file import module, used to create a script execution environment, and import multiple script protocol files corresponding to photovoltaic inverter protocols of multiple photovoltaic inverters through the script execution environment; The communication module is used to start the photovoltaic inverter acquisition task thread, enable the concentrator to communicate with any specified photovoltaic inverter based on each script protocol file, and determine whether the communication is successful; The acquisition and control module is used to collect the data of the photovoltaic inverter with successful communication and control the photovoltaic inverter after the communication is successful.

10. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the photovoltaic inverter identification method according to any one of claims 1 to 8 by executing the computer instructions.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the photovoltaic inverter identification method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Data acquisition method based on photovoltaic collector

    CN111667676A

  • Low-voltage grid-connected distributed photovoltaic observation control method and device

    CN113972746A

  • Configuration method and device of inverter equipment adaptation protocol

    CN114979112A

  • Photovoltaic inverter high-frequency data acquisition system based on HPLC (High Performance Liquid Chromatography) communication

    CN115802207A

  • Inverter interaction method and device, storage medium and electronic equipment

    CN118249509A