Method and device for remotely upgrading electric energy meter based on use and acquisition terminal, and storage medium

By using terminals to issue intelligent classification and modular upgrade packages for power metering, combined with MD5 check and SFTP services, the problem of low efficiency of diversified power meter upgrades has been solved, and efficient and safe remote upgrade of power meter has been achieved, improving Upgrade success rate and reliability.

CN119225765APending Publication Date: 2024-12-31CSG SMART SCI&TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411294512.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-14
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

The existing technology is difficult to achieve rapid and accurate software upgrades for diversified power meters. Traditional manual upgrades are time-consuming and labor-intensive. Traditional remote upgrade methods are inefficient when facing power meters from different models and manufacturers and cannot be managed efficiently and uniformly.

Method used

The power meter is upgraded remotely by using terminals, and the power meter is grouped through intelligent classification algorithms. The modular upgrade package and dynamic issuance strategy are used, combined with MD5 checks and SFTP services to support the simultaneous upgrade of different types of power meters, and the introduction of two types is introduced. Retry the mechanism to improve success rate.

Benefits of technology

It significantly improves the flexibility, efficiency and safety of the upgrade of electricity meter, realizes personalized upgrades of different types of electricity meters, reduces the need for manual intervention, and ensures the reliability and overall efficiency of the upgrade.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119225765A_ABST
    Figure CN119225765A_ABST
Patent Text Reader

Abstract

The invention relates to a method and device for remotely upgrading an electric energy meter based on an application and acquisition terminal and a storage medium, and the method comprises the steps: employing the application and acquisition terminal as a bridge, combining an intelligent recognition and classification algorithm, a modular upgrade package and a dynamic issuing strategy of the electric energy meter, and introducing a mechanism for taking effective measures for an electric energy meter which fails to upgrade to carry out secondary retry. And the flexibility, efficiency and safety of upgrading of the electric energy meter are remarkably improved. Based on the powerful processor performance and storage capacity of the using and collecting terminal, classification of the electric energy meters is optimized through an intelligent classification algorithm, so that automatic issuing of personalized upgrading packages is achieved, and the problem that different types of electric energy meters cannot be upgraded at the same time through a traditional electric energy meter upgrading method is solved. Benefited from the modular software architecture of the electric energy meter, the electric energy meter can only download the file module needing to be updated according to own needs, so that the data volume of file transmission can be reduced, and the overall upgrading efficiency of the electric energy meter is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electric energy meters, and in particular to a method, a device and a storage medium for remotely upgrading an electric energy meter based on a user acquisition terminal. Background Art

[0002] As the core metering unit in the power grid, the continuous optimization and updating of the functions of the energy meter is crucial to improving the efficiency of power grid operations and protecting the rights and interests of users. However, faced with a large number of energy meters with various models, how to achieve fast and accurate software upgrades has become a major challenge for power grid operation and maintenance. The traditional manual upgrade method is not only time-consuming and labor-intensive, but also difficult to adapt to the needs of large-scale deployment. Although there have been attempts to perform remote upgrades through upper-level equipment, these methods seem to be powerless when faced with a variety of energy meter models and communication protocols, and cannot achieve efficient and unified management.

[0003] At present, hundreds of electric energy meters are usually connected to a concentrator in a substation, and some substations can even connect up to a thousand electric energy meters. These electric energy meters may come from the same manufacturer or from different manufacturers; even if they come from the same manufacturer, they may have different models or versions. How to efficiently upgrade the software of these electric energy meters has always been a difficult problem.

[0004] There are two main traditional upgrade methods. The first is a manual method, which requires manual removal of the upper cover of the electricity meter and then burning a new program through the programmer interface. This method has the disadvantages of high cost, low upgrade efficiency, and easy confusion. The second is to upgrade the electricity meter through the upper device of the electricity meter in a broadcast or point-to-point manner. For the same model of electricity meters, the broadcast method can have a relatively high file transfer efficiency, but for electricity meters of different manufacturers or models, they cannot be upgraded at the same time due to different upgrade packages. The point-to-point method can upgrade all electricity meters, but the overall upgrade efficiency is extremely low. Summary of the invention

[0005] The present invention proposes a method, device and storage medium for remotely upgrading an electric energy meter based on a sampling terminal, which can at least solve one of the technical problems in the background technology.

[0006] To achieve the above object, the present invention adopts the following technical solutions:

[0007] A method for remotely upgrading an electric energy meter based on a sampling terminal comprises the following steps:

[0008] Step 1: The user procurement master station sends the software upgrade packages of various types of electric energy meters to the user procurement terminal through Ethernet / 4G / 5G and other channels;

[0009] Step 2: Use the terminal to decompose and extract the upgrade package obtained in step 1, and perform md5 verification on the extracted compressed package. After the verification is correct, unpack it, and then save the upgrade file in the upgrade directory of each electric energy meter model according to the description file config.json in the upgrade package;

[0010] Step 3: Use the terminal to broadcast to the electric energy meter and it can be upgraded;

[0011] Step 4: After receiving the upgrade notification, the electric energy meter queries the user terminal for its own upgrade file information;

[0012] Step 5: The electric energy meter determines whether it needs to be upgraded and the upgrade file to be obtained based on the received upgrade file information;

[0013] Step 6. The electric energy meter downloads the upgrade file from the user terminal. After the download is complete, an md5 check is performed on each downloaded module file. If all checks pass, the upgrade operation is performed. Otherwise, the upgrade failure error code is recorded for query by the user terminal.

[0014] Furthermore, the electric energy meter software upgrade package file uses a two-in-one file structure of a shell script preprocess.sh + a compressed package meter.tar.gz;

[0015] The file header is the shell script preprocess.sh. The preprocess.sh script is responsible for extracting the compressed package meter.tar.gz from the file, and then performing md5 verification on the extracted compressed package meter.tar.gz. After the verification passes, the extracted compressed package meter.tar.gz is decompressed and the upgrade script fileprocess.sh in the compressed package meter.tar.gz is executed. The fileprocess.sh script is responsible for the specific preparation of the upgrade file. The fileprocess.sh script finds the decompressed config.json file and reads the file content, and copies the electric energy meter upgrade file to the specified path according to the configuration to ensure precise control of the upgrade process and file integrity.

[0016] Furthermore, step three includes intelligently classifying the electric energy meters, grouping the electric energy meters with similar characteristics, thereby preparing corresponding upgrade packages for each group of electric energy meters, and automatically classifying the electric energy meters in detail according to the characteristics such as model, version information, and communication protocol reported by the electric energy meters;

[0017] Specifically, the K-means clustering algorithm is used:

[0018] Assume that the characteristic vector of the electric energy meter is X = {x1, x2, ..., x n}, where x i The i-th feature of the electric energy meter includes model, version, and communication protocol. The optimal classification center μ is determined by minimizing the square error J. i , where C i represents the set of electric energy meters of category i, and k is the number of categories:

[0019] Furthermore, step three also includes:

[0020] In order to quantify and evaluate the success rate and efficiency of the remote upgrade process, an upgrade efficiency evaluation model is established. This model helps measure the ratio between the number of successful meters and the total number of meters during the remote upgrade process of electric energy meters, and can objectively evaluate the effectiveness of the entire upgrade project. The formula of the upgrade efficiency evaluation model is as follows:

[0021]

[0022] Among them, E is the upgrade efficiency, N success is the number of meters that have been successfully upgraded, N fail is the number of meters that failed to upgrade, N total is the total number of meters.

[0023] Furthermore, step six also includes,

[0024] For the energy meters that failed to upgrade, the terminal performs a second retry upgrade based on the retry strategy optimization function. In order to avoid affecting the operation of the power grid, the system adopts a time-divided retry mechanism, selecting the time when the power grid load is low or the energy meter is idle for upgrade retries, ensuring that the impact of the retry process on the user's power experience is minimized.

[0025] Design retry interval time T retry The optimization function takes into account network fluctuation V, energy meter idle rate F and historical retry success rate S history , to maximize the upgrade success rate S retry :

[0026]

[0027] Among them, α, β, γ, δ, λ,∈ are coefficients adjusted according to actual conditions, and the optimal T is found through the optimization algorithm. retry .

[0028] Furthermore, step six also includes the upgrade process:

[0029] During the upgrade process, MD5 verification is used to ensure the integrity and security of the file, avoiding upgrade failures caused by file damage. At the same time, the SFTP service is enabled on the terminal to provide a safe and convenient file download path for the electric energy meter, supporting simultaneous upgrades of electric energy meters of different models, thus enhancing the flexibility and compatibility of the upgrade process.

[0030] When the file is pulled, the md5 value of the pulled file is calculated, and the md5 value of the corresponding file module in the retrieved config.json is calculated. If all are consistent, the file is updated. If there is one inconsistency, the update is abandoned to ensure the correctness of the program upgrade. At the same time, the upgrade failure error code is recorded for the user terminal to query, and the user terminal will feedback to the user station.

[0031] On the other hand, the present invention further discloses a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor executes the steps of the above method.

[0032] On the other hand, the present invention further discloses a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the above method.

[0033] It can be seen from the above technical solution that the present invention proposes an innovative remote upgrade method for electric energy meters, which uses the user terminal as a bridge, combines the intelligent identification and classification algorithm of the electric energy meter, modular upgrade package and dynamic delivery strategy, and introduces a secondary retry mechanism for electric energy meters that fail to upgrade and take effective measures. It effectively solves the above problems and significantly improves the flexibility, efficiency and safety of electric energy meter upgrades.

[0034] Compared with the prior art, the present invention has the following beneficial effects:

[0035] 1. Intelligent classification and personalized distribution: Based on the powerful processor performance and storage capacity of the acquisition terminal, the present invention optimizes the classification of electric energy meters through intelligent classification algorithms, thereby realizing the automatic distribution of personalized upgrade packages, solving the problem that the traditional electric energy meter upgrade method cannot upgrade electric energy meters of different models at the same time. Thanks to the modular software architecture of the electric energy meter, the electric energy meter can download only the file modules that need to be updated according to its own needs, which can reduce the amount of data transmitted by the file and greatly improve the overall upgrade efficiency of the electric energy meter.

[0036] 2. Modular file upgrade method: The present invention uses a modular file upgrade method to solve the problem of redundancy in the transmission of upgrade files when the electric energy meter software is upgraded. This on-demand upgrade file transmission method is obviously innovative.

[0037] 3. Active judgment and upgrade of electric energy meters: The electric energy meters are given the ability to self-judge the need for upgrades, which improves the intelligence level of the upgrade process and reduces interference with the normal operation of the power grid.

[0038] 4. Second retry mechanism: By intelligently identifying upgrade failures and automatically triggering a second retry upgrade process, the overall upgrade success rate is significantly improved, the need for manual intervention is reduced, and the reliability of the upgrade is ensured. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 This is a schematic diagram of a process of upgrading an electric energy meter using a sampling terminal according to an embodiment of the present invention;

[0040] Figure 2 This is a file structure diagram of the electric energy meter upgrade package of the present invention;

[0041] Figure 3 This is a flowchart for upgrading different types of electric energy meters according to an embodiment of the present invention. DETAILED DESCRIPTION

[0042] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions 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 only part of the embodiments of the present invention, not all of the embodiments.

[0043] like Figure 1 As shown, the method for remotely upgrading an electric energy meter based on a terminal according to this embodiment includes the following steps:

[0044] Step 1: The user procurement master station sends the software upgrade packages of various types of electric energy meters to the user procurement terminal through Ethernet / 4G / 5G and other channels;

[0045] Step 2: Use the terminal to decompose and extract the upgrade package obtained in step 1, and perform md5 verification on the extracted compressed package. After the verification is correct, unpack it, and then save the upgrade file in the upgrade directory of each electric energy meter model according to the description file config.json in the upgrade package;

[0046] Step 3: Use the terminal to broadcast to the electric energy meter and it can be upgraded;

[0047] Step 4: After receiving the upgrade notification, the electric energy meter queries the user terminal for its own upgrade file information;

[0048] Step 5: The electric energy meter determines whether it needs to be upgraded and the upgrade file to be obtained based on the received upgrade file information;

[0049] Step 6. The electric energy meter downloads the upgrade file from the user terminal. After the download is complete, an md5 check is performed on each downloaded module file. If all checks pass, the upgrade operation is performed. Otherwise, the upgrade failure error code is recorded for query by the user terminal.

[0050] The following are the technical points:

[0051] Upgrade package file structure and processing:

[0052] like Figure 2 As shown in the figure, the electric energy meter upgrade package file uses a two-in-one (shell script preprocess.sh + compressed package meter.tar.gz) file structure. The file header is the shell script preprocess.sh, which is responsible for extracting the compressed package meter.tar.gz from the file, and then performing md5 verification on the extracted compressed package meter.tar.gz. After the verification passes, the extracted compressed package meter.tar.gz is decompressed and the upgrade script fileprocess.sh in the compressed package meter.tar.gz is executed. The script fileprocess.sh is responsible for the specific preparation of the upgrade file. The script fileprocess.sh finds the decompressed config.json file and reads the file content, and copies the electric energy meter upgrade file to the specified path according to the configuration, ensuring precise control of the upgrade process and file integrity.

[0053] Step three involves intelligent classification of energy meters using the sampling terminal:

[0054] By intelligently classifying the energy meters, energy meters with similar characteristics can be grouped, so that corresponding upgrade packages can be prepared for each group of energy meters. This means that the user terminal can prepare and issue upgrade packages in a customized manner according to the different types and characteristics of the energy meters, avoiding unnecessary file transfers and reducing network bandwidth usage. The system integrates advanced machine learning algorithms to optimize classification accuracy. The energy meters are automatically classified in detail based on the model, version information, communication protocol and other features reported by the energy meters.

[0055] This scheme adopts K-means clustering algorithm: Assume that the characteristic vector of the electric energy meter is X = {x1, x2, ..., x n}, where x i Represents the i-th feature of the electric energy meter (such as model, version, communication protocol, etc.), and determines the optimal classification center μ by minimizing the sum of squared errors J i , where C i represents the set of electric energy meters of category i, and k is the number of categories:

[0056]

[0057] This algorithm can dynamically learn and adapt to newly added electricity meter models to ensure the accuracy and timeliness of classification.

[0058] Step three also involves building an efficiency evaluation model:

[0059] In order to quantify and evaluate the success rate and efficiency of the remote upgrade process, an upgrade efficiency evaluation model is established. This model helps measure the ratio between the number of successful meters and the total number of meters during the remote upgrade of electric energy meters, so that the effectiveness of the entire upgrade project can be objectively evaluated. Specifically, the formula of the upgrade efficiency evaluation model is as follows:

[0060]

[0061] Among them, E is the upgrade efficiency, N success is the number of meters that have been successfully upgraded, N fail is the number of meters that failed to upgrade, N total is the total number of meters.

[0062] Dynamic delivery strategy:

[0063] After receiving the upgrade instruction from the master station, the user terminal dynamically adjusts the delivery strategy according to the real-time status of the energy meter (such as workload, communication quality) and classification information. The upgrade file is sent first to the energy meter with high priority or idle state, while the energy meter that is performing critical tasks is scheduled to be upgraded during the off-peak period, thereby reducing the impact on the operation of the power grid.

[0064] Step 6 involves the secondary retry upgrade time-sharing mechanism:

[0065] For the energy meter that failed to upgrade, the terminal performs a second retry upgrade according to the retry strategy optimization function. In order to avoid affecting the operation of the power grid, the system adopts a time-divided retry mechanism, selecting the time when the power grid load is low or the energy meter is idle for upgrade retries, ensuring that the impact of the retry process on the user's power experience is minimized. Design the retry interval time T retry The optimization function takes into account network fluctuation V, energy meter idle rate F and historical retry success rate S history , to maximize the upgrade success rate S retry :

[0066]

[0067] Among them, α, β, γ, δ, λ,∈ are coefficients adjusted according to actual conditions, and the optimal T is found through the optimization algorithm. retry .

[0068] Upgrade process:

[0069] During the upgrade process, MD5 verification is used to ensure the integrity and security of the file, avoiding upgrade failures caused by file damage. At the same time, the SFTP service is enabled on the terminal to provide a safe and convenient file download path for the electric energy meter, supporting the simultaneous upgrade of electric energy meters of different models, and enhancing the flexibility and compatibility of the upgrade process.

[0070] When the file is pulled, the md5 value of the pulled file is calculated, and the md5 value of the corresponding file module in the retrieved config.json is calculated. If all are consistent, the file is updated. If there is one inconsistency, the update is abandoned to ensure the correctness of the program upgrade. At the same time, the upgrade failure error code is recorded for the user terminal to query, and the user terminal will feedback to the user station.

[0071] like Figure 3 As shown in the figure, after receiving the upgrade notification, the electric energy meter requests the upgrade file that matches itself from the user terminal. After the file transfer is completed, the file is verified. After the verification is correct, the automatic upgrade begins. If the file verification is wrong, or an unexpected error occurs during the upgrade process, the upgrade is terminated, the upgrade failure information is recorded, and the next operation instruction from the user terminal is awaited.

[0072] In summary, the present invention provides a comprehensive, efficient and safe solution for remote upgrade of electric energy meters, and introduces intelligent identification and secondary retry mechanism for electric energy meters that fail to upgrade, further improving the whole process management of remote upgrade of electric energy meters, ensuring the efficiency, reliability and intelligence of large-scale electric energy meter network upgrade, which is of great value to promoting the construction of smart grids and improving the efficiency of grid operation and maintenance.

[0073] On the other hand, the present invention further discloses a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor executes the steps of the above method.

[0074] On the other hand, the present invention further discloses a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the above method.

[0075] In another embodiment provided in the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any of the methods for remotely upgrading an electric energy meter based on a procurement terminal in the above embodiments.

[0076] It is understandable that the system, device and storage medium provided in the embodiments of the present invention correspond to the method provided in the embodiments of the present invention, and the explanation, examples and beneficial effects of the relevant contents can refer to the corresponding parts in the above methods.

[0077] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.

[0078] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0079] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0080] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for remotely upgrading an electric energy meter based on a terminal, characterized in that: The following steps are included: Step 1: The user procurement master station sends the software upgrade packages of various types of electric energy meters to the user procurement terminal through Ethernet / 4G / 5G and other channels; Step 2: Use the terminal to decompose and extract the upgrade package obtained in step 1, and perform md5 verification on the extracted compressed package. After the verification is correct, unpack it, and then save the upgrade file in the upgrade directory of each electric energy meter model according to the description file config.json in the upgrade package; Step 3: Use the terminal to broadcast to the electric energy meter and it can be upgraded; Step 4: After receiving the upgrade notification, the electric energy meter queries the user terminal for its own upgrade file information; Step 5: The electric energy meter determines whether it needs to be upgraded and the upgrade file to be obtained based on the received upgrade file information; Step 6. The electric energy meter downloads the upgrade file from the user terminal. After the download is complete, an md5 check is performed on each downloaded module file. If all checks pass, the upgrade operation is performed. Otherwise, the upgrade failure error code is recorded for query by the user terminal.

2. The method for remotely upgrading an electric energy meter based on a terminal according to claim 1 is characterized in that: The electric energy meter software upgrade package file uses a two-in-one file structure, namely, the shell script preprocess.sh + the compressed package meter.tar.gz; The file header is the shell script preprocess.sh. The preprocess.sh script is responsible for extracting the compressed package meter.tar.gz from the file, and then performing md5 verification on the extracted compressed package meter.tar.gz. After the verification passes, the extracted compressed package meter.tar.gz is decompressed and the upgrade script fileprocess.sh in the compressed package meter.tar.gz is executed. The fileprocess.sh script is responsible for the specific preparation of the upgrade file. The fileprocess.sh script finds the decompressed config.json file and reads the file content, and copies the electric energy meter upgrade file to the specified path according to the configuration to ensure precise control of the upgrade process and file integrity.

3. The method for remotely upgrading an electric energy meter based on a terminal according to claim 2 is characterized in that: Step three includes intelligently classifying the energy meters and grouping the energy meters with similar characteristics, thereby preparing corresponding upgrade packages for each group of energy meters, and automatically classifying the energy meters in detail according to the characteristics such as model, version information, and communication protocol reported by the energy meters; Specifically, the K-means clustering algorithm is used: Assume that the characteristic vector of the electric energy meter is X = {x1, x2, ..., x n }, where x i The i-th feature of the electric energy meter includes model, version, and communication protocol. The optimal classification center μ is determined by minimizing the square error J. i , where C i represents the set of electric energy meters of category i, and k is the number of categories:

4. The method for remotely upgrading an electric energy meter based on a terminal according to claim 3 is characterized in that: Step three also includes: In order to quantify and evaluate the success rate and efficiency of the remote upgrade process, an upgrade efficiency evaluation model is established. This model helps measure the ratio between the number of successful meters and the total number of meters during the remote upgrade process of electric energy meters, and can objectively evaluate the effectiveness of the entire upgrade project. The formula of the upgrade efficiency evaluation model is as follows: Among them, E is the upgrade efficiency, N success is the number of meters that have been successfully upgraded, N fail is the number of meters that failed to upgrade, N total is the total number of meters.

5. The method for remotely upgrading an electric energy meter based on a terminal according to claim 4 is characterized in that: Step six also includes, For the energy meters that failed to upgrade, the terminal performs a second retry upgrade based on the retry strategy optimization function. In order to avoid affecting the operation of the power grid, the system adopts a time-divided retry mechanism, selecting the time when the power grid load is low or the energy meter is idle for upgrade retries, ensuring that the impact of the retry process on the user's power experience is minimized. Design retry interval time T retry The optimization function takes into account network fluctuation V, energy meter idle rate F and historical retry success rate S history , to maximize the upgrade success rate S retry : Among them, α, β, γ, δ, λ,∈ are coefficients adjusted according to actual conditions, and the optimal T is found through the optimization algorithm. retry .

6. The method for remotely upgrading an electric energy meter based on a terminal according to claim 5 is characterized in that: Step six also includes the upgrade process: During the upgrade process, MD5 verification is used to ensure the integrity and security of the file, avoiding upgrade failures caused by file damage. At the same time, the SFTP service is enabled on the terminal to provide a safe and convenient file download path for the electric energy meter, supporting simultaneous upgrades of electric energy meters of different models, thus enhancing the flexibility and compatibility of the upgrade process. When the file is pulled, the md5 value of the pulled file is calculated, and the md5 value of the corresponding file module in the retrieved config.json is calculated. If all are consistent, the file is updated. If there is one inconsistency, the update is abandoned to ensure the correctness of the program upgrade. At the same time, the upgrade failure error code is recorded for the user terminal to query, and the user terminal will feedback to the user station.

7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 6.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the computer program is executed by the processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 6.