Remote upgrading method for transformer area carrier module
Through the remote upgrade method of the carrier network management platform and intelligent gateway, using blockchain and adaptive algorithm model, it solves the problems of low efficiency and high cost of carrier module upgrade in traditional station areas, and achieves safe and efficient remote upgrade, which is suitable for intelligent applications. Construction of power grid.
Patent Information
- Application Number
- CN202410861771.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-09-27
AI Technical Summary
The traditional way of upgrading carrier modules in station areas relies on manual on-site operations, which is inefficient and costly.
Through the control of the carrier network management platform and intelligent carrier gateway, the blockchain is used to record the hash value of the upgrade file, monitor the upgrade status in real time, and use the adaptive algorithm model to plan the upgrade path and sequence to achieve remote upgrade.
It improves the upgrade efficiency, reduces maintenance costs, realizes safe, efficient and intelligent remote upgrade, and adapts to the needs of different types and versions of carrier modules.
Smart Images

Figure CN118714005A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of remote upgrading of a carrier module in a station area, and in particular to a remote upgrading method of a carrier module in a station area. Background Art
[0002] In the power transmission and distribution network, the intelligent PCL gateway is dispersedly deployed in each substation. The network element data in the carrier network is managed and collected in the south through the power line carrier network, and the business data is exchanged with the carrier network management platform in the north through the standard MQTT protocol carried in the IP network. The carrier network management platform will manage, maintain and collect business data for the intelligent PCL gateway and the network element equipment in the southbound carrier network. Because the carrier module STA is installed on intelligent terminals such as household meters, sensors, and topological branches, the deployment is relatively scattered. The software version upgrade of the carrier module STA can only be carried out one by one at the substation site. The upgrade work is cumbersome, inefficient, and has high maintenance costs. The present invention proposes a remote upgrade method for the carrier module STA through the control of the carrier network management platform and the intelligent carrier gateway, which saves maintenance costs and improves efficiency. Summary of the invention
[0003] In view of the above existing problems, the present invention is proposed.
[0004] Therefore, the present invention provides a remote upgrade method for a substation carrier module, which can solve the problem that the traditional substation carrier module upgrade method mainly relies on manual on-site operation to upgrade the modules one by one, which is not only inefficient but also costly.
[0005] In order to solve the above technical problems, the present invention provides the following technical solutions, a method for remotely upgrading a carrier module in a station area, comprising:
[0006] The hash value and file information of the upgrade file are recorded on the blockchain. Before upgrading, the file hash value is obtained from the blockchain and compared with the local file hash value;
[0007] During the upgrade process, the carrier module regularly reports the upgrade status. At the same time, the carrier network management platform monitors the upgrade status in real time and provides a visual interface. When an upgrade abnormality is detected, the carrier module is automatically restored to the backup state.
[0008] The upgrade path and upgrade sequence are planned through an adaptive algorithm model to plan the optimal upgrade strategy.
[0009] As a preferred solution of the remote upgrade method of the carrier module in the station area described in the present invention, the hash value includes: using the SHA-256 algorithm to perform a hash operation on the upgrade file to generate a unique identifier, and recording the file hash value, file name, version number, and release time information on the blockchain to ensure that the file source is reliable;
[0010] The upgrade file is hashed using the SHA-256 algorithm to obtain a hash value H. The hash value H is tested for randomness using the NIST pseudo-random number generator test suite to obtain a test result N. At the same time, the probability of hash collision P is estimated using the birthday attack theory model, and the time cost T of hash value generation is evaluated using the actual running time, as follows:
[0011]
[0012] Among them, L represents the length of the hash value, k represents the size of the hash table, n represents the number of hash functions, and V represents the execution speed.
[0013] As a preferred solution of the remote upgrade method of the station carrier module described in the present invention, wherein: the SHA-256 algorithm includes, when P>0, T>0, C>0, the hash algorithm performs normally in terms of security, randomness and execution efficiency, and the collision probability is lower than the preset value, and it is still safe in practical applications; P>0, T>0, C<0 is impossible to occur in practice, and it is directly determined that the value of C is negative due to erroneous understanding or input; when P=0, T>0, C>0, the hash algorithm performs normally in terms of security, and there is no possibility of collision, but there is a time cost and the execution efficiency of the algorithm;
[0014] When T=0 or C=0, it means that there is a problem with the algorithm input or the algorithm itself. The calculation must be stopped immediately to fix the problem and correct the algorithm until T and C in the algorithm are not 0.
[0015] As a preferred solution of the remote upgrade method of the substation carrier module described in the present invention, the carrier network management platform monitors the upgrade status in real time, including: when the reported current operation steps do not match the preset successful step sequence, sending a warning message to the carrier network management platform and recording the abnormality; when the carrier network management platform receives the upgrade status information of multiple carrier modules, the information is classified and summarized to generate a global upgrade status report; when the upgrade status information of the carrier module exceeds the preset threshold, the fault automatic recovery mechanism is started to try to restore the upgrade process; when the carrier network management platform finds abnormal upgrade status information, it is fed back to the operation and maintenance personnel in real time and the corresponding processing flow is started; when the upgrade progress of the carrier module is lower than the preset threshold, the upgrade strategy is adjusted, the upgrade frequency is increased and the transmission path is switched at the same time; when the upgrade status information of the carrier module shows failure, the fault automatic recovery mechanism is automatically executed to try to restore the upgrade process; when the upgrade status information of the carrier module continuously exceeds the preset threshold, the threshold setting is re-evaluated and adjusted to ensure system adaptability.
[0016] As a preferred solution of the remote upgrade method of the substation carrier module described in the present invention, the carrier network management platform real-time monitoring of the upgrade status also includes that the carrier network management platform collects the upgrade status information reported by all carrier modules, including the actual progress and expected progress of each module, and the actual response time and expected response time of various abnormal types, as well as the actual error count and expected error count of various error types. For each module, the difference between the actual progress and the expected progress is calculated, and then the square of the ratio of the difference to the expected progress is calculated; if the actual progress is not within the expected range, the score of the actual progress is set to 0; for each abnormal type, the difference between the actual response time and the expected response time is calculated, and then the square of the ratio of the difference to the expected response time is calculated; if the response time is abnormal, the score of the response time is set to 0; for each error type, the difference between the actual error count and the expected error count is calculated, and then the square of the ratio of the difference to the expected error count is calculated; if the error count exceeds the preset range, the score of the error count is set to 0, as follows:
[0017]
[0018] Among them, ADScore represents the anomaly detection score, n represents the number of carrier modules, AP i Indicates the actual progress of carrier module i, EP i Expected progress of Carrier Module I, IPT i A Boolean variable indicating whether the progress of carrier module i is within the expected range, m indicates the number of abnormal types detected, ART j Indicates the actual response time of detected anomaly type j, ERT j represents the expected response time of detected anomaly type j, IR j A Boolean variable indicating whether the response time of exception type j is normal, p indicates the number of error types detected, AEC k Indicates the actual error count of error type k detected, EEC k represents the expected error count of error type k detected, IEC k A Boolean variable indicating whether the error count for error type k is acceptable.
[0019] As a preferred solution of the remote upgrade method of the area carrier module of the present invention, wherein: the carrier network management platform real-time monitoring upgrade status also includes: when ADScore>0, it indicates that there is an abnormal situation, indicating that the progress is stagnant and the module response timeout is abnormal; when ADScore=0, it indicates that there is no abnormal situation and the operation steps of all modules are in line with expectations; ADScore<0 is an impossible situation, indicating that there is a problem with the output in the process and it is necessary to stop and check immediately;
[0020] Among them, when ADScore is in the range of (0, 20], it is a low-score anomaly, indicating that the impact of the abnormal situation on the upgrade process is negligible. The system arranges to continue the upgrade process, strengthens monitoring and recording, and regularly checks the abnormal detection score. If the score continues to rise, further medium-score abnormal measures need to be taken; when ADScore is in the range of (20, 60], it is a medium-score anomaly, indicating that the abnormal situation has an impact risk on the upgrade process. The system suspends the upgrade process, conducts problem troubleshooting and repair, and issues instructions to stop the upgrade immediately, troubleshoot the carrier module, take corresponding repair measures according to the troubleshooting results, and restart the upgrade process after confirming that the problem has been solved; when ADScore is in the range of (60, 100], it is a high-score anomaly, indicating that the impact of the abnormal situation on the upgrade process is serious. The system immediately stops the upgrade and restores the backup firmware. At the same time, according to the type and severity of the abnormality, choose to restore the most recent backup firmware or use the initial firmware. After confirming that the problem has been solved, restart the upgrade process.
[0021] As a preferred solution of the remote upgrade method of the area carrier module of the present invention, wherein: the adaptive algorithm model includes extracting each module information M i , including version v i and dependencies i :
[0022] M i = {v i ,d i}
[0023] Extract each upgrade file information j , including version u j and risk factor r j :
[0024] U j = {u j ,r j}
[0025] Define the version compatibility function f(v i ,u j ):
[0026]
[0027] If f(v i ,u j )>0.5, the version compatibility meets the standard and proceeds to the next step; otherwise, skip the current combination;
[0028] Define the dependency matching function g(d i ,m j ), combined with the version compatibility results:
[0029]
[0030] Determine the dependency match, if g(d i ,m j )>0.5, the dependency matching meets the criteria and proceeds to the next step; otherwise, skip the current combination;
[0031] Define the upgrade order priority function h(S), combined with the dependency matching results:
[0032]
[0033] Determine the upgrade order priority. If h(S)> the preset threshold, the order is reasonable and proceed to the next step; otherwise, adjust the order S and recalculate;
[0034] Define the risk and stability function k(s i ,r j ):
[0035]
[0036] To judge the risk and stability, if k(s i ,r j )>0.5, the risk and stability meet the standards and go to the next step; otherwise, skip the current combination;
[0037] Define the upgrade time function l(M i ,U j ):
[0038] l(M i ,U j )=log(1+|v i -u j |)+log(1+|d i -m j |)
[0039] Combined with the above formula, the fitness value P(k) is defined as:
[0040]
[0041] Among them, P(k) is the fitness value of the kth individual in the genetic algorithm, M i is the information of the i-th module, U j is the information of the jth upgrade file, v i is the version of the i-th module, d i is the dependency of the ith module, u j is the version of the jth upgrade file, r j is the risk factor of the jth upgrade file, f(v i ,uj ) is the version compatibility function, judging module M i Version v i With the upgrade file U j Version u j Is it compatible? g(d i ,m j ) is the dependency matching function, and the judgment module M i Dependence of i Is it compatible with the upgrade file U j Applicable modules j h(S) is the priority function of the upgrade order, which determines the rationality of the upgrade order S, and k(s i ,r j ) is the risk and stability function, the evaluation module M i Stability i With the upgrade file U j The risk factor r j The relationship between l(M i ,U j ) is the upgrade time function, the estimation module M i With the upgrade file U j The upgrade time between h ,w k ,w l is the weight coefficient, which is used to adjust the importance of different functions.
[0042] As a preferred solution of the remote upgrade method of the station carrier module of the present invention, wherein: the optimal upgrade strategy includes: when the fitness P(k) is lower than the preset standard P threshold When upgrading, re-plan the upgrade sequence and path through specific optimization and adjustment steps;
[0043] Check the current module M i Version v i With the upgrade file U j Version u j , calculate each pair (v i ,u j )’s compatibility function f(v i ,u j ), select f(v i ,u j )The largest combination is upgraded, if the module version v i Incompatible, try updating to the latest version and recalculating f(v i ,u j );
[0044] After ensuring that there are no exceptions in version compatibility, redistribute dependencies and analyze all modules M iDependence of i and upgrade file U j Dependency matching m j , calculate each pair (d i ,m j )’s dependency matching function g(d i ,m j ), select g(d i ,m j ) is upgraded. If the judgment result is mismatch, redefine the module dependency and recalculate g(d i ,m j );
[0045] After ensuring version compatibility and reasonable dependencies, optimize the upgrade order. After the initial order is set, calculate the priority function h(S) of the current order. According to the dependency relationship and risk assessment results, adjust the upgrade order S to maximize the priority function h(S). Move the lowest priority module to the back, upgrade the highest priority module first, and recalculate h(S).
[0046] Prioritize the modules with the lowest upgrade dependency and the modules with the lowest risk; after optimizing the upgrade sequence, re-evaluate the risk and select the upgrade files with the lowest risk and the second lowest risk. j Combination, calculate each pair (s i ,r j )’s risk and stability function k(s) i ,r j ), select k(s i ,r j ) is the largest path for upgrading. For the upgrade file with the highest risk, consider upgrading in stages or adding testing steps, and recalculate k(s i ,r j );
[0047] After ensuring risk and stability, time optimization is performed to estimate the M of each module. i and upgrade file U j The upgrade time between each pair (M i ,U j )'s upgrade time function l(M i ,U j ), adjust the upgrade schedule so that l(M i ,U j ) is minimized, the overall upgrade time is reduced by parallel processing, batch upgrades are performed to reduce time conflicts, and l(M i ,U j );
[0048] Minimize the time, prioritize the upgrade tasks with the shortest time period, minimize conflicts, and avoid conflicts caused by time overlap. After completing all optimization adjustments, recalculate the fitness value P(k). If the new P(k) <P threshold , then adjustments need to be made until the reasonableness standard is met.
[0049] A computer device includes a memory and a processor, wherein the memory stores a computer program, and is characterized in that when the processor executes the computer program, the steps of a method for remotely upgrading a carrier module in a station area are implemented.
[0050] A computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of a method for remotely upgrading a carrier module in a station area.
[0051] Beneficial effects of the present invention: The present invention provides a method for remote upgrading of carrier modules in a substation area, which realizes safe, efficient and intelligent remote upgrading by introducing multiple security mechanisms, such as blockchain-based file verification, real-time monitoring and feedback, adaptive upgrade strategies, automatic fault recovery and artificial intelligence-assisted decision-making. The method uniformly manages the upgrade of carrier modules through a professional platform, improves security and convenience, reduces labor costs, and improves upgrade efficiency. At the same time, the method can adapt to the upgrade requirements of carrier modules of different types and versions, and provides platform support for promoting the application field of carrier communications. In summary, the present invention provides strong support for the construction and development of smart grids and has broad application prospects. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0053] Figure 1 A schematic flow chart of a method for remotely upgrading a carrier module in a substation area provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0054] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.
[0055] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0056] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.
[0057] The present invention is described in detail with reference to schematic diagrams. When describing the embodiments of the present invention, for the sake of convenience, the cross-sectional diagrams showing the device structure will not be partially enlarged according to the general scale, and the schematic diagrams are only examples, which should not limit the scope of protection of the present invention. In addition, in actual production, the three-dimensional dimensions of length, width and depth should be included.
[0058] At the same time, in the description of the present invention, it should be noted that the directions or positional relationships indicated by the terms "upper, lower, inner and outer" are based on the directions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore cannot be understood as limiting the present invention. In addition, the terms "first, second or third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.
[0059] In the present invention, unless otherwise clearly specified and limited, the terms "install, connect, connect" should be understood in a broad sense, for example: it can be a fixed connection, a detachable connection or an integral connection; it can also be a mechanical connection, an electrical connection or a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0060] Example 1
[0061] Reference Figure 1 , which is the first embodiment of the present invention, and provides a method for remotely upgrading a carrier module in a station area, comprising:
[0062] The hash value and file information of the upgrade file are recorded on the blockchain. Before upgrading, the file hash value is obtained from the blockchain and compared with the local file hash value;
[0063] During the upgrade process, the carrier module regularly reports the upgrade status. At the same time, the carrier network management platform monitors the upgrade status in real time and provides a visual interface. When an upgrade abnormality is detected, the carrier module is automatically restored to the backup state.
[0064] The upgrade path and upgrade sequence are planned through an adaptive algorithm model to plan the optimal upgrade strategy.
[0065] The hash value includes using the SHA-256 algorithm to perform a hash operation on the upgrade file to generate a unique identifier, and recording the file hash value, file name, version number, and release time information on the blockchain to ensure that the file source is reliable;
[0066] The upgrade file is hashed using the SHA-256 algorithm to obtain a hash value H. The hash value H is tested for randomness using the NIST pseudo-random number generator test suite to obtain a test result N. At the same time, the probability of hash collision P is estimated using the birthday attack theory model, and the time cost T of hash value generation is evaluated using the actual running time, as follows:
[0067]
[0068] Among them, L represents the length of the hash value, k represents the size of the hash table, n represents the number of hash functions, and V represents the execution speed.
[0069] The SHA-256 algorithm includes: when P>0, T>0, C>0, the hash algorithm performs normally in terms of security, randomness and execution efficiency, the collision probability is lower than the preset value, and it is still safe in practical applications; P>0, T>0, C<0 is impossible to occur in practice, and it is directly determined that the value of C is negative due to erroneous understanding or input; when P=0, T>0, C>0, the hash algorithm performs normally in terms of security, and there is no possibility of collision, but there is a time cost and the execution efficiency of the algorithm;
[0070] When T=0 or C=0, it means that there is a problem with the algorithm input or the algorithm itself. The calculation must be stopped immediately to fix the problem and correct the algorithm until T and C in the algorithm are not 0.
[0071] The carrier network management platform monitors the upgrade status in real time, including: when the reported current operation steps do not match the preset successful step sequence, sending a warning message to the carrier network management platform and recording the abnormality; when the carrier network management platform receives the upgrade status information of multiple carrier modules, classifying and summarizing the information to generate a global upgrade status report; when the upgrade status information of the carrier module exceeds the preset threshold, starting the fault automatic recovery mechanism to try to restore the upgrade process; when the carrier network management platform finds abnormal upgrade status information, real-time feedback is given to the operation and maintenance personnel, and the corresponding processing flow is started; when the upgrade progress of the carrier module is lower than the preset threshold, adjusting the upgrade strategy, increasing the upgrade frequency and switching the transmission path at the same time; when the upgrade status information of the carrier module shows failure, automatically executing the fault automatic recovery mechanism to try to restore the upgrade process; when the upgrade status information of the carrier module continuously exceeds the preset threshold, re-evaluating and adjusting the threshold setting to ensure system adaptability.
[0072] The carrier network management platform real-time monitoring of the upgrade status also includes that the carrier network management platform collects the upgrade status information reported by all carrier modules, including the actual progress and expected progress of each module, as well as the actual response time and expected response time of various abnormal types, and the actual error count and expected error count of various error types. For each module, the difference between the actual progress and the expected progress is calculated, and then the square of the ratio of the difference to the expected progress is calculated; if the actual progress is not within the expected range, the score of the actual progress is set to 0; for each abnormal type, the difference between the actual response time and the expected response time is calculated, and then the square of the ratio of the difference to the expected response time is calculated; if the response time is abnormal, the score of the response time is set to 0; for each error type, the difference between the actual error count and the expected error count is calculated, and then the square of the ratio of the difference to the expected error count is calculated; if the error count exceeds the preset range, the score of the error count is set to 0, as follows:
[0073]
[0074] Among them, ADScore represents the anomaly detection score, n represents the number of carrier modules, AP i Indicates the actual progress of carrier module i, EP i Expected progress of Carrier Module I, IPT i A Boolean variable indicating whether the progress of carrier module i is within the expected range, m indicates the number of abnormal types detected, ART j Indicates the actual response time of detected anomaly type j, ERT j represents the expected response time of detected anomaly type j, IR j A Boolean variable indicating whether the response time of exception type j is normal, p indicates the number of error types detected, AECk Indicates the actual error count of error type k detected, EEC k represents the expected error count of error type k detected, IEC k A Boolean variable indicating whether the error count for error type k is acceptable.
[0075] The carrier network management platform monitors the upgrade status in real time, and also includes: when ADScore>0, it indicates that there is an abnormal situation, indicating that the progress is stagnant and the module response timeout is abnormal; when ADScore=0, it indicates that there is no abnormal situation and the operation steps of all modules are in line with expectations; ADScore<0 is an impossible situation, indicating that there is a problem with the output in the process and it is necessary to stop and check immediately;
[0076] Among them, when ADScore is in the range of (0, 20], it is a low-score anomaly, indicating that the impact of the abnormal situation on the upgrade process is negligible. The system arranges to continue the upgrade process, strengthens monitoring and recording, and regularly checks the abnormal detection score. If the score continues to rise, further medium-score abnormal measures need to be taken; when ADScore is in the range of (20, 60], it is a medium-score anomaly, indicating that the abnormal situation has an impact risk on the upgrade process. The system suspends the upgrade process, conducts problem troubleshooting and repair, and issues instructions to stop the upgrade immediately, troubleshoot the carrier module, take corresponding repair measures according to the troubleshooting results, and restart the upgrade process after confirming that the problem has been solved; when ADScore is in the range of (60, 100], it is a high-score anomaly, indicating that the impact of the abnormal situation on the upgrade process is serious. The system immediately stops the upgrade and restores the backup firmware. At the same time, according to the type and severity of the abnormality, choose to restore the most recent backup firmware or use the initial firmware. After confirming that the problem has been solved, restart the upgrade process.
[0077] The adaptive algorithm model includes extracting each module information M i , including version v i and dependencies i :
[0078] M i = {v i ,d i}
[0079] Extract each upgrade file information j , including version u j and risk factor r j :
[0080] U j = {u j ,r j}
[0081] Define the version compatibility function f(vi ,u j ):
[0082]
[0083] If f(v i ,u j )>0.5, the version compatibility meets the standard and proceeds to the next step; otherwise, skip the current combination;
[0084] Define the dependency matching function g(d i ,m j ), combined with the version compatibility results:
[0085]
[0086] Determine the dependency match, if g(d i ,m j )>0.5, the dependency matching meets the criteria and proceeds to the next step; otherwise, skip the current combination;
[0087] Define the upgrade order priority function h(S), combined with the dependency matching results:
[0088]
[0089] Determine the upgrade order priority. If h(S)> the preset threshold, the order is reasonable and proceed to the next step; otherwise, adjust the order S and recalculate;
[0090] Define the risk and stability function k(s i ,r j ):
[0091]
[0092] To judge the risk and stability, if k(s i ,r j )>0.5, the risk and stability meet the standards and go to the next step; otherwise, skip the current combination;
[0093] Define the upgrade time function l(M i ,U j ):
[0094] l(M i ,U j )=log(1+|v i -u j |)+log(1+|d i -m j |)
[0095] Combined with the above formula, the fitness value P(k) is defined as:
[0096]
[0097] Among them, P(k) is the fitness value of the kth individual in the genetic algorithm, M i is the information of the i-th module, U j is the information of the jth upgrade file, v i is the version of the i-th module, d i is the dependency of the ith module, u j is the version of the jth upgrade file, r j is the risk factor of the jth upgrade file, f(v i ,u j ) is the version compatibility function, judging module M i Version v i With the upgrade file U j Version u j Is it compatible? g(d i ,m j ) is the dependency matching function, and the judgment module M i Dependence of i Is it compatible with the upgrade file U j Applicable modules j h(S) is the priority function of the upgrade order, which determines the rationality of the upgrade order S, and k(s i ,r j ) is the risk and stability function, the evaluation module M i Stability i With the upgrade file U j The risk factor r j The relationship between l(M i ,U j ) is the upgrade time function, the estimation module M i With the upgrade file U j The upgrade time between h ,w k ,w l is the weight coefficient, which is used to adjust the importance of different functions.
[0098] The optimal upgrade strategy includes: when the fitness P(k) is lower than the preset standard P threshold When upgrading, re-plan the upgrade sequence and path through specific optimization and adjustment steps;
[0099] Check the current module M i Version v i With the upgrade file U j Version u j , calculate each pair (v i ,uj )'s compatibility function f(v i ,u j ), select f(v i ,u j )The largest combination is upgraded, if the module version v i Incompatible, try updating to the latest version and recalculating f(v i ,u j );
[0100] After ensuring that there are no exceptions in version compatibility, redistribute dependencies and analyze all modules M i Dependence of i and upgrade file U j Dependency matching m j , calculate each pair (d i ,m j )’s dependency matching function g(d i ,m j ), select g(d i ,m j ) is upgraded. If the judgment result is mismatch, redefine the module dependency and recalculate g(d i ,m j );
[0101] After ensuring version compatibility and reasonable dependencies, optimize the upgrade order. After the initial order is set, calculate the priority function h(S) of the current order. According to the dependency relationship and risk assessment results, adjust the upgrade order S to maximize the priority function h(S). Move the lowest priority module to the back, upgrade the highest priority module first, and recalculate h(S).
[0102] Prioritize the modules with the lowest upgrade dependency and the modules with the lowest risk; after optimizing the upgrade sequence, re-evaluate the risk and select the upgrade files with the lowest risk and the second lowest risk. j Combination, calculate each pair (s i ,r j )’s risk and stability function k(s) i ,r j ), select k(s i ,r j ) is the largest path for upgrading. For the upgrade file with the highest risk, consider upgrading in stages or adding testing steps, and recalculate k(s i ,r j );
[0103] After ensuring risk and stability, time optimization is performed to estimate the M of each module. i and upgrade file U j The upgrade time between each pair (Mi ,U j )'s upgrade time function l(M i ,U j ), adjust the upgrade schedule so that l(M i ,U j ) is minimized, the overall upgrade time is reduced by parallel processing, batch upgrades are performed to reduce time conflicts, and l(M i ,U j );
[0104] Minimize the time, prioritize the upgrade tasks with the shortest time period, minimize conflicts, and avoid conflicts caused by time overlap. After completing all optimization adjustments, recalculate the fitness value P(k). If the new P(k) <P threshold , then adjustments need to be made until the reasonableness standard is met.
[0105] Example 2
[0106] The second embodiment of the present invention is different from the previous embodiment in that:
[0107] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.
[0108] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0109] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0110] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0111] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0112] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A method for remotely upgrading a carrier module in a station area, characterized in that: include, The hash value and file information of the upgrade file are recorded on the blockchain. Before upgrading, the file hash value is obtained from the blockchain and compared with the local file hash value; During the upgrade process, the carrier module regularly reports the upgrade status. At the same time, the carrier network management platform monitors the upgrade status in real time and provides a visual interface. When an upgrade abnormality is detected, the carrier module is automatically restored to the backup state. The upgrade path and upgrade sequence are planned through an adaptive algorithm model to plan the optimal upgrade strategy.
2. A method for remotely upgrading a carrier module in a station area as claimed in claim 1, characterized in that: The hash value includes using the SHA-256 algorithm to perform a hash operation on the upgrade file to generate a unique identifier, and recording the file hash value, file name, version number, and release time information on the blockchain to ensure that the file source is reliable; The upgrade file is hashed using the SHA-256 algorithm to obtain a hash value H. The hash value H is tested for randomness using the NIST pseudo-random number generator test suite to obtain a test result N. At the same time, the probability of hash collision P is estimated using the birthday attack theory model, and the time cost T of hash value generation is evaluated using the actual running time, as follows: Among them, L represents the length of the hash value, k represents the size of the hash table, n represents the number of hash functions, and V represents the execution speed.
3. A method for remotely upgrading a carrier module in a station area as claimed in claim 2, characterized in that: The SHA-256 algorithm includes: when P>0, T>0, C>0, the hash algorithm performs normally in terms of security, randomness and execution efficiency, the collision probability is lower than the preset value, and it is still safe in practical applications; P>0, T>0, C<0 is impossible to occur in practice, and it is directly determined that the value of C is negative due to erroneous understanding or input; when P=0, T>0, C>0, the hash algorithm performs normally in terms of security, and there is no possibility of collision, but there is a time cost and the execution efficiency of the algorithm; When T=0 or C=0, it means that there is a problem with the algorithm input or the algorithm itself. The calculation must be stopped immediately to fix the problem and correct the algorithm until T and C in the algorithm are not 0.
4. A method for remotely upgrading a carrier module in a station area as claimed in claim 3, characterized in that: The carrier network management platform monitors the upgrade status in real time, including sending a warning message to the carrier network management platform and recording the abnormality when the reported current operation steps do not match the preset successful step sequence; When the carrier network management platform receives the upgrade status information of multiple carrier modules, it classifies and summarizes the information and generates a global upgrade status report; when the upgrade status information of the carrier module exceeds the preset threshold, the fault automatic recovery mechanism is started to try to restore the upgrade process; When the carrier network management platform finds abnormal upgrade status information, it will provide real-time feedback to the operation and maintenance personnel and start the corresponding processing flow; when the upgrade progress of the carrier module is lower than the preset threshold, the upgrade strategy will be adjusted, the upgrade frequency will be increased and the transmission path will be switched; when the upgrade status information of the carrier module shows failure, the automatic fault recovery mechanism will be automatically executed to try to restore the upgrade process; when the upgrade status information of the carrier module continuously exceeds the preset threshold, the threshold setting will be re-evaluated and adjusted to ensure system adaptability.
5. A method for remotely upgrading a carrier module in a station area as claimed in claim 4, characterized in that: The carrier network management platform real-time monitoring of the upgrade status also includes that the carrier network management platform collects the upgrade status information reported by all carrier modules, including the actual progress and expected progress of each module, as well as the actual response time and expected response time of various abnormal types, and the actual error count and expected error count of various error types. For each module, the difference between the actual progress and the expected progress is calculated, and then the square of the ratio of the difference to the expected progress is calculated; if the actual progress is not within the expected range, the score of the actual progress is set to 0; for each abnormal type, the difference between the actual response time and the expected response time is calculated, and then the square of the ratio of the difference to the expected response time is calculated; if the response time is abnormal, the score of the response time is set to 0; for each error type, the difference between the actual error count and the expected error count is calculated, and then the square of the ratio of the difference to the expected error count is calculated; if the error count exceeds the preset range, the score of the error count is set to 0, as follows: Among them, ADScore represents the anomaly detection score, n represents the number of carrier modules, AP i Indicates the actual progress of carrier module i, EP i Expected progress of Carrier Module I, IPT i A Boolean variable indicating whether the progress of carrier module i is within the expected range, m indicates the number of abnormal types detected, ART j Indicates the actual response time of detected anomaly type j, ERT j represents the expected response time of detected anomaly type j, IR j A Boolean variable indicating whether the response time of exception type j is normal, p indicates the number of error types detected, AEC k Indicates the actual error count of error type k detected, EEC k represents the expected error count of error type k detected, IEC k A Boolean variable indicating whether the error count for error type k is acceptable.
6. A method for remotely upgrading a carrier module in a station area as claimed in claim 5, characterized in that: The carrier network management platform monitors the upgrade status in real time, and also includes: when ADScore>0, it indicates that there is an abnormal situation, indicating that the progress is stagnant and the module response timeout is abnormal; when ADScore=0, it indicates that there is no abnormal situation and the operation steps of all modules are in line with expectations; ADScore<0 is an impossible situation, indicating that there is a problem with the output in the process and it is necessary to stop and check immediately; Among them, when ADScore is in the range of (0, 20], it is a low-score anomaly, indicating that the impact of the abnormal situation on the upgrade process is negligible. The system arranges to continue the upgrade process, strengthens monitoring and recording, and regularly checks the abnormal detection score. If the score continues to rise, further medium-score abnormal measures need to be taken; when ADScore is in the range of (20, 60], it is a medium-score anomaly, indicating that the abnormal situation has an impact risk on the upgrade process. The system suspends the upgrade process, conducts problem troubleshooting and repair, and issues instructions to stop the upgrade immediately, troubleshoot the carrier module, take corresponding repair measures according to the troubleshooting results, and restart the upgrade process after confirming that the problem has been solved; when ADScore is in the range of (60, 100], it is a high-score anomaly, indicating that the impact of the abnormal situation on the upgrade process is serious. The system immediately stops the upgrade and restores the backup firmware. At the same time, according to the type and severity of the abnormality, choose to restore the most recent backup firmware or use the initial firmware. After confirming that the problem has been solved, restart the upgrade process.
7. A method for remotely upgrading a carrier module in a station area as claimed in claim 6, characterized in that: The adaptive algorithm model includes extracting each module information M i , including version v i and dependencies i : M i ={v i ,d i } Extract each upgrade file information j , including version u j and risk factor r j : U j ={u j ,r j } Define the version compatibility function f(v i ,u j ): If f(v i ,u j )>0.5, the version compatibility meets the standard and proceeds to the next step; otherwise, skip the current combination; Define the dependency matching function g(d i ,m j ), combined with the version compatibility results: Determine the dependency match, if g(d i ,m j )>0.5, the dependency matching meets the criteria and proceeds to the next step; otherwise, skip the current combination; Define the upgrade order priority function h(S), combined with the dependency matching results: Determine the upgrade sequence priority. If h(S)> the preset threshold, the sequence is reasonable and proceed to the next step. Otherwise, adjust the order S and recalculate; Define the risk and stability function k(s i ,r j ): To judge the risk and stability, if k(s i ,r j )>0.5, the risk and stability meet the standards and go to the next step; otherwise, skip the current combination; Define the upgrade time function l(M i ,U j ): l(M i ,U j )=log(1+|v i -u j |)+log(1+|d i -m j |) Combined with the above formula, the fitness value P(k) is defined as: Among them, P(k) is the fitness value of the kth individual in the genetic algorithm, M i is the information of the i-th module, U j is the information of the jth upgrade file, v i is the version of the i-th module, d i is the dependency of the ith module, u j is the version of the jth upgrade file, r j is the risk factor of the jth upgrade file, f(v i ,u j ) is the version compatibility function, judging module M i Version v i With the upgrade file U j Version u j Is it compatible? g(d i ,m j ) is the dependency matching function, and the judgment module M i Dependence of i Is it compatible with the upgrade file U j Applicable modules j h(S) is the priority function of the upgrade order, which determines the rationality of the upgrade order S, and k(s i ,r j ) is the risk and stability function, the evaluation module M i Stability i With the upgrade file U j The risk factor r j The relationship between l(M i ,U j ) is the upgrade time function, the estimation module M i With the upgrade file U j The upgrade time between h ,w k ,w l is the weight coefficient, which is used to adjust the importance of different functions.
8. A method for remotely upgrading a carrier module in a station area as claimed in claim 7, characterized in that: The optimal upgrade strategy includes: when the fitness P(k) is lower than the preset standard P threshold When upgrading, re-plan the upgrade sequence and path through specific optimization and adjustment steps; Check the current module M i Version v i With the upgrade file U j Version u j , calculate each pair (v i ,u j )'s compatibility function f(v i ,u j ), select f(v i ,u j )The largest combination is upgraded, if the module version v i Incompatible, try updating to the latest version and recalculating f(v i ,u j ); After ensuring that there are no exceptions in version compatibility, redistribute dependencies and analyze all modules M i Dependence of i and upgrade file U j Dependency matching m j , calculate each pair (d i ,m j )’s dependency matching function g(d i ,m j ), select g(d i ,m j ) is upgraded. If the judgment result is mismatch, redefine the module dependency and recalculate g(d i ,m j ); After ensuring version compatibility and reasonable dependencies, optimize the upgrade order. After the initial order is set, calculate the priority function h(S) of the current order. According to the dependency relationship and risk assessment results, adjust the upgrade order S to maximize the priority function h(S). Move the lowest priority module to the back, upgrade the highest priority module first, and recalculate h(S). Prioritize the modules with the lowest dependencies and the lowest risks; After optimizing the upgrade sequence, re-evaluate the risk and select the upgrade files with the lowest risk and the second lowest risk. j Combination, calculate each pair (s i ,r j )’s risk and stability function k(s) i ,r j ), select k(s i ,r j ) is the largest path for upgrading. For the upgrade file with the highest risk, consider upgrading in stages or adding testing steps, and recalculate k(s i ,r j ); After ensuring risk and stability, time optimization is performed to estimate the M of each module. i and upgrade file U j The upgrade time between each pair (M i ,U j )'s upgrade time function l(M i ,U j ), adjust the upgrade schedule so that l(M i ,U j ) is minimized, the overall upgrade time is reduced by parallel processing, batch upgrades are performed to reduce time conflicts, and l(M i ,U j ); Minimize the time, prioritize the upgrade tasks with the shortest time period, minimize conflicts, and avoid conflicts caused by time overlap. After completing all optimization adjustments, recalculate the fitness value P(k). If the new P(k) <P threshold , then adjustments need to be made until the reasonableness standard is met.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
