Inverter data acquisition method and system and computer readable storage medium
By using RSIC-V soft core to replace ARM chip in the photovoltaic inverter data acquisition system, inverter data acquisition and transmission is realized, solving the problems of high system cost and large labor demand, reducing time and labor demand, and improving The reliability of the system.
Patent Information
- Application Number
- CN202411292179.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2024-12-17
AI Technical Summary
The existing photovoltaic inverter data acquisition system is costly and has a high labor demand, especially after the source code of the ARM chip needs to be changed, resulting in waste of time and manpower.
The RSIC-V soft core is used to replace the ARM chip. The target executable program generated by cross-compilation runs on the RSIC-V soft core to realize inverter data acquisition, conversion and transmission, avoiding modification of the ARM chip source code and additional ARM chip demand.
It greatly reduces the cost, time and labor requirements of the inverter data acquisition system, and improves the acquisition efficiency and system reliability.
Smart Images

Figure CN119149047A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data acquisition, and in particular to an inverter data acquisition method, system and computer-readable storage medium. Background Art
[0002] The existing photovoltaic inverter field data acquisition control is generally composed of ARM (Advanced RISC Machine, reduced instruction set machine) chip, DSP (Digital Signal Processing, digital signal processing technology) chip and a data collector containing a Linux communication protocol conversion application. The structure is as follows Figure 1 As shown, the DSP chip is responsible for the inverter work, and the ARM chip is responsible for the communication work. However, in actual production, the cost of purchasing ARM chips is relatively high, so the cost of the photovoltaic inverter data acquisition system is increased; in addition, if only one MPU (MicroProcessor Unit) is configured on site at the photovoltaic inverter, the source code inside the ARM chip will be modified in the prior art (the process of modifying the source code is to remove the RTOS (Real Time Operating System) system in the ARM chip and modify the system interface function of the application) and cross-compiled, and the cross-compiled instruction set is run through the MPU to realize the function of the original ARM chip. Once the source code of the original ARM chip changes, the changed source code needs to be modified and cross-compiled accordingly. The process of modifying the source code greatly wastes time and manpower, so there is an urgent need for a low-cost, low-manpower inverter data acquisition device. Summary of the invention
[0003] The object of the present invention is to provide an inverter data acquisition method, system and computer-readable storage medium. The inverter data acquisition device used in this scheme includes not only a Linux communication protocol conversion application but also an RSIC-V soft core. Because the RSIC-V soft core runs a target executable program generated by cross-compiling the source program in the physical ARM chip, the RSIC-V soft core can replace the function of the ARM chip. Therefore, there is no need to use additional ARM chips in actual production. In addition, there is no need to modify the source code of the ARM chip, and corresponding modifications must be made after the source code of the ARM chip changes, thereby greatly reducing the cost, time and manpower requirements.
[0004] In order to solve the above technical problems, the present invention provides an inverter data acquisition method, which is applied to a data acquisition device pre-integrated with a Linux communication protocol conversion application and an RSIC-V soft core, wherein the RSIC-V soft core runs a target executable program, and the target executable program is an executable program that can be recognized by the RSIC-V soft core and is generated by cross-compiling a source program in a physical ARM chip; wherein the method comprises:
[0005] The inverter data transmitted in the DSP chip of the inverter is collected by the RSIC-V soft core using the target executable program at intervals of a preset period, the inverter data is converted into corresponding RSIC-V format data at intervals of the preset period, and the RSIC-V format data is stored in the cache area of the RSIC-V soft core, and after receiving the first data request instruction transmitted by the Linux communication protocol conversion application at intervals of the preset period, the RSIC-V format data is converted into modbus format data, and the modbus format data is transmitted to the Linux communication protocol conversion application;
[0006] Converting the modbus format data into Linux format data through the Linux communication protocol conversion application, and storing the Linux format data in a buffer area of the Linux communication protocol conversion application;
[0007] The second data request instruction transmitted by the external device is received through the Linux communication protocol conversion application. After receiving the second data request instruction, the Linux format data is converted into the target format data required by the external device, and the target format data is transmitted to the external device.
[0008] Optionally, the RSIC-V soft core uses the target executable program to collect inverter data transmitted in the DSP chip of the inverter at preset intervals, converts the inverter data into corresponding RSIC-V format data at intervals of the preset period, stores the RSIC-V format data in the cache area of the RSIC-V soft core, and converts the RSIC-V format data into modbus format data after receiving the first data request instruction transmitted by the Linux communication protocol conversion application at intervals of the preset period, and transmits the modbus format data to the Linux communication protocol conversion application, including:
[0009] The target executable program is loaded by the RSIC-V soft core using a preset RTOS path and instruction fetch processing, decoding processing, execution processing, write-back processing, and memory access processing are performed in sequence;
[0010] The processed RSIC-V soft core uses the target executable program to collect the inverter data at the preset period interval;
[0011] The processed RSIC-V soft core uses the target executable program to convert the inverter data into the RSIC-V format data at intervals of the preset period;
[0012] The RSIC-V format data is stored in a buffer area of the RSIC-V soft core by using the target executable program through the processed RSIC-V soft core;
[0013] The processed RSIC-V soft core uses the target executable program to convert the RSIC-V format data into the modbus format data after receiving the first data request instruction transmitted by the Linux communication protocol conversion application at the preset period interval, and transmits the modbus format data to the Linux communication protocol conversion application.
[0014] Optionally, the converting the RSIC-V format data into modbus format data after receiving the first data request instruction transmitted by the Linux communication protocol conversion application at intervals of the preset period includes:
[0015] The RSIC-V soft core utilizes the target executable program to extract the RSIC-V format data from the cache area of the RSIC-V soft core after receiving the first data request instruction transmitted by the Linux communication protocol conversion application at the preset period interval, and converts the extracted RSIC-V format data into the modbus format data.
[0016] Optionally, converting the Linux format data into target format data required by the external device after receiving the second data request instruction, and transmitting the target format data to the external device, comprises:
[0017] extracting the Linux format data from a buffer area of the Linux communication protocol conversion application program after receiving the second data request instruction by the Linux communication protocol conversion application program;
[0018] The Linux format data is converted into the target format data required by the external device through the Linux communication protocol conversion application, and the target format data is transmitted to the external device.
[0019] Optionally, after transmitting the target format data to the external device, the method further includes:
[0020] The Linux communication protocol conversion application sends a corresponding prompt signal to the host computer, so that the host computer sends a corresponding display prompt and / or sound prompt after receiving the prompt signal.
[0021] In order to solve the above technical problems, the present invention also provides an inverter data acquisition system, which is applied to a data acquisition device pre-integrated with a Linux communication protocol conversion application and an RSIC-V soft core, wherein the RSIC-V soft core runs a target executable program, and the target executable program is an executable program that can be recognized by the RSIC-V soft core and is generated by cross-compiling a source program in a physical ARM chip; wherein the system comprises:
[0022] A first data conversion module is used to collect inverter data transmitted in the DSP chip of the inverter at preset intervals by using the target executable program through the RSIC-V soft core, convert the inverter data into corresponding RSIC-V format data at intervals of the preset period, and store the RSIC-V format data in the cache area of the RSIC-V soft core, and convert the RSIC-V format data into modbus format data after receiving the first data request instruction transmitted by the Linux communication protocol conversion application at intervals of the preset period, and transmit the modbus format data to the Linux communication protocol conversion application;
[0023] A second data conversion module, used for converting the modbus format data into Linux format data through the Linux communication protocol conversion application, and storing the Linux format data in a buffer area of the Linux communication protocol conversion application;
[0024] The data transmission module is used to receive the second data request instruction transmitted by the external device through the Linux communication protocol conversion application, convert the Linux format data into the target format data required by the external device after receiving the second data request instruction, and transmit the target format data to the external device.
[0025] Optionally, the first data conversion module includes:
[0026] A processing unit, used to load the target executable program through the RSIC-V soft core using a preset RTOS path and perform instruction fetch processing, decoding processing, execution processing, write-back processing, and memory access processing in sequence;
[0027] An inverter data acquisition unit, configured to acquire the inverter data at the preset period intervals by using the target executable program through the processed RSIC-V soft core;
[0028] A first data conversion unit, configured to convert the inverter data into the RSIC-V format data at intervals of the preset period using the target executable program through the processed RSIC-V soft core;
[0029] A storage unit, used for storing the RSIC-V format data into a cache area of the RSIC-V soft core by using the target executable program through the processed RSIC-V soft core;
[0030] The second data conversion unit is used to convert the RSIC-V format data into the modbus format data after receiving the first data request instruction transmitted by the Linux communication protocol conversion application by using the target executable program through the processed RSIC-V soft core, and transmit the modbus format data to the Linux communication protocol conversion application.
[0031] Optionally, the data transmission module includes:
[0032] an extracting unit, configured to extract the Linux format data from a buffer area of the Linux communication protocol conversion application after receiving the second data request instruction through the Linux communication protocol conversion application;
[0033] The third data conversion unit is used to convert the Linux format data into the target format data required by the external device through the Linux communication protocol conversion application, and transmit the target format data to the external device.
[0034] In order to solve the above technical problems, the present invention further provides an electronic device, comprising:
[0035] Memory for storing computer programs;
[0036] A processor is used to implement the steps of the inverter data acquisition method as described above when executing the computer program.
[0037] In order to solve the above technical problem, the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the inverter data acquisition method as described above are implemented.
[0038] The purpose of the present invention is to provide an inverter data acquisition method, system and computer-readable storage medium, which relate to the field of data acquisition and are applied to a data acquisition device pre-integrated with a Linux communication protocol conversion application and an RSIC-V soft core, wherein the RSIC-V soft core runs a target executable program generated by cross-compiling a source program in a physical ARM chip; the present scheme only compiles the source program of the ARM chip into a target executable program by cross-compiling, and completes all the functions of the physical ARM chip by running the target executable program of the RSIC-V soft core, namely, acquiring inverter data transmitted by a DSP chip, converting the inverter data into RSIC-V format data, storing RSIC-V format data, converting RSIC-V format data into modbus format data and transmitting modbus format data, which greatly saves cost, time and manpower requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0040] Figure 1 An existing inverter data acquisition device provided by the present invention;
[0041] Figure 2 A process flow chart of an inverter data acquisition method provided by the present invention;
[0042] Figure 3 An improved inverter data acquisition device provided by the present invention;
[0043] Figure 4 A schematic diagram of an inverter data collection process provided by the present invention;
[0044] Figure 5 A schematic diagram of another inverter data collection process provided by the present invention;
[0045] Figure 6 A schematic diagram of the structure of an inverter data acquisition system provided by the present invention;
[0046] Figure 7 The present invention provides a schematic structural diagram of an electronic device. DETAILED DESCRIPTION
[0047] The core of the present invention is to provide an inverter data acquisition method, system and computer-readable storage medium. The inverter data acquisition device used in this scheme includes not only a Linux communication protocol conversion application but also an RSIC-V soft core. Because the RSIC-V soft core runs a target executable program generated by cross-compiling the source program in the physical ARM chip, the RSIC-V soft core can replace the function of the ARM chip. Therefore, there is no need to use additional ARM chips in actual production. In addition, there is no need to modify the source code of the ARM chip, and corresponding modifications must be made after the source code of the ARM chip changes, thereby greatly reducing the cost, time and manpower requirements.
[0048] 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0049] Please refer to Figure 2 , Figure 2 A process flow chart of an inverter data acquisition method provided by the present invention. The inverter data acquisition method is applied to a data acquisition device pre-integrated with a Linux communication protocol conversion application and an RSIC-V soft core, the RSIC-V soft core runs a target executable program, and the target executable program is an executable program that can be recognized by the RSIC-V soft core and is generated by cross-compiling the source program in the physical ARM chip; wherein the method includes:
[0050] S11: using the RSIC-V soft core to collect the inverter data transmitted in the DSP chip of the inverter at preset intervals using the target executable program, converting the inverter data into corresponding RSIC-V format data at preset intervals, storing the RSIC-V format data in the cache area of the RSIC-V soft core, and converting the RSIC-V format data into modbus format data after receiving the first data request instruction transmitted at preset intervals by the Linux communication protocol conversion application, and transmitting the modbus format data to the Linux communication protocol conversion application;
[0051] S12: converting the modbus format data into Linux format data through the Linux communication protocol conversion application, and storing the Linux format data into a buffer area of the Linux communication protocol conversion application;
[0052] S13: receiving a second data request instruction transmitted by an external device through a Linux communication protocol conversion application, converting the Linux format data into target format data required by the external device after receiving the second data request instruction, and transmitting the target format data to the external device.
[0053] In the present invention, taking into account the cost required to purchase an ARM chip, modify and cross-compile the source code inside the ARM chip, and run the cross-compiled instruction set through the MPU to realize the function of the original ARM chip, and the problem of excessive time and manpower required for subsequent maintenance, this solution runs the source program inside the physical ARM chip directly into the virtual processor inside the data collector, that is, a RSIC-V soft core is constructed in the original data collector, and the RSIC-V soft core runs a target executable program, and the target executable program is an executable program that can be recognized by the RSIC-V soft core after cross-compiling the source program in the physical ARM chip, so the RSIC-V soft core has the function of a physical ARM chip. Among them, the RSIC-V soft core uses the target executable program to collect the inverter data transmitted in the DSP chip of the inverter at preset intervals, converts it into corresponding RSIC-V format data, and stores the RSIC-V format data in the cache area of the RSIC-V soft core. When receiving the first data request instruction transmitted by the Linux communication protocol conversion application, the RSIC-V format data in the storage will be converted into modbus format data and transmitted to the Linux communication protocol conversion application. The Linux communication protocol conversion application will convert the received modbus format data into Linux format data and store it in its own cache area. When receiving the second data request instruction transmitted by the external device, the Linux format data will be converted into the target format data required by the external device, and the target format data will be transmitted to the external device. This solution uses the RSIC-V soft core to run the target executable program generated after cross-compiling the source program in the physical ARM chip to replace the function of the ARM chip. Therefore, there is no need to use additional ARM chips in actual production. In addition, there is no need to modify the source code of the ARM chip, and corresponding modifications are made after the source code of the ARM chip changes, thereby greatly reducing the cost, time and manpower requirements.
[0054] It should be noted that the Linux communication protocol conversion application and the RSIC-V soft core generally communicate through message queues. This application does not limit the communication method between the Linux communication protocol conversion application and the RSIC-V soft core. The specific communication method depends on actual needs.
[0055] It should also be noted that, in the prior art, a data collector and an ARM chip are provided in the inverter data acquisition device. Because the ARM chip usually runs an RTOS (Real Time Operating System) operating system, and the data collector runs a Linux operating system, the calling function process communications of the two systems are inconsistent. If the ARM chip is omitted in the existing manner, the functions in the omitted ARM chip need to be transplanted to the data collector. However, when this method is used in the later operation, once the ARM chip program changes, the acquisition program previously transplanted into the Linux operating system must also be modified synchronously. The synchronization process requires a lot of manpower costs. Therefore, a virtual processor is proposed to address this problem, that is, the original ARM chip program is directly run into the data collector, which saves the manpower costs of transplantation, debugging and later program updates. The structural diagram of the improved inverter data acquisition device is shown as follows. Figure 3 shown.
[0056] It should also be noted that RISC-V technology has been popular in recent years, and a complete ecosystem has been established, which makes it possible for ARM embedded systems to run RSIC-V soft cores. That is, using RISC-V technology, an additional RSIC-V soft core can be run in the data collector, and the RTOS firmware can be run on the RSIC-V soft core, so that the program of the original ARM chip can be directly run into the RSIC-V soft core without modification. The RSIC-V soft core then communicates with the DSP chip, and the original data collector program then communicates with the RSIC-V soft core. The data collector collects inverter data and can exchange data with mobile phone APP and servers (external devices). It can be seen that the solution provided in this application removes an ARM chip in the original inverter, and moves the original ARM chip program to the RSIC-V soft core of the data collector processor without any modification, eliminating the manpower overhead of transplantation and later program update adaptation, and ensuring high system reliability.
[0057] It should also be noted that in actual applications, the RSIC-V soft core is written in C language, and a target executable program runs inside it. The target executable program is an executable program that can be recognized by the RSIC-V soft core after cross-compiling the source program in the physical ARM chip. The RSIC-V soft core has two major functions: 1. It is used to execute RTOS firmware and uses the RSIC-V instruction set to implement processor functions such as instruction fetching, decoding, execution, memory access, and write back; 2. External communication, through the Linux message queue to achieve inter-process communication, and communicate with the DSP chip of the inverter through the serial port. The Linux operating system will start the Linux communication protocol conversion application and the RISC-V soft core. After the RISC-V soft core is started, the RTOS firmware will be loaded into the cache area of the RISC-V soft core according to the preset address. This firmware is generated by the running program of the original ARM chip through cross-compilation. After the boot program of the RISC-V soft core transfers the RTOS firmware into its own cache area, it can start to execute the program. The RISC-V soft core can collect data from the DSP chip of the inverter through the serial port, and exchange data with the Linux communication protocol conversion application through the Linux message queue. At the same stage, after the original data acquisition program is running, it communicates with the RISC-V soft core program through the Linux message queue, and transmits the collected inverter data to the cloud server or the on-site mobile phone APP (external device) through the network socket. The entire inverter data collection process is as follows Figure 4 and Figure 5 shown.
[0058] The present embodiment provides an inverter data acquisition method, which is applied to a data collector that has pre-integrated a Linux communication protocol conversion application and an RSIC-V soft core, and the RSIC-V soft core runs a target executable program generated by cross-compiling a source program in a physical ARM chip; this solution only compiles the source program of the ARM chip into a target executable program by cross-compiling, and all the functions of the physical ARM chip can be completed by running the target executable program of the RSIC-V soft core, that is, collecting inverter data transmitted by the DSP chip, converting the inverter data into RSIC-V format data, storing RSIC-V format data, converting RSIC-V format data into modbus format data, and transmitting modbus format data, which greatly saves cost, time and manpower requirements.
[0059] Based on the above embodiments:
[0060] As an optional embodiment, the inverter data transmitted in the DSP chip of the inverter is collected by the RSIC-V soft core using the target executable program at preset intervals, the inverter data is converted into corresponding RSIC-V format data at preset intervals, and the RSIC-V format data is stored in the buffer area of the RSIC-V soft core, and after receiving the first data request instruction transmitted by the Linux communication protocol conversion application at preset intervals, the RSIC-V format data is converted into modbus format data, and the modbus format data is transmitted to the Linux communication protocol conversion application, including:
[0061] The target executable program is loaded through the RSIC-V soft core using the preset RTOS path and instruction fetching, decoding, execution, write-back, and memory access are performed in sequence;
[0062] The processed RSIC-V soft core uses the target executable program to collect inverter data at preset intervals;
[0063] The processed RSIC-V soft core converts the inverter data into RSIC-V format data at preset intervals using the target executable program;
[0064] The processed RSIC-V soft core uses the target executable program to store RSIC-V format data into the buffer area of the RSIC-V soft core;
[0065] The processed RSIC-V soft core uses the target executable program to convert RSIC-V format data into modbus format data after receiving the first data request instruction transmitted by the Linux communication protocol conversion application at a preset periodic interval, and transmits the modbus format data to the Linux communication protocol conversion application.
[0066] In the present invention, because the target executable program is running in the RSIC-V soft core, the RSIC-V soft core can be regarded as a processor. The RSIC-V soft core will go to the program storage area Nand flash to read the firmware to its own cache and execute it. This process is similar to the computer startup boot program first copying the operating system from the disk to the DDR (Double Data Rate), and then the CPU (Central Processing Unit) starts to execute the program in the DDR. Moreover, the processor is a logic and operation unit, which will perform instruction fetching, decoding, execution, write back, and memory access operations. Instruction fetching is to fetch instructions, decoding is to convert instructions into logic and operations, and then memory access is to read and write data back to the cache. Therefore, before running the program, the RSIC-V soft core needs to use the preset RTOS path to load the target executable program and perform instruction fetching, decoding, execution, write back, and memory access in sequence. After that, the initialized RSIC-V soft core can run the target executable program to perform corresponding data collection, data storage, data conversion and data transmission functions, and accurately realize the functions of the physical ARM chip.
[0067] As an optional embodiment, after receiving the first data request instruction transmitted by the Linux communication protocol conversion application program at a preset period interval, converting RSIC-V format data into modbus format data includes:
[0068] The RSIC-V soft core uses the target executable program to extract RSIC-V format data from the RSIC-V soft core's cache area after receiving the first data request instruction transmitted at a preset period interval by the Linux communication protocol conversion application, and converts the extracted RSIC-V format data into modbus format data.
[0069] In the present invention, the specific process of the RSIC-V soft core converting RSIC-V format data into modbus format data after receiving the first data request instruction transmitted by the Linux communication protocol conversion application is as follows: because the RSIC-V soft core will use the target executable program to convert the inverter data into RSIC-V format data and store it in the cache area after collecting the inverter data, the RSIC-V soft core needs to use the target executable program to extract the RSIC-V format data from the cache area of the RSIC-V soft core after receiving the first data request instruction transmitted by the Linux communication protocol conversion application at preset periodic intervals, and convert the extracted RSIC-V format data into modbus format data, thereby ensuring the integrity of the solution.
[0070] As an optional embodiment, after receiving the second data request instruction, converting the Linux format data into the target format data required by the external device, and transmitting the target format data to the external device, includes:
[0071] extracting Linux format data from a buffer area of the Linux communication protocol conversion application program after receiving the second data request instruction through the Linux communication protocol conversion application program;
[0072] The Linux format data is converted into the target format data required by the external device through the Linux communication protocol conversion application, and the target format data is transmitted to the external device.
[0073] In the present invention, after receiving the second data request instruction, the Linux format data is converted into the target format data required by the external device, and the specific process of transmitting the target format data to the external device is as follows: because the Linux communication protocol conversion application converts the modbus format data into Linux format data after receiving it, and stores the Linux format data in the cache area of the Linux communication protocol conversion application, when the Linux communication protocol conversion application receives the second data request instruction, it is necessary to extract the Linux format data stored in the cache area of the Linux communication protocol conversion application, and convert the extracted Linux format data into the target format data required by the external device, and transmit the target format data to the external device, so as to complete the entire data collection, storage, conversion and transmission process, thereby improving the reliability of the solution.
[0074] As an optional embodiment, after transmitting the target format data to the external device, the method further includes:
[0075] The corresponding prompt signal is sent to the upper computer through the Linux communication protocol conversion application, so that the upper computer sends a corresponding display prompt and / or sound prompt after receiving the prompt signal.
[0076] In the present invention, considering that the data acquisition, data conversion, data storage and data transmission processes in the inverter data acquisition system are all independently completed by the Linux communication protocol conversion application and the RSIC-V soft core, if the Linux communication protocol conversion application or the RSIC-V soft core fails, resulting in the inability to complete each process on time or to be implemented, the maintenance personnel cannot discover and perform timely maintenance in time, so this solution, after transmitting the target format data to the external device, also sends a corresponding prompt signal to the host computer through the Linux communication protocol conversion application. If neither the Linux communication protocol conversion application nor the RSIC-V soft core fails, the host computer can receive the prompt signal at the specified time, and the host computer will give a corresponding prompt at this time; conversely, if the time when the prompt signal is received is different from the specified time or the prompt signal is not received at all, it means that the Linux communication protocol conversion application and / or the RSIC-V soft core fails at this time, and the host computer will not issue a corresponding prompt at this time. At this time, the maintenance personnel can promptly know that there is a problem with the current inverter data acquisition system and perform timely maintenance, thereby improving the safety and reliability of the solution.
[0077] Please refer to Figure 6 , Figure 6 The present invention provides a schematic diagram of the structure of an inverter data acquisition system. The inverter data acquisition system is applied to a data acquisition device pre-integrated with a Linux communication protocol conversion application and an RSIC-V soft core, the RSIC-V soft core runs a target executable program, and the target executable program is an executable program that can be recognized by the RSIC-V soft core and is generated by cross-compiling the source program in the physical ARM chip; wherein the system includes:
[0078] The first data conversion module 11 is used to collect the inverter data transmitted in the DSP chip of the inverter at preset intervals through the RSIC-V soft core using the target executable program, convert the inverter data into corresponding RSIC-V format data at preset intervals, and store the RSIC-V format data in the cache area of the RSIC-V soft core, and convert the RSIC-V format data into modbus format data after receiving the first data request instruction transmitted by the Linux communication protocol conversion application at preset intervals, and transmit the modbus format data to the Linux communication protocol conversion application;
[0079] A second data conversion module 12, used to convert the modbus format data into Linux format data through the Linux communication protocol conversion application, and store the Linux format data in the buffer area of the Linux communication protocol conversion application;
[0080] The data transmission module 13 is used to receive the second data request instruction transmitted by the external device through the Linux communication protocol conversion application, convert the Linux format data into the target format data required by the external device after receiving the second data request instruction, and transmit the target format data to the external device.
[0081] As an optional embodiment, the first data conversion module includes:
[0082] The processing unit is used to load the target executable program through the RSIC-V soft core using the preset RTOS path and perform instruction fetch processing, decoding processing, execution processing, write-back processing, and memory access processing in sequence;
[0083] The inverter data acquisition unit is used to collect inverter data at preset intervals using the target executable program through the processed RSIC-V soft core;
[0084] A first data conversion unit, configured to convert the inverter data into RSIC-V format data at preset intervals of a target executable program through a processed RSIC-V soft core;
[0085] A storage unit, for storing RSIC-V format data into a cache area of the RSIC-V soft core using a target executable program through the processed RSIC-V soft core;
[0086] The second data conversion unit is used to convert RSIC-V format data into modbus format data through the processed RSIC-V soft core using the target executable program after receiving the first data request instruction transmitted by the Linux communication protocol conversion application at a preset period interval, and transmit the modbus format data to the Linux communication protocol conversion application.
[0087] As an optional embodiment, the data transmission module includes:
[0088] An extracting unit, configured to extract Linux format data from a buffer area of the Linux communication protocol conversion application program after receiving a second data request instruction through the Linux communication protocol conversion application program;
[0089] The third data conversion unit is used to convert the Linux format data into the target format data required by the external device through the Linux communication protocol conversion application program, and transmit the target format data to the external device.
[0090] The inverter data acquisition system provided in this embodiment corresponds to the above method, and thus has the same beneficial effects as the above method. Therefore, for the embodiments of the inverter data acquisition system part, please refer to the description of the embodiments of the method part, which will not be repeated here.
[0091] Please refer to Figure 7 , Figure 7 A schematic diagram of the structure of an electronic device provided by the present invention. The electronic device comprises:
[0092] A memory 20, used for storing computer programs;
[0093] The processor 21 is used to implement the steps of the inverter data acquisition method as described above when executing a computer program.
[0094] The electronic device provided in this embodiment may include but is not limited to a smart phone, a tablet computer, a laptop computer or a desktop computer.
[0095] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 can be implemented in at least one hardware form of a digital signal processor (DSP), a field-programmable gate array (FPGA), and a programmable logic array (PLA). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 21 may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.
[0096] The memory 20 may include one or more computer-readable storage media, which may be non-transitory. The memory 20 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 20 is at least used to store the following computer program 201, wherein, after the computer program is loaded and executed by the processor 21, it can implement the relevant steps of the inverter data acquisition method disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 20 may also include an operating system 202 and data 203, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 202 may include Windows, Unix, Linux, etc. Data 203 may include but is not limited to inverter data acquisition methods, etc.
[0097] In some embodiments, the electronic device may further include a display screen 22 , an input / output interface 23 , a communication interface 24 , a power source 25 , and a communication bus 26 .
[0098] Those skilled in the art will understand that Figure 7 The structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure.
[0099] The purpose of this embodiment is to provide an electronic device, in which the memory 20 is used to store computer programs, and the processor 21 is used to implement the steps of the inverter data acquisition method as described above when executing the computer programs, so that the acquisition process is more efficient and accurate.
[0100] The present invention further provides an embodiment corresponding to a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the inverter data acquisition method as described above are implemented.
[0101] It is understandable that if the method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium to execute all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.
[0102] The computer-readable storage medium provided in this embodiment corresponds to the above method, and therefore has the same beneficial effects as the above method. Therefore, for the embodiments of the computer-readable storage medium part, please refer to the description of the embodiments of the method part, which will not be repeated here.
[0103] It should be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
[0104] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for collecting inverter data, characterized in that: The invention is applied to a data collector pre-integrated with a Linux communication protocol conversion application and an RSIC-V soft core, wherein the RSIC-V soft core runs a target executable program, and the target executable program is an executable program that can be recognized by the RSIC-V soft core and is generated by cross-compiling a source program in a physical ARM chip; wherein the method comprises: The inverter data transmitted in the DSP chip of the inverter is collected by the RSIC-V soft core using the target executable program at intervals of a preset period, the inverter data is converted into corresponding RSIC-V format data at intervals of the preset period, and the RSIC-V format data is stored in the cache area of the RSIC-V soft core, and after receiving the first data request instruction transmitted by the Linux communication protocol conversion application at intervals of the preset period, the RSIC-V format data is converted into modbus format data, and the modbus format data is transmitted to the Linux communication protocol conversion application; Converting the modbus format data into Linux format data through the Linux communication protocol conversion application, and storing the Linux format data in a buffer area of the Linux communication protocol conversion application; The second data request instruction transmitted by the external device is received through the Linux communication protocol conversion application. After receiving the second data request instruction, the Linux format data is converted into the target format data required by the external device, and the target format data is transmitted to the external device.
2. The inverter data acquisition method according to claim 1, characterized in that: The method comprises: collecting inverter data transmitted in the DSP chip of the inverter at intervals of a preset period by using the target executable program through the RSIC-V soft core, converting the inverter data into corresponding RSIC-V format data at intervals of the preset period, storing the RSIC-V format data in a cache area of the RSIC-V soft core, and converting the RSIC-V format data into modbus format data after receiving a first data request instruction transmitted by the Linux communication protocol conversion application at intervals of the preset period, and transmitting the modbus format data to the Linux communication protocol conversion application, including: The target executable program is loaded by the RSIC-V soft core using a preset RTOS path and instruction fetch processing, decoding processing, execution processing, write-back processing, and memory access processing are performed in sequence; The processed RSIC-V soft core uses the target executable program to collect the inverter data at the preset period interval; The processed RSIC-V soft core uses the target executable program to convert the inverter data into the RSIC-V format data at intervals of the preset period; The RSIC-V format data is stored in a buffer area of the RSIC-V soft core by using the target executable program through the processed RSIC-V soft core; The processed RSIC-V soft core uses the target executable program to convert the RSIC-V format data into the modbus format data after receiving the first data request instruction transmitted by the Linux communication protocol conversion application at the preset period interval, and transmits the modbus format data to the Linux communication protocol conversion application.
3. The inverter data collection method according to claim 1, characterized in that: The converting the RSIC-V format data into modbus format data after receiving the first data request instruction transmitted by the Linux communication protocol conversion application program at intervals of the preset period comprises: The RSIC-V soft core utilizes the target executable program to extract the RSIC-V format data from the cache area of the RSIC-V soft core after receiving the first data request instruction transmitted by the Linux communication protocol conversion application at the preset period interval, and converts the extracted RSIC-V format data into the modbus format data.
4. The inverter data collection method according to any one of claims 1 to 3, characterized in that: The converting the Linux format data into target format data required by the external device after receiving the second data request instruction, and transmitting the target format data to the external device, comprises: extracting the Linux format data from a buffer area of the Linux communication protocol conversion application program after receiving the second data request instruction by the Linux communication protocol conversion application program; The Linux format data is converted into the target format data required by the external device through the Linux communication protocol conversion application, and the target format data is transmitted to the external device.
5. The inverter data collection method according to claim 4, characterized in that: After transmitting the target format data to the external device, the method further includes: The Linux communication protocol conversion application sends a corresponding prompt signal to the host computer, so that the host computer sends a corresponding display prompt and / or sound prompt after receiving the prompt signal.
6. An inverter data acquisition system, characterized in that: The system is applied to a data collector pre-integrated with a Linux communication protocol conversion application and an RSIC-V soft core, wherein the RSIC-V soft core runs a target executable program, and the target executable program is an executable program that can be recognized by the RSIC-V soft core and is generated by cross-compiling a source program in a physical ARM chip; wherein the system comprises: A first data conversion module is used to collect inverter data transmitted in the DSP chip of the inverter at preset intervals by using the target executable program through the RSIC-V soft core, convert the inverter data into corresponding RSIC-V format data at intervals of the preset period, and store the RSIC-V format data in the cache area of the RSIC-V soft core, and convert the RSIC-V format data into modbus format data after receiving the first data request instruction transmitted by the Linux communication protocol conversion application at intervals of the preset period, and transmit the modbus format data to the Linux communication protocol conversion application; A second data conversion module, used for converting the modbus format data into Linux format data through the Linux communication protocol conversion application, and storing the Linux format data in a buffer area of the Linux communication protocol conversion application; The data transmission module is used to receive the second data request instruction transmitted by the external device through the Linux communication protocol conversion application, convert the Linux format data into the target format data required by the external device after receiving the second data request instruction, and transmit the target format data to the external device.
7. The inverter data acquisition system according to claim 6, characterized in that: The first data conversion module includes: A processing unit, used to load the target executable program through the RSIC-V soft core using a preset RTOS path and perform instruction fetch processing, decoding processing, execution processing, write-back processing, and memory access processing in sequence; An inverter data acquisition unit, configured to acquire the inverter data at the preset period intervals by using the target executable program through the processed RSIC-V soft core; A first data conversion unit, configured to convert the inverter data into the RSIC-V format data at intervals of the preset period using the target executable program through the processed RSIC-V soft core; A storage unit, used for storing the RSIC-V format data into a cache area of the RSIC-V soft core by using the target executable program through the processed RSIC-V soft core; The second data conversion unit is used to convert the RSIC-V format data into the modbus format data through the processed RSIC-V soft core using the target executable program after receiving the first data request instruction transmitted by the Linux communication protocol conversion application at the preset period interval, and transmit the modbus format data to the Linux communication protocol conversion application.
8. The inverter data acquisition system according to claim 6, characterized in that: The data transmission module comprises: an extracting unit, configured to extract the Linux format data from a buffer area of the Linux communication protocol conversion application after receiving the second data request instruction through the Linux communication protocol conversion application; The third data conversion unit is used to convert the Linux format data into the target format data required by the external device through the Linux communication protocol conversion application, and transmit the target format data to the external device.
9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the inverter data collection method according to any one of claims 1 to 5 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the inverter data collection method according to any one of claims 1 to 5 are implemented.
