Bluetooth parallel upgrading method for multiple inverters and electronic equipment

Through the correspondence between Bluetooth connection and SN code and MAC address, the parallel upgrade of multiple inverters is achieved, solving the problem of inefficient upgrade efficiency of multiple inverters in the existing technology, improving the upgrade efficiency and saving labor costs .

CN119201182AInactive Publication Date: 2024-12-27ROYPOW TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411589833.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-08
Publication Date
2024-12-27
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

It is difficult for the existing technology to upgrade multiple inverters at the same time, resulting in inefficient upgrade efficiency and waste of manpower and material resources. Especially in photovoltaic stations and mountainous areas, wired upgrade methods are inefficient and may not be realized.

Method used

Connect multiple inverters through Bluetooth to obtain the SN code and MAC address of each inverter, establish a sub-thread to send firmware upgrade packages in parallel, use the correspondence between the SN code and the MAC address to ensure that the correct inverter is upgraded, and Re-establish the connection when Bluetooth is disconnected.

Benefits of technology

The simultaneous upgrade of multiple inverters has been achieved, which improves the upgrade efficiency, saves labor costs, and can effectively upgrade the firmware of the inverter in mountainous areas.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119201182A_ABST
    Figure CN119201182A_ABST
Patent Text Reader

Abstract

The invention provides a Bluetooth parallel upgrading method for multiple inverters and electronic equipment. The method comprises the following steps: establishing Bluetooth connection with a plurality of inverters; obtaining an SN code and an MAC address of each inverter; storing a corresponding relationship between the SN code and the MAC address of each inverter to a server, wherein the corresponding relationship is used for searching each inverter from the plurality of inverters; establishing a sub-thread for each inverter by taking the SN code as a thread ID (Identity), wherein the sub-threads of different inverters are parallel; and sending an upgrade package of the first firmware to each inverter through the sub-thread, wherein the upgrade package is used for the inverter to upgrade the first firmware.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of Internet of Things, and in particular to a Bluetooth parallel upgrade method for multiple inverters and an electronic device. Background Art

[0002] The inverter can convert DC power into AC power and is the core device of the power generation system. In order to meet some user needs, add new functions and maintenance needs, the inverter needs to be regularly upgraded with firmware. Usually, the inverter is upgraded remotely through wired methods such as controller area network (CAN) and 485, but this method is difficult to meet the needs of systems with multiple inverters. Taking photovoltaic inverters as an example, when a photovoltaic site has multiple inverters that need to be upgraded, only one device can be connected and upgraded. This upgrade method is inefficient and wastes manpower and material resources. Summary of the invention

[0003] The embodiments of the present application provide a Bluetooth parallel upgrade method for multiple inverters and an electronic device.

[0004] In a first aspect, an embodiment of the present application provides a method for Bluetooth parallel upgrading of multiple inverters, the method comprising: Establish Bluetooth connection with multiple inverters; Get the SN code and MAC address of each inverter; The correspondence between the SN code and the MAC address of each inverter is stored in the server, and the correspondence is used to find each inverter from multiple inverters; Use the SN code as the thread ID to create a sub-thread for each inverter, and the sub-threads of different inverters run in parallel; An upgrade package of the first firmware is sent to each inverter through a sub-thread, and the upgrade package is used by the inverter to upgrade the first firmware.

[0005] Optionally, the header of the upgrade package includes a thread ID, and the thread ID is used to verify the inverter itself. If the thread ID is the same as the SN code of the inverter, it indicates that the inverter is a correct inverter, otherwise the inverter is an incorrect inverter.

[0006] Optionally, the method further includes: If the inverter is the correct one, the normal prompt of the inverter is received; If the inverter is an error inverter, an error prompt of the inverter is received, and the upgrade package is resent to the inverter through the child thread.

[0007] Optionally, the tail of the upgrade package includes a cyclic redundancy check CRC code, and the CRC code is used by the inverter to verify the upgrade package.

[0008] Optionally, the method further includes: If the inverter is a correct inverter, but the upgrade package fails to pass the CRC code verification, the error prompt of the inverter is received, and the upgrade package is resent to the inverter through the child thread; If the inverter is a correct inverter and the upgrade package passes the CRC code verification, a correct prompt of the inverter is received.

[0009] Optionally, the method further includes: If the number of times the upgrade package fails to be resent is greater than the first value, judging whether the SN code of the inverter matches the MAC address based on the corresponding relationship; If there is no match, the inverter corresponding to the SN code matching the MAC address is found according to the corresponding relationship, and an upgrade package is sent to the inverter.

[0010] Optionally, the method further includes: If no response from the inverter is received during the process of sending the upgrade package to the inverter, sending the upgrade package to the inverter once at every first time interval; If the number of transmissions is greater than the second value and no response from the inverter is received, then detecting whether the Bluetooth of the inverter is online; If the Bluetooth connection is disconnected, re-establish the Bluetooth connection with the inverter.

[0011] Optionally, the upgrade package is a file package divided from the binary file of the first firmware.

[0012] Optionally, the data size of the file package is 255 bytes.

[0013] In a second aspect, an embodiment of the present application provides an electronic device, including: Bluetooth module, used to establish Bluetooth connection with multiple inverters; Acquisition module, used to obtain the SN code and MAC address of each inverter; A storage module, used for storing the correspondence between the SN code and the MAC address of each inverter to the server, and the correspondence is used to find each inverter from multiple inverters; The thread module is used to establish a sub-thread for each inverter using the SN code as the thread ID, and the sub-threads of different inverters are parallel; The communication module is used to send an upgrade package of the first firmware to each inverter through a sub-thread, where the upgrade package is used to upgrade the first firmware.

[0014] Optionally, the header of the upgrade package includes a thread ID, and the thread ID is used to verify the inverter itself. If the thread ID is the same as the SN code of the inverter, it indicates that the inverter is a correct inverter, otherwise the inverter is an incorrect inverter.

[0015] Optionally, the communication module is also used for: When the inverter is a correct inverter, receive normal prompts from the inverter; Alternatively, when the inverter is an error inverter, an error prompt of the inverter is received, and the upgrade package is resent to the inverter through the child thread.

[0016] Optionally, the tail of the upgrade package includes a CRC code, and the CRC code is used by the inverter to verify the upgrade package.

[0017] Optionally, the communication module is also used for: When the inverter is a correct inverter but the upgrade package fails to pass the CRC code verification, an error prompt of the inverter is received, and the upgrade package is resent to the inverter through a child thread; Alternatively, when the inverter is a correct inverter and the upgrade package passes the verification of the CRC code, a correct prompt of the inverter is received.

[0018] Optionally, the electronic device further includes: A judgment module, used for judging whether the SN code of the inverter matches the MAC address based on the corresponding relationship when the number of times the upgrade package fails to be resent is greater than a first value; If there is no match, the communication module is further used to find the inverter corresponding to the SN code matching the MAC address according to the corresponding relationship, and send an upgrade package to the inverter.

[0019] Optionally, the communication module is also used for: When no response from the inverter is received during the process of sending the upgrade package to the inverter, sending the upgrade package to the inverter once at a first time interval; The Bluetooth module is also used for: When the number of times the communication module sends is greater than the second value and still no response from the inverter is received, detecting whether the Bluetooth of the inverter is online; If the Bluetooth connection is disconnected, re-establish the Bluetooth connection with the inverter.

[0020] Optionally, the upgrade package is a file package divided from the binary file of the first firmware.

[0021] Optionally, the data size of the file package is 255 bytes.

[0022] In a third aspect, an embodiment of the present application provides an electronic device comprising a memory, at least one processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, a method as described in any one of the above-mentioned first aspects is implemented.

[0023] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method as described in any one of the above-mentioned first aspects is implemented.

[0024] In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes any one of the methods described in the first aspect.

[0025] Based on this application, multiple inverters can be connected via Bluetooth, and a subthread can be established for each inverter using the SN code of each inverter as the thread ID. Through the correspondence between the SN code and the MAC address of each inverter, each inverter can be found from multiple inverters. And the firmware upgrade package is sent to it through the subthread of each inverter to upgrade each inverter. The subthreads of different inverters are parallel, and multiple inverters can be upgraded at the same time, which helps to improve the upgrade efficiency of the inverter. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for describing the embodiments are briefly introduced below.

[0027] Figure 1 It is a flowchart of a Bluetooth parallel upgrade method for multiple inverters provided in an embodiment of the present application.

[0028] Figure 2 This is an example diagram of the Bluetooth parallel upgrade method for multiple inverters provided in an embodiment of the present application.

[0029] Figure 3 It is a schematic diagram of the structure of an electronic device provided in one embodiment of the present application.

[0030] Figure 4 It is a structural schematic diagram of an electronic device provided in another embodiment of the present application. DETAILED DESCRIPTION

[0031] The technical solution of the embodiment of the present invention will be described below in conjunction with the accompanying drawings in the embodiment of the present invention.

[0032] The inverter can convert DC power into AC power and is the core device of the power generation system. In order to meet some user needs, add new functions and maintain the needs, the inverter needs to be regularly upgraded. Usually, the inverter is upgraded remotely through wired methods such as CAN and 485, but this method is difficult to meet the needs of systems with multiple inverters.

[0033] Take photovoltaic inverters as an example. With the growing global demand for renewable energy, the photovoltaic industry is facing unprecedented development opportunities. When a photovoltaic site has multiple inverters that need to be upgraded, the wired upgrade method can only upgrade one device at a time. This upgrade method is inefficient and wastes manpower and material resources.

[0034] In addition, photovoltaics in mountainous areas has become a new area of ​​entrepreneurship that has attracted much attention. Photovoltaic in mountainous areas refers to the installation of photovoltaic power generation systems in mountainous areas. Because the network may not cover mountainous areas, the wired upgrade method is not only inefficient, but may also be impossible to implement.

[0035] Based on this, Figure 1 The embodiment of the present application provides a method for Bluetooth parallel upgrading of multiple inverters. The method is applicable to smart electronic devices, such as mobile phones, tablets, etc., and the method can be executed by an application (APP) of the smart electronic device.

[0036] See also Figure 1 , the method may include steps S110-S150.

[0037] In step S110, Bluetooth connections are established with multiple inverters. The number of inverters is not limited, for example, it can be 6. The type of inverter is also not limited, and the types of multiple inverters can be the same or different.

[0038] In step S120 , a sequence number (SN) code and a media access control address (MAC) address of each inverter are obtained.

[0039] The SN code is a string of numbers or letters, generally used as an identification code for electronic products. The biggest feature of the SN code is its uniqueness, so the SN code is often used for anti-counterfeiting. The SN code can be obtained by a method agreed upon in advance with the inverter, such as by making the inverter report its SN code after establishing a Bluetooth connection through a protocol with the inverter.

[0040] Any Bluetooth device has a globally unique MAC address, which can be used to distinguish different Bluetooth devices. The MAC address of a Bluetooth device is a 48-bit unique hardware identifier used to establish connections and communications between Bluetooth devices. The MAC address of a Bluetooth device is usually expressed as 12 hexadecimal numbers (for example: 00:11:22:33:44:55), where the first 6 digits represent the manufacturer's identification (ID) of the Bluetooth device, and the last 6 digits are the unique serial number of the Bluetooth device. Usually, when a Bluetooth connection is established with the inverter, the MAC address of the inverter can be obtained.

[0041] In step S130, the correspondence between the SN code and the MAC address of each inverter is stored in the server, and the correspondence can be used to find each inverter from multiple inverters. Since the MAC address and SN code of the inverter are both unique, the correspondence between the two can be used to find the target inverter among multiple inverters. For example, if the MAC address of the known inverter is connected via Bluetooth, the SN code of the inverter can be determined according to the correspondence between the MAC address and the SN code, so that the inverter can be found among multiple inverters. Since multiple inverters are usually displayed as the same device name "inverter" in the Bluetooth list of the APP, the inverter cannot be determined by the correspondence between the MAC address and the device name. In addition, the inverter device usually does not expose its MAC address to the outside, so the inverter cannot be directly determined by the MAC address. However, the SN codes of different inverters are different, and the inverter usually displays its own SN code to the outside, so it is easier to distinguish different inverters by the SN code.

[0042] The correspondence between the SN code and the MAC address can be stored and queried through communication with the server. For example, after obtaining the correspondence, the electronic device can report it to the server, and the server stores the correspondence. For another example, when the electronic device needs to query the correspondence, it can send a request to the server, and the server will reply the corresponding content to the electronic device. The form of the correspondence between the SN code and the MAC address is not limited, for example, it can be the form of SN code + MAC address obtained by byte splicing, or the form of MAC address + SN code.

[0043] In step S140, a subthread is established for each inverter using the SN code as the thread ID, and the subthreads of different inverters are parallel. Each inverter has a corresponding subthread, and the subthreads are parallel, so the tasks executed on the subthreads are also parallel.

[0044] In step S150, an upgrade package of the first firmware is sent to each inverter through a child thread, and the upgrade package is used by the inverter to upgrade the first firmware. The first firmware can be any firmware that needs to be upgraded, and this application does not limit this. For different inverters, the first firmware can be the same or different. For example, multiple inverters can upgrade the same firmware at the same time, or they can upgrade different firmware at the same time. The first firmware can be one firmware or multiple firmwares, and this application does not limit this. For example, multiple inverters can upgrade multiple firmwares at the same time.

[0045] Based on this application, multiple inverters can be connected via Bluetooth, and a subthread can be established for each inverter using the SN code of each inverter as the thread ID. Through the correspondence between the SN code and the MAC address of each inverter, each inverter can be found from multiple inverters. And the firmware upgrade package is sent to it through the subthread of each inverter to upgrade each inverter. The subthreads of different inverters are parallel, and multiple inverters can be upgraded at the same time, which helps to improve the upgrade efficiency of the inverter.

[0046] Optionally, the header of the upgrade package may include a thread ID, which can be used to verify the inverter itself. If the thread ID is the same as the SN code of the inverter, it indicates that the inverter is the correct inverter, otherwise the inverter is the wrong inverter. That is, the header of the upgrade package sent to the inverter can carry the SN code obtained when establishing a Bluetooth connection with the inverter. If the SN code obtained when establishing the Bluetooth connection is the same as the SN code of the inverter itself, it indicates that the inverter is the correct inverter and has not been replaced by another inverter. If the SN code obtained when establishing the Bluetooth connection is different from the SN code of the inverter itself, it indicates that the inverter is the wrong inverter and may have been replaced by another inverter. The thread ID based on the header of the upgrade package helps to determine whether the inverter is the correct inverter, thereby ensuring the normal progress of the upgrade process.

[0047] Further, Figure 1 The method shown may further include step S160.

[0048] In step S160, if the inverter is the correct inverter, a normal prompt of the inverter is received. When the inverter confirms that it is the correct inverter based on the thread ID of the upgrade package header, a normal prompt can be sent to the electronic device. After receiving the normal prompt, the electronic device can continue to send other upgrade packages to the inverter.

[0049] Alternatively, if the inverter is an incorrect inverter, the error prompt of the inverter is received, and the upgrade package is resent to the inverter through the child thread. When the inverter confirms that it is an incorrect inverter based on the thread ID of the upgrade package header, an error prompt can be sent to the electronic device. After receiving the error prompt, the electronic device can resend the upgrade package to the inverter. Based on this, a prompt can be given to the electronic device when the inverter is incorrect to ensure the normal progress of the upgrade process.

[0050] Optionally, the tail of the upgrade package may include a cyclic redundancy check (CRC) code, and the CRC code may be used by the inverter to verify the upgrade package. The CRC code may be agreed upon in advance by the electronic device and the inverter, for example, through a protocol.

[0051] Further, Figure 1 The method shown may further include step S170.

[0052] In step S170, if the inverter is a correct inverter, but the upgrade package fails to pass the CRC code verification, the inverter receives an error prompt, and resends the upgrade package to the inverter through the child thread. When the inverter confirms that it is the correct inverter based on the thread ID of the upgrade package header, it can continue to verify whether the upgrade package is correct based on the CRC code at the end of the upgrade package. If the upgrade package fails to pass the CRC code verification, the inverter can send an error prompt to the electronic device. After receiving the error prompt, the electronic device can resend the upgrade package to the inverter.

[0053] Alternatively, if the inverter is a correct inverter and the upgrade package passes the CRC code verification, the correct prompt of the inverter is received. If the upgrade package passes the CRC code verification, the inverter can send a correct prompt to the electronic device. After receiving the correct prompt, the electronic device can send other upgrade packages to the inverter. Based on this, the electronic device can be prompted when the upgrade package is incorrect to ensure the normal progress of the upgrade process.

[0054] Optional, Figure 1 The method shown may further include step S180 and step S190.

[0055] In step S180, if the number of times the upgrade package fails to be resent is greater than the first value, it is determined based on the correspondence whether the SN code of the inverter matches the MAC address. That is, when the inverter is an incorrect inverter or the upgrade package fails to pass the CRC code verification, and the electronic device still receives an error prompt after resending the upgrade package to the inverter for a number greater than the first value, the electronic device needs to determine whether the inverter is the correct inverter. At this time, the MAC address and SN code of the inverter can be obtained again, and the correspondence between the MAC address and the SN code can be obtained through the server to verify whether the SN code and the MAC address match. As an example, the first value can be 3.

[0056] In step S190, if there is no match, the inverter corresponding to the SN code matching the MAC address is found according to the correspondence, and the upgrade package is sent to the inverter. If it is determined according to the correspondence that the MAC address and SN code of the inverter do not match, it indicates that the inverter may be replaced or the Bluetooth module of the inverter is transferred to another inverter. Therefore, the electronic device can find the correct inverter based on the correspondence and send the upgrade package to it. Based on this, adjustments can be made in time when the inverter is incorrect to ensure the normal progress of the upgrade process.

[0057] Optional, Figure 1 The method shown may further include steps S200 to S220.

[0058] In step S200, if no response from the inverter is received during the process of sending the upgrade package to the inverter, the upgrade package is sent to the inverter once every first time interval. As an example, the first time interval may be 10 seconds.

[0059] In step S210, if the number of transmissions is greater than the second value and no response is received from the inverter, it is detected whether the Bluetooth of the inverter is online. As an example, the second value may be 3. If the inverter does not respond within a certain period of time, it may be because the inverter is offline, so the electronic device can check the Bluetooth of the inverter.

[0060] In step S220, if the Bluetooth is disconnected, the Bluetooth connection is re-established with the inverter. When the Bluetooth of the inverter is found to be disconnected, the electronic device can re-establish the Bluetooth connection with the inverter. Based on this, the Bluetooth disconnection of the inverter can be discovered in time and the connection can be re-established to ensure the normal progress of the upgrade process.

[0061] Furthermore, the electronic device can also remind the user that the corresponding inverter Bluetooth is offline, for example, it can be displayed on the APP page. Based on this, the user can assist the electronic device to re-establish the Bluetooth connection with the inverter.

[0062] Optionally, the upgrade package can be a file package divided from the binary file (bin) of the first firmware. The bin file of some firmware may be large and cannot be transmitted through the sub-thread at one time. Therefore, the bin file can be divided and transmitted one by one through the sub-threads. The bin file can be downloaded from the server by the electronic device, and this application does not limit this. Furthermore, the data size of the file package can be 255 bytes. It is worth noting that when the data size of the bin file is not an integer multiple of 255, the last upgrade package of the bin file can be padded to reach 255 bytes.

[0063] Combine the following Figure 2 , an example is given to introduce the Bluetooth parallel upgrade method of multiple inverters in an embodiment of the present application.

[0064] For example, Figure 2 The method shown takes upgrading multiple inverters via an APP on a mobile phone as an example.

[0065] like Figure 2 As shown, the firmware bin file is downloaded through the APP and cached to the mobile phone, and the bin file is divided into several 255-byte upgrade packages. After the mobile phone connects to the inverter via Bluetooth through the APP, it first obtains the inverter's SN code and MAC address, and then stores it in the server in the form of MAC address + SN code.

[0066] The mobile phone then generates sub-threads for different inverters using the SN code as the thread ID, and sends 255-byte upgrade packages to the inverters in turn through the corresponding sub-threads. The header of the upgrade package is the thread ID of the inverter, and the tail of the upgrade package is the CRC code of the CRC sum check. After receiving the data, the inverter will verify it based on its own SN code and the thread ID of the header. If the SN code verification passes, it will continue to verify the CRC code. If the CRC code verification passes, it will return a normal prompt to the mobile phone. After receiving the normal prompt, the mobile phone will transmit the next upgrade package. If the SN code or CRC code verification fails, the inverter will return an error prompt. After receiving the normal prompt, the mobile phone will retransmit the upgrade package. If the retransmission fails three times, the mobile phone will query whether the SN and MAC of the current inverter match based on the MAC address + SN code in the server. If they do not match, it will find the corresponding SN inverter and send the upgrade package.

[0067] During the process of transmitting the upgrade package, if the inverter does not respond, the mobile phone will send the upgrade package to the inverter every 10 seconds. If there is still no response after three times, it will detect whether the Bluetooth of the inverter is disconnected. If so, it will reconnect the Bluetooth and remind the user.

[0068] Figure 2The method shown realizes the one-to-one binding between the inverter SN code and the Bluetooth MAC address. By locating the inverter through the SN code, multiple inverters can be upgraded at the same time, saving the user's time and avoiding data conflicts during simultaneous upgrades that lead to upgrade failures, greatly improving work efficiency and labor costs.

[0069] The method provided in the embodiment of the present application is described in detail above. The device provided in the embodiment of the present application is described in detail below with reference to the accompanying drawings.

[0070] See also Figure 3 , is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 3 The electronic device 300 shown may include: a Bluetooth module 310; an acquisition module 320; a storage module 330; a thread module 340; and a communication module 350.

[0071] The Bluetooth module 310 can be used to establish Bluetooth connections with multiple inverters; The acquisition module 320 may be used to acquire the SN code and MAC address of each inverter; The storage module 330 may be used to store the correspondence between the SN code and the MAC address of each inverter to the server, and the correspondence is used to find each inverter from multiple inverters; The thread module 340 may be used to establish a sub-thread for each inverter using the SN code as the thread ID, and the sub-threads of different inverters are parallel; The communication module 350 may be used to send an upgrade package of the first firmware to each inverter through a sub-thread, where the upgrade package is used to upgrade the first firmware.

[0072] Optionally, the header of the upgrade package may include a thread ID, and the thread ID may be used to verify the inverter itself. If the thread ID is the same as the SN code of the inverter, it indicates that the inverter is a correct inverter, otherwise the inverter is an incorrect inverter.

[0073] Optionally, the communication module 350 may also be used for: When the inverter is a correct inverter, receive normal prompts from the inverter; Alternatively, when the inverter is an error inverter, an error prompt of the inverter is received, and the upgrade package is resent to the inverter through the child thread.

[0074] Optionally, the tail of the upgrade package may include a CRC code, and the CRC code may be used by the inverter to verify the upgrade package.

[0075] Optionally, the communication module 350 may also be used for: When the inverter is a correct inverter but the upgrade package fails to pass the CRC code verification, an error prompt of the inverter is received, and the upgrade package is resent to the inverter through a child thread; Alternatively, when the inverter is a correct inverter and the upgrade package passes the verification of the CRC code, a correct prompt of the inverter is received.

[0076] Optionally, the electronic device may further include: The judgment module 360 ​​may be used to judge whether the SN code of the inverter matches the MAC address based on the corresponding relationship when the number of times the upgrade package fails to be resent is greater than a first value; If there is no match, the communication module 350 can also be used to find the inverter corresponding to the SN code matching the MAC address according to the corresponding relationship, and send an upgrade package to the inverter.

[0077] Optionally, the communication module 350 may also be used for: When no response from the inverter is received during the process of sending the upgrade package to the inverter, sending the upgrade package to the inverter once at a first time interval; The Bluetooth module 310 can also be used for: When the number of times the communication module 350 sends is greater than the second value and still no response from the inverter is received, detecting whether the Bluetooth of the inverter is online; If the Bluetooth connection is disconnected, re-establish the Bluetooth connection with the inverter.

[0078] Optionally, the upgrade package may be a file package divided from a binary file of the first firmware.

[0079] Optionally, the data size of the file package can be 255 bytes.

[0080] The present application also provides an electronic device. Figure 4 As shown, the electronic device 400 includes: at least one processor 401, a memory 402, and a computer program 403 stored in the memory 402 and executable on the at least one processor 401. When the processor 401 executes the computer program 403, the method provided in the present application is implemented.

[0081] Exemplarily, the computer program 403 may be divided into one or more modules / units, one or more modules / units are stored in the memory 402, and executed by the processor 401 to complete the present application. One or more modules / units may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program in the electronic device 400.

[0082] Those skilled in the art will understand that Figure 4It is only an example of the electronic device 400 and does not constitute a limitation of the electronic device. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device 400 may also include input and output devices, network access devices, buses, etc.

[0083] The processor 401 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0084] The memory 402 may be an internal storage unit of the electronic device 400, such as a hard disk or memory of the electronic device 400. The memory 402 may also be an external storage device of the electronic device 400, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 400. Further, the memory 402 may also include both an internal storage unit of the electronic device 400 and an external storage device. The memory 402 is used to store computer programs and other programs and data required by the electronic device 400. The memory 402 may also be used to temporarily store data that has been output or is to be output.

[0085] The electronic device 400 provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0086] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.

[0087] An embodiment of the present application provides a computer program product. When the computer program product runs on an electronic device, the electronic device can implement the steps in the above-mentioned method embodiments when executing the computer program product.

[0088] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above method embodiments, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above method embodiments can be implemented. Among them, the computer program includes computer program code, which can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the camera / electronic device, recording medium, computer memory, ROM (read-only memory), RAM (random access memory), CD-ROM (compact disc read-only memory), magnetic tape, floppy disk and optical data storage device. The computer-readable storage medium mentioned in the present application can be a non-volatile storage medium, in other words, it can be a non-transient storage medium.

[0089] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0090] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0091] In the embodiments provided in the present application, it should be understood that the disclosed devices / equipment and methods can be implemented in other ways. For example, the device / equipment embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0092] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0093] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0094] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0095] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0096] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A Bluetooth parallel upgrade method for multiple inverters, characterized in that: include: Establish Bluetooth connection with multiple inverters; Obtaining the serial number SN code and media access control address MAC address of each inverter; storing the correspondence between the SN code and the MAC address of each inverter in a server, wherein the correspondence is used to find each inverter from the plurality of inverters; Using the SN code as a thread ID, a subthread is established for each inverter, and the subthreads of different inverters are run in parallel; An upgrade package of the first firmware is sent to each of the inverters through the sub-thread, where the upgrade package is used by the inverter to upgrade the first firmware.

2. The method according to claim 1, characterized in that The header of the upgrade package includes the thread ID, and the thread ID is used to verify the inverter itself. If the thread ID is the same as the SN code of the inverter, it indicates that the inverter is a correct inverter, otherwise the inverter is an incorrect inverter.

3. The method according to claim 2, characterized in that The method further comprises: If the inverter is a correct inverter, receiving a normal prompt of the inverter; If the inverter is an error inverter, an error prompt of the inverter is received, and the upgrade package is resent to the inverter through the sub-thread.

4. The method according to claim 3, characterized in that The tail of the upgrade package includes a cyclic redundancy check CRC code, and the CRC code is used by the inverter to check the upgrade package.

5. The method according to claim 4, characterized in that The method further comprises: If the inverter is a correct inverter, but the upgrade package fails to pass the CRC code verification, an error prompt of the inverter is received, and the upgrade package is resent to the inverter through the sub-thread; If the inverter is a correct inverter and the upgrade package passes the verification of the CRC code, a correct prompt of the inverter is received.

6. The method according to claim 3 or 5, characterized in that: The method further comprises: If the number of failed resending of the upgrade package is greater than a first value, determining whether the SN code of the inverter matches the MAC address based on the corresponding relationship; If there is no match, the inverter corresponding to the SN code matching the MAC address is found according to the corresponding relationship, and the upgrade package is sent to the inverter.

7. The method according to claim 6, characterized in that The method further comprises: If no response from the inverter is received during the process of sending the upgrade package to the inverter, sending the upgrade package to the inverter once at a first time interval; If the number of transmissions is greater than the second value and no response from the inverter is received, detecting whether the Bluetooth of the inverter is online; If the Bluetooth connection is disconnected, re-establish the Bluetooth connection with the inverter.

8. The method according to claim 7, characterized in that The upgrade package is a file package divided from the binary file of the first firmware.

9. The method according to claim 8, characterized in that The data size of the file packet is 255 bytes.

10. An electronic device, characterized in that: include: Bluetooth module, used to establish Bluetooth connection with multiple inverters; An acquisition module, used for acquiring a serial number SN code and a media access control address MAC address of each inverter; A storage module, used for storing the correspondence between the SN code and the MAC address of each inverter to a server, wherein the correspondence is used for finding each inverter from the plurality of inverters; A thread module, used for establishing a sub-thread for each inverter using the SN code as a thread ID, and the sub-threads of different inverters are in parallel; A communication module is used to send an upgrade package of the first firmware to each of the inverters through the sub-thread, where the upgrade package is used to upgrade the first firmware.

Citation Information

Patent Citations

  • Embedded system and method for remote upgrade by use of CAN bus

    CN104346179A

  • Inverter software upgrading method and system and electronic equipment

    CN109992282A

  • Batch test method, medium and system for printer Bluetooth modules

    CN111918259A

  • Photovoltaic inverter firmware upgrading method, device and system

    CN116781686A

  • Data transmission method, mobile terminal, switch and storage medium

    CN117081923A