Method and system for energy consumption regulation of edge nodes facing communication infrastructure
By acquiring and processing the difference and variation of the number of communication service packets and the increase in active power in the communication infrastructure, a comparison sequence of the adjustment direction is generated, which solves the problem of asynchronous measurement units and update rhythm, and realizes accurate adjustment of processor frequency level.
Patent Information
- Application Number
- CN202611250849.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-18
- Publication Date
- 2026-11-27
AI Technical Summary
The number of communication service packets processed and the increase in active power may not be synchronized due to different units of measurement, different update rhythms, and different changes, making it difficult to form a reproducible basis for processor frequency level adjustment.
By acquiring the number of communication service packets processed and the increase in active power in at least four consecutive complete sampling intervals, the difference between adjacent banded values and the magnitude of the change in adjacent differences are calculated, the sorting positions are normalized, and a comparison sequence of gear adjustment directions is generated. The target processor frequency gear is determined based on the frequency gear list.
This enables the formation of reproducible processor frequency level adjustment criteria without directly mixing the original data, reducing position mismatches caused by interface update rhythm, minimizing the impact of individual data on boundary positions, and ensuring the accuracy and consistency of frequency adjustment.
Smart Images

Figure CN123185643A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and more specifically to a method and system for regulating the energy consumption of edge nodes in communication infrastructure. Background Technology
[0002] Edge nodes in communication infrastructure typically handle tasks such as protocol parsing, authentication, forwarding, and queue submission of communication service packets. The processor frequency level affects the node's service processing capacity and active power consumption. To adjust the processor frequency according to actual operating conditions, the control process needs to simultaneously obtain the number of communication service packets processed, reflecting changes in service processing, and the increase in active power consumption, reflecting changes in node power consumption. However, these two types of data come from different interfaces, have different acquisition methods, update rhythms, and units of measurement, making it difficult to directly form a comparative basis with clear physical meaning.
[0003] For example, the communication service packet processing counting interface can output data every 1 second, while the active energy metering interface can output a cumulative active energy reading every 60 seconds. During the time it takes for the energy metering interface to generate a valid update, the communication service packet processing counting interface has already generated 60 sets of data. If the interfaces are directly paired according to their output order, a single active energy increment may only correspond to the number of communication service packets processed in one set. If the same active energy increment is repeatedly matched to all service data, the energy consumption of the same sampling period will be reused. Differences in interface startup time, timestamp resolution, and update delay may also cause adjacent data to actually cover different time ranges.
[0004] Even after time aggregation of the two types of data, the number of communication service packets processed remains discrete count data, while the increase in active power is measured in Wh or kWh. The two cannot be directly added or subtracted based on their original values. For example, during the same observation period, if the number of communication service packets processed increases from 1000 to 1030, and the increase in active power increases from 0.43Wh to 0.53Wh, the increases for the two types of data are 30 packets and 0.1Wh, respectively. The magnitudes of these two increases do not have a directly comparable physical meaning. If a comparison is forcibly established using fixed conversion factors, fixed ratio boundaries, or fixed fusion weights, the relevant parameters will be affected by processor model, node basic energy consumption, service composition, sampling duration, and power metering resolution. When equipment or operating conditions change, the original parameters may need to be recalibrated. Summary of the Invention
[0005] This invention provides a method and system for adjusting the energy consumption of edge nodes in communication infrastructure, which solves the problem that it is difficult to form a reproducible basis for adjusting the processor frequency level due to different units of measurement, different update rhythms and possible asynchronous changes in the number of communication service packets processed and the increase in active power.
[0006] This invention provides a method for regulating the energy consumption of edge nodes in communication infrastructure, comprising: acquiring the number of communication service packets processed and the increment of active power in at least four consecutive complete sampling intervals; forming a sequence of the number of communication service packets processed and a sequence of the increment of active power in time; calculating the adjacent band sign difference and the magnitude of the change of adjacent difference between the two sequences; normalizing the sorting position of the magnitude of the change of adjacent difference to the range of 0 to 1; assigning a sign according to the corresponding current adjacent band sign difference to form two band sign normalized sorting position sequences corresponding to the two sequences in sequence; pairing by time, with the absolute value of the latter being the most significant factor when the time is positive. Subtract the absolute value of the former; if both are negative, subtract the absolute value of the latter from the absolute value of the former; if they have opposite signs, take the smaller absolute value and assign the sign of the latter; if it contains 0, take 0, forming a gear adjustment direction comparison sequence; if the sequence is all zero, generate a hold instruction; otherwise, use the median of the absolute values of non-zero data as the median boundary value of this cycle to generate a downshift-side limit indication sequence and an upshift-side limit indication sequence, calculate the difference in the number of limits reached and the difference in the length of the longest continuous segment; if both are positive, generate a downshift instruction; if both are negative, generate an upshift instruction; otherwise, generate a hold instruction; determine and apply the target processor frequency gear from the list of available processor frequency gears.
[0007] Optionally, the calculation of the adjacent band sign difference and the magnitude of the adjacent difference change between the two sequences includes: for each data in the sequence of the number of communication service packets processed, excluding the first data, subtracting the previous data from the current data, and forming a sequence of adjacent band sign difference between the number of communication service packets processed according to the time sequence; for each data in the sequence of adjacent band sign difference, excluding the first data, taking the absolute value of the difference between the current data and the previous data, and using the time sequence number of the current data to form a sequence of the magnitude of the adjacent difference change between the number of communication service packets processed.
[0008] Optionally, the calculation of the adjacent band sign difference and the magnitude of the adjacent difference change between the two sequences includes: for each data in the active energy increment sequence except for the first data, subtracting the previous data from the current data, and forming an active energy increment adjacent band sign difference sequence according to the time sequence number; for each data in the adjacent band sign difference sequence except for the first data, taking the absolute value of the difference between the current data and the previous data, and using the time sequence number of the current data to form an active energy increment adjacent difference change magnitude sequence.
[0009] Optionally, the sorting position of the adjacent difference variation amplitude is normalized to the range of 0 to 1, and a sign is assigned according to the corresponding current adjacent signed difference value, including: in each adjacent difference variation amplitude sequence, the values are arranged in ascending order and assigned a sorting position starting from 1; data with the same value are used together by the arithmetic mean of the first and last sorting positions; when the sequence data are not all the same, the normalized sorting position is obtained by dividing the data obtained by subtracting 1 from the sorting position by the data obtained by subtracting 1 from the number of sequence data; when all the sequence data are the same, the normalized sorting position is set to 0; when the current adjacent signed difference value used to form the current adjacent difference variation amplitude is positive, negative, or 0, the normalized sorting position is retained, a negative sign is assigned, or it is set to 0, respectively.
[0010] Optionally, a gear adjustment direction comparison sequence is formed, including: pairing the signed normalized sorting position of the number of communication service packets processed and the signed normalized sorting position of the active energy increment according to the time sequence number, wherein the former is the signed normalized sorting position of the number of communication service packets processed and the latter is the signed normalized sorting position of the active energy increment; when both are positive, the absolute value of the latter is subtracted from the absolute value of the former; when both are negative, the absolute value of the former is subtracted from the absolute value of the latter; when they have opposite signs, the smaller of the two absolute values is taken and the latter is assigned a sign; when any position is 0, it is taken as 0; the obtained gear adjustment direction comparison values are arranged in ascending order according to the corresponding time sequence number.
[0011] Optionally, the median of the absolute values of non-zero data is used as the median boundary value for this period, including: arranging the absolute values of non-zero gear adjustment direction comparison values in the gear adjustment direction comparison sequence in ascending order; taking the data in the middle sorting position when the number of data is odd, and taking the arithmetic mean of the data in the middle two sorting positions when the number of data is even; when the gear adjustment direction comparison sequence is all zero, setting the median boundary value, the difference in the number of reaching the limit, and the difference in the length of the longest continuous segment for this period to 0, and generating a hold instruction.
[0012] Optionally, generating a downshift-side limit indication sequence and an upshift-side limit indication sequence includes: when the gear adjustment direction comparison value is positive and its absolute value is not less than the median boundary value of this cycle, writing 1 to the corresponding time sequence number in the downshift-side limit indication sequence; otherwise, writing 0; when the gear adjustment direction comparison value is negative and its absolute value is not less than the median boundary value of this cycle, writing 1 to the corresponding time sequence number in the upshift-side limit indication sequence; otherwise, writing 0; the two sequences have the same time sequence number and length as the gear adjustment direction comparison sequence.
[0013] Optionally, calculating the threshold quantity difference and the longest continuous segment length difference includes: subtracting the number of 1 values in the upshift threshold indication sequence from the number of 1 values in the downshift threshold indication sequence to obtain the threshold quantity difference; at least two consecutive time numbers with values of 1 constitute a continuous segment, while isolated 1 values do not constitute a continuous segment; determining the longest continuous segment length for each of the two sequences, setting it to 0 if no continuous segment exists; and subtracting the longest continuous segment length for the upshift threshold indication sequence from the longest continuous segment length of the downshift threshold indication sequence to obtain the longest continuous segment length difference.
[0014] Optionally, determining and applying the target processor frequency level from the list of available processor frequency levels includes: reading the list of available processor frequency levels and the current processor frequency level through the processor frequency control interface, unifying the units, removing duplicates, and sorting them in ascending order; if the read fails, the list is empty, or the current processor frequency level is not in the list, not writing and terminating the current calculation cycle; if the downgrade instruction selects the adjacent lower frequency level when the current processor frequency level is higher than the lowest frequency level, and the upgrade instruction selects the adjacent higher frequency level when the current processor frequency level is lower than the highest frequency level, and selects the current processor frequency level when the hold instruction or the aforementioned conditions are not met; writing the target processor frequency level and reading it back, and if the write fails or the read back is inconsistent, writing back the current processor frequency level before writing and reading it back again.
[0015] A power consumption regulation system for edge nodes of communication infrastructure is also provided. The system is used to implement a power consumption regulation method for edge nodes of communication infrastructure. It includes a communication service packet processing counting interface, an active power metering interface, a processor frequency control interface, a memory, and a processor. The processor executes instructions in the memory to implement: a data sequence processing module for forming two signed normalized sorted position sequences; and a frequency level adjustment module for generating a level adjustment direction comparison sequence, the median boundary value of the current period, a down-level boundary indication sequence, an up-level boundary indication sequence, a boundary quantity difference, and a longest continuous segment length difference. It generates a frequency level adjustment instruction based on the boundary quantity difference and the longest continuous segment length difference, determines the target processor frequency level from the processor's available frequency level list, and applies it through the processor frequency control interface.
[0016] The beneficial effects of this invention are reflected in: This invention incorporates the number of communication service packets processed and the increase in active power into a time-aligned, continuous, and complete sampling interval, ensuring that data with the same time sequence number corresponds to the same observation range and reducing position mismatches caused by different interface update rhythms. Both types of data generate adjacent band sign differences and adjacent difference change amplitudes within their respective sequences. The in-order sorting position of the adjacent difference change amplitudes is then normalized and assigned a sign according to the current adjacent band sign difference used when forming the current adjacent difference change amplitude. This results in a band sign-normalized sorting position with a common numerical range and retaining the direction of increase or decrease. This processing does not directly perform cross-unit raw numerical calculations on the number of communication service packets processed and the increase in active power, while preserving the relative change order of the two types of data within the current calculation cycle, providing dimensionless and time-corresponding input for subsequent directional comparisons.
[0017] This invention generates gear adjustment direction comparison values according to the same positive, same negative, opposite signs, and zero cases in two signed normalized sorting positions, using a determined absolute value processing order. Positive values, negative values, and zero respectively form evidence for downgrading, upgrading, and no adjustment. The median boundary value for this period is formed by the median absolute value of the non-zero gear adjustment direction comparison values within the current calculation cycle. This ensures that the boundary benchmark is directly derived from the current cycle data, without relying on external fixed energy consumption judgment thresholds or manually fused weights, and reduces the impact of individual large data points on the boundary position. Furthermore, the difference in the number of boundary-reaching values reflects the overall quantitative relationship between the two adjustment directions, and the difference in the length of the longest continuous segment reflects the temporal continuity of the boundary state. A downgrading or upgrading instruction is generated only when the signs of the two differences are consistent. The current processor frequency gear is maintained when there are no non-zero comparison values, the two difference directions are inconsistent, or either difference is 0. Therefore, given the same input data, the same frequency gear adjustment result can be obtained by following a defined sorting, sign branching, median, counting and continuity judgment process, and avoids gear changes being directly triggered by data in a single direction or contradictory quantitative and continuous relationships. Attached Figure Description
[0018] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the accompanying drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn to scale.
[0019] Figure 1 This is a schematic diagram illustrating the steps of the edge node energy consumption regulation method for communication infrastructure according to the present invention; Figure 2 This is a schematic diagram of part of step S1 in the edge node energy consumption regulation method for communication infrastructure of the present invention; Figure 3This is a schematic diagram of part of step S2 in the edge node energy consumption regulation method for communication infrastructure of the present invention; Figure 4 This is a schematic diagram of the data flow timing in S3 of the edge node energy consumption regulation method for communication infrastructure of the present invention; Figure 5 This is a schematic diagram of part of step S3 in the edge node energy consumption regulation method for communication infrastructure of the present invention; Figure 6 This is a schematic diagram of part of step S4 in the edge node energy consumption regulation method for communication infrastructure of the present invention; Figure 7 This is a schematic diagram of the module structure and data flow of the edge node energy consumption regulation system for communication infrastructure according to the present invention. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0021] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0022] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, the terms "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0023] This invention provides a method for regulating the power consumption of edge nodes in communication infrastructure, such as... Figure 1 As shown, in one embodiment, the method includes: S1. Read the interface update cycle, timestamp, time resolution, metering unit and minimum metering resolution of the communication service packet processing counting interface and the active energy metering interface, determine the common sampling boundary and sampling duration, obtain the number of communication service packets processed and the active energy increment within at least 4 time-aligned continuous complete sampling intervals of the target edge node, and form a sequence of the number of communication service packets processed and a sequence of active energy increments according to the time sequence number. S2. Generate adjacent signed difference sequence and adjacent difference change amplitude sequence in the communication service packet processing quantity sequence and active energy increment sequence respectively. Normalize the sorting position of each adjacent difference change amplitude in the corresponding sequence, and assign a sign according to the current adjacent signed difference used when forming the current adjacent difference change amplitude to form two signed normalized sorting position sequences. S3. Pair two signed normalized sorting positions according to the same time sequence number; when both positions are positive, subtract the absolute value of the number of communication service packets processed from the absolute value of the signed normalized sorting position of the active energy increment; when both positions are negative, subtract in reverse order; when the two positions have opposite signs, take the smaller of the two absolute values and assign the sign of the signed normalized sorting position of the active energy increment; when any position is 0, take 0, forming a gear adjustment direction comparison value sequence; when there is no non-zero data in the gear adjustment direction comparison value sequence, maintain the current processor frequency gear; otherwise, use the median of the absolute values of non-zero data as the median boundary value of this period. S4. Based on the sign of the gear adjustment direction comparison value and whether its absolute value reaches the median boundary value of this cycle, generate a downshift boundary indication sequence and an upshift boundary indication sequence, and calculate the boundary quantity difference and the longest continuous segment length difference; when both the boundary quantity difference and the longest continuous segment length difference are positive, generate a downshift instruction; when both are negative, generate an upshift instruction; otherwise, generate a hold instruction; determine the target processor frequency level based on the frequency level adjustment instruction, the current processor frequency level, and the list of available processor frequency levels, and apply the target processor frequency level through the processor frequency control interface.
[0024] In this specification, the interface update cycle is the nominal duration between two consecutive normal data updates of the communication service packet processing counting interface or the active energy metering interface; the time resolution is the smallest time unit that the data interface can distinguish and report adjacent timestamps; the common sampling boundary is the same moment when both interfaces can provide valid boundary data; the sampling interval is a time interval with a defined start and end boundary, used to summarize the number of communication service packets processed and the increment of active energy, respectively; the complete sampling interval is a sampling interval that simultaneously has a valid number of communication service packets processed, a valid increment of active energy, and a valid time sequence number, and whose sampling duration meets the requirements of the current calculation cycle; the sampling duration is the duration of a sampling interval from the start boundary to the end boundary.
[0025] The calculation cycle is the period during which a continuous and complete sampling interval is collected and all data processing is completed to generate and execute a frequency gear adjustment command; the calculation cycle duration is the duration of a calculation cycle from the start of the first sampling interval to the end of the last sampling interval; the number of sampling intervals contained in the calculation cycle is the actual number of continuous and complete sampling intervals contained in the calculation cycle; the maximum adjustment response time is the longest duration of data observation and command generation process allocated by the network management platform for a frequency gear adjustment; the time sequence number is the sequence number assigned to each sampling interval starting from 1 according to the order of the start time of the sampling interval.
[0026] The number of communication service packets processed is the number of different communication service packet processing identifiers that the target edge node completes protocol processing and successfully submits to the subsequent processing queue for the first time within a sampling interval; the active energy increment is the increase in the cumulative active energy reading at the end boundary of the same sampling interval relative to the cumulative active energy reading at the start boundary; the active energy metering boundary is the physical range of the target edge node's energy metering defined by the energy metering device identifier, metering channel, wiring location, and metering multiplier; the minimum metering resolution is the minimum amount of active energy change that the active energy metering interface can distinguish and report.
[0027] The communication service packet processing quantity sequence is an ordered data sequence formed by arranging the communication service packet processing quantity of each sampling interval in ascending order of time sequence number; the active power increment sequence is an ordered data sequence formed by arranging the active power increment of each sampling interval in ascending order of time sequence number; the adjacent band sign difference is the data obtained by subtracting the data of the previous time sequence number from the data of the current time sequence number in the same original data sequence; the adjacent difference change amplitude is the absolute value of the difference between the current adjacent band sign difference and the previous adjacent band sign difference in the same adjacent band sign difference sequence.
[0028] The sorting position is the position assigned sequentially from 1 to the data of the same adjacent difference change range sequence, arranged in ascending order of value. Data with the same value share the arithmetic mean of their first and last sorting positions. The normalized sorting position is the dimensionless data obtained by converting the sorting position to a closed interval containing 0 and 1. The signed normalized sorting position is the data obtained by assigning a sign to the normalized sorting position according to the sign of the current adjacent signed difference used when forming the current adjacent difference change range.
[0029] The gear shift direction comparison value is a dimensionless data obtained by combining the signs and absolute values of two types of signed normalized sorting positions under the same time sequence. Positive values serve as evidence for downshifting, negative values as evidence for upshifting, and 0 as evidence for no shift. The gear shift direction comparison value sequence is an ordered data sequence formed by arranging the gear shift direction comparison values in ascending order of time sequence. The median boundary value for this period is the median of the absolute values of all non-zero gear shift direction comparison values within the current calculation period.
[0030] The downshift-side boundary indication sequence and the upshift-side boundary indication sequence are binary time series that respectively identify whether the downshift-side evidence and the upshift-side evidence have reached the median boundary value of the current period; the boundary quantity difference is the data obtained by subtracting the number of 1 values in the upshift-side boundary indication sequence from the number of 1 values in the downshift-side boundary indication sequence; a continuous segment is a sequence fragment consisting of at least two consecutive time numbers with a value of 1 in the same boundary indication sequence, and an isolated 1 value does not constitute a continuous segment; the longest continuous segment length is the number of data in the continuous segment containing the most data in a boundary indication sequence, and is 0 when there is no continuous segment; the longest continuous segment length difference is the data obtained by subtracting the longest continuous segment length of the upshift-side boundary indication sequence from the longest continuous segment length of the downshift-side boundary indication sequence.
[0031] Frequency level adjustment instructions are generated by combining the signs of the difference in the number of reached limits and the difference in the length of the longest continuous segment, resulting in a down-level instruction, an up-level instruction, or a hold instruction. A frequency control domain is a single processor core or group of processor cores managed by the same processor frequency control strategy and sharing the same frequency level. The list of available processor frequency levels is a sequence of different available strategy frequency levels returned by the processor frequency control interface, unified by units, and deduplicated, arranged in ascending order of frequency value. The current processor frequency level is the current strategy frequency level read and confirmed by the processor frequency control interface before the generation of the frequency level adjustment instruction in this calculation cycle. The target processor frequency level is the frequency level to be applied, determined based on the frequency level adjustment instruction, the current processor frequency level, and the list of available processor frequency levels.
[0032] The target edge node processor is a processor or a group of processors within a shared frequency control domain that handles communication service packet protocol processing within the target edge node and whose operating frequency can be adjusted via the processor frequency control interface. The processor frequency control interface is a hardware or system software interface used to read the frequency control domain, the list of available processor frequency levels, and the current processor frequency level, and to write to and read back the target processor frequency level. The calculation cycle termination flag is used to instruct the frequency level adjustment module to stop the current calculation cycle, not to generate new frequency level adjustment instructions, and to maintain the control state of the current processor frequency level. The frequency control fault status is the abnormal status output when the read, write, read back, or recovery operations of the processor frequency control interface do not obtain the expected results. The meanings of the above terms appearing in the following text are consistent with the definitions above.
[0033] In this implementation, time is represented by s, power by W, frequency by Hz and its decimal multiples, and active energy by Wh. Based on the unit relationships of s, W, and Hz in the International System of Units (SI) and the rule of converting 1 hour to 3600 seconds, the increase in active energy and the sampling duration can be converted into the average active power within the sampling interval.
[0034] The active energy metering interface uses a static active energy metering device capable of outputting cumulative active energy readings, and reads the metering unit, metering multiplier, minimum metering resolution, cumulative reading, and timestamp provided by the device. This type of device belongs to the static active energy meter type recorded in current national standards. (See the National Standardization Management Committee's static active energy meter standard page.) The technical problem addressed by this invention is how to form a reproducible basis for processor frequency level adjustment when the units of measurement for the number of communication service packets processed and the increment of active power are different and may change asynchronously, without directly mixing the two types of raw data and without using an external fixed energy consumption threshold.
[0035] In this embodiment, it should be noted that in S1, the communication service packet processing counting interface and the active energy metering interface may have different interface update cycles. If the sequence is directly established according to the original update record of either interface, the data at the same position may not correspond to the same time range. The data sequence processing first converts the update cycles of the two interfaces into a common time unit, then selects the first identical duration from the integer multiples of the update cycles of the two interfaces as the sampling duration, and establishes a common sampling boundary at the moment when both interfaces can provide valid boundary data.
[0036] Furthermore, the timestamps of both interfaces are first converted to the same monotonic clock reference of the target edge node, and the time resolution adopts a coarser time resolution that both interfaces can support. When the time resolution of the communication service packet processing counting interface is 1ms and the time resolution of the active energy metering interface is 10ms, the timestamp is uniformly saved using 10ms; timestamps that cannot be converted to the same monotonic clock reference, have reversed time order, or cannot be associated with common sampling boundaries are judged as invalid timestamps.
[0037] Communication service packet completion records are point events with a single occurrence time, and are assigned according to the rule of including the start boundary but not the end boundary. Cumulative active energy readings represent the boundary states of sampling intervals; the same boundary reading simultaneously serves as the end reading of the previous sampling interval and the start reading of the next. Using different boundary processing methods for these two types of records avoids duplicate counting of communication service packet completion records and allows adjacent active energy increments to share the same boundary reference.
[0038] The reason for adopting the above processing logic is that a one-to-one correspondence can only be formed between the two types of original data when their time boundaries are consistent. This step solves the problems of different interface update cycles, different interface timestamp bases, different methods of attributing boundary records, and the possibility that missing data may be mistaken for real values, so that the two original data sequences have the same length and a consistent time basis.
[0039] In S2, the data sequence processing does not directly add, subtract, or multiply the number of communication service packets processed and the increase in active power. Instead, it independently calculates the adjacent band sign difference between the current data and the previous data within each sequence, and then calculates the absolute value of the difference between two adjacent band sign differences. The variation amplitude of the two types of adjacent differences retains their original units of measurement before normalization is completed.
[0040] Furthermore, the change in each adjacent difference is compared only with the sorting position of data of the same category. After the sorting position is normalized, it no longer carries the original unit of measurement, and is then assigned a sign according to the current adjacent signed difference used when forming the current adjacent difference change. The two signed normalized sorting position sequences thus enter the same numerical range and retain the corresponding direction of change.
[0041] The normalized sort position, the median boundary value of the current period, and subsequent boundary comparison data use a rational number data structure that can accurately store integer numerators and denominators, or a fixed-point data structure with equivalent precision. Binary floating-point approximations are not used directly to determine equality, zero values, or sort order. For example, the normalized sort position 0.25 is stored according to a precise integer ratio; two values both 0.25 are determined to be equal, rather than based on floating-point tolerance.
[0042] The reason for adopting the above processing logic is that the number of communication service packets processed is measured in "units," while the increase in active power is measured in Wh. These two types of raw values lack a physical basis for direct mixing and calculation. This step obtains dimensionless data through internal sorting and unified range processing, thus providing dimensionally consistent input for S3 to compare data according to symbol combinations and absolute value relationships.
[0043] In S3, the data processing order is fixed: first, pair two signed normalized sort positions according to their time sequence numbers, and then select the processing branch based on the sign combination. When both positions are positive, both types of data are in an increasing direction; when both positions are negative, both types of data are in a decreasing direction. Different absolute value subtraction orders are used for common increases and common decreases, ensuring that positive values are always attributed to the downgrade side of evidence, and negative values are always attributed to the upgrade side of evidence.
[0044] Furthermore, when two positions have opposite signs, the smaller of the two absolute values is selected to ensure that the comparison value of the gear adjustment direction does not exceed the sorting range that either position can jointly support. Then, the sign of the active energy increment is assigned to the normalized sorting position. When either position is 0, the current time sequence is treated as having no adjustment evidence. Position 0 may originate from the minimum normalized sorting position, the current adjacent band sign difference being 0, or all data in the adjacent difference change range sequence being identical; it does not represent missing input data.
[0045] The median boundary value for this period is generated solely by the absolute value of the comparison of non-zero gear adjustment directions within the current calculation period. It does not read results from historical calculation periods, does not accept manual settings, and does not reuse boundary values from the previous calculation period. When the number of non-zero data points is odd, the data at the middle sorting position is used; when the number of non-zero data points is even, the arithmetic mean of the data at the two middle sorting positions is used. When there are no non-zero data points, the median boundary value, the difference in the number of data points reaching the boundary, and the difference in the length of the longest continuous segment for this period are all set to 0.
[0046] The reason for adopting the above processing logic is that the gear adjustment direction comparison value is the control evidence defined by this method, and does not indicate a direct energy conservation relationship between the number of communication service packets processed and the increase in active power. The median boundary value of this period changes synchronously with the data distribution of the current calculation period, which avoids the use of an external fixed energy consumption threshold and reduces the possibility that a single large absolute value directly changes the boundary results of most data.
[0047] In S4, when the gear adjustment direction comparison value is positive and its absolute value is equal to or greater than the median boundary value of this cycle, 1 is written only for the time sequence corresponding to the downshift boundary indication sequence; when the gear adjustment direction comparison value is negative and its absolute value is equal to or greater than the median boundary value of this cycle, 1 is written only for the time sequence corresponding to the upshift boundary indication sequence; otherwise, 0 is written. The values 1 and 0 are fixed state codes, not preset thresholds or adjustable weights.
[0048] Furthermore, the difference in the number of data reaching the boundary reflects the relationship between the number of data reaching the median boundary value of the current period in the two adjustment directions throughout the entire calculation period, while the difference in the length of the longest continuous segment reflects the relationship of the data reaching the median boundary value of the current period occurring continuously over time. A continuous segment must contain at least two consecutive time-sequence values of 1; therefore, an isolated value of 1 only participates in the statistics of the number of data reaching the boundary and does not form the length of the longest continuous segment.
[0049] A downshift instruction is generated when both the difference in the number of steps reaching the limit and the difference in the length of the longest consecutive segment are positive; a upshift instruction is generated when both are negative; and a hold instruction is generated when the signs are different or either difference is 0. This step only determines the sign of the two differences, does not set a threshold for the absolute value of the difference, does not add, subtract, or multiply the two differences, and does not change the number of gear steps based on the absolute value of the two differences.
[0050] The reason for adopting the above processing logic is that simply counting the number of times the threshold is reached cannot distinguish between scattered and continuous data. The target processor frequency level is only changed when the difference in the number of times the threshold is reached and the difference in the length of the longest continuous segment both point to the same adjustment direction. This can avoid frequency changes when the overall quantitative relationship and the temporal continuity relationship contradict each other.
[0051] In summary, the edge node energy consumption regulation method for communication infrastructure firstly involves using a common sampling boundary and sampling duration to classify the number of communication service packets processed and the increase in active power into a continuous and complete sampling interval corresponding to the time. This maintains the current processor frequency level even when input is missing, the counter is reset, the cumulative reading wraps around, or the metering conditions change. Simultaneously, the sign difference between adjacent data and the magnitude of their changes are independently calculated within the two types of original data sequences. Sorting position normalization ensures that data from different metering units enter the same numerical range, and the direction of change is preserved through the current sign difference between adjacent data. Furthermore, a comparison value for the adjustment direction is formed based on the sign combination and absolute value relationship of the two normalized sorting positions. The median of the absolute values of the non-zero comparison values in the current calculation cycle forms the data adaptive boundary. Therefore, the number of data reaching the boundary and their consecutive occurrences on both the downsegment and upsegment sides are statistically analyzed. Only when the sign of the difference in the number of data reaching the boundary matches the sign of the difference in the longest continuous segment length is one frequency level changed. The target processor frequency level is determined through the processor available frequency level list, the current processor frequency level, write result readback, and fault branches.
[0052] In one implementation, such as Figure 2 As shown, S1 includes: S11. Read the interface update cycle, timestamp, and time resolution of the communication service packet processing counting interface and the active energy metering interface, convert the two interface update cycles to a common time unit, and determine the sampling duration and common sampling boundary.
[0053] S12. Collect communication service packet processing records and cumulative active energy readings according to the common sampling boundary, and obtain the number of communication service packets processed and the increase in active energy for each sampling interval.
[0054] S13. Determine the number of sampling intervals in the calculation period based on the maximum adjustment response time and the sampling time, and collect at least 4 consecutive complete sampling intervals starting from the first effective common sampling boundary.
[0055] S14. Check the data integrity and metering condition consistency of each sampling interval; if the check passes, form a sequence of communication service packet processing quantity and active energy increment sequence according to the time sequence number; if the check fails, output the calculation cycle termination mark and maintain the current processor frequency level.
[0056] In this embodiment, it should be noted that in S11, the interface update cycle is read from the interface description information of the communication service packet processing counting interface and the active energy metering interface. The data sequence processing process converts the two interface update cycles into the same time unit, and then selects the first identical duration from integer multiples of the two interface update cycles as the sampling duration. When the communication service packet processing counting interface updates every 1 second and the active energy metering interface updates every 60 seconds, the sampling duration is 60 seconds; when the two interfaces update every 40 seconds and 60 seconds respectively, the sampling duration is 120 seconds. The larger 60 seconds cannot be directly selected. When any interface update cycle changes, the current calculation cycle is terminated, and the sampling duration is re-determined according to the new interface update cycle.
[0057] The common sampling boundary uses the same monotonic clock timestamp that can be associated with valid records on both interfaces. After system startup, the first moment when valid communication service packet processing records and valid cumulative active energy readings can be obtained simultaneously is taken as the first common sampling boundary. Subsequent common sampling boundaries are determined continuously according to the sampling duration. If a common sampling boundary cannot be established, the cycle calculation does not begin.
[0058] When the completion time of a communication service packet record equals the boundary time of a sampling interval, the record is included in the next sampling interval. The cumulative active energy reading at the boundary time serves as both the end reading of the previous sampling interval and the start reading of the next sampling interval, but only participates in the start-end difference processing of each sampling interval once. For example, when the sampling duration is 60 seconds, a communication service packet processing instance completed within a relative time of 60 seconds is included in the second sampling interval, while the cumulative active energy reading within a relative time of 60 seconds simultaneously constitutes the end reference of the first sampling interval and the start reference of the second sampling interval.
[0059] Furthermore, after obtaining the processing result of S11, S12 assigns a unique processing identifier to each communication service packet processing instance entering the protocol processing flow. When this processing instance is successfully submitted to the subsequent processing queue for the first time, a completion count is incremented, and the corresponding processing identifier is marked as already counted. When the same processing identifier re-enters the submission branch, only the duplicate submission status is recorded, and the number of communication service packets processed is not increased. If a sampling interval generates 1002 successful submission records, and two of these records carry already counted processing identifiers, after excluding duplicate records, the number of communication service packets processed is 1000. When the communication service packet processing counter is reset or wrapped around, and the interface cannot directly provide the number of new processing packets for the current sampling interval, this sampling interval is determined to be an incomplete sampling interval.
[0060] The communication service packet processing count interface returns the number of newly processed communication service packets each time an update is performed. This is achieved by summing the new numbers within the same sampling interval during the data sequence processing. When the interface returns the cumulative processing count, it uses the increase in the cumulative processing count at the end boundary relative to the cumulative processing count at the beginning boundary. Only one data format confirmed by the interface description information is used within the same calculation cycle; the new processing count and the cumulative processing count are not mixed. When the interface explicitly returns 0, the value is considered valid data.
[0061] The active energy metering boundary is determined based on the power supply topology of the target edge node during system deployment. The deployment process reads the energy metering device identifier, metering channel, wiring location, and metering multiplier, selecting a metering channel that covers the overall power input of the target edge node and is distinct from other branches. For example, if the energy metering interface returns two channels, with the first channel connected to the overall power input and the second channel connected only to the fan branch, the first channel is selected as the active energy metering boundary; data from the second channel is not included in the current calculation cycle. If a change in the energy metering device, metering channel, wiring location, or metering multiplier is detected during the calculation cycle, the current calculation cycle is terminated.
[0062] The active energy increment is obtained by subtracting the effective cumulative active energy reading at the start boundary from the effective cumulative active energy reading at the end boundary of the same sampling interval. When multiple intermediate cumulative readings exist within a sampling interval, the intermediate readings are only used to check the reading time sequence and monotonicity, and do not change the active energy increment determined by the start and end boundaries. For example, if the cumulative active energy reading at the start boundary is 10Wh, the intermediate reading is 12.1Wh, and the end boundary reading is 14.3Wh, the active energy increment is 4.3Wh. If the end reading is less than the start reading and the interface does not report a valid wrapback, the corresponding sampling interval is determined to be invalid.
[0063] The data sequence processing first restores the actual cumulative active energy according to the metering multiplier returned by the active energy metering interface, then converts it uniformly to Wh, and finally converts it to an integer count according to the minimum metering resolution. When the interface returns 0.004 kWh, it is converted to 4 Wh; when the minimum metering resolution is 0.01 Wh, 0.43 Wh is stored according to 43 minimum metering units. If the unit identifier is missing, the metering multiplier is invalid, or the conversion result exceeds the range declared by the interface, the corresponding data is judged as invalid.
[0064] In S13, the maximum adjustment response duration is determined by the network management platform based on the maximum update cycle of the communication service energy consumption management policy. It is only used to limit the data observation time that can be used in a single calculation cycle and is not used as an energy consumption judgment threshold. The network management platform reads the current communication service's energy consumption control policy and node resource management policy, selects the longest observation duration allowed by both policies, and requires that this duration can accommodate at least four complete sampling intervals. For example, if the longest observation duration allowed by the communication service energy consumption control policy is 480s and the longest observation duration specified by the node resource management policy is 420s, the maximum adjustment response duration is determined to be 420s; with a sampling duration of 60s, one calculation cycle contains seven complete sampling intervals. When the policy value changes, a new maximum adjustment response duration is adopted from the next calculation cycle.
[0065] The data sequence processing procedure selects the maximum number of sampling intervals that can be fully accommodated as the number of sampling intervals in the calculation cycle, provided that the maximum adjustment response time is not exceeded. Each calculation cycle does not overlap. After the 7th sampling interval is completed, the current calculation cycle is closed, data processing, target processor frequency setting writing and readback are completed, and the next calculation cycle begins from the first complete sampling interval after successful readback.
[0066] Each computation cycle must contain at least four complete sampling intervals. This is because four original data points can sequentially generate three adjacent signed differences and two adjacent difference variation amplitudes, ensuring that the number of adjacent difference variation amplitudes used in the normalization process, minus one, is not zero. With only three sampling intervals, only one adjacent difference variation amplitude can be generated, making it impossible to complete the intended normalization using the non-identical branch. With four sampling intervals, two adjacent difference variation amplitudes can be generated. Therefore, four is the lower bound for ensuring the algorithm's executable structure, not a threshold for energy consumption judgment.
[0067] Upon initial system startup, the frequency adjustment process first reads the current processor frequency level through the processor frequency control interface and begins collecting data from the first valid common sampling boundary after successful reading. After completing one application of the target processor frequency level, the next calculation cycle begins from the first valid common sampling boundary after successful readback.
[0068] In S14, the following conditions will cause the calculation cycle termination mark to become valid: no record returned by the interface, invalid timestamp, missing boundary readings at the common sampling boundary, change in the data format of the communication service packet processing counting interface, change in the active energy metering interface or metering channel, incompatibility of metering unit or metering multiplier, change in minimum metering resolution, and inability of cumulative readings to form effective increments.
[0069] When the final reading of the accumulated active energy is less than the initial reading, the corresponding record is deemed invalid due to a reset or rewind. Similarly, if the cumulative counter for a communication service packet is reset or rewinded and the number of newly processed data in the current sampling interval cannot be recovered from the interface state, the corresponding record is also deemed invalid. The system does not use an assumed upper limit of the counter to recover the value, nor does it pad invalid data with zeros.
[0070] When the computation cycle termination flag is valid, the data sequence processing discards the data already collected in the current computation cycle, does not form two signed normalized sorted position sequences, does not generate frequency level adjustment instructions, and maintains the current processor frequency level. After the two interfaces regain a valid common sampling boundary, the system starts a new computation cycle from the next set of continuous complete sampling intervals.
[0071] The reason for adopting the processing logic from S11 to S14 is that the sampling duration, the number of sampling intervals included in the calculation cycle, the deduplication method for communication service packets, the active energy metering boundary, the metering unit, and the data integrity branch all have clear sources and determination processes. This processing avoids asynchronous interfaces, duplicate submissions, inconsistent units, counter resets, and missing data from entering the subsequent sorting process.
[0072] In one implementation, such as Figure 3 As shown, S2 includes: S21. For the sequence of communication service packet processing quantities, subtract the previous data from the current data to form a sequence of adjacent band sign difference values for the number of communication service packets processed; then, starting from the second adjacent band sign difference value, take the absolute value of the difference between the current adjacent band sign difference value and the previous adjacent band sign difference value to form a sequence of adjacent difference value variation amplitudes for the number of communication service packet processing quantities.
[0073] S22. For the active energy increment sequence, subtract the previous data from the current data to form the active energy increment adjacent band sign difference sequence; then, starting from the second adjacent band sign difference, take the absolute value of the difference between the current adjacent band sign difference and the previous adjacent band sign difference to form the active energy increment adjacent difference change amplitude sequence.
[0074] S23. Determine the sorting position and normalized sorting position within the two adjacent difference change amplitude sequences respectively. Assign the current adjacent signed difference according to the current adjacent difference change amplitude used when forming the current adjacent difference change amplitude, and form the signed normalized sorting position sequence of the number of communication service packets processed and the signed normalized sorting position sequence of the active energy increment according to the time sequence number.
[0075] In this embodiment, it should be noted that in S21, the subtraction order of adjacent signed differences is fixed as the data of the current time number minus the data of the previous time number. Positive values correspond to an increase in the number of communication service packets processed, negative values correspond to a decrease in the number of communication service packets processed, and 0 corresponds to the same number of communication service packets processed in two adjacent sampling intervals. The change range of each adjacent difference follows the time number of the current adjacent signed difference.
[0076] For example, when the sequence of number of communication service packets processed is 10000, 10100, 10300, 10300, 10600, 10500, and 10900, the difference between adjacent signed packets is 100, 200, 0, and 300, respectively. 100 and 400. Then take the absolute value of the difference between any two adjacent signed differences to get 100, 200, 300, 400 and 500 in succession.
[0077] Furthermore, after obtaining the processing results on the communication service packet processing quantity side, S22 processes the active energy increment sequence using the same time correspondence method, but all calculations are performed only within the active energy increment sequence. Each active energy increment has been converted to a unified unit of measurement and the same minimum measurement resolution before entering S22.
[0078] For example, when the active energy increment sequence is 0.4Wh, 0.43Wh, 0.47Wh, 0.53Wh, 0.55Wh, 0.54Wh, and 0.58Wh, the sign differences between adjacent values are 0.03Wh, 0.04Wh, 0.06Wh, and 0.02Wh, respectively. 0.01Wh and 0.04Wh. Continue to take the absolute value of the difference between two adjacent signed values, and obtain 0.01Wh, 0.02Wh, 0.04Wh, 0.03Wh and 0.05Wh in the original time order.
[0079] In S23, each sequence of adjacent difference changes is sorted independently. When the sequence data are not all the same, they are arranged in ascending order of value and assigned values starting from sort position 1. Data with the same value share the arithmetic mean of the first and last sort positions they occupy. Then, 1 is subtracted from the current sort position, and the result is divided by the total number of data in the current sequence minus 1 to obtain the normalized sort position within a closed interval containing 0 and 1.
[0080] Starting the sorting position from 1 and using a closed interval containing 0 and 1 for the normalization result are both part of the sorting position encoding rules and not part of the energy consumption threshold. When the adjacent difference changes by 10, 20, 20, and 30 respectively, the sorting positions are 1, 2.5, 2.5, and 4 respectively, and the normalized sorting positions are 0, 0.5, 0.5, and 1 respectively. When all sequence data are identical, all normalized sorting positions are set to 0 to avoid different results for the same data due to the original sorting order.
[0081] After normalization, the normalized sorting position is retained when the difference between the current adjacent bands is positive, assigned a negative sign when it is negative, and set to 0 when it is 0. When the normalized sorting position itself is 0, even if the difference between the current adjacent bands is negative, the saved result is still 0.
[0082] The changes in the number of adjacent processing differences for the aforementioned communication service packets are, respectively, 100, 200, 300, 400, and 500, with normalized sorting positions of 0, 0.25, 0.5, 0.75, and 1. The corresponding current adjacent signed differences are, respectively, 200, 0, 300, and... The numbers 100 and 400 result in a signed normalized sorting sequence of the number of communication service packets processed: 0, 0, 0.5, and 0.5. 0.75 and 1.
[0083] The aforementioned changes in the adjacent differences of active energy increments, in their original time sequence, are 0.01Wh, 0.02Wh, 0.04Wh, 0.03Wh, and 0.05Wh, corresponding to normalized sorting positions of 0, 0.25, 0.75, 0.5, and 1, respectively. The corresponding current adjacent sign differences are positive, positive, positive, negative, and positive, respectively. Therefore, the normalized sorting position sequence of active energy increments is 0, 0.25, 0.75, ... 0.5 and 1.
[0084] Both signed normalized sorted position sequences have two fewer data points than their corresponding original data sequences, and each sequence corresponds to a time number starting from the third sampling interval in the original data sequence. The reason for using processing logic S21 to S23 is that adjacent signed differences preserve the direction of data increase or decrease, the magnitude of changes in adjacent differences reflects the degree of change in adjacent quantities, and sorted position normalization eliminates the influence of the two types of original units on subsequent comparisons.
[0085] In one implementation, such as Figure 4 and Figure 5 As shown, S3 includes: S31. Pair the sign-normalized sorting position of the number of communication service packets processed and the sign-normalized sorting position of the active energy increment one by one according to the time sequence number; when both positions are positive, subtract the absolute value of the sign-normalized sorting position of the active energy increment from the absolute value of the sign-normalized sorting position of the number of communication service packets processed; when both positions are negative, subtract in reverse order.
[0086] S32. When two signed normalized sorting positions have opposite signs, select the smaller of the two absolute values and assign the sign of the signed normalized sorting position of the active energy increment; when either position is 0, set the corresponding gear adjustment direction comparison value to 0; arrange all processing results according to time sequence to form a gear adjustment direction comparison value sequence.
[0087] S33. Extract non-zero data from the gear adjustment direction comparison value sequence, take the absolute value of the non-zero data and arrange them in ascending order of value, and determine the median boundary value of this cycle based on the parity of the number of data; when there is no non-zero data in the gear adjustment direction comparison value sequence, set the median boundary value of this cycle, the difference in the number of reaching the limit and the difference in the length of the longest continuous segment to 0, and generate a hold instruction.
[0088] In this embodiment, it should be noted that in S31, both positions being positive corresponds to the number of communication service packets processed and the increase in active power both being in an increasing direction. Both positions being negative corresponds to both types of data being in a decreasing direction. The branches that are jointly increasing and jointly decreasing use different absolute value subtraction orders to ensure that the two branches obtain unified downshifting and upshifting side codes.
[0089] Furthermore, after obtaining the processing results of branches with the same sign, S32 processes branches with different signs and zero values. When the number of communication service packets processed has a negative sign-normalized sorting position and the active energy increment has a positive sign-normalized sorting position, the gear adjustment direction comparison value is positive; when the number of communication service packets processed has a positive sign-normalized sorting position and the active energy increment has a negative sign-normalized sorting position, the gear adjustment direction comparison value is negative.
[0090] The branch with the opposite sign selects the smaller absolute value to limit the gear adjustment direction comparison value to the sorting range covered by both types of positions. When either position is 0, the current time sequence is treated as having no adjustment evidence, and the other position is not used to generate a gear adjustment direction comparison value separately.
[0091] In S33, when the number of non-zero data points is odd, the data point in the middle of the sorted order is taken as the median boundary value for this period; when the number of non-zero data points is even, the arithmetic mean of the data points in the two middle sorted positions is taken. This period's median boundary value only uses data from the current calculation period and does not accept external input.
[0092] For example, when the gear adjustment direction comparison value sequence is 0, 0, 0.25, 0.25, and 0, the absolute values of the non-zero data are 0.25 and 0.25, and the number of data is 2. The data in the two middle sorting positions are both 0.25, and their arithmetic mean is 0.25. Therefore, the median boundary value for this period is 0.25.
[0093] The reason for adopting the processing logic of S31 to S33 is that the branches with the same positive, the same negative, different signs and containing 0 cover all the sign combinations of the two signed normalized sort positions under the same time sequence number. The median boundary value of this period is directly calculated from the current data, which can provide a common and reproducible basis for reaching the boundary for the two adjustment directions.
[0094] In one implementation, such as Figure 6 As shown, S4 includes: S41. Scan the gear adjustment direction comparison value sequence according to the time sequence number, and generate a downshifting side limit indication sequence and an upshifting side limit indication sequence with the same length and time sequence number as the gear adjustment direction comparison value sequence.
[0095] S42. Count the number of values 1 in the downshift boundary indicator sequence and the upshift boundary indicator sequence, and calculate the difference in the number of boundaries reached; identify the continuous segments in the two boundary indicator sequences, determine the length of the longest continuous segment, and calculate the difference in the length of the longest continuous segment.
[0096] S43. Generate a frequency range adjustment instruction based on the sign combination of the difference in the number of reached limits and the difference in the length of the longest continuous segment, read the list of available frequency ranges of the processor and the current frequency range of the processor, determine the target processor frequency range, and perform write, readback and fault handling.
[0097] In this embodiment, it should be noted that in S41, when the gear adjustment direction comparison value is positive and its absolute value is equal to or greater than the median boundary value of this cycle, the corresponding time sequence number of the downshift boundary indication sequence is written as 1, otherwise it is written as 0; when the gear adjustment direction comparison value is negative and its absolute value is equal to or greater than the median boundary value of this cycle, the corresponding time sequence number of the upshift boundary indication sequence is written as 1, otherwise it is written as 0.
[0098] The "reaching" condition in the boundary judgment includes both equal to and greater than the specified cases. An indicator value of 1 indicates that the gear adjustment direction comparison value in the corresponding direction has reached the median boundary value of this cycle, while an indicator value of 0 indicates that it has not been reached or that the gear adjustment direction comparison value does not belong to that direction. Indicator values 0 and 1 are fixed binary codes, not adjustable parameters.
[0099] Furthermore, after acquiring the two threshold indication sequences, S42 subtracts the number of 1 values in the upshift threshold indication sequence from the number of 1 values in the downshift threshold indication sequence to obtain the threshold quantity difference. Then, starting from the first time sequence number, each threshold indication sequence is scanned. Candidate segments containing at least two consecutive 1 values are registered as continuous segments; candidate segments containing only one 1 value are processed as isolated threshold data.
[0100] The minimum number of data points for a continuous segment is set to 2 to exclude boundary indicators that appear in isolation at only one time index, ensuring that the longest continuous segment length reflects the continuous occurrence of the boundary state at adjacent time indexes. This value is a structural constant for determining temporal continuity and is not obtained through model training or history fitting. For example, when the boundary indicator sequence is 0, 1, 0, the longest continuous segment length is 0; when the boundary indicator sequence is 0, 1, 1, 0, the two middle values of 1 constitute a continuous segment of length 2.
[0101] When a threshold indication sequence has multiple consecutive segments, the lengths of each segment are compared and the maximum value is used. When multiple consecutive segments have the same maximum length, the longest consecutive segment length is taken from this common length, regardless of the order of the consecutive segments. When there are no consecutive segments, the longest consecutive segment length is set to 0. The difference in the longest consecutive segment length is obtained by subtracting the longest consecutive segment length of the threshold indication sequence on the upshift side from the longest consecutive segment length of the threshold indication sequence on the downshift side.
[0102] In S43, the frequency gear adjustment module reads the difference in the number of thresholds reached and the difference in the length of the longest continuous segment, and only determines whether each difference is positive, negative, or 0. For example, when the difference in the number of thresholds reached is 2 and the difference in the length of the longest continuous segment is 1, a downshift command is generated; the two differences are 2 and 1 respectively. When generating a hold instruction, you cannot first obtain a positive value by addition and then generate a downshift instruction.
[0103] The list of available processor frequency ranges and the current processor frequency range are both read from the processor frequency control interface. The frequency range adjustment module standardizes the frequency values returned by the interface to GHz, removes duplicate values, and sorts them in ascending order. If the processor driver does not provide a discrete frequency range list, only provides a continuous frequency range, returns an empty list, or the interface read fails, this method does not automatically divide the frequency ranges, does not perform the write operation, and does not output the calculation cycle termination flag.
[0104] The current processor frequency level uses the current policy frequency value reported by the processor frequency control interface, and does not use the instantaneous measured frequency affected by transient load, hardware acceleration, or clock gating. General processor frequency control frameworks typically manage shared control interfaces using frequency policy objects and may provide a discrete list of available frequencies or a continuous range; therefore, this implementation explicitly limits the target processor frequency control interface to returning discrete policy frequency levels and treats the shared policy object as an adjustment target.
[0105] For example, if the processor frequency control interface returns 2.4GHz, 1.6GHz, 2GHz, 1.6GHz, and 1.2GHz in sequence, after removing duplicate values and sorting them in ascending order, the list of available processor frequency levels will be 1.2GHz, 1.6GHz, 2GHz, and 2.4GHz. If the interface also confirms that the current processor frequency level is 2GHz, it allows the selection of the target processor frequency level to continue.
[0106] The frequency control domain of the target edge node processor is determined based on the processor affinity of the communication service packet processing task and the correspondence between the policy domain returned by the processor frequency control interface. Each computing instance corresponds to only one current processor frequency level and one list of available processor frequency levels. When multiple processor cores share the same frequency control domain, this frequency control domain is treated as an adjustment object and written only once. When multiple independent frequency control domains simultaneously handle communication service packet processing tasks, and the active energy metering interface can only provide the overall active energy reading, the same overall active energy increment is not repeatedly allocated to multiple independent frequency control domains.
[0107] When the frequency adjustment command is a down-level command, it selects the adjacent lower frequency level of the current processor frequency level; if the current processor frequency level is already the lowest, the target processor frequency level remains the current processor frequency level. When the frequency adjustment command is a up-level command, it selects the adjacent higher frequency level of the current processor frequency level; if the current processor frequency level is already the highest, the target processor frequency level remains the current processor frequency level. When the frequency adjustment command is a hold command, the target processor frequency level is the current processor frequency level.
[0108] Each completed data calculation cycle can change at most one adjacent frequency level, and the adjustment step size is not changed by the absolute value of the difference in the number of reached limits or the difference in the length of the longest consecutive segment. For example, if the list of available processor frequency levels is 1.2GHz, 1.6GHz, 2GHz, and 2.4GHz, and the current processor frequency level is 2GHz, the down-level instruction will only select 1.6GHz, and cannot directly select 1.2GHz.
[0109] If the processor frequency control interface read fails, the list of available processor frequency slots is empty, the current processor frequency slot is not in the list of available processor frequency slots, or the list of available processor frequency slots changes during the current calculation cycle, the frequency slot writing will not be performed. Instead, a calculation cycle termination flag will be output, and the last confirmed valid current processor frequency slot will continue to be used.
[0110] Before writing, the frequency level adjustment module saves the current processor frequency level. After submitting the target processor frequency level, it waits for the interface to return a write completion status, and then reads the current policy frequency value in the same frequency control domain. When the readback value equals the target processor frequency level, the current calculation cycle is marked as adjustment complete. If the interface reports an error or the readback value is inconsistent, a control request to restore the current processor frequency level before writing is sent and readback is performed again. When the restoration result is confirmed, the current calculation cycle ends and the restored level is adopted. If the restoration request fails or the restoration result cannot be confirmed, a frequency control fault status is output, and subsequent automatic frequency level adjustment is paused.
[0111] The data sequence processing module records the current processor frequency level at the beginning of the calculation cycle and reads the same strategy frequency value at the end of each sampling interval. If the read result differs from the value at the beginning of the calculation cycle and the system does not send a level write command during that period, the change is judged as external frequency modulation interference. The current calculation cycle is terminated and the collected data is discarded. A new calculation cycle begins when the frequency state stabilizes again after the change and a common sampling boundary is obtained.
[0112] This invention also provides an edge node power consumption regulation system for communication infrastructure, such as... Figure 7 As shown, the system includes the following physical and logical modules: The communication service packet processing counting interface provides communication service packet processing identifiers, processing completion records, and timestamps; the active energy metering interface provides cumulative active energy readings, reading timestamps, metering units, metering multipliers, and minimum metering resolution; the memory stores executable instructions, interface input data, time sequence numbers, intermediate sequences, calculation cycle termination markers, frequency control fault status, a list of available processor frequency ranges, the current processor frequency range, frequency range adjustment instructions, and the target processor frequency range; the processor frequency control interface reads the frequency control domain, the list of available processor frequency ranges, and the current processor frequency range, and writes and... The system includes: a target processor frequency range readback module; at least one processor for executing executable instructions in memory; a data sequence processing module for generating a sequence of communication service packet processing quantities, an active energy increment sequence, a sequence of two adjacent signed difference values, a sequence of two adjacent difference change magnitudes, and two signed normalized sorting position sequences; and a frequency range adjustment module for generating a range adjustment direction comparison value sequence, the median boundary value of the current period, a downshift boundary indication sequence, an upshift boundary indication sequence, a boundary quantity difference, a longest continuous segment length difference, a frequency range adjustment instruction, and the target processor frequency range, and applying the target processor frequency range through the processor frequency control interface.
[0113] In one implementation, the communication service packet processing counting interface is connected to the protocol processing flow of the target edge node, outputting a processing identifier and completion timestamp when the communication service packet processing instance completes protocol processing and is successfully submitted to the subsequent processing queue for the first time. The active energy metering interface is connected to the fixed metering boundary formed by the power supply input terminal of the target edge node. The processor frequency control interface is connected to the frequency control domain of the target edge node processor, used to complete policy frequency reading, writing, and readback.
[0114] Both the data sequence processing module and the frequency level adjustment module are logical function modules. They can be implemented by the same processor executing instructions from memory, or by different processors sharing memory, without requiring separate physical hardware. The data sequence processing module stores the time sequence number of each intermediate data point, enabling two signed normalized sort positions to be paired according to the same time sequence number.
[0115] The data sequence processing module checks whether any sampling interval is missing a type of input, whether the timestamp is valid, whether the counter is reset, whether the cumulative reading wraps around, and whether the unit of measurement and the measurement multiplier are consistent. If any check fails, the calculation cycle termination flag is set to valid, the two signed normalized sorted position sequences of the current calculation cycle are not output, and the incomplete intermediate results are discarded. When the frequency adjustment module detects that the calculation cycle termination flag is valid, it does not generate a new frequency adjustment instruction and continues to use the current processor frequency level.
[0116] The frequency gear adjustment module receives two signed normalized sorted position sequences and their time numbers, and sequentially forms a gear adjustment direction comparison value sequence, the median boundary value of this cycle, a downshift boundary indication sequence, an upshift boundary indication sequence, a boundary quantity difference, and a longest continuous segment length difference. Then, it generates a frequency gear adjustment instruction, determines the target processor frequency gear, and completes the write-back.
[0117] The following uses a specific application scenario to integrate and verify the calculation logic and data flow process of each step in the above implementation method.
[0118] Assume the target edge node is a communication edge device used for controlling packet authentication, decryption, and protocol processing. The device asset record states the rated power of the entire unit is 65W, a value derived from the device's power supply nameplate. The processor topology interface report indicates that the four processor cores responsible for processing communication packets share a single frequency control domain; therefore, this shared frequency control domain is identified as the target edge node processor. The overall active energy metering boundary and the frequency control domain are not the same physical boundary. In this application scenario, only the increase in overall active energy is used as feedback data, and it is not interpreted as the active energy consumed individually by the four processor cores.
[0119] The update cycle for the communication service packet processing counting interface report is 1 second, and the update cycle for the active energy metering interface report is 60 seconds. Both values are derived from the interface description information. After converting the update cycles of the two interfaces to the same time unit, 60 seconds can fully accommodate 60 update cycles of the communication service packet processing counting interface and 1 update cycle of the active energy metering interface. This is also the first time that the duration of two interfaces' complete updates in integer numbers is met; therefore, the sampling duration is 60 seconds.
[0120] The network management platform reads a maximum observation duration of 480s from the communication service energy consumption control policy and 420s from the node resource management policy. It adopts the smaller of the two policies, 420s, as the maximum adjustment response time. Dividing the maximum adjustment response time of 420s by the sampling duration of 60s yields 7 sampling intervals within the calculation cycle. This value satisfies the algorithm structure requirement of at least 4 sampling intervals.
[0121] The data sequence processing converts the first valid timestamp shared by both interfaces into a relative time of 0s. Subsequently, common sampling boundaries of 60s, 120s, 180s, 240s, 300s, 360s, and 420s are obtained sequentially according to a sampling duration of 60s. The relative time of 0s, together with the subsequent seven boundaries, defines seven consecutive complete sampling intervals, each boundary being obtained by adding 60s to the previous boundary.
[0122] The active energy metering interface declares a minimum metering resolution of 0.01Wh, a value derived from the metering interface metadata. To avoid displaying excessively long cumulative readings, the data sequence processing only internally stores the original cumulative readings, and the original cumulative reading of the first common sampling boundary is used as the relative benchmark in the application scenario description. This processing only subtracts the same benchmark from all boundary readings, does not change the difference between any two adjacent boundary readings, and does not indicate a reset of the energy metering device.
[0123] Using the first common sampling boundary as a relative benchmark, the relative cumulative active energy readings for the eight common sampling boundaries are 0Wh, 0.4Wh, 0.83Wh, 1.3Wh, 1.83Wh, 2.38Wh, 2.92Wh, and 3.5Wh, respectively. These eight values were all obtained from the same energy metering interface, the same metering channel, and the same metering multiplier, and correspond to the aforementioned eight common sampling boundaries.
[0124] Based on a minimum metering resolution of 0.01Wh, the aforementioned relative cumulative active energy readings are sequentially stored as 0, 40, 83, 130, 183, 238, 292, and 350 minimum metering units. Each integer is obtained by dividing the corresponding relative cumulative active energy reading by 0.01Wh.
[0125] In S1, the communication service packet processing counting interface summarizes the newly completed counts updated every 1 second 60 times within each 60-second sampling interval, and performs deduplication of processing identifiers, resulting in the following communication service packet processing counts for the seven sampling intervals: 10000, 10100, 10300, 10300, 10600, 10500, and 10900 respectively. These values represent the number of different communication service packet processing identifiers successfully submitted for the first time within the corresponding sampling interval, and are direct outputs of the communication service packet processing counting interface.
[0126] Dividing the number of communication service packets processed (10,000) by the sampling duration of 60 seconds yields approximately 166.67 packets per second; dividing the number of communication service packets processed (10,900) by 60 seconds yields approximately 181.67 packets per second. This processing rate range is only used to verify the sample service volume and is not included in subsequent sorting and frequency range determination.
[0127] Subtracting the starting boundary reading from the relative cumulative active energy reading at the end boundary of each sampling interval yields active energy increments of 0.4Wh, 0.43Wh, 0.47Wh, 0.53Wh, 0.55Wh, 0.54Wh, and 0.58Wh, respectively. Summing these seven active energy increments yields 3.5Wh, consistent with the increase in the last relative cumulative active energy reading of 3.5Wh relative to the first relative cumulative active energy reading of 0Wh.
[0128] Each sampling interval lasts 60 seconds, which is 1 / 60th of 1 hour. Therefore, multiplying each increase in active power by 60 sequentially yields the corresponding average active power of 24W, 25.8W, 28.2W, 31.8W, 33W, 32.4W, and 34.8W. The maximum average active power of 34.8W is less than the rated power of 65W recorded on the equipment's power supply nameplate; therefore, the example data does not exceed the equipment's power supply capacity. The above average active power is only used for physical consistency verification and is not included in the gear adjustment calculation.
[0129] At the start of the computation cycle, the processor frequency control interface returns discrete policy frequency values of 1.2GHz, 1.6GHz, 2GHz, and 2.4GHz, and confirms that the current policy frequency is 2GHz. These values are derived from the frequency performance table of the target processor driver and do not imply that other processors must have the same frequency range. The interface return values are already unique and arranged in ascending order, thus directly forming a list of available processor frequency ranges.
[0130] In S2, the sequence of communication service packet processing quantities is processed according to the order of subtracting the data from the previous sampling interval from the data in the current sampling interval, resulting in 100, 200, 0, 300, ... The difference in the number of adjacent communication service packets processed (100 and 400). The above data are obtained by subtracting 10000 from 10100, 10100 from 10300, 10300 from 10300, 10600 from 10300, 10500 from 10600, and 10900 from 10500, respectively.
[0131] Next, the absolute value of the difference between adjacent signed differences in the number of processed communication service packets is taken to obtain the variation range of adjacent differences in the number of processed communication service packets for 100, 200, 300, 400, and 500 packets, respectively. The above data are derived from the differences between 200 and 100, 0 and 200, 300 and 0, respectively. 100 and 300, and 400 and The absolute value of the difference of 100.
[0132] The number of communication service packets processed sequentially generates 6 adjacent signed differences and 5 adjacent difference variation ranges. The 5 adjacent difference variation ranges are arranged in ascending order of value, from the 1st to the 5th position. Subtracting 1 from the total number of data (5) yields the divisor 4 used for normalization, resulting in normalization sort positions of 0, 0.25, 0.5, 0.75, and 1, respectively.
[0133] The five adjacent difference magnitudes mentioned above were calculated using 200, 0, 300, and 100 adjacent signed differences, respectively. 100 and 400. Following the rules of retaining positive values, assigning a negative sign to negative values, and setting 0 to 0, the signed normalized sorting sequence of the number of communication service packets processed is 0, 0, 0.5, ... 0.75 and 1.
[0134] Furthermore, following the order of subtracting the previous active energy increment from the current active energy increment, we obtain 0.03Wh, 0.04Wh, 0.06Wh, 0.02Wh, and so on. The sign difference between adjacent active energy increments of 0.01Wh and 0.04Wh. The above data are obtained by subtracting 0.4 from 0.43, 0.43 from 0.47, 0.47 from 0.53, 0.53 from 0.55, 0.55 from 0.54, and 0.54 from 0.58, respectively.
[0135] Next, take the absolute value of the difference between adjacent active energy increments, and obtain the variation range of adjacent active energy increment differences of 0.01Wh, 0.02Wh, 0.04Wh, 0.03Wh, and 0.05Wh in the original time sequence. After arranging them in ascending order of value, the sequence is 0.01Wh, 0.02Wh, 0.03Wh, 0.04Wh, and 0.05Wh.
[0136] The variation range of adjacent differences in active energy increments also includes 5 data points. Arranging them in ascending order, the normalized sort positions are 0, 0.25, 0.5, 0.75, and 1. After restoring the original time sequence, the normalized sort positions are 0, 0.25, 0.75, 0.5, and 1. The corresponding current adjacent signed differences are positive, positive, positive, negative, and positive, respectively. Therefore, the normalized sort position sequence of the active energy increments is 0, 0.25, 0.75, ... 0.5 and 1.
[0137] In S3, the first pair of signed normalized sort positions are 0 and 0, containing 0, and the gear adjustment direction comparison value is 0; the second pair is 0 and 0.25, containing 0, and the gear adjustment direction comparison value is 0.
[0138] The third pair of signed normalized sorted values are 0.5 and 0.75, both positive. Subtracting 0.5 from 0.75 yields 0.25. The fourth pair is... 0.75 and The first pair is 0.5, both of which are negative. Subtracting 0.5 from 0.75 gives 0.25. The fifth pair is 1 and 1, both of which are positive. Subtracting them gives 0. Therefore, the sequence of gear adjustment direction comparison values is 0, 0, 0.25, 0.25, and 0.
[0139] The absolute values of the non-zero data in the gear adjustment direction comparison value sequence are 0.25 and 0.25, and the number of non-zero data is 2, which is an even number. The data in the middle two sorting positions are both 0.25. Adding them together gives 0.5, and dividing by 2 gives the median boundary value of 0.25 for this period.
[0140] In S4, firstly, the comparison values for the 3rd and 4th gear adjustment directions are both positive, and their absolute values are equal to the median boundary value of 0.25 for this cycle. Therefore, the downshift limit indication sequence is 0, 0, 1, 1, and 0 in sequence. The gear adjustment direction comparison value sequence does not contain negative values, so the upshift limit indication sequence is 0, 0, 0, 0, and 0 in sequence.
[0141] Secondly, the number of values 1 in the downshift boundary indicator sequence is 2, and the number of values 1 in the upshift boundary indicator sequence is 0. Subtracting 0 from 2 gives the boundary quantity difference of 2.
[0142] Secondly, the third and fourth data points in the downshift threshold indication sequence form a continuous segment consisting of two consecutive values of 1, and the longest continuous segment length in the downshift threshold indication sequence is 2. The upshift threshold indication sequence has no continuous segments, and its longest continuous segment length is 0. Subtracting 0 from 2 gives the difference of 2 in the longest continuous segment length.
[0143] Finally, since both the difference in the number of reached limits and the difference in the length of the longest continuous segment are positive, the frequency adjustment module generates a down-level instruction. The current processor frequency level is 2GHz, and the next lower frequency level in the list of available processor frequency levels is 1.6GHz. Therefore, the target processor frequency level is 1.6GHz.
[0144] The frequency level adjustment module saves the current processor frequency level of 2GHz before writing, writes 1.6GHz to the shared frequency control domain through the processor frequency control interface, and reads back the current strategy frequency value after the interface returns a write completion status. In this application scenario, the readback result is 1.6GHz, which comes from the same processor frequency control interface and is consistent with the target processor frequency level. Therefore, the frequency level adjustment for this calculation cycle is complete.
[0145] The preferred embodiments of this disclosure have been described in detail above with reference to the accompanying drawings. However, this disclosure is not limited to the specific details of the above embodiments. Within the scope of the technical concept of this disclosure, various simple modifications can be made to the technical solutions of this disclosure, and these simple modifications all fall within the protection scope of this disclosure.
[0146] It should also be noted that the various specific technical features described in the above embodiments can be combined in any suitable manner without contradiction. To avoid unnecessary repetition, this disclosure will not describe the various possible combinations separately.
[0147] Furthermore, various different embodiments of this disclosure can be combined in any way, as long as they do not violate the spirit of this disclosure, they should also be regarded as the content disclosed in this disclosure.
[0148] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention, and they should all be covered within the scope of the claims and specification of the present invention.
Claims
1. A method for regulating the energy consumption of edge nodes in communication infrastructure, characterized in that the method... include: Obtain the number of communication service packets processed and the increment of active power in at least four consecutive complete sampling intervals, and form a sequence of the number of communication service packets processed and a sequence of the increment of active power in time. Calculate the adjacent signed difference and the change range of adjacent difference between the two sequences, normalize the sorting position of the change range of adjacent difference to the range of 0 to 1, and assign a sign according to the corresponding current adjacent signed difference to form two signed normalized sorting position sequences corresponding to the two sequences in turn. Pair them by time, when both are positive, subtract the absolute value of the former from the absolute value of the latter; when both are negative, subtract the absolute value of the latter from the absolute value of the former; when they are opposite signs, take the smaller absolute value and assign the sign of the latter; when they contain 0, take 0, thus forming a comparison sequence for gear adjustment direction. When the sequence is all zero, a hold instruction is generated; otherwise, the median of the absolute values of the non-zero data is used as the median boundary value of the current cycle to generate a downshift boundary indication sequence and an upshift boundary indication sequence, and the difference in the number of boundaries reached and the difference in the length of the longest continuous segment are calculated. When both are positive, a downshift instruction is generated; when both are negative, an upshift instruction is generated; otherwise, a hold instruction is generated. Identify and apply the target processor frequency from the list of available processor frequency ranges.
2. The edge node energy consumption regulation method for communication infrastructure according to claim 1, characterized in that, The calculation of the sign difference between adjacent sequences and the magnitude of the change in the adjacent difference includes: For each data in the sequence of communication service packet processing quantities except the first data, subtract the previous data from the current data, and form a sequence of adjacent signed differences in communication service packet processing quantities according to the time sequence number; For each data point in the adjacent signed difference sequence except for the first data point, take the absolute value of the difference between the current data point and the previous data point, and use the time sequence number of the current data point to form a sequence of adjacent difference magnitudes of communication service packet processing quantity.
3. The edge node energy consumption regulation method for communication infrastructure according to claim 1, characterized in that, The calculation of the sign difference between adjacent sequences and the magnitude of the change in the adjacent difference includes: For each data in the active energy increment sequence except the first data, the previous data is subtracted from the current data, and a signed difference sequence of adjacent active energy increments is formed according to the time sequence number. For each data point in the adjacent signed difference sequence except for the first data point, take the absolute value of the difference between the current data point and the previous data point, and use the time sequence number of the current data point to form a sequence of adjacent difference magnitudes of active power increment.
4. The edge node energy consumption regulation method for communication infrastructure according to claim 1, characterized in that, The step of normalizing the sorting position of the adjacent difference variation magnitude to the range of 0 to 1, and assigning a sign according to the corresponding current adjacent signed difference, includes: Within each sequence of adjacent difference changes, the values are arranged in ascending order and assigned a sorting position starting from 1. Data with the same value are taken as the arithmetic mean of the first and last sorting positions. When the sequence data are not all the same, the normalized sort position is obtained by dividing the data obtained by subtracting 1 from the sort position by the data obtained by subtracting 1 from the number of sequence data; when all the sequence data are the same, the normalized sort position is set to 0. When determining the current adjacent difference change range, if the current adjacent signed difference is positive, negative, or 0, the normalized sorting position is retained, a negative sign is assigned, or it is set to 0, respectively.
5. The edge node energy consumption regulation method for communication infrastructure according to claim 1, characterized in that, The formation of the gear adjustment direction comparison sequence includes: The sign-normalized sorting position of the number of communication service packets processed and the sign-normalized sorting position of the active energy increment are paired according to the time sequence number. The former is the sign-normalized sorting position of the number of communication service packets processed and the latter is the sign-normalized sorting position of the active energy increment. When both are positive, subtract the absolute value of the former from the absolute value of the latter; when both are negative, subtract the absolute value of the latter from the absolute value of the former; when they have opposite signs, take the smaller of the two absolute values and assign the sign to the latter; when either position is 0, take 0. The obtained gear adjustment direction comparison values are arranged in ascending order according to the corresponding time sequence.
6. The edge node energy consumption regulation method for communication infrastructure according to claim 1, characterized in that, The use of the median of the absolute values of non-zero data as the median boundary value for this period includes: Arrange the absolute values of the non-zero gear adjustment direction comparison values in the gear adjustment direction comparison sequence in ascending order. When the number of data is odd, take the data in the middle sorting position. When the number of data is even, take the arithmetic mean of the data in the middle two sorting positions. When the gear adjustment direction comparison sequence is all zero, the median boundary value, the difference in the number of reached limits, and the difference in the length of the longest continuous segment of the current cycle are all set to 0, and a hold command is generated.
7. The edge node energy consumption regulation method for communication infrastructure according to claim 1, characterized in that, The generation of the downshift-side limit indication sequence and the upshift-side limit indication sequence includes: When the gear adjustment direction comparison value is positive and its absolute value is not less than the median boundary value of this cycle, write 1 to the corresponding time sequence number of the downshift boundary indication sequence; otherwise, write 0. When the gear adjustment direction comparison value is negative and its absolute value is not less than the median boundary value of this cycle, write 1 to the corresponding time sequence number of the upshift boundary indication sequence; otherwise, write 0. The two sequences and the gear adjustment direction comparison sequence have the same time number and length.
8. The edge node energy consumption regulation method for communication infrastructure according to claim 1, characterized in that, The calculation of the difference in the number of reached boundaries and the difference in the length of the longest continuous segment includes: The difference in the number of points reached is obtained by subtracting the number of points of 1 in the downshift boundary indicator sequence from the number of points of 1 in the upshift boundary indicator sequence. A continuous segment consists of at least two consecutive time numbers and both values being 1; an isolated value of 1 does not constitute a continuous segment. Determine the length of the longest continuous segment for each of the two sequences, setting it to 0 if no continuous segment exists. The difference in the longest continuous segment length is obtained by subtracting the longest continuous segment length of the upshift boundary indication sequence from the longest continuous segment length of the downshift boundary indication sequence.
9. The edge node energy consumption regulation method for communication infrastructure according to claim 1, characterized in that, The process of determining and applying the target processor frequency level from the list of available processor frequency levels includes: The processor frequency control interface is used to read the list of available processor frequency levels and the current processor frequency level, unify the units, remove duplicates, and sort them in ascending order. If a read fails, the list is empty, or the current processor frequency setting is not in the list, no writing is performed and the current calculation cycle is terminated. Downshifting instructions select the adjacent lower frequency level when the current processor frequency level is higher than the lowest frequency level; upshifting instructions select the adjacent higher frequency level when the current processor frequency level is lower than the highest frequency level; hold instructions select the current processor frequency level if the aforementioned conditions are not met. Write the target processor frequency level and read it back. If the write fails or the read back is inconsistent, write back the current processor frequency level before the write and read it back again.
10. An edge node power consumption regulation system for communication infrastructure, characterized in that, The system is used to implement the edge node energy consumption regulation method for communication infrastructure as described in any one of claims 1 to 11, including a communication service packet processing counting interface, an active energy metering interface, a processor frequency control interface, a memory, and a processor; the processor executes instructions in the memory to achieve: The data sequence processing module is used to generate two signed normalized sorted position sequences; The frequency gear adjustment module is used to generate a gear adjustment direction comparison sequence, the median boundary value of the current cycle, the downshift side limit indication sequence, the upshift side limit indication sequence, the limit quantity difference, and the longest continuous segment length difference. It generates a frequency gear adjustment instruction based on the limit quantity difference and the longest continuous segment length difference, determines the target processor frequency gear from the processor's available frequency gear list, and applies it through the processor frequency control interface.
