Test method and device for upgrading energy storage system, computer equipment and storage medium

By building upgrade tasks on the Internet of Things platform and automatically issuing OTA upgrade commands, the problems of cumbersome manual operations and inaccurate judgments in the BMS system upgrade test are solved, and efficient and accurate upgrade tests and result statistics are achieved.

CN119865802APending Publication Date: 2025-04-22SUZHOU JK ENERGY LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411937375.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-04-22

AI Technical Summary

Technical Problem

During the CAN communication upgrade test of the home storage battery pack BMS system, manual operation is complicated and easy to make mistakes, inaccurate upgrade judgments, and inefficient success rate statistics.

Method used

By presetting test programs on the Internet of Things platform, building upgrade tasks, automatically issuing OTA upgrade commands, receiving progress data reported by the target device, updating the running status in real time, and judging the upgrade results by analyzing and displaying the status image of the component.

Benefits of technology

It improves the efficiency of upgrade testing, reduces labor costs, enhances judgment accuracy, reduces the rate of misjudgment, and ensures the reliability of test results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119865802A_ABST
    Figure CN119865802A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of energy storage systems, and discloses an energy storage system upgrading test method and device, computer equipment and a storage medium, and the method comprises the steps: constructing an upgrading task on an Internet of Things platform through a preset test program; an OTA upgrading command is issued to at least one target device through the upgrading task, and the OTA upgrading command is used for controlling the target device to execute upgrading operation of the energy storage system; receiving progress data reported by the target equipment, and updating the running state of the target equipment on the display component according to the progress data until the upgrading operation is executed; and obtaining a state image of the display component, and determining whether the energy storage system in the target equipment is successfully upgraded according to the state image to obtain a test result. The problems that manual operation is tedious and prone to errors, upgrading judgment is inaccurate and success rate statistics is low in the CAN communication upgrading test of the BMS of the household storage battery pack are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of energy storage systems, and in particular to a testing method, device, computer equipment and storage medium for upgrading an energy storage system. Background Art

[0002] With the continuous development of energy storage technology, home storage battery packs are playing an increasingly important role in distributed energy systems. As the core control component of home storage battery packs, the stability of the performance and optimization of the functions of the battery management system (BMS) are crucial to the entire energy storage system. In order to meet the ever-changing needs of users and adapt to the new technical environment, the BMS system needs to be upgraded periodically. In this process, upgrade testing is a key link to ensure that the BMS system can be upgraded normally and operate stably.

[0003] In the BMS system upgrade test of home storage battery packs, the method of upgrading the host computer with the help of CAN communication is currently widely used, which has many disadvantages. The operation requires manual connection of the CAN box and the device, which is prone to connection errors and affects the upgrade test; judging the success of the upgrade depends on manual inspection of the version information and the lighting of the WiFi board, which is prone to misjudgment and the lighting judgment method is inaccurate; the statistics of the upgrade success rate rely on manual repetitive operations, which has high labor costs and is difficult to guarantee the accuracy and efficiency of the results. Summary of the invention

[0004] In view of this, the embodiments of the present invention provide a test method, device, computer equipment and storage medium for energy storage system upgrade to solve the problems of cumbersome and error-prone manual operation, inaccurate upgrade judgment and inefficient success rate statistics in the CAN communication upgrade test of the home battery pack BMS system.

[0005] In a first aspect, an embodiment of the present invention provides a test method for upgrading an energy storage system, which is applied to an Internet of Things platform. The method includes:

[0006] Building upgrade tasks on the IoT platform through preset test procedures;

[0007] Using the upgrade task, issuing an OTA upgrade command to at least one target device, wherein the OTA upgrade command is used to control the target device to perform an upgrade operation of the energy storage system;

[0008] receiving progress data reported by the target device, and updating the operating status of the target device on the display component according to the progress data until the upgrade operation is completed;

[0009] A status image of the display component is obtained, and whether the energy storage system in the target device is successfully upgraded is determined based on the status image to obtain a test result.

[0010] Furthermore, before acquiring the status image of the display component, the method further includes:

[0011] When the upgrade operation is completed, obtaining the duration of the target device executing the upgrade operation;

[0012] Determine whether the duration is greater than a preset threshold;

[0013] If it is greater than the preset threshold, it is determined that the energy storage system in the target device has failed to upgrade; or, if it is less than or equal to the preset threshold, the update version number of the energy storage system in the target device is obtained, and it is determined whether the energy storage system in the target device has been successfully upgraded based on the update version number.

[0014] Further, determining whether the energy storage system in the target device is successfully upgraded according to the update version number includes:

[0015] Extract the target version number in the OTA upgrade command;

[0016] Comparing the update version number with the target version number;

[0017] If the update version number is inconsistent with the target version number, it is determined that the energy storage system in the target device has failed to upgrade; or, if the update version number is consistent with the target version number, an operation status evaluation mechanism is triggered to detect whether the energy storage system in the target device has been successfully upgraded.

[0018] Further, determining whether the energy storage system in the target device is successfully upgraded according to the status image to obtain a test result includes:

[0019] Performing a scaling operation on the state image to obtain a target state image;

[0020] Identify key areas in the target state image, and obtain color features of pixels in the key areas;

[0021] Determine whether the energy storage system in the target device is successfully upgraded based on the color feature to obtain a test result.

[0022] Further, determining whether the energy storage system in the target device is successfully upgraded according to the color feature to obtain a test result includes:

[0023] Get the association between the preset version number and the preset color feature;

[0024] Determine the target color feature hit by the target version number according to the association relationship;

[0025] Matching the color feature with the target color feature to obtain a matching result;

[0026] Based on the matching result, it is determined whether the energy storage system in the target device is successfully upgraded to obtain a test result.

[0027] Furthermore, the method further comprises:

[0028] Initializing execution data of the preset test program, wherein the execution data includes the number of executions and the number of successes;

[0029] Controlling the Internet of Things platform to perform an upgrade operation on the target device through the preset test program, and updating the execution data according to the upgrade operation;

[0030] When the number of executions in the execution data reaches a preset number, the stability of the preset test program is calculated based on the number of executions and the number of successes.

[0031] In a second aspect, an embodiment of the present invention provides a test method for upgrading an energy storage system, which is applied to a target device, and the method includes:

[0032] Receive OTA upgrade commands issued by the IoT platform;

[0033] Execute an upgrade operation of the energy storage system according to the OTA upgrade command to obtain progress data;

[0034] Reporting the progress data to the Internet of Things platform, so that the Internet of Things platform updates the operating status corresponding to the target device according to the progress data;

[0035] When the upgrade operation is completed, the current update version number of the energy storage system and the duration of the upgrade operation are sent to the Internet of Things platform.

[0036] In a third aspect, an embodiment of the present invention provides a test device for upgrading an energy storage system, which is applied to an Internet of Things platform, and the device includes:

[0037] A construction module, used to construct an upgrade task on the IoT platform through a preset test program;

[0038] A sending module, used to send an OTA upgrade command to at least one target device using the upgrade task, wherein the OTA upgrade command is used to control the target device to perform an upgrade operation of the energy storage system;

[0039] An updating module, configured to receive progress data reported by the target device, and update the operating status of the target device in the display component according to the progress data until the upgrade operation is completed;

[0040] The acquisition module is used to acquire the status image of the display component, and determine whether the energy storage system in the target device is successfully upgraded according to the status image to obtain a test result.

[0041] In a fourth aspect, an embodiment of the present invention provides a test device for upgrading an energy storage system, which is applied to a target device, and the device includes:

[0042] The receiving module is used to receive the OTA upgrade command issued by the IoT platform;

[0043] An execution module, used to execute an upgrade operation of the energy storage system according to the OTA upgrade command to obtain progress data;

[0044] A reporting module, used to report the progress data to the Internet of Things platform, so that the Internet of Things platform updates the operating status corresponding to the target device according to the progress data;

[0045] The sending module is used to send the current update version number of the energy storage system and the duration of the upgrade operation to the Internet of Things platform when the upgrade operation is completed.

[0046] In a fifth aspect, an embodiment of the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, computer instructions being stored in the memory, and the processor executing the method of the above-mentioned first aspect or any corresponding embodiment thereof by executing the computer instructions.

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

[0048] The method provided in the embodiment of the present application has the following beneficial effects:

[0049] The method provided in the embodiment of the present application automatically constructs upgrade tasks on the Internet of Things platform through a preset test program, saving labor costs, improving test preparation efficiency, ensuring accurate and standardized tasks, and avoiding manual construction errors. This task can be used to issue OTA upgrade commands to multiple target devices in batches, which greatly improves the efficiency of upgrade testing compared to manual operations one by one, meets large-scale testing needs, ensures the consistency and accuracy of instructions, and prevents omissions. The progress data reported by the receiving device is updated in real time on the display component to allow testers to intuitively grasp the upgrade progress and promptly discover problems such as upgrade stagnation in order to intervene and adjust to ensure that the test process is controllable. By analyzing the status image of the display component to determine the upgrade result, the inaccurate methods such as manually viewing version information and relying on the WiFi board to light up are abandoned, the judgment accuracy is improved, misjudgment is reduced, and the reliability of the test results is enhanced. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0051] Figure 1 is a flow chart of a test method for upgrading an energy storage system according to an embodiment of the present invention;

[0052] Figure 2 is a schematic diagram of a process of evaluating a device operating status according to an embodiment of the present invention;

[0053] Figure 3 A schematic diagram of a process flow of stability evaluation of an energy storage system upgrade test program according to an embodiment of the present invention;

[0054] Figure 4 A schematic flow chart of another energy storage system upgrade test method according to an embodiment of the present invention;

[0055] Figure 5 A schematic diagram of a flow chart of interaction of energy storage system upgrade components according to an embodiment of the present invention;

[0056] Figure 6 is a structural block diagram of a test device for upgrading an energy storage system according to an embodiment of the present invention;

[0057] Figure 7 is a structural block diagram of another energy storage system upgrade test device according to an embodiment of the present invention;

[0058] Figure 8 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

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

[0060] According to an embodiment of the present invention, a test method, apparatus, computer device and storage medium for upgrading an energy storage system are provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0061] In this embodiment, a test method for energy storage system upgrade is provided, which is applied to the Internet of Things platform. Figure 1 is a flow chart of a test method for upgrading an energy storage system according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0062] Step S11, constructing an upgrade task on the Internet of Things platform through a preset test program.

[0063] In the embodiment of the present application, the preset test program can interact with the Internet of Things platform, and the selenium automation program can be used to drive the browser to simulate manual operation to build upgrade tasks on the platform, without manual settings, avoiding tediousness and errors, and laying the foundation for the automatic OTA upgrade of the target device. By combining this way of building tasks with subsequent operations, the automatic OTA upgrade control of the BMS system of a large energy storage system can be realized, and the stability and accuracy of the upgrade can be ensured, avoiding the disadvantages of manual operation.

[0064] Step S12: using the upgrade task to issue an OTA upgrade command to at least one target device, wherein the OTA upgrade command is used to control the target device to perform an upgrade operation of the energy storage system.

[0065] In an embodiment of the present application, when the upgrade task is completed on the IoT platform, the platform will automatically extract the relevant parameters and instruction information in the task and integrate it into an OTA upgrade command. This command is sent to the corresponding target device via network transmission (for example, through relevant network communication protocols such as the MQTT protocol). After receiving the OTA upgrade command, the target device will perform the corresponding energy storage system upgrade operation according to the requirements of the command. This method of automatically issuing OTA upgrade commands through the IoT platform avoids the cumbersome process of manually operating the target devices one by one, improves the efficiency of the upgrade operation, and can ensure the accuracy and consistency of the command issuance. At the same time, combined with subsequent steps, it can better achieve effective control and management of the entire energy storage system upgrade process.

[0066] It should be noted that if the target device does not return confirmation information within the preset time, the IoT platform will first automatically trigger the retransmission mechanism, and resend the request within 10 seconds of detecting the timeout for the first time. If no confirmation is received, it will resend multiple times at appropriately extended time intervals, up to a maximum of 3 times. At the same time, the device identification, the time and number of the first transmission and each retransmission are recorded in detail after each retransmission, and the device status is marked as "suspected abnormal" in the device management module. Then, the operator is notified of the device timeout and retransmission times in a variety of ways. When the number of devices that have not returned confirmation information reaches a certain proportion or problems occur in specific important devices, a more advanced warning is triggered. Finally, the operator preliminarily analyzes the cause of the timeout based on the recorded information, uses remote diagnostic tools to troubleshoot the device's own problems, contacts the operation and maintenance team for network problems, and promptly performs maintenance and debugging for abnormal upgrade servers to ensure a smooth upgrade process.

[0067] Step S13, receiving progress data reported by the target device, and updating the running status of the target device in the display component according to the progress data until the upgrade operation is completed.

[0068] In an embodiment of the present application, after the IoT platform issues an OTA upgrade command to the target device, the target device executes the energy storage system upgrade operation, and generates progress data including the proportion of downloaded upgrade packages, completion marks of specific upgrade steps, etc. based on the actual progress, which fully reflects the degree of upgrade. The target device reports the progress data to the IoT platform through established methods such as the MQTT protocol. After receiving the data, the platform updates the operating status of the target device in the form of a chart, progress bar or text on the display component of the visual interface for the operator to intuitively understand, such as "20% of the upgrade is completed" and "Downloading the upgrade package". Before the upgrade is completed, the platform continues to receive update data, which is convenient for operators to grasp the dynamics in real time and promptly discover abnormalities such as stagnation of the upgrade progress, and then combine the system record information to check and handle according to the established process to ensure the smooth completion of the upgrade.

[0069] In addition, the frequency of equipment reporting upgrade progress can be specified from multiple aspects: based on time intervals, divided into frequent fixed intervals (15-30 seconds / time) and dynamic intervals (1 minute / time in the initial stage, 15 seconds / time for key steps, and 30 seconds / time at the end); based on the upgrade stage, triggered by key steps (such as starting download, 50% completion, etc.), combined with step time adjustment (30 seconds / time for long steps, and short steps are reported upon completion); comprehensive network and device performance, 15 seconds / time for a good network, 1 minute / time for a bad network and cached, 15-30 seconds / time for high-performance devices, and 30 seconds-1 minute / time for low-performance devices.

[0070] Step S14, obtaining a status image of the display component, and determining whether the energy storage system in the target device is successfully upgraded based on the status image to obtain a test result.

[0071] In an embodiment of the present application, after the target device completes the energy storage system upgrade operation, the Internet of Things platform captures an image of the display component that displays the operating status of the target device, wherein the status image refers to a picture containing visual information about the operating status of the target device, and the image can intuitively reflect the immediate status of the device after the upgrade is completed, such as whether the device is started normally, the indication status of each functional module, etc. This information is presented in the image in the form of graphics, colors, logos, etc.

[0072] In terms of implementation, the image acquisition module integrated in the IoT platform can be used to call the relevant graphics capture interface, and the driver or software interface associated with the display component can be used to convert the display component screen into a digital image format and save it according to specific instructions. This is similar to using a screenshot tool to capture a computer screen, but it is only for the specific display component that displays the operating status of the device on the IoT platform, so that the image can be analyzed later to determine whether the energy storage system upgrade is successful.

[0073] In the embodiment of the present application, determining whether the energy storage system in the target device is successfully upgraded according to the state image and obtaining the test result includes the following steps A1-A3:

[0074] Step A1, performing a scaling operation on the state image to obtain a target state image.

[0075] Specifically, after obtaining the status image of the display component, it is necessary to perform a scaling operation on it. Specifically, an image processing library can be used, such as the Pillow library in Python. The library provides a wealth of image operation functions, among which the resize method can be used to change the size of the image. The original status image is adjusted by setting a suitable scaling ratio or target size. For example, according to the requirements of the subsequent recognition algorithm and the limitations of computing resources, a target size is determined that can retain key information and is easy to process. The purpose of this is to reduce the amount of image data and speed up subsequent processing on the one hand, and to ensure that key information is not lost on the other hand, so as to provide a suitable image basis for accurately judging the upgrade status of the device. The scaled image is the target status image, which will be the object of the next analysis.

[0076] Step A2: identifying key areas in the target state image and obtaining color features of pixels in the key areas.

[0077] Specifically, for the zoomed target state image, the key area is identified from it. The key area refers to the part of the image related to the judgment of the device upgrade status, such as the indicator area representing the status of a specific functional module of the device, the area displaying version information, etc. To realize the recognition of the key area, image processing technologies such as template matching and feature extraction can be used. Taking template matching as an example, a template image with similar features to the key area is prepared in advance. By sliding the template on the target state image, the similarity between the template and each part of the image is calculated to determine the location of the key area. After determining the key area, the color features of the pixels in the area are obtained. In the Pillow library of Python, the color value of the pixel at the specified coordinate can be obtained by the getpixel method. The pixels in the key area are traversed and their color information is recorded. These color information constitute the color features of the key area. Different device upgrade states correspond to different color displays. By analyzing the color features, a basis is provided for finally judging whether the device energy storage system has been successfully upgraded.

[0078] Step A3, determining whether the energy storage system in the target device is successfully upgraded based on the color characteristics, and obtaining a test result.

[0079] In the embodiment of the present application, step A3 includes the following steps A31-A34:

[0080] Step A31, obtaining the association relationship between the preset version number and the preset color feature.

[0081] Specifically, during the system design phase, developers will pre-set the correspondence between different version numbers and specific color features. This association is determined based on the device display logic and the requirements for upgrade status indication. For example, for version A of the energy storage system, if it is stipulated that when the device is upgraded to this version, a specific area (such as the indicator area on the WiFi board) will be displayed in green, then green is the preset color feature corresponding to version A. This association can be stored in the form of a configuration file, such as a JSON file. In the JSON file, a key-value pair can be used to represent it, where the key is the version number and the value is the corresponding color feature information, such as {"VersionA":[0,255,0],"VersionB":[255,0,0]}, where the RGB value represents different colors. Alternatively, it can be stored in a database table, where the table structure contains a version number field and a color feature field, and this association is obtained through a database query operation. In this way, when it is necessary to determine the upgrade version, the system can easily obtain the color features corresponding to each version number.

[0082] Step A32, determining the target color feature hit by the target version number according to the association relationship.

[0083] Specifically, when the target device completes the upgrade and obtains its updated version number, the color feature corresponding to the target version number, that is, the target color feature, is found based on the association between the preset version number and the preset color feature. For example, if the target version number is determined to be "VersionX" through the OTA upgrade command, it will search in the configuration file or database table that stores the association relationship. If the configuration file is used, the JSON data structure will be traversed to find the item with the key "VersionX", and its corresponding value is the target color feature; if the database is used, an SQL query statement will be executed, such as SELECT color_feature FROM version_color_relation WHERE version_number='VersionX', and the query result will be the target color feature. The target color feature is the basis for subsequent matching with the actual color feature obtained.

[0084] Step A33, matching the color feature with the target color feature to obtain a matching result.

[0085] Specifically, after obtaining the color features of the pixels in the key area and determining the target color features, the two need to be matched. Color matching can be performed by calculating the similarity between colors. For example, for the RGB color mode, the Euclidean distance formula can be used to calculate the distance between two colors (i.e., the actual acquired color features and the target color features) in the RGB space. Assuming that the actual acquired color features are (R1, G1, B1) and the target color features are (R2, G2, B2), the Euclidean distance d = sqrt((R1-R2)^2+(G1-G2)^2+(B1-B2)^2). The smaller the distance, the more similar the two colors are. The system will pre-set a similarity threshold. If the calculated distance is less than the threshold, the color match is considered successful; otherwise, the match fails. Other color similarity calculation methods can also be used, such as comparison based on color histograms, etc. The specific method depends on the system's requirements for accuracy and computational efficiency. The matching result will be used to determine whether the device is successfully upgraded in the next step.

[0086] Step A34, based on the matching result, determine whether the energy storage system in the target device is successfully upgraded to obtain a test result.

[0087] Specifically, if the color match is successful, that is, the color characteristics displayed by the device are consistent with the expected target version number, it indicates that the device has been successfully upgraded to the target version, and a test result of "upgrade success" can be obtained. On the contrary, if the color does not match, that is, the difference between the actual and target color characteristics exceeds the preset similarity threshold, it means that the device may have failed to upgrade, and a test result of "upgrade failure" is obtained. This method based on color feature matching, combined with the device display characteristics, provides an intuitive and effective method for judging the upgrade status of the energy storage system.

[0088] In the embodiment of the present application, before acquiring the status image of the display component, the method further includes the following steps B1-B3:

[0089] Step B1, when the upgrade operation is completed, obtain the duration of the target device executing the upgrade operation.

[0090] Specifically, when the target device completes the upgrade operation of the energy storage system, it is necessary to record the time from the start of the upgrade operation to the completion, that is, the duration of the upgrade operation. When the target device receives the OTA upgrade command and starts the upgrade operation, the timer inside the device starts timing. This timer can be implemented based on the time management module of the device operating system. For example, in some embedded devices, a real-time clock (RTC) is used to record timestamps. When the signal that the upgrade operation is completed is sent, the current timestamp is obtained again, and the time taken for the upgrade operation is calculated by the difference between the two timestamps.

[0091] As an example, assume that the timestamp obtained when the upgrade operation starts is t1, and the timestamp obtained when the upgrade is completed is t2. If the timestamp is recorded in seconds, the duration is duration = t2-t1. The target device will report this duration data to the IoT platform through the established communication method (such as MQTT protocol) with the IoT platform for subsequent judgment.

[0092] Step B2: determine whether the duration is greater than a preset threshold.

[0093] Specifically, after receiving the upgrade operation duration reported by the target device, the IoT platform compares it with the preset threshold set based on the normal upgrade time experience and performance requirements of the energy storage system. For example, after multiple tests and performance considerations, it is determined that completing the upgrade within 10 minutes is normal, and 10 minutes is the preset threshold. The relevant logic module of the IoT platform reads the preset threshold from the configuration file or database. Assuming that the preset threshold in the configuration file is threshold and the received duration is duration, if (duration>threshold) is used to determine whether the duration exceeds the preset threshold. This result determines the direction of the subsequent device upgrade status determination.

[0094] Step B3: if it is greater than the preset threshold, it is determined that the energy storage system in the target device has failed to upgrade; or, if it is less than or equal to the preset threshold, the update version number of the energy storage system in the target device is obtained, and whether the energy storage system in the target device has been successfully upgraded is determined according to the update version number.

[0095] Specifically, if the duration is greater than the preset threshold, it means that the upgrade may take too long due to network interruption, hardware failure, etc., and the target device energy storage system upgrade failure can be directly determined. The IoT platform records the device identification, upgrade task information, and the failure reason of "upgrade time is too long" to facilitate subsequent analysis and processing. If the duration is less than or equal to the preset threshold, although the upgrade is completed within a reasonable time, it cannot be determined that the upgrade is successful. The IoT platform needs to obtain the energy storage system update version number reported by the target device through the MQTT protocol after the upgrade is completed.

[0096] In an embodiment of the present application, determining whether the energy storage system in the target device has been successfully upgraded is performed based on the update version number, including: extracting the target version number in the OTA upgrade command; comparing the update version number with the target version number; if the update version number is inconsistent with the target version number, determining that the upgrade of the energy storage system in the target device has failed, or, if the update version number is consistent with the target version number, triggering the operating status evaluation mechanism to detect whether the energy storage system in the target device has been successfully upgraded.

[0097] Specifically, when the IoT platform initiates an OTA upgrade for the target device, the OTA upgrade command carries the target version number, which specifies the specific version to which the target device is to be upgraded. To determine whether the upgrade is successful, the target version number must first be extracted from the command. After the target device is upgraded, the updated version number of the energy storage system is reported to the IoT platform. After obtaining the target version number, it is compared with the updated version number reported by the device. This is the key to determining whether the upgrade is successful or not. The upgrade status is preliminarily determined by judging whether the two are consistent. Simple conditional judgment statements can be used in the program, such as comparing version number strings like comparing numbers.

[0098] When the update version number is inconsistent with the target version number, the device has not been successfully upgraded to the expected version. It can be directly determined that the energy storage system in the target device has failed to upgrade, and relevant failure information can be recorded, such as device identification, upgrade task details, failure reasons (inconsistent version numbers), etc., to facilitate subsequent analysis and troubleshooting.

[0099] When the update version number is consistent with the target version number, the consistency of the version number only means that the device has been upgraded to the expected version, but whether the actual operating status of the device is normal and whether all functions can be used normally still needs further testing. Therefore, when the version numbers are consistent, the operating status evaluation mechanism is triggered. This mechanism will further test the energy storage system in the target device, and further test the actual operating status of the device by taking the status image of the display component corresponding to the target device to determine whether the upgrade is successful.

[0100] It should be noted that if Figure 2 As shown, the process of triggering the operation status evaluation mechanism to detect whether the energy storage system in the target device has been successfully upgraded includes: first, receiving the progress data reported by the target device through the Internet of Things platform, and updating the operation status of the target device on the display component according to the progress data, until the state image of the display component is obtained after the upgrade operation is completed; secondly, performing a zoom operation on the obtained state image of the display component to obtain a target state image; identifying key areas in the target state image, and obtaining color features of pixels in the key areas; finally, obtaining the association relationship between the preset version number and the preset color feature, and determining whether the target color feature hit by the target version number matches the target color feature based on the association relationship. If so, the operation status meets the test conditions, and if not, the operation status does not meet the test conditions.

[0101] In the embodiment of the present application, the upgrade result is not limited to being determined based on the state image, but can be determined based on multiple feature fusion, specifically including:

[0102] Method 1: Image multimodal feature fusion and deep learning analysis. First, the shape, texture and color features are extracted for the state image respectively. The shape features are obtained by using edge detection algorithms such as Canny combined with morphological operations, the texture features are extracted by gray-level co-occurrence matrix (GLCM), and the color features are obtained by converting the pixel color value to HSV space. Then, these features are combined in series into a comprehensive feature vector to provide rich information for subsequent analysis. Next, a convolutional neural network (CNN) model consisting of a convolutional layer, a pooling layer, and a fully connected layer is constructed to process the multimodal feature vector. Finally, a large amount of state image data annotated with upgrade success or failure labels is used to train the model. The parameters are adjusted through algorithms such as stochastic gradient descent to minimize the loss function so that the model can learn the mapping relationship between image features and upgrade results, thereby judging the upgrade results.

[0103] Method 2: Combine multi-dimensional judgment with operating parameters. First, collect the operating parameters of the equipment, such as voltage and current, and collect them in real time through sensors and perform normalization processing so that they can be better integrated with image features. When using convolutional neural networks (CNN) to judge the upgrade results, the processed operating parameters are added to the image feature vector as additional feature dimensions, or processed as independent input branches and image feature branches in the fusion layer to form a comprehensive feature vector containing image and operating parameter information. Based on this comprehensive feature vector, the CNN model analyzes from multiple dimensions, fully considering the operating status of the equipment and image features, so as to more accurately judge whether the upgrade is successful and avoid misjudgment that may be caused by relying solely on image features.

[0104] Method 3: Comparative analysis of historical image data to assist in judgment. During the operation of the IoT platform, each time a device upgrade is completed, its status image and related information such as the device model and upgrade version number are collected regardless of success or failure. The upgrade results are marked and sorted by device model and version number and stored in the historical status image database. After the new upgrade is completed and the image is obtained, multimodal feature extraction is performed to obtain a feature vector. Similar historical images are screened in the database based on the device model and version number and their feature vectors are extracted. The similarity between the new image and the historical image feature vector is calculated using methods such as cosine similarity. A similarity threshold is set. If the similarity between the new image and the historical failed image exceeds the threshold, the platform will warn that there may be a problem with the upgrade and provide a key feature comparison report to help troubleshoot. If the similarity with multiple historical successful images is high, the confidence in the success of the upgrade is increased to assist in judging the upgrade result.

[0105] In an embodiment of the present application, the method also includes: initializing execution data of a preset test program, wherein the execution data includes the number of executions and the number of successes; controlling the Internet of Things platform to perform an upgrade operation on the target device through the preset test program, and updating the execution data according to the upgrade operation; when the number of executions in the execution data reaches a preset number, calculating the stability of the preset test program based on the number of executions and the number of successes.

[0106] Specifically, Figure 3As shown, firstly, an initialization operation is performed, and the number of executions, the number of successes, and the number of failures in the execution data are all set to 0. Then, it is determined whether the number of executions reaches the preset number. If it reaches, the stability of the preset test program is calculated and the process ends. If the number of executions does not reach the preset number, the IoT platform is controlled by the preset test program to perform an upgrade operation on the target device. During the upgrade operation, it is checked whether the duration of the upgrade operation exceeds the preset time. If it exceeds the preset time, the duration is updated and rechecked; if it does not exceed the preset time, it is further checked whether the updated version number is consistent with the target version number. If the updated version number is inconsistent with the target version number, the number of executions and the number of failures are updated and the upgrade operation is performed again; if the version numbers are consistent, it is checked whether the running status of the target device meets the test conditions. If the running status does not meet the test conditions, the number of executions and the number of failures are updated and the upgrade operation is performed again; if the running status meets the test conditions, the number of executions and the number of successes are updated, and the process returns to continue to detect whether the number of executions reaches the preset number, until the number of executions reaches the preset number, and finally the stability of the preset test program is calculated.

[0107] As an example, at the beginning of the test, the total number of times total_time, the number of successes success_time, and the number of failures fail_time are initialized to 0. In the first loop, since total_time is not equal to 100, total_time and fail_time are each increased by 1, and then the browser is controlled by selenium to perform the upgrade operation on the target energy storage system and time is set to 0. In the third minute after the upgrade (time = 3, less than or equal to 4), it is checked that the version number is correct and the device operation status is also correct, so success_time and total_time are each increased by 1. Then continue to loop. For example, in a certain loop, if it is upgraded to the fifth minute (time>4), wait for 1 minute, add 1 to time, and re-judge. If time becomes 6 and is still greater than 4 at this time, continue to wait for 1 minute until time is less than or equal to 4 to check the version number and device operation status. If a certain check finds that the version number is wrong, total_time and fail_time are each increased by 1. This cycle is repeated until total_time reaches 100 times. Assuming that success_time is 85 at this time, the stability of the preset test program is 85 / 100*100%=85%.

[0108] In this embodiment, a test method for energy storage system upgrade is provided, which is applied to a target device. Figure 4 is a flow chart of another energy storage system upgrade test method according to an embodiment of the present invention. Figure 4 As shown, the process includes the following steps:

[0109] Step S21, receiving the OTA upgrade command issued by the Internet of Things platform.

[0110] In an embodiment of the present application, the target device monitors the communication link between the target device and the IoT platform at all times through its built-in communication module, waiting to receive the OTA upgrade command. The communication link can be established based on the MQTT protocol. MQTT is a lightweight publish / subscribe message transmission protocol suitable for communication between devices and platforms. When the IoT platform builds the upgrade task and sends the OTA upgrade command to the target device, the command is transmitted to the communication module of the target device through the network. After receiving the command, the communication module of the target device parses it to ensure that the command format is correct and belongs to a recognizable OTA upgrade instruction. For example, the validity of the command is verified by a specific command header identifier or protocol specification. Only after confirming that the command is valid, the target device will proceed to the next step and start executing the upgrade process of the energy storage system.

[0111] Step S22: Execute the upgrade operation of the energy storage system according to the OTA upgrade command to obtain progress data.

[0112] In an embodiment of the present application, after the target device successfully receives and parses the OTA upgrade command, it starts the energy storage system upgrade operation according to the command. First check its own operating status, confirm that the upgrade conditions such as sufficient power and normal working mode are met, and then download the upgrade package from the specified server address (via MQTT or HTTP protocol) according to the command instructions. During downloading, the ratio of the total amount of downloaded and upgraded packages is calculated in real time as the download progress data; in different upgrade stages such as decompressing the upgrade package and replacing system files, a corresponding completion specific step identifier is generated, which together with the download progress data constitutes progress data reflecting the degree of upgrade, and provides upgrade status information for the Internet of Things platform, such as generating a "download_50%_completed" identifier when the download is 50% complete.

[0113] Step S23, reporting the progress data to the Internet of Things platform, so that the Internet of Things platform updates the operating status corresponding to the target device according to the progress data.

[0114] In an embodiment of the present application, after the target device generates progress data, it is sent to the IoT platform through the MQTT protocol or other established methods. Using the MQTT publish / subscribe mechanism, the device publishes the progress data to a specific topic, and the IoT platform subscribes to the topic to receive the data. Before sending, the device encapsulates the data in the format specified by the platform, such as integrating the proportion of downloaded upgrade packages, specific upgrade step completion marks, etc. into a JSON structure. After the platform receives the data, it updates the operating status of the target device in real time on the visual interface display component with a chart, progress bar or text, so that the operator can intuitively understand the upgrade status, such as "the upgrade is 20% complete", etc., which is convenient for grasping the dynamics, discovering and handling potential problems.

[0115] Step S24, when the upgrade operation is completed, send the current update version number of the energy storage system and the duration of the upgrade operation to the Internet of Things platform.

[0116] In an embodiment of the present application, after the target device completes the energy storage system upgrade operation, it reads the current update version number from the configuration file or the specific version information storage area. At the same time, the internal timer of the device is used to start timing from the receipt of the OTA upgrade command and stop when the upgrade is completed, and the duration of the upgrade operation is calculated. Subsequently, the device reports the update version number and duration to the Internet of Things platform through the MQTT protocol or other communication methods. After receiving this information, the platform combines the previous upgrade progress data, comprehensively evaluates the upgrade results, determines whether it is successful, and performs corresponding record processing to provide a basis for subsequent equipment management and maintenance.

[0117] As an example, Figure 5 As shown in the figure, the interaction process between multiple components during the energy storage system upgrade process is as follows:

[0118] Starting from the target device, the target device first reports the current version number of the energy storage system (step 1); the preset test program of the IoT platform will automatically create an upgrade task (step 2); after receiving the upgrade task, the OTA server adds the upgrade package and sends the OTA upgrade command to the target device (step 3); after receiving the OTA upgrade command, the target device starts to perform a series of upgrade operations: the target device receives the OTA upgrade command (step 4.1); the target device downloads the upgrade package (step 4.2); during the upgrade process, the target device reports the progress data (step 4.3); the IoT platform displays the OTA upgrade progress (step 4.4); after the target device completes the upgrade, it reports the updated version number (step 4.5); the device status recognition program obtains the status image of the display component (step 5); the device operation status is checked (step 6) to ensure the normal operation of the upgraded device. The entire process realizes the upgrade operation of the energy storage system through close cooperation between various components, and monitors the progress and checks the status during the upgrade process to ensure the smooth progress of the upgrade and the normal operation of the equipment.

[0119] In this embodiment, a test device for upgrading an energy storage system is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and will not be repeated hereafter. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0120] This embodiment provides a test device for energy storage system upgrade, which is applied to the Internet of Things platform, such as Figure 6 As shown, including:

[0121] A construction module 61 is used to construct an upgrade task on the Internet of Things platform through a preset test program;

[0122] The sending module 62 is used to send an OTA upgrade command to at least one target device using the upgrade task, wherein the OTA upgrade command is used to control the target device to perform an upgrade operation of the energy storage system;

[0123] The updating module 63 is used to receive the progress data reported by the target device, and update the running status of the target device in the display component according to the progress data until the upgrade operation is completed;

[0124] The acquisition module 64 is used to acquire the status image of the display component, and determine whether the energy storage system in the target device is successfully upgraded according to the status image to obtain the test result.

[0125] In an optional embodiment of the present application, the device also includes: a judgment module, which is used to obtain the duration of the target device executing the upgrade operation when the upgrade operation is completed; judge whether the duration is greater than a preset threshold; if it is greater than the preset threshold, determine that the upgrade of the energy storage system in the target device has failed, or, if it is less than or equal to the preset threshold, obtain the updated version number of the energy storage system in the target device, and determine whether the energy storage system in the target device has been successfully upgraded based on the updated version number.

[0126] In an optional implementation of the present application, a judgment module is used to extract the target version number in the OTA upgrade command; compare the update version number with the target version number; if the update version number is inconsistent with the target version number, it is determined that the energy storage system in the target device has failed to upgrade; or, if the update version number is consistent with the target version number, the operation status evaluation mechanism is triggered to detect whether the energy storage system in the target device has been successfully upgraded.

[0127] In an optional embodiment of the present application, an acquisition module 64 is used to perform a zoom operation on the state image to obtain a target state image; identify key areas in the target state image and obtain color features of pixels in the key areas; determine whether the energy storage system in the target device has been successfully upgraded based on the color features to obtain test results.

[0128] In an optional embodiment of the present application, an acquisition module 64 is used to obtain an association relationship between a preset version number and a preset color feature; determine a target color feature hit by the target version number based on the association relationship; match the color feature with the target color feature to obtain a matching result; and determine whether the energy storage system in the target device is successfully upgraded based on the matching result to obtain a test result.

[0129] In an optional embodiment of the present application, the device also includes: a computing module for initializing execution data of a preset test program, wherein the execution data includes the number of executions and the number of successes; controlling the Internet of Things platform to perform an upgrade operation on the target device through the preset test program, and updating the execution data according to the upgrade operation; when the number of executions in the execution data reaches a preset number, calculating the stability of the preset test program based on the number of executions and the number of successes.

[0130] This embodiment provides a test device for energy storage system upgrade, which is applied to target equipment, such as Figure 7 As shown, including:

[0131] The receiving module 71 is used to receive the OTA upgrade command issued by the Internet of Things platform;

[0132] An execution module 72 is used to execute an upgrade operation of the energy storage system according to the OTA upgrade command to obtain progress data;

[0133] The reporting module 73 is used to report the progress data to the Internet of Things platform so that the Internet of Things platform updates the corresponding operating status of the target device according to the progress data;

[0134] The sending module 74 is used to send the current update version number of the energy storage system and the duration of the upgrade operation to the Internet of Things platform when the upgrade operation is completed.

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

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

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

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

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

[0140] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

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

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

Claims

1. A test method for energy storage system upgrade, applied to the Internet of Things platform, characterized in that: The method comprises: Building upgrade tasks on the IoT platform through preset test procedures; Using the upgrade task, issuing an OTA upgrade command to at least one target device, wherein the OTA upgrade command is used to control the target device to perform an upgrade operation of the energy storage system; receiving progress data reported by the target device, and updating the operating status of the target device on the display component according to the progress data until the upgrade operation is completed; A status image of the display component is obtained, and whether the energy storage system in the target device is successfully upgraded is determined based on the status image to obtain a test result.

2. The method according to claim 1, characterized in that: Before acquiring the status image of the display component, the method further includes: When the upgrade operation is completed, obtaining the duration of the target device executing the upgrade operation; Determine whether the duration is greater than a preset threshold; If it is greater than the preset threshold, it is determined that the upgrade of the energy storage system in the target device has failed; or, if it is less than or equal to the preset threshold, the update version number of the energy storage system in the target device is obtained, and it is determined whether the upgrade of the energy storage system in the target device is successful based on the update version number.

3. The method according to claim 2, characterized in that The step of determining whether the energy storage system in the target device is successfully upgraded according to the updated version number includes: Extract the target version number in the OTA upgrade command; Comparing the update version number with the target version number; If the update version number is inconsistent with the target version number, it is determined that the energy storage system in the target device has failed to upgrade; or, if the update version number is consistent with the target version number, an operation status evaluation mechanism is triggered to detect whether the energy storage system in the target device has been successfully upgraded.

4. The method according to claim 1, characterized in that: The step of determining whether the energy storage system in the target device is successfully upgraded according to the status image to obtain a test result includes: Performing a scaling operation on the state image to obtain a target state image; Identify key areas in the target state image, and obtain color features of pixels in the key areas; Determine whether the energy storage system in the target device is successfully upgraded based on the color feature to obtain a test result.

5. The method according to claim 4, characterized in that The step of determining whether the energy storage system in the target device is successfully upgraded according to the color feature to obtain a test result includes: Get the association between the preset version number and the preset color feature; Determine the target color feature hit by the target version number according to the association relationship; Matching the color feature with the target color feature to obtain a matching result; Based on the matching result, it is determined whether the energy storage system in the target device is successfully upgraded to obtain a test result.

6. The method according to claim 1, characterized in that The method further comprises: Initializing execution data of the preset test program, wherein the execution data includes the number of executions and the number of successes; Controlling the Internet of Things platform to perform an upgrade operation on the target device through the preset test program, and updating the execution data according to the upgrade operation; When the execution times reach a preset number, the stability of the preset test program is calculated based on the execution times and the success times.

7. A test method for energy storage system upgrade, applied to a target device, characterized in that: The method comprises: Receive OTA upgrade commands issued by the IoT platform; Execute an upgrade operation of the energy storage system according to the OTA upgrade command to obtain progress data; Reporting the progress data to the Internet of Things platform, so that the Internet of Things platform updates the operating status corresponding to the target device according to the progress data; When the upgrade operation is completed, the current update version number of the energy storage system and the duration of the upgrade operation are sent to the Internet of Things platform.

8. A test device for upgrading an energy storage system, applied to an Internet of Things platform, characterized in that: The device comprises: A construction module, used to construct an upgrade task on the IoT platform through a preset test program; A sending module, used to send an OTA upgrade command to at least one target device using the upgrade task, wherein the OTA upgrade command is used to control the target device to perform an upgrade operation of the energy storage system; An updating module, configured to receive progress data reported by the target device, and update the operating status of the target device in the display component according to the progress data until the upgrade operation is completed; The acquisition module is used to acquire the status image of the display component, and determine whether the energy storage system in the target device is successfully upgraded according to the status image to obtain a test result.

9. A test device for upgrading an energy storage system, applied to a target device, characterized in that: The device comprises: The receiving module is used to receive the OTA upgrade command issued by the IoT platform; An execution module, used to execute an upgrade operation of the energy storage system according to the OTA upgrade command to obtain progress data; A reporting module, used to report the progress data to the Internet of Things platform, so that the Internet of Things platform updates the operating status corresponding to the target device according to the progress data; The sending module is used to send the current update version number of the energy storage system and the duration of the upgrade operation to the Internet of Things platform when the upgrade operation is completed.

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

Citation Information

Cited By

  • OTA updating method, OTA updating device and energy storage equipment

    CN120676327A

  • Method for performing upgrade test on firmware, test system and storage medium

    CN121501691A