An upgrade method for a power collection terminal
By dividing the upgrade file into multiple sub-files and using the collaborative sending mechanism of smart meter, the transmission interruption and security issues during the upgrade process of the power acquisition terminal are solved, and efficient and secure upgrade file transfer and memory management are achieved.
Patent Information
- Application Number
- CN202411581817.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-07
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2044-11-07
AI Technical Summary
During the upgrade process, the upgrade file transmission of existing power acquisition terminals is interrupted or lost, resulting in low communication efficiency and memory occupancy. The lack of effective security protection measures makes it difficult to meet the data processing capabilities and security needs of modern power systems.
The upgrade files are divided into multiple upgrade sub-files, and classified according to the distance between the smart meter and the terminal to be upgraded and the communication error rate. Multiple smart meters are used to send the upgrade sub-files in a coordinated manner, setting the fault tolerance threshold and upgrade interval, predicting the upgrade end time, and ensuring the success rate and security of file transmission.
It improves the success rate of upgrading file transfer of power acquisition terminals, reduces memory usage, balances the load of communication network, enhances the security and efficiency of the system, and supports higher data processing capabilities and security.
Smart Images

Figure CN119440585B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power acquisition terminal upgrading, and particularly to an upgrading method for a power acquisition terminal. Background Technique
[0002] Power acquisition terminals are key devices in power system monitoring and management, used to monitor the operating status of the power grid and power quality in real time and collect power consumption data. With the increase in power demand and the progress of power grid technology, existing power acquisition terminals are facing the pressure of needing to be upgraded and improved to enhance data processing capabilities, communication efficiency, and system security. With the development of smart grids, the demand for real-time data analysis and remote control is increasing continuously, which requires power acquisition terminals to have higher data communication speeds and stronger data processing capabilities. In addition, the security issues of power systems are becoming increasingly prominent. Old systems often lack effective security protection measures and are vulnerable to network attack threats. Therefore, upgrading power acquisition terminals to support more secure encryption communication and authentication mechanisms has become an important part of improving the security of the entire power system. In summary, upgrading power acquisition terminals is a necessary measure to meet the requirements of modern power systems, improve power grid efficiency, and enhance security.
[0003] During the upgrading process of existing power acquisition terminals, it is necessary to send the upgrade file to the power acquisition terminal. Due to the complex and changeable communication environment of the power grid, the upgrade file often interrupts or is lost during transmission. When the power acquisition terminal temporarily does not have the conditions to execute the upgrade file, the upgrade file stored in the power acquisition terminal occupies memory and reduces the working efficiency of the power acquisition terminal.
[0004] This solution proposes to evenly divide the upgrade file into the number of upgrade sub-files equal to the number of files, and classify smart meters according to the distance from the terminal to be upgraded according to the radius division strategy to obtain several time-period meter sets. During each divided time period, the smart meters send the upgrade sub-files to the terminal to be upgraded. Summary of the Invention
[0005] The present invention provides an upgrading method for a power acquisition terminal to help solve the problems mentioned in the above background technique.
[0006] The present invention provides the following technical solution: An upgrading method for a power acquisition terminal, including:
[0007] Obtain the power acquisition terminal that needs to be upgraded, denoted as the terminal to be upgraded;
[0008] Obtain all smart meters whose data is collected by the terminal to be upgraded;
[0009] Obtain the upgrade file of the terminal to be upgraded;
[0010] Obtain the size of the upgrade file;
[0011] Obtain the memory of the smart meter for storing the upgrade file, denoted as the meter memory;
[0012] Calculate [the size of the upgrade file / the meter memory] + 1 = the number of files, [] is the integer-taking symbol;
[0013] Divide the upgrade file into the number of upgrade sub-files;
[0014] For each smart meter:
[0015] Obtain the historical communication records of the smart meter;
[0016] Execute the communication error rate statistics strategy to calculate the communication error rate of each smart meter;
[0017] Set the number of time periods for dividing 24 hours of a day into multiple time periods;
[0018] Divide 24 hours of a day evenly into the number of divided time periods;
[0019] According to the radius division strategy, classify the smart meters according to the distance from the terminal to be upgraded to obtain several time period meter sets;
[0020] Among them, each time period meter set corresponds to a divided time period, and the smart meters in the time period meter set send the same upgrade sub-file to the terminal to be upgraded during the corresponding divided time period;
[0021] Send the upgrade sub-file to the terminal to be upgraded through the smart meter during each divided time period;
[0022] Obtain the historical upgrade files in the historical communication records of the terminal to be upgraded, execute the upgrade interval division strategy to obtain several intervals, and calculate the average upgrade duration of each interval;
[0023] Execute the upgrade end prediction strategy to predict the moment when the terminal to be upgraded ends the upgrade.
[0024] Optionally, the execution of the communication error rate statistics strategy includes:
[0025] Obtain the communication records of the smart meter sending any 100 times of data to the terminal to be upgraded in the historical communication records of the smart meter, denoted as the total number of communications;
[0026] Obtain the number of times of communication errors between the smart meter and the terminal to be upgraded in the 100 communication records, denoted as the total number of errors;
[0027] Calculate the total number of errors / the total number of communications, and the result is denoted as the communication error rate of the smart meter.
[0028] Optionally, the setting for the number of time periods that divides 24 hours of a day into multiple time periods includes:
[0029] Record the duration from when the smart meter starts sending data to the terminal to be upgraded until the terminal to be upgraded feeds back successful data reception as the communication duration;
[0030] Obtain the communication durations of all smart meters, denoted as the first communication duration, the second communication duration... the a-th communication duration respectively, where a is the total number of smart meters;
[0031] Execute the following formula to calculate the average communication duration;
[0032] (The first communication duration + the second communication duration +... + the a-th communication duration) / a = average communication duration;
[0033] Obtain the maximum communication error rate among the communication error rates of all smart meters, denoted as the maximum error rate p;
[0034] Set a fault tolerance threshold, where the fault tolerance threshold is the threshold probability of successfully sending the upgrade sub-file at least once;
[0035] Calculate 1 - (p) n > When the fault tolerance threshold is reached, obtain the smallest integer of n, denoted as the fault tolerance value;
[0036] Calculate the fault tolerance value * average communication duration, and record the result as the marked duration;
[0037] Calculate [24 hours / marked duration] + 1 to obtain the number of time periods.
[0038] Optionally, the radius division strategy includes:
[0039] Obtain the location of the terminal to be upgraded, denoted as the central location;
[0040] Obtain the location of the smart meter farthest from the terminal to be upgraded, denoted as the boundary location;
[0041] Obtain the connection line between the boundary location and the central location, denoted as the longest radius;
[0042] On the longest radius, with the central location as the center, construct a set of concentric circles, where the number of concentric circles is the fault tolerance value, and the number of smart meters between adjacent concentric circles is equal;
[0043] All smart meters between adjacent concentric circles form a communication meter set;
[0044] Obtain all the communication meter sets;
[0045] Evenly divide each communication meter set into the number of time period sub-groups;
[0046] Arbitrarily select a subgroup from each communication electric meter set to jointly form a time period electric meter set, and obtain the number of time period electric meter sets equal to the number of time periods.
[0047] Optionally, the step of sending the upgrade sub-file to the terminal to be upgraded by the smart meter in each divided time period includes:
[0048] Obtain the number of file divided time periods, where each divided time period is used to send an upgrade sub-file;
[0049] Record the divided time period for sending the upgrade sub-file as the communication time period;
[0050] Divide the communication time periods at intervals of the value of the number of time periods according to the order of sending the upgrade sub-files, and obtain multiple date time period sets, where the communication time periods in each date time period set are the time periods for sending the upgrade sub-files in a day;
[0051] Divide all the upgrade sub-files at intervals of the value of the number of time periods according to the order of sending, and obtain multiple date file sets, where the upgrade sub-files in each date file set are all the upgrade sub-files sent in a day;
[0052] Establish a one-to-one correspondence between the date time period sets and the date file sets.
[0053] Optionally, the step of sending the upgrade sub-file to the terminal to be upgraded by the smart meter in each divided time period includes:
[0054] For any one of the date time period sets and its corresponding date file set:
[0055] Obtain any one of the communication time periods in the date time period set;
[0056] Obtain the time period electric meter set of the communication time period;
[0057] Name the subgroups in the time period electric meter set as the first subgroup, the second subgroup... the d-th subgroup in order from near to far from the central position;
[0058] Obtain the upgrade sub-file sent in the communication time period;
[0059] Respectively obtain any one smart meter in the first subgroup, the second subgroup... the d-th subgroup, store the upgrade sub-file in d smart meters, and record the smart meters storing the upgrade sub-file as the assisting upgrade electric meters;
[0060] In the order of the subgroups, the assisting upgrade electric meters in each subgroup send the upgrade sub-files stored in them to the terminal to be upgraded;
[0061] If the process of sending the upgrade sub-file fails for any assisting meter in upgrading the electricity meter, the next assisting meter in upgrading the electricity meter will take over the task and attempt to re-send the upgrade sub-file;
[0062] When the upgrade sub-file is successfully transmitted to the terminal to be upgraded, the upgrade sub-file saved in the assisting meter in upgrading the electricity meter will be cleared;
[0063] If the transmission of the upgrade sub-file from all assisting meters in upgrading the electricity meter to the terminal to be upgraded fails, an upgrade failure message will be sent to the master station.
[0064] Optionally, the implementation of the upgrade interval division strategy includes:
[0065] Obtain the smallest upgrade file in the historical communication record and denote it as the smallest file;
[0066] Obtain the largest upgrade file in the historical communication record and denote it as the largest file;
[0067] Set the file interval for dividing the upgrade interval;
[0068] Calculate (the largest file - the smallest file) / the file interval = the number of intervals q;
[0069] Calculate the smallest file + the file interval to obtain the first file;
[0070] Calculate the smallest file + the file interval * 2 to obtain the second file;
[0071] ……
[0072] Calculate the smallest file + the file interval * (q - 1) to obtain the (q - 1)-th file;
[0073] Then, record the interval formed by the smallest file and the first file as the first interval, record the interval formed by the first file and the second file as the second interval... record the interval formed by the (q - 1)-th file and the largest file as the q-th interval;
[0074] Obtain all the upgrade files in the historical communication record and classify the upgrade files into the corresponding intervals;
[0075] For any one interval;
[0076] Obtain the upgrade duration of all upgrade files in the interval, calculate the average value, and use it as the average upgrade duration of the interval.
[0077] Optionally, the implementation of the upgrade end prediction strategy includes:
[0078] Record the date when the upgrade sub-file starts to be sent as the first date;
[0079] Obtain the number of date period sets and denote it as the sending duration;
[0080] Calculate the date of the first date + transmission duration - 1, and record it as the second date;
[0081] Obtain the end time of the last communication period in the second date;
[0082] Obtain the average upgrade duration of the interval where the upgrade file is located;
[0083] Obtain the time at an interval of the average upgrade duration after the end time, and use it as the predicted end time of the upgrade for the terminal to be upgraded.
[0084] The present invention has the following beneficial effects:
[0085] 1. For the upgrade method of the power collection terminal, obtain the historical communication records of the smart meter and the terminal to be upgraded, obtain 100 communication records among them, obtain the number of communication errors in the 100 communication records to get the total number of errors, calculate the communication error rate of the smart meter by calculating the total number of errors / total number of communications, digitalize the probability of communication errors of the smart meter, which is convenient to calculate the number of smart meters configured for an upgrade sub-file according to the communication error rate, so as to achieve the purpose of sending the upgrade sub-file to the terminal to be upgraded, and when a smart meter fails to send the upgrade sub-file, there is a backup smart meter to send the upgrade sub-file again, increasing the probability of the terminal to be upgraded receiving the upgrade sub-file.
[0086] 2. For the upgrade method of the power collection terminal, set a fault tolerance threshold, where the fault tolerance threshold is the threshold probability that at least one of the set multiple smart meters sends the upgrade sub-file successfully. Obtain the maximum error rate p. Assume that among the n smart meters sending an upgrade sub-file, each smart meter sends the upgrade sub-file at the maximum error rate, and the probability of all errors is (p) n , then the probability of at least one success is 1 - (p) n , when 1 - (p) n > the fault tolerance threshold, it means that the standard of at least one successful send is reached. Calculate the smallest integer of n at this time, that is, the number of smart meters required to send an upgrade sub-file. At this time, the standard of successfully sending the upgrade sub-file is reached. By calculating the fault tolerance value, increase the number of smart meters sending the same upgrade sub-file to improve the success rate of sending.
[0087] 3. The upgrade method for the power collection terminal obtains the communication duration from the start of data transmission to the awareness of successful data transmission of an intelligent electricity meter, calculates the average value of the communication durations of all intelligent electricity meters to obtain the average communication duration. When there are a fault tolerance number of intelligent electricity meters sending the same upgrade sub-file, at least reserve the time for each intelligent electricity meter to send once, that is, calculate the fault tolerance number * average communication duration. The obtained marked duration is the duration for the fault tolerance number of intelligent electricity meters to send once each, considering the situation where the last intelligent electricity meter in the fault tolerance number of intelligent electricity meters needs to send the upgrade sub-file. The number of divided time periods calculated in this way can achieve that each divided time period is only used to send one upgrade sub-file, that is, each divided time period allows the fault tolerance number of intelligent electricity meters to send one upgrade sub-file, avoiding the chaos caused by sending upgrade sub-files simultaneously and increasing the probability of successful upgrade.
[0088] 4. The upgrade method for the power collection terminal obtains the central position of the terminal to be upgraded, obtains the boundary position of the intelligent electricity meter farthest from the terminal to be upgraded, obtains the longest radius, constructs a set of concentric circles with the central position as the center on the longest radius. The number of concentric circles is equal to the fault tolerance number, and the number of intelligent electricity meters between adjacent concentric circles is equal. Obtain the communication electricity meter set, divide each communication electricity meter set into the number of sub-groups equal to the number of time periods on average, select one sub-group from each communication electricity meter set to form a time period electricity meter set. Among them, the number of sub-groups in the time period electricity meter set is the fault tolerance number, and the distance of each sub-group in a time period electricity meter set from the terminal to be upgraded is different. By dividing the intelligent electricity meters according to the different distances from the terminal to be upgraded, multiple time period electricity meter sets are obtained, that is, the intelligent electricity meters sending the same upgrade sub-file are selected according to the distance, avoiding the overloading of data transmission of intelligent electricity meters in a certain area caused by randomly selecting intelligent electricity meters and balancing the load of the communication network. Among them, since the number of communication electricity meter sets is the fault tolerance number and the communication electricity meter sets are evenly divided into the number of sub-groups equal to the number of time periods, all intelligent electricity meters are configured on the divided time periods of a day, which is convenient for sending one upgrade sub-file in each divided time period.
[0089] 5. The upgrade method for the power collection terminal, due to the different sizes of upgrade files, the number of divided upgrade sub-files is also different. Since the number of divided time periods in a day is determined, the number of upgrade sub-files sent in a day is determined. Divide all upgrade sub-files at intervals of the value of the number of time periods according to the sending order, obtain the date file set, and each date file set is the number of upgrade sub-files to be sent in a day. Among them, the number of date file sets is the number of sending days. Similarly, the date time period set is the divided time period for sending upgrade sub-files every day. Therefore, each date time period set corresponds to a date file set, clearly corresponding the upgrade sub-files sent in each time period every day, which is convenient for clearly managing the sending and receiving of upgrade sub-files.
[0090] 6. The upgrade method for the power collection terminal sorts and names the subgroups of the time-of-use electricity meters in ascending order of distance from the central position, and selects one smart meter from each subgroup as the assisting upgrade meter. The upgrade sub-files are stored in each assisting upgrade meter. In the order of the subgroups, the assisting upgrade meters in each subgroup send the upgrade sub-files stored in them to the terminal to be upgraded. If the sending is successful, the transmission of the upgrade sub-files stops, and the upgrade sub-files in all assisting upgrade meters are cleared. If the sending fails for each assisting upgrade meter, an upgrade failure message is reported. First, the upgrade sub-file is sent to the terminal to be upgraded through the assisting upgrade meter closest to the terminal to be upgraded. If there is an error, the next closest assisting upgrade terminal to the terminal to be upgraded continues to send the upgrade sub-file. The upgrade sub-files are sent from the closest to the farthest, considering distance first to reduce the transmission time and improve efficiency. When there is an error, the farther one continues to send. While considering distance, the communication load in different regions is balanced to increase the success rate. The upgrade file is divided into several upgrade sub-files, which are stored in the smart meters so that when the terminal to be upgraded meets the upgrade conditions, it can obtain the upgrade file from the smart meter and then perform the upgrade, reducing the time for the upgrade file to be stored in the terminal to be upgraded and improving the memory utilization rate of the terminal to be upgraded. Multiple standby smart meters increase the success rate of data reception.
[0091] 7. In the upgrade method for the power collection terminal, since the modules to be upgraded for the terminal to be upgraded are different each time, that is, the sizes of the upgrade files are different, the upgrade durations for the terminal to be upgraded are different. The smallest and largest upgrade files in the historical communication records are obtained, and through file intervals, they are divided into multiple intervals. The upgrade files are classified into the corresponding intervals, and the average upgrade duration of the upgrade files in each interval is calculated to obtain the average upgrade duration of each interval. The average upgrade duration of the interval where the current upgrade file is located is obtained. The end time of the last communication period on the second date is obtained, and the time after the end time with an interval of the average upgrade duration is the predicted end time of the upgrade of the upgrade file, which is convenient for making a full-process analysis of the upgrade situation of the terminal to be upgraded. BRIEF DESCRIPTION OF THE DRAWINGS
[0092] Figure 1 It is a schematic diagram of the method of the present invention.
[0093] Figure 2 It is a schematic diagram of the concentric circle where the boundary position between the terminal to be upgraded of the present invention and the farthest smart meter is located. DETAILED DESCRIPTION OF THE INVENTION
[0094] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0095] Embodiment 1. Refer to Figure 1 , an upgrade method for a power collection terminal, including:
[0096] Obtain the power collection terminal that needs to be upgraded, denoted as the terminal to be upgraded;
[0097] Obtain all the smart meters that are collected data by the terminal to be upgraded;
[0098] Obtain the upgrade file of the terminal to be upgraded;
[0099] Obtain the size of the upgrade file;
[0100] Obtain the memory of the smart meter for storing the upgrade file, denoted as the meter memory;
[0101] Calculate [the size of the upgrade file / the meter memory] + 1 = the number of files, [] is the rounding symbol;
[0102] Divide the upgrade file into the number of upgrade sub-files equal to the number of files;
[0103] For each smart meter:
[0104] Obtain the historical communication record of the smart meter;
[0105] Execute the communication error rate statistics strategy to calculate the communication error rate of each smart meter;
[0106] Set the number of time periods for dividing 24 hours of a day into multiple time periods;
[0107] Divide 24 hours of a day into the number of divided time periods equal to the number of time periods;
[0108] According to the radius division strategy, classify the smart meters according to the distance from the terminal to be upgraded to obtain several time period meter sets;
[0109] Among them, each time period meter set corresponds to a divided time period, and the smart meters in the time period meter set send the same upgrade sub-file to the terminal to be upgraded during the corresponding divided time period;
[0110] Send the upgrade sub-file to the terminal to be upgraded through the smart meter during each divided time period;
[0111] Obtain the historical upgrade files in the historical communication records of the terminal to be upgraded, execute the upgrade interval division strategy to obtain several intervals, and calculate the average upgrade duration of each interval;
[0112] Execute the upgrade end prediction strategy to predict the moment when the terminal to be upgraded finishes the upgrade.
[0113] The execution of the communication error rate statistics strategy includes:
[0114] Obtain the communication records of the smart meter sending any 100 times of data to the terminal to be upgraded in the historical communication records of the smart meter, and record it as the total number of communications;
[0115] Obtain the number of times of communication errors between the smart meter and the terminal to be upgraded in the 100 communication records, and record it as the total number of error occurrences;
[0116] Calculate the total number of error occurrences / the total number of communications, and record the result as the communication error rate of the smart meter.
[0117] Obtain the historical communication records of the smart meter and the terminal to be upgraded, obtain 100 of the communication records, obtain the number of communication errors in the 100 communication records to get the total number of error occurrences, calculate the communication error rate of the smart meter by calculating the total number of error occurrences / the total number of communications, digitalize the probability of communication errors of the smart meter, which is convenient for calculating the number of smart meters configured for an upgrade sub-file according to the communication error rate, so as to achieve the purpose of sending the upgrade sub-file to the terminal to be upgraded, and achieve that when a smart meter fails to send the upgrade sub-file, there is a standby smart meter to send the upgrade sub-file again, increasing the probability of the terminal to be upgraded receiving the upgrade sub-file.
[0118] The setting of the number of time periods for dividing 24 hours of a day into multiple time periods includes:
[0119] Record the duration from when the smart meter starts to send data to the terminal to be upgraded until the terminal to be upgraded feeds back successful data reception as the communication duration;
[0120] Obtain the communication durations of all smart meters, and record them as the first communication duration, the second communication duration... the a-th communication duration respectively, where a is the total number of smart meters;
[0121] Execute the following formula to calculate the average communication duration;
[0122] (The first communication duration + the second communication duration +... + the a-th communication duration) / a = average communication duration;
[0123] Obtain the communication error rate with the largest value among the communication error rates of all smart meters, and record it as the maximum error rate p;
[0124] Set a fault tolerance threshold, where the fault tolerance threshold is the threshold probability of successfully sending the upgrade sub-file at least once;
[0125] Calculate 1-(p) n When > the fault tolerance threshold, obtain the smallest integer of n, denoted as the fault tolerance value;
[0126] In this embodiment, the fault tolerance value is 3;
[0127] Set a fault tolerance threshold, where the fault tolerance threshold is the threshold probability of at least one successful transmission of the upgrade sub-file by a set of smart meters. Obtain the maximum error rate p. Assume that among n smart meters sending an upgrade sub-file, each smart meter sends the upgrade sub-file at the maximum error rate, and the probability of all errors is (p)^n. Then the probability of at least one success is 1-(p)^n. When 1-(p)^n > the fault tolerance threshold, it means that the set standard of at least one successful transmission is met. Calculate the smallest integer of n at this time, that is, the number of smart meters required to send an upgrade sub-file. At this time, the set standard for successfully sending the upgrade sub-file is reached. By calculating the fault tolerance value, increase the number of smart meters sending the same upgrade sub-file to improve the success rate of transmission.
[0128] Calculate the fault tolerance value * average communication duration, and record the result as the marked duration;
[0129] Calculate [24 hours / marked duration] + 1 to obtain the number of time periods.
[0130] In this embodiment, the number of time periods is 8, that is, 8 upgrade sub-files are sent in a day;
[0131] Obtain the communication duration of a smart meter from the start of data transmission to knowing the successful data transmission, calculate the average value of the communication durations of all smart meters to obtain the average communication duration. When there are the fault tolerance value number of smart meters sending the same upgrade sub-file, at least reserve the time for each smart meter to send once, that is, calculate the fault tolerance value * average communication duration. The obtained marked duration is the duration for the fault tolerance value number of smart meters to send once. Considering the situation where the last smart meter in the fault tolerance value number of smart meters needs to send the upgrade sub-file, the number of divided time periods calculated in this way can ensure that each divided time period is only used to send one upgrade sub-file, that is, each divided time period allows the fault tolerance value number of smart meters to send one upgrade sub-file, avoiding chaos when sending upgrade sub-files simultaneously and improving the probability of upgrade success.
[0132] The radius-based division strategy includes:
[0133] Obtain the location of the terminal to be upgraded, denoted as the central location;
[0134] Obtain the location of the smart meter farthest from the terminal to be upgraded, denoted as the boundary location;
[0135] Obtain the connection line between the boundary position and the center position, denoted as the longest radius;
[0136] On the longest radius, construct a set of concentric circles with the center position as the center. Among them, the number of concentric circles is the fault tolerance value, and the number of smart meters between adjacent concentric circles is equal;
[0137] All the smart meters between adjacent concentric circles form a communication meter set;
[0138] Obtain all the communication meter sets;
[0139] Evenly divide each communication meter set into the number of time slots sub - groups;
[0140] Arbitrarily select one sub - group from each communication meter set to jointly form a time - slot meter set, and obtain the number of time - slot meter sets equal to the number of time slots.
[0141] In this embodiment, the relationship of the concentric circles refers to Figure 2 , there are a total of 8 time - slot meter sets, and each time - slot meter set has 3 sub - groups. The distance from the sub - group to the terminal to be upgraded is from near to far. Send an upgrade sub - file to configure 3 assisting upgrade meters;
[0142] Obtain the center position of the terminal to be upgraded, obtain the boundary position of the smart meter farthest from the terminal to be upgraded, obtain the longest radius, construct a set of concentric circles on the longest radius with the center position as the center. The number of concentric circles is equal to the fault tolerance value, and the number of smart meters between adjacent concentric circles is equal. Obtain the communication meter sets, evenly divide each communication meter set into the number of time slots sub - groups, select one sub - group from each communication meter set to form a time - slot meter set. Among them, the number of sub - groups in the time - slot meter set is the fault tolerance value, and the distance from each sub - group in a time - slot meter set to the terminal to be upgraded is different. By dividing the smart meters according to the different distances from the terminal to be upgraded, multiple time - slot meter sets are obtained, that is, the smart meters for sending the same upgrade sub - file are selected according to the distance, avoiding the over - load of data transmission of smart meters in a certain area caused by randomly selecting smart meters, and balancing the load of the communication network. Among them, since the number of communication meter sets is the fault tolerance value, and the communication meter sets are evenly divided into the number of time slots sub - groups, all the smart meters are configured to the divided time slots of a day, which is convenient for sending an upgrade sub - file for each divided time slot.
[0143] The step of sending the upgrade sub - file to the terminal to be upgraded through the smart meter in each divided time slot includes:
[0144] Obtain the number of file - divided time slots, where each divided time slot is used to send an upgrade sub - file;
[0145] The divided time periods for sending upgrade sub-files are recorded as communication time periods;
[0146] The communication time periods are divided at intervals of the numerical value of the number of time periods according to the order of sending upgrade sub-files, resulting in multiple date time period sets. Among them, the communication time periods in each date time period set are the time periods for sending upgrade sub-files in a day;
[0147] All upgrade sub-files are divided at intervals of the numerical value of the number of time periods according to the order of sending, resulting in multiple date file sets. Among them, the upgrade sub-files in each date file set are all the upgrade sub-files to be sent in a day;
[0148] A one-to-one correspondence is established between the date time period set and the date file set.
[0149] Since the sizes of the upgrade files are different, the number of divided upgrade sub-files is also different. Since the number of divided time periods in a day is determined, the number of upgrade sub-files sent in a day is determined. All upgrade sub-files are divided at intervals of the numerical value of the number of time periods according to the order of sending, resulting in a date file set. Each date file set is the number of upgrade sub-files to be sent in a day. Among them, the number of date file sets is the number of days of sending. Similarly, the date time period set is the divided time periods for sending upgrade sub-files every day. Therefore, each date time period set corresponds to a date file set, and the upgrade sub-files sent in each time period every day are clearly corresponding, which is convenient for clearly managing the sending and receiving of upgrade sub-files.
[0150] Sending the upgrade sub-files to the terminal to be upgraded through the smart meter in each divided time period includes:
[0151] For any date time period set and its corresponding date file set:
[0152] Obtain any communication time period in the date time period set;
[0153] Obtain the set of time period electric meters for the communication time period;
[0154] The subgroups in the set of time period electric meters are named the first subgroup, the second subgroup... the dth subgroup in order from the closest to the center position;
[0155] Obtain the upgrade sub-files sent during the communication time period;
[0156] Obtain any one smart meter in the first subgroup, the second subgroup... the dth subgroup respectively, store the upgrade sub-files in d smart meters, and record the smart meters storing the upgrade sub-files as assisting upgrade electric meters;
[0157] According to the order of the subgroups, the assisting upgrade electric meters in each subgroup send the upgrade sub-files they store to the terminal to be upgraded;
[0158] If any assisting meter for upgrade fails during the process of sending the upgrade sub-file, the next assisting meter for upgrade will take over the task and attempt to re-send the upgrade sub-file;
[0159] When the upgrade sub-file is successfully transmitted to the terminal to be upgraded, the upgrade sub-file saved in the assisting meter for upgrade will be cleared;
[0160] If all assisting meters for upgrade fail to send the upgrade sub-file to the terminal to be upgraded, an upgrade failure message will be sent to the master station.
[0161] The subgroups in the time-of-use meter set are sorted and named in ascending order of distance from the central position, and an intelligent meter in each subgroup is obtained as an assisting meter for upgrade. The upgrade sub-file is stored in each assisting meter for upgrade; in the order of the subgroups, the assisting meter for upgrade in each subgroup sends the upgrade sub-file it stores to the terminal to be upgraded. If the sending is successful, stop sending the upgrade sub-file and clear the upgrade sub-file in all assisting meters for upgrade. If each assisting meter for upgrade fails to send, report the upgrade failure message. First, send the upgrade sub-file to the terminal to be upgraded through the assisting meter for upgrade closest to the terminal to be upgraded. If there is an error, then the next assisting terminal closest to the terminal to be upgraded continues to send the upgrade sub-file. Send the upgrade sub-file from near to far, considering distance first to reduce the sending time and improve efficiency. When there is an error, then the one farther away continues to send. While considering distance, balance the communication load in different regions to improve the success rate.
[0162] The implementation of the upgrade interval division strategy includes:
[0163] Obtain the smallest upgrade file in the historical communication record and denote it as the minimum file;
[0164] Obtain the largest upgrade file in the historical communication record and denote it as the maximum file;
[0165] Set the file interval for dividing the upgrade interval;
[0166] Calculate (maximum file - minimum file) / file interval = number of intervals q;
[0167] Calculate minimum file + file interval to obtain the first file;
[0168] Calculate minimum file + file interval * 2 to obtain the second file;
[0169] ……
[0170] Calculate minimum file + file interval * (q - 1) to obtain the (q - 1)-th file;
[0171] Then, denote the interval formed by the smallest file and the first file as the first interval, the interval formed by the first file and the second file as the second interval... and the interval formed by the (q - 1)-th file and the largest file as the q-th interval;
[0172] Obtain all the upgrade files in the historical communication records and classify the upgrade files into the corresponding intervals;
[0173] For any one interval;
[0174] Obtain the upgrade durations of all the upgrade files in the interval, calculate the average value, and take it as the average upgrade duration of the interval.
[0175] The execution of the upgrade end prediction strategy includes:
[0176] Denote the date when the upgrade sub-file starts to be sent as the first date;
[0177] Obtain the number of the date period set, denoted as the sending duration;
[0178] Calculate the date of the first date + the sending duration - 1, denoted as the second date;
[0179] Obtain the end moment of the last communication period in the second date;
[0180] Obtain the average upgrade duration of the interval where the upgrade file is located;
[0181] Obtain the moment at an interval of the average upgrade duration after the end moment, and take it as the moment to predict the end of the upgrade of the terminal to be upgraded.
[0182] Since the modules for upgrading the terminal to be upgraded are different each time, that is, the sizes of the upgrade files are different, the upgrade durations of the terminal to be upgraded are different. Obtain the smallest upgrade file and the largest upgrade file in the historical communication records, divide them into multiple intervals through file intervals, classify the upgrade files into the corresponding intervals, calculate the average value of the upgrade durations of the upgrade files in each interval to obtain the average upgrade duration of each interval, obtain the average upgrade duration of the interval where the current upgrade file is located, obtain the end moment of the last communication period in the second date, and the moment at an interval of the average upgrade duration after the end moment is the predicted end moment of the upgrade of the upgrade file, which is convenient for making a full-process analysis of the upgrade situation of the terminal to be upgraded.
[0183] It should be noted that in this text, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device.
[0184] The above are only the preferred embodiments of the present invention. It should be pointed out that for those of ordinary skill in the art, without departing from the technical principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.
Claims
1. An upgrade method for a power collection terminal, characterized in that: Including: Obtain the power collection terminal that needs to be upgraded, denoted as the terminal to be upgraded; Obtain all smart meters that are collected data by the terminal to be upgraded; Obtain the upgrade file of the terminal to be upgraded; Obtain the size of the upgrade file; Obtain the memory of the smart meter used to store the upgrade file, denoted as the meter memory; Calculate [size of upgrade file / meter memory] + 1 = number of files, [] is the rounding symbol; Divide the upgrade file evenly into the number of upgrade sub-files; For each smart meter: Obtain the historical communication records of the smart meter; Execute the communication error rate statistics strategy to calculate the communication error rate of each smart meter; Set the number of time periods for dividing 24 hours of a day into multiple time periods; Divide 24 hours of a day evenly into the number of divided time periods; According to the radius division strategy, classify the smart meters according to the distance from the terminal to be upgraded to obtain several time period meter sets; Among them, each time period meter set corresponds to a divided time period, and the smart meters in the time period meter set send the same upgrade sub-file to the terminal to be upgraded during the corresponding divided time period; Send the upgrade sub-file to the terminal to be upgraded through the smart meter during each divided time period; Obtain the historical upgrade files in the historical communication records of the terminal to be upgraded, execute the upgrade interval division strategy to obtain several intervals, and calculate the average upgrade duration of each interval; Execute the upgrade end prediction strategy to predict the moment when the terminal to be upgraded ends the upgrade.
2. The upgrade method for a power collection terminal according to claim 1, wherein: The execution of the communication error rate statistics strategy includes: Obtain the communication records of the smart meter sending any 100 times of data to the terminal to be upgraded in the historical communication records of the smart meter, denoted as the total number of communications; Obtain the number of times of communication errors between the smart meter and the terminal to be upgraded in the 100 communication records, denoted as the total number of errors; Calculate the total number of errors / total number of communications, and the result is denoted as the communication error rate of the smart meter.
3. The upgrade method for a power collection terminal according to claim 1, wherein: The setting of the number of time periods for dividing 24 hours of a day into multiple time periods includes: Denote the duration from the start of the smart meter sending data to the terminal to be upgraded to the successful feedback of data reception by the terminal to be upgraded as the communication duration; Obtain the communication durations of all smart meters, denoted as the first communication duration, the second communication duration... the a-th communication duration respectively, where a is the total number of smart meters; Execute the following formula to calculate the average communication duration; (First communication duration + second communication duration +... + a-th communication duration) / a = average communication duration; Obtain the maximum communication error rate among the communication error rates of all smart meters, denoted as the maximum error rate p; Set the fault tolerance threshold, and the fault tolerance threshold is the threshold probability of at least one successful transmission of the upgrade sub-file; Calculate 1-(p) n When it is greater than the fault tolerance threshold, obtain the smallest integer of n, denoted as the fault tolerance value; Calculate the fault tolerance value * average communication duration, and the result is denoted as the marked duration; Calculate [24 hours / marked duration] + 1 to obtain the number of time periods.
4. The upgrade method for a power collection terminal according to claim 3, characterized in that: The according to the radius division strategy includes: Obtain the location of the terminal to be upgraded, denoted as the central location; Obtain the location of the smart meter farthest from the terminal to be upgraded, denoted as the boundary location; Obtain the connection line between the boundary location and the central location, denoted as the longest radius; On the longest radius, with the central position as the center of the circle, construct a set of concentric circles. Among them, the number of concentric circles is the fault tolerance value, and the number of smart meters between adjacent concentric circles is equal; All smart meters between adjacent concentric circles form a communication meter set; Obtain all communication meter sets; Evenly divide each communication meter set into the number of time period sub - groups; Arbitrarily select one sub - group from each communication meter set to jointly form a time period meter set, and obtain the number of time period meter sets equal to the number of time periods.
5. The upgrade method for a power collection terminal according to claim 1, characterized in that: The step of sending the upgrade sub - file to the terminal to be upgraded by the smart meter in each divided time period includes: Obtain the number of file divided time periods, where each divided time period is used to send an upgrade sub - file; Denote the divided time period for sending the upgrade sub - file as the communication time period; Divide the communication time periods at intervals of the value of the number of time periods according to the order of sending the upgrade sub - files, and obtain multiple date - time period sets. Among them, the communication time periods in each date - time period set are the time periods for sending the upgrade sub - files in a day; Divide all upgrade sub - files at intervals of the value of the number of time periods according to the order of sending, and obtain multiple date - file sets. Among them, the upgrade sub - files in each date - file set are all the upgrade sub - files sent in a day; Establish a one - to - one correspondence between the date - time period set and the date - file set.
6. The upgrade method for a power collection terminal according to claim 5, characterized in that: The step of sending the upgrade sub - file to the terminal to be upgraded by the smart meter in each divided time period includes: For any date - time period set and its corresponding date - file set: Obtain any communication time period in the date - time period set; Obtain the time period meter set of the communication time period; Name the sub - groups in the time period meter set as the first sub - group, the second sub - group... the d - th sub - group in order from near to far from the central position; Obtain the upgrade sub - file sent in the communication time period; Respectively obtain any smart meter in the first sub - group, the second sub - group... the d - th sub - group, store the upgrade sub - file in d smart meters, and denote the smart meters storing the upgrade sub - file as the assisting upgrade meters; In the order of the sub - groups, the assisting upgrade meters in each sub - group send the upgrade sub - file they store to the terminal to be upgraded; If any assisting upgrade meter fails during the process of sending the upgrade sub - file, the next assisting upgrade meter will take over the task and try to resend the upgrade sub - file; When the upgrade sub - file is successfully transmitted to the terminal to be upgraded, clear the upgrade sub - file saved in the assisting upgrade meters; If all assisting upgrade meters fail to send the upgrade sub - file to the terminal to be upgraded, send an upgrade failure message to the master station.
7. The upgrade method for a power collection terminal according to claim 1, characterized in that: The step of implementing the upgrade interval division strategy includes: Obtain the smallest upgrade file in the historical communication record, denoted as the smallest file; Obtain the largest upgrade file in the historical communication record, denoted as the largest file; Set the file interval for dividing the upgrade interval; Calculate (the largest file - the smallest file) / the file interval = the number of intervals q; Calculate the smallest file+the file interval to get the first file; Calculate the smallest file+the file interval * 2 to get the second file; …… Calculate the smallest file+the file interval * (q - 1) to get the (q - 1)-th file; Then, denote the interval formed by the smallest file and the first file as the first interval, the interval formed by the first file and the second file as the second interval... and the interval formed by the (q - 1)-th file and the largest file as the q-th interval; Obtain all upgrade files in the historical communication records and classify the upgrade files into the corresponding intervals; For any one interval; Obtain the upgrade durations of all upgrade files in the interval, calculate the average value, and use it as the average upgrade duration of the interval.
8. The upgrading method for a power collection terminal according to claim 1, characterized in that: The execution of the upgrade end prediction strategy includes: Denote the date when the upgrade sub-file starts to be sent as the first date; Obtain the number of date period sets, denoted as the sending duration; Calculate the date of the first date + the sending duration - 1, denoted as the second date; Obtain the end moment of the last communication period in the second date; Obtain the average upgrade duration of the interval where the upgrade file is located; Obtain the moment at an interval of the average upgrade duration after the end moment, and use it as the moment to predict the end of the upgrade of the terminal to be upgraded.