Family electricity charge optimization method and device based on improved ant lion algorithm

By improving the Ant Lion algorithm, combining the type of home equipment and user dissatisfaction, a home electricity bill model is built, which solves the problems of user experience neglect and local optimality in the traditional model, and realizes the coordinated optimization of home electricity bill and user comfort, and finds the best electricity scheduling solution.

CN120560044AActive Publication Date: 2025-08-29HUAQIAO UNIVERSITY

Patent Information

Application Number
CN202511014751.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-23
Publication Date
2025-08-29
Estimated Expiration
2045-07-23

AI Technical Summary

Technical Problem

The existing household electricity bill optimization model ignores user experience. The traditional Ant Lion algorithm is prone to falling into local optimization, and it is difficult to achieve coordinated optimization of electricity bill expenditure and user comfort under a variety of complex factors.

Method used

The household electricity bill model was constructed, the type of home equipment and user dissatisfaction was introduced, and the improved Ant Lion algorithm (LTK-ALO) was used for the solution, the population was initialized through Logistic chaotic mapping, the t-distribution perturbation strategy and Cauchy mutation mechanism were designed, and the global search and local development were dynamically balanced, and the household electricity scheduling was optimized.

Benefits of technology

The coordinated optimization of electricity bill expenditure and user comfort is achieved, the problems of rough equipment classification and neglected user experience in traditional models are solved, and the optimal household electricity scheduling solution is found.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120560044A_ABST
    Figure CN120560044A_ABST
Patent Text Reader

Abstract

The invention discloses a home electricity charge optimization method and device based on an improved ant lion algorithm, and relates to the technical field of home electricity utilization optimization, and the method comprises the steps: S1, constructing a home electricity charge model used for calculating the electricity charge of home electricity utilization equipment and a multi-objective optimization function combining a home electricity charge objective function and user dissatisfaction; s2, taking a multi-objective optimization function as a fitness function of an improved ant lion algorithm, and using the improved ant lion algorithm to solve the household electricity charge model; the improved ant lion algorithm uses chaotic mapping to initialize ants and ant lion populations; cauchy variation disturbance is introduced when local optimum is trapped by using Cauchy distribution. According to the invention, by constructing the household electricity charge model, double-target integration of electricity charge expenditure and user experience is formed, and collaborative optimization of electricity charge expenditure and user comfort is realized; the improved ant lion algorithm is used for solving the household electricity charge model, and the defect that a traditional ant lion algorithm is likely to sink into local optimum is overcome.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of household electricity consumption optimization, and in particular to a household electricity rate optimization method and device based on an improved ant lion algorithm. Background Art

[0002] In recent years, with the development of smart home technology, smart meters have become increasingly prevalent in households. Smart meters allow residents to monitor the electricity usage of various devices in their homes, making it possible to optimize the time periods during which smart home devices are used. However, faced with diverse electricity pricing policies and a complex variety of household appliances, most residents struggle to rationally schedule the use of various devices based on price fluctuations, making it difficult to fully utilize off-peak electricity prices to reduce their electricity bills. Furthermore, there is a lack of scientific scheduling solutions for managing household electrical appliances.

[0003] While there have been numerous research results on electricity cost optimization, for example, Yu Haoming et al. simplified the optimal charging decision for new energy vehicles based on real-time electricity price responses and proposed an effective method for online estimation of real-time electricity prices. However, this method has significant limitations and is difficult to implement in every household. Shah J et al. studied household electric water heaters and successfully reduced electricity costs while meeting user water needs by responding appropriately to electricity price fluctuations. However, this study did not consider the user experience. Javadi et al. proposed a household energy management optimization scheme to incentivize active prosumers to trade their surplus energy within a rules-based pool market within a local energy community. The results showed that through collaboration, end users in the local energy community market could reduce their total electricity bills. However, the paper did not provide a detailed classification analysis of household devices. Zhe C et al. proposed a demand response scheduling method for residential buildings, using a genetic algorithm as the target optimization algorithm to search for the minimum electricity cost. The proposed scheduling method effectively shortened peak load to off-peak load times, reducing electricity costs, but it neglected to consider device classification and user satisfaction after scheduling. Wang C et al. considered different load demand response modes and developed demand response models for various loads. To fully utilize residential electricity consumption data, they established a multi-objective optimization scheduling model for user-side flexible loads and used a greedy algorithm for calculation and analysis. However, this model focused solely on reducing electricity prices, disregarding user experience. Huang Z et al. studied flexible loads in the system, established a flexible load model and its operating conditions. Based on this, they combined real-time grid electricity prices to construct a home energy management system model to minimize electricity purchase costs and maximize renewable energy utilization. A genetic algorithm was used to solve the problem, but the model failed to classify flexible loads and ignored the different operating characteristics of flexible devices.

[0004] However, these traditional electricity price models face challenges such as neglecting user experience, the optimization algorithm's tendency to fall into local optimality, and insufficient electricity price prediction accuracy. The Ant Lion Algorithm (ALO) has strong dynamic adaptability, high search efficiency, and strong global search capabilities, making it suitable for scenarios with large data fluctuations and multi-objective optimization. Therefore, it has been used to solve household electricity price models. However, the traditional Ant Lion Algorithm is prone to falling into local optimality. Therefore, to address these issues, we propose a household electricity price optimization method based on an improved Ant Lion Algorithm. Summary of the Invention

[0005] To address the above problems, the present invention proposes a household electricity bill optimization method and device based on an improved ant lion algorithm. By introducing household device types and user dissatisfaction levels, a household electricity bill model is constructed, forming a dual-objective integration of electricity bill expenditure and user experience, and realizing the coordinated optimization of electricity bill expenditure and user comfort. As the household electricity bill optimization problem involves multiple complex factors, such as the operating characteristics of different types of equipment, large fluctuations in electricity prices, and diverse electricity demands of residents, an improved ant lion algorithm (LTK-ALO) is proposed to solve the household electricity bill model. The population is initialized by logistic chaotic mapping to enhance diversity, a t-distribution perturbation strategy is designed to dynamically balance global search and local development, and a Cauchy mutation mechanism is constructed to force the user to jump out of the extreme value, thereby solving the defect of the traditional ant lion algorithm that is prone to falling into local optimality. Multiple improvements are made to the traditional ant lion algorithm, and the improved algorithm is used to optimize and solve the household electricity bill model to explore the optimal household electricity scheduling solution.

[0006] On the one hand, the household electricity bill optimization method based on the improved ant lion algorithm has the following specific steps:

[0007] S1, household electricity bill model construction step, constructing a household electricity bill model for calculating the electricity bill of household electrical equipment and a multi-objective optimization function combining the household electricity bill objective function and user dissatisfaction;

[0008] S2, an improved ant lion algorithm solution step, using a multi-objective optimization function as the fitness function of the improved ant lion algorithm, using the improved ant lion algorithm to solve the household electricity bill model, and obtaining the optimal household electricity bill and the optimal operation plan for the power consumption time distribution of each device; the improved ant lion algorithm uses a chaotic map to initialize the ant and ant lion populations, uses t-distribution perturbation to improve the ant's wandering strategy, and introduces Cauchy mutation perturbation when the algorithm falls into a local optimum.

[0009] Preferably, the household electrical appliances include rigid appliances and flexible appliances; the rigid appliances are electrical appliances that must run continuously or in a fixed mode in daily life and are not directly adjusted or interrupted by user behavior; the flexible appliances are electrical appliances whose operating time and power consumption can be adjusted to a certain extent according to user preferences, electricity price policies or energy management system instructions; the flexible appliances include flexible interruptible appliances and flexible non-interruptible appliances; the interruptible appliances are electrical appliances that can receive an interruption instruction at any time during operation and stop working immediately; the non-interruptible appliances are electrical appliances that complete the entire working cycle according to a preset program and cannot be stopped or changed during the period.

[0010] Preferably, the objective function of the household electricity bill is expressed as:

[0011] ;

[0012] ;

[0013] in, Indicates the The total load demand of the user's rigid equipment in each time period. A day is divided into 48 time periods. Indicates the Time period Power consumption of each flexible device; Indicates the The electricity price for each time period; Indicates the The total electricity cost of the user in each time period; Sum represents the total electricity cost in 48 time periods.

[0014] Preferably, the modeling representation of the interruptible device is:

[0015] ;

[0016] ;

[0017] ;

[0018] ;

[0019] ;

[0020] in, Indicates the device number of the flexible device; Indicates the number of interruptible devices; Indicates the The flexible device The working status of each time period, 0 means not running, 1 means running; Indicates the The working status of a flexible device in 48 time periods, When it is an interruptible device; and Respectively represent the start time and end time of the device; Indicates the The total working time of each flexible device; Indicates the Power of a flexible device; Indicates the Flexible devices in Power consumption during the time period.

[0021] Preferably, the modeling representation of the non-interruptible device is:

[0022] ;

[0023] ;

[0024] ;

[0025] ;

[0026] ;

[0027] in, Indicates the device number of the flexible device; Indicates the number of interruptible devices; Indicates the number of flexible devices; Indicates the The flexible device The working status of each time period, 0 means not running, 1 means running; Indicates the The working status of a flexible device in 48 time periods, When it is a non-interruptible device; and Respectively represent The start and end time of each flexible device; Indicates the The total working time of each flexible device; Indicates the Power of a flexible device; Indicates the Flexible devices in Power consumption during the time period.

[0028] Preferably, the user dissatisfaction is calculated based on the runtime offset, which is expressed as:

[0029] ;

[0030] ;

[0031] in, It indicates the total dissatisfaction of users with the operational deviation of all flexible devices; Indicates the user's The degree of dissatisfaction with flexible equipment; Indicates the minimum electricity price in 48 time periods; Indicates the number of flexible devices; Indicates the A flexible device offsets the time set by the user. When is the running time offset of the non-interruptible device, Time is the runtime offset of the interruptible device; Indicates the The dissatisfaction coefficient of flexible equipment.

[0032] Preferably, the runtime offset of the non-interruptible device is expressed as;

[0033] , ;

[0034] in, Indicates the The lower limit of the working time window set by the user of a flexible device, Indicates the The upper limit of the working time window set by the user of a flexible device, Indicates the The total operating time of each flexible device; represents the maximum function, Indicates the offset of the start time later than the lower limit of the working time. Indicates the offset by which the end time is later than the upper limit of the time window, ensuring that the offset is only calculated when the time window is exceeded.

[0035] Preferably, the runtime offset of the interruptible device is expressed as;

[0036] , ;

[0037] in, Indicates the The lower limit of the working time window set by the user of a flexible device; Indicates the The upper limit of the working time window set by the user of a flexible device; The operating time period of the equipment; Indicates the Flexible devices in The status of the run in the timeslot.

[0038] Preferably, the multi-objective optimization function is the sum of the household electricity bill objective function and user dissatisfaction; the multi-objective optimization function is used as the fitness function of the improved ant lion algorithm, and the household electricity bill model is solved using the improved ant lion algorithm, and the specific steps are as follows:

[0039] S201, the sum of the household electricity bill objective function and user dissatisfaction is used as the improved ant lion algorithm fitness function;

[0040] S202, using Logistic mapping to initialize the population of the ant lion algorithm;

[0041] S203, using a fitness function to calculate the fitness of ant lions and ants, and retaining elite ant lions based on the fitness;

[0042] S204, using a roulette wheel strategy to select the best ant lion;

[0043] In S205, the superior ant lion and the elite ant lion build a trap together;

[0044] S206, using t-distribution perturbation to improve the ants' movement strategy, by adding a t-distributed disturbance term to the original ant positions, to guide the ant population to fully move and explore within the ant lion trap, wherein the number of iterations of the disturbance term is used as the degree of freedom parameter of the t-distribution; the ant lion begins to capture the ants;

[0045] S207, updating the position of the ant population;

[0046] S208, calculating the new fitness values ​​of the ants and ant lions, selecting a new generation of elite ant lions based on the new fitness values, and updating the position of the ant lion population;

[0047] S209: If the same fitness value is used as the fitness value of the optimal ant lion twice in a row and is recorded as the historical optimal value, the algorithm is determined to have fallen into a local optimum. Once it is confirmed that it has fallen into a local optimum, a Cauchy mutation operation is performed on the ant lion population and the ant population. After the operation is completed, the fitness values ​​of the ants and ant lions are recalculated.

[0048] S210, repeat steps S204-S209 until the number of iterations reaches the preset number of iterations, and output the optimal electricity cost corresponding to the elite ant lion and the optimal operation plan for the power consumption time distribution of each device.

[0049] On the other hand, the household electricity bill optimization device based on the improved Ant Lion algorithm includes the following:

[0050] A household electricity bill model construction module is used to construct a household electricity bill model for calculating the electricity bill of household electrical equipment and a multi-objective optimization function that combines the household electricity bill objective function and user dissatisfaction;

[0051] An improved ant lion algorithm solution step module is used to solve a household electricity bill model using a multi-objective optimization function as the improved ant lion algorithm's fitness function to obtain the optimal household electricity bill and the optimal operating plan for the distribution of electricity usage time of each device. The improved ant lion algorithm uses a chaotic map to initialize ants and ant lion populations, utilizes t-distribution perturbations to improve the ants' wandering strategies, and introduces Cauchy mutation perturbations when the algorithm falls into a local optimum.

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

[0053] (1) This invention constructs a household electricity bill model by introducing household device types and user dissatisfaction levels, forming a dual-objective integration of electricity bill expenditure and user experience, achieving coordinated optimization of electricity bill expenditure and user comfort, and solving the problems of rough device classification and neglect of user experience in traditional electricity bill models.

[0054] (2) In view of the fact that the optimization problem of household electricity bills involves many complex factors, such as the operating characteristics of different types of equipment, large fluctuations in electricity prices, and diverse electricity demands of residents, this paper proposes an improved ant lion algorithm (LTK-ALO) to solve the household electricity bill model. The population is initialized by Logistic chaotic mapping to enhance diversity, a t-distribution perturbation strategy is designed to dynamically balance global search and local development, and a Cauchy mutation mechanism is constructed to force the jump out of extreme values. Multiple improvements are made to the traditional ant lion algorithm. The improved algorithm is used to optimize and solve the household electricity bill model in this paper, and to explore the optimal household electricity scheduling solution. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] The present invention will be described in further detail below with reference to the accompanying drawings;

[0056] Figure 1 Flowchart of a household electricity bill optimization method based on an improved ant lion algorithm according to an embodiment of the present invention;

[0057] Figure 2 This is a technical solution flow chart of a household electricity bill optimization method based on an improved ant lion algorithm according to an embodiment of the present invention;

[0058] Figure 3 This is an architecture diagram of a household electricity bill optimization model for a household electricity bill optimization method based on an improved ant lion algorithm according to an embodiment of the present invention;

[0059] Figure 4This is an architecture diagram of an improved ant lion algorithm of a household electricity rate optimization method based on the improved ant lion algorithm according to an embodiment of the present invention;

[0060] Figure 5 This is a structural block diagram of a household electricity bill optimization device based on an improved ant lion algorithm according to an embodiment of the present invention. DETAILED DESCRIPTION

[0061] The present invention is further described below through specific embodiments.

[0062] like Figure 1 and Figure 2 As shown in the figure, the household electricity bill optimization method based on the improved ant lion algorithm has the following specific steps:

[0063] S1, household electricity bill model construction step, constructing a household electricity bill model for calculating the electricity bill of household electrical equipment and a multi-objective optimization function combining the household electricity bill objective function and user dissatisfaction.

[0064] The architecture diagram of the household electricity bill optimization model is as follows: Figure 3 As shown. First, household electrical equipment is categorized. Household electrical equipment is divided into rigid equipment and flexible equipment. Rigid equipment refers to those that must operate continuously or in a fixed pattern in daily life, and whose operating time and power consumption are difficult to adjust or interrupt directly through user behavior. These types of equipment often relate to a household's basic living needs and safety, such as refrigerators, lighting (although they can be turned on and off, basic nighttime lighting needs are considered rigid), and security systems. Rigid equipment loads play a critical role. A power outage, such as the loss of incandescent lighting, spoilage of food in refrigerators, and the failure of safety systems such as alarms, can cause significant inconvenience to users. Therefore, these rigid loads are typically not included in optimized scheduling, leaving no room for optimization in energy management. The operating hours and power consumption are considered fixed and unchanging, and no further scheduling planning is performed on them.

[0065] Flexible devices are those whose operating hours and power consumption can be adjusted to a certain extent based on user preferences, electricity pricing policies, or instructions from the energy management system. This type of device offers greater flexibility and optimization potential in energy management.

[0066] Flexible devices can be further categorized into interruptible and non-interruptible devices. Interruptible devices, such as electric vehicle chargers and electric water heaters, exhibit exceptional flexibility and responsiveness. Not only can they flexibly select start-up times throughout the day based on user schedules to optimize energy distribution, but more importantly, these devices can receive interruption commands at any time during operation and immediately cease operations, seamlessly transitioning to the next time slot when more favorable electricity prices become available or the user needs to reschedule. This immediate control capability makes interruptible devices crucial for managing grid load peaks and balancing electricity supply and demand.

[0067] In contrast, non-interruptible devices, such as washing machines and dishwashers, while also essential components of smart homes, are more rigidly scheduled. Once activated, these devices follow a pre-programmed schedule to complete their entire operating cycle, with no ability to stop or change tasks mid-flight. While they lack the flexibility of interruptible devices, proper planning and scheduling, such as concentrating their operation during periods of low electricity prices, can optimize household energy usage and reduce electricity costs to a certain extent.

[0068] The modeling definition of interruptible devices in flexible devices is as follows:

[0069] ;

[0070] ;

[0071] ;

[0072] ;

[0073] ;

[0074] In the above formula: Indicates the device number; Indicates the number of interruptible devices; Representation device In the The working status of each time period, 0 means not running, 1 means running; Representation device Working status in 48 time periods; and Respectively represent the start time and end time of the device; Representation device Total working hours; Representation device Power; Representation device exist Power consumption during the time period.

[0075] The definition of non-interruptible device modeling in flexible devices is as follows:

[0076] ;

[0077] ;

[0078] ;

[0079] ;

[0080] ;

[0081] In the above formula: Indicates the device number; Indicates the number of uninterruptible devices; Representation device In the The working status of each time period, 0 means not running, 1 means running; Representation device Working status in 48 time periods; and Respectively represent the start time and end time of the device; Representation device Total working hours; Representation device Power; Representation device exist Power consumption during the time period.

[0082] Next, we construct a user's electricity bill function. The household electricity bill objective function is defined as the sum of the product of the power consumption of n electrical devices during each of the user's 48 time periods per day and the corresponding electricity prices. Rigid devices have fixed power during their time periods, while flexible devices are schedulable. Therefore, the objective function expression for household electricity bills is defined as follows:

[0083] ;

[0084] ;

[0085] In the above formula: Indicates the The total load demand of the user's rigid equipment in each time period; Indicates the flexible device Period Power consumption of each device; For the The electricity price at the time; for The total electricity cost of the user at that moment; Sum is the total electricity cost in 48 time periods.

[0086] Next, a user dissatisfaction model was constructed. User dissatisfaction is a quantitative indicator that measures the degree to which users accept deviations from the ideal equipment operating time. It refers to the degree to which users are willing to allow equipment operating time to be advanced or delayed relative to the planned schedule. In real-world household electricity usage scenarios, users have their own expectations and requirements for the operating times of different devices. However, due to factors such as electricity price fluctuations, the actual operating time of devices often does not fully align with the ideal time period. User dissatisfaction is introduced precisely to measure the acceptability of such deviations, thereby providing a key basis for subsequent equipment scheduling and electricity cost optimization.

[0087] For flexible, non-interruptible equipment, its operating time is continuous, and the equipment can only run in two situations: early or late. For example, a washing machine has two operating time periods. The user originally expected it to run between 38 and 40, but due to the influence of electricity prices, the washing machine may run between 37 and 39 or 39 and 41 after scheduling, with a running time offset of 1. The formula for calculating the running time offset of flexible, non-interruptible equipment is defined as follows:

[0088] ;

[0089] In the above formula: Offset the user-set time for this flexible non-interruptible device. Representation device The lower limit of the user-set working time window, Representation device The upper limit of the working time window set by the user, is the total operating time of the device, represents the maximum function, Indicates the offset of the start time later than the lower limit of the working time. Indicates the offset by which the end time is later than the upper limit of the working hours, ensuring that the offset is only calculated when the time window is exceeded.

[0090] Since the operating time of a flexible interruptible device may be discrete, the device may operate both ahead of schedule and behind schedule. For example, an electric vehicle charging station may operate in four time periods. Users originally expected it to operate between 36 and 40 hours. However, due to fluctuations in electricity prices, the device may operate in 35, 38, 39, and 41 hours, with an offset of 2. The formula for calculating the operating time offset of a flexible interruptible device is defined as follows:

[0091] ;

[0092] In the above formula: Representation device The lower limit of the user-set working time window, Representation device The upper limit of the working time window set by the user, The operating time period of the equipment. Representation device exist The status of the run in the timeslot.

[0093] The user's dissatisfaction level is the sum of the dissatisfaction levels of all flexible devices within a day. There are n electrical devices in total, and the user has a different dissatisfaction coefficient for each device, which is defined as , The larger the value, the less users want the flexible device to run beyond their expected time. For example, if the cooling period is adjusted from 20:00-22:00 to 22:00-24:00, although it may avoid peak electricity prices, users may feel obvious discomfort due to the increase in room temperature during sleep. Therefore, the value of the air conditioner is It should be set to a large value to prevent the air conditioner from being scheduled outside the expected operating time. The definition of the user's dissatisfaction with the flexible device a and the user's total dissatisfaction are as follows:

[0094] ;

[0095] ;

[0096] In the above formula: Indicates that the user has access to the device The degree of dissatisfaction, is the minimum electricity price for 48 periods, is the total dissatisfaction of users running the offset across all devices, Indicates the The dissatisfaction coefficient of flexible equipment.

[0097] The user's household electricity price response model is defined as follows:

[0098] ;

[0099] In the above formula: Represents the user’s total electricity expenditure, is the total dissatisfaction of users running the offset across all devices, It is the electricity price response value that combines the total household electricity expenditure and the total user dissatisfaction, and also serves as the fitness function of the household electricity price model in the optimization algorithm.

[0100] S2, the improved ant lion algorithm solution step, takes the multi-objective optimization function as the fitness function of the improved ant lion algorithm, and uses the improved ant lion algorithm to solve the household electricity bill model.

[0101] The antlion algorithm involves many key steps, including the random walk of ants, the clever placement of traps, the use of traps to ensnare ants, the successful capture of prey, and the reconstruction of traps. The algorithm simulates the interaction between antlions and ants within a trap. In this scenario, ants randomly wander the search area in search of food, while antlions precisely capture ants using carefully constructed traps. Specifically, the ants' random walk follows the rules defined by the following formula:

[0102] ;

[0103] in, To calculate the cumulative sum, represents iteration, is a random function, specifically defined as follows:

[0104] ;

[0105] in, represents iteration, The ants' positions are uniformly distributed in the interval [0,1] and random numbers are generated. During the optimization process, the positions of the ants are saved and used using the following matrix.

[0106] ;

[0107] in, is a matrix used to store the position of each ant, Indicates the Weizhongdi The positions of the ants, n represents the number of ants, and d represents the dimension of the variable. Ants and ant lions represent the solution to the optimization problem. During the optimization process, the matrix is ​​used to store the position information of all ants. The position of each ant is evaluated using the fitness function, and a corresponding matrix is ​​constructed to store the fitness value of each ant. The fitness matrix is ​​expressed as:

[0108] ;

[0109] in, The matrix is ​​used to store the fitness value of each ant. is the fitness function, Indicates the Weizhongdi is the position of the ants, n is the number of ants, and d is the dimension of the variable.

[0110] In the ant lion algorithm, assuming that the ant lion is hiding somewhere in the search range, the following matrix is ​​used to save the position and fitness value of the ant lion.

[0111] ;

[0112] in, The matrix is ​​used to store the position of each ant lion. Indicates the Weizhongdi The position of the ant lion, n represents the number of ant lions, and d represents the dimension of the variable.

[0113] ;

[0114] in, The matrix is ​​used to store the fitness value of each ant lion. is the fitness function, Indicates the Weizhongdi The position of the ant lion, n represents the number of ant lions, and d represents the dimension of the variable.

[0115] The random walk behavior of individual ants completely follows The constructed rule model. In each iteration of the optimization algorithm, the ants perform random walk operations according to the constructed rules, and then update their own positions. However, given that each search space has a clear boundary, which is defined by the range of variable values, in this case, the constructed rule model cannot be directly applied to the update operation of the ant position, otherwise the ant position will exceed the established search space range. In order to ensure that the ants can achieve random walks within the legal search space boundaries and avoid the occurrence of out-of-bounds phenomena, the following equation is introduced to normalize the relevant parameters. The normalization formula is specifically defined as follows:

[0116] ;

[0117] in, Indicates the The minimum value of the random walk of the dimensional variable; Indicates the The maximum value of the random walk of the dimensional variable; For the In the iteration Minimum of the dimensional random walk; For the In the iteration The maximum value of a dimensional random walk.

[0118] The walk formula is defined as follows:

[0119] ;

[0120] ;

[0121] in, Indicates the The minimum value of all variables in the dimensional ant; Indicates the The maximum value of all variables of the ant dimension; and Respectively represent The maximum and minimum values ​​of all variables in the iteration; Show first The selected The location of the ant lion.

[0122] The ants' movement is restricted by the traps built by the ant lions. The following formula defines the change in the trap range:

[0123] ;

[0124] ;

[0125] ;

[0126] ;

[0127] in, Represents the current iteration number, represents the maximum number of iterations, A constant defined based on the current iteration that adjusts the accuracy of the search.

[0128] During an antlion's hunting process, the moment an ant reaches the bottom of a pit marks the final stage of the hunt. Once this stage is complete, the antlion quickly drags the ant into the sand pit, completing the hunt. To accurately simulate this natural hunting scenario, the following conditions were set: The ant's entry into the sand triggers the antlion's hunting mechanism. Simultaneously, the antlion must immediately synchronize its position to the prey's latest location. This ensures it maintains an optimal hunting position at all times, maximizing its chances of successfully capturing new prey. This ensures the entire hunting process is more aligned with natural laws, achieving a precise simulation.

[0129] ;

[0130] When an ant lion captures an ant, its position is updated to the position of the captured ant. The update operator formula is defined as follows:

[0131] ;

[0132] in, It is based on the fitness value of the previous generation of ant lion population. After selecting an ant lion according to the roulette rule, the ant lion will randomly walk around the location. Indicates the The position of the antlion after a random walk around the elite antlion at iteration . No. The first iteration The position of the ant.

[0133] like Figure 4 As shown, to address the shortcomings of the traditional Ant Lion Algorithm, this embodiment proposes three key modifications to the Ant Lion Algorithm: initialization modification, ant wandering modification, and local optimal solution detection. This embodiment aims to achieve refined management and optimization of household electricity bill models by improving the Ant Lion Algorithm, providing household users with a scientific and reasonable electricity bill management solution and reducing electricity bill expenses. The details are as follows:

[0134] In the population initialization stage, the Logistic Chaos Map is introduced. The chaotic sequence generated by the chaotic map is used to initialize the ant and ant lion populations. This makes the initial solutions more evenly distributed in the search space, enhances the randomness and diversity of the population, broadens the search range, and avoids falling into local optimality in the early stages of the algorithm. The formula of the Logistic Chaos Map is as follows:

[0135] ;

[0136] The initialization steps of the ant lion population improved by Logistic chaotic mapping are as follows:

[0137] Determine the following parameters: population size N, problem dimension dim, and the parameters of the Logistic Chaos Map , the initial value of the chaotic map , the lower bound of the d-dimensional antlion population , the upper bound of the d-dimensional ant lion population .

[0138] Generate a chaotic sequence. Generate a chaotic sequence for each dimension d , each sequence contains N values, which is the population size. The sequence is generated using the following formula:

[0139] ;

[0140] in, , is the randomly selected initial value of the d-th dimension.

[0141] Map the chaotic sequence to the search space. Each value in Mapped into the search space, we get the d-dimensional position of the n-th individual in the population The mapping formula is as follows:

[0142] ;

[0143] Generate a population. For each individual i (i=1, 2, ..., N), construct a position vector Contains D elements, which represent the various decision variables in the problem, and the position vector of each individual It consists of D mapped chaotic values.

[0144] During the algorithm's iterations, a t-distribution perturbation strategy is employed to improve ant movement. Based on the ant's current position, fitness, and t-distribution parameters, the perturbation step size and direction are calculated to update the ant's position. In the early stages of the iteration, the t-distribution approximates the standard Cauchy distribution, endowing the algorithm with strong global search capabilities. As the iterations progress, the t-distribution approaches a Gaussian distribution. This change effectively strengthens the algorithm's local search capabilities, thereby improving convergence speed and accuracy. The t-distribution holds a unique position, serving as an intermediate transition between the Gaussian and Cauchy distributions and capable of transitioning to other distributions by flexibly adjusting the degrees of freedom n. When n = 1, the t-distribution becomes a standard Cauchy distribution; when n > 30, it becomes a Gaussian distribution. Notably, current research has found that search algorithms often exhibit certain drawbacks in the later stages of iteration. This can be addressed by cleverly employing the t-distribution perturbation strategy. This strategy effectively breaks the limitations of local optima, effectively enhancing the algorithm's global search capabilities and helping it discover more optimal solutions in complex solution spaces. The t-distribution is used to optimize the ant lion algorithm and the positions of individual ants are mutated by the t-distribution. The mutation process is defined as follows:

[0145] ;

[0146] in, is the first The new position of each ant; is the first The original position of each ant; The t-distribution that satisfies the number of iterations of the algorithm as the degree of freedom. The ant lion algorithm based on the t-distribution is Add at the position The t-distributed perturbation term allows individual ants to fully explore the ant lion trap during the search process, allowing the ant population to fully roam within the ant lion trap. Using the algorithm's overall number of iterations, t, as the degree of freedom parameter for the t-distribution, this guides the ant population's exploration within the ant lion trap. During the algorithm's initial iterations, due to the small number of iterations, the t-distribution approaches a standard Cauchy distribution. This allows the algorithm to transcend local constraints, demonstrating strong global search potential and extensively exploring the space of possible optimal solutions. As the iterations progress, when the number of iterations, t, reaches a certain scale, the t-distribution gradually transforms into a Gaussian distribution, focusing the algorithm's search on fine-grained local areas, highlighting its local search capabilities. Overall, the introduction of the t-distribution perturbation strategy to optimize the Ant Lion Algorithm has shown significant results. It broadens the global search horizon in the early stages of the iterations and enhances the accuracy of local deep search in the later stages, resulting in improved convergence rate and accuracy.

[0147] During the algorithm's execution, a monitoring process is implemented to compare the current optimal value with the historical optimal value. If the optimal value remains unchanged after multiple iterations, indicating a local optimum, a Cauchy perturbation is promptly introduced to help the ants and antlions escape this predicament and ensure the algorithm's search for a global optimum. The long tail of the Cauchy distribution allows for a large perturbation duration, helping the algorithm to break free from the constraints of the current search space. The fitness of selected individuals is then reassessed after the perturbation, improving algorithm stability.

[0148] The heavy-tailed property of the Cauchy distribution enables it to maintain a high sampling probability in the neighborhood of local extreme values. This property is used to improve the ant lion algorithm: when an elite individual falls into a local extreme value, the random perturbation generated by the Cauchy mutation can effectively reduce its dependence on the current extreme point. This perturbation strategy increases the frequency of individual sampling in areas far away from the extreme value, thereby shifting search resources from the local neighborhood to the global space. This embodiment embeds the mutation mechanism into the state update process of the elite ant lion and constructs a Cauchy perturbation operator to enhance the global escape capability of the algorithm. This improvement not only enhances the global search capability of the algorithm, but also improves the overall performance and stability of the algorithm. The specific improved formula is defined as follows:

[0149] ;

[0150] in, is the initial position The updated position of is the standard Cauchy random distribution at t=1; parameter is a constant used to control the intensity of the Cauchy distribution variation.

[0151] The steps of the ant lion algorithm based on Cauchy mutation are as follows.

[0152] Execute the pre-order steps of the original basic ant lion algorithm.

[0153] During the iterative phase, if the optimal values ​​obtained by the antlion colony in two consecutive iterations are nearly identical and both are recorded as historical optimal values, the algorithm is considered to have fallen into a local optimum. At this point, Cauchy mutation is triggered, applying a Cauchy-distributed random perturbation to the position of the current elite antlion, forcing it to escape its local neighborhood and shift to global exploration.

[0154] Mutation operation: First, the fitness value and number of the optimal ant lion individual are copied to the size of the original population, and then the Cauchy mutation operator is embedded to further update the position of the ant lion group and update the optimal value.

[0155] ;

[0156] ;

[0157] in, and is the initial position of the original ant lion and ant individual; and is the new position updated after the Cauchy mutation operation.

[0158] Finally, the improved ant lion algorithm is used to optimize and solve the household electricity bill model. The specific implementation steps are as follows:

[0159] S201: Initialize the parameters required for the household electricity bill model. It is necessary to confirm whether the smart home devices involved in the optimization are of flexible interruptible type, the number of devices, power, operating time, and the user's expected operating window for these devices, and set the fitness function to the formula The operating status of the equipment is encoded in binary: the on / off status of a single equipment in 48 time periods is represented by a 1×48 0-1 array (1 = running, 0 = off). The all-day status of n equipment forms an n×48 decision matrix X, where X(i,t) represents the start / stop status of the i-th equipment in the t-th time period. This encoding method transforms the continuous scheduling problem into a discrete binary optimization. The matrix dimension matches the fine-grained modeling requirements of the 48 half-hour time periods, and is specifically defined as follows:

[0160] ;

[0161] S202: Initialize the population of the ant lion algorithm using the Logistic chaos map.

[0162] S203: Calculate the fitness of ant lions and ants, and retain the elite ant lions.

[0163] S204: Use the roulette wheel strategy to select the best ant lion.

[0164] S205: The superior ant lion and the elite ant lion build a trap together.

[0165] S206: Using t-distribution perturbation to improve the ants' wandering strategy, the ant lion begins to capture ants.

[0166] S207: Update the position of the ant population.

[0167] S208: Calculate the fitness values ​​of ants and ant lions, select a new generation of elite ant lions, and update the position of the ant lion population.

[0168] S209: Determine whether the algorithm is at risk of falling into a local optimum. If the algorithm detects that the same fitness value has been recorded as the fitness value of the optimal ant lion twice in a row and has been recorded as the historical optimal value, the algorithm is determined to be at risk of falling into a local optimum. Once a local optimum is confirmed, a Cauchy mutation operation is performed on the ant lion and ant populations, and their fitness values ​​are recalculated after the operation is completed.

[0169] S210: Determine whether the number of iterations has been reached. If not, go to step S204 to continue execution. Otherwise, the algorithm ends and the final optimal solution is obtained, that is, the optimal household electricity bill and the optimal operating plan for the power consumption time distribution of each device.

[0170] like Figure 5 As shown, the present invention also discloses a household electricity fee optimization device based on the improved ant lion algorithm, comprising:

[0171] A household electricity bill model construction module 501 is used to construct a household electricity bill model for calculating the electricity bill of household electrical equipment and a multi-objective optimization function combining the household electricity bill objective function and user dissatisfaction;

[0172] The improved ant lion algorithm solution step module 502 is used to use the multi-objective optimization function as the fitness function of the improved ant lion algorithm to solve the household electricity bill model, thereby obtaining the optimal household electricity bill and the optimal operation plan for the distribution of electricity usage time of each device. The improved ant lion algorithm uses a chaotic map to initialize the ant and ant lion populations, utilizes t-distribution perturbation to improve the ant's wandering strategy, and introduces Cauchy mutation perturbation when the algorithm falls into a local optimum.

[0173] The specific implementation of the household electricity bill optimization device based on the improved ant lion algorithm is the same as the household electricity bill optimization method based on the improved ant lion algorithm, and will not be repeated in this embodiment.

[0174] The above is only a specific implementation of the present invention, but the design concept of the present invention is not limited to this. Any non-substantial changes to the present invention using this concept shall be deemed as an infringement of the protection scope of the present invention.

Claims

1. A household electricity bill optimization method based on an improved ant lion algorithm, characterized in that: The steps include: S1, a household electricity bill model construction step, constructing a household electricity bill model for calculating the electricity bill of household electrical equipment and a multi-objective optimization function combining the household electricity bill objective function and user dissatisfaction; S2, an improved ant lion algorithm solution step, using a multi-objective optimization function as the fitness function of the improved ant lion algorithm, using the improved ant lion algorithm to solve the household electricity bill model, and obtaining the optimal household electricity bill and the optimal operation plan for the power consumption time distribution of each device; the improved ant lion algorithm uses a chaotic map to initialize the ant and ant lion populations, uses t-distribution perturbation to improve the ant's wandering strategy, and introduces Cauchy mutation perturbation when the algorithm falls into a local optimum.

2. The household electricity bill optimization method based on the improved ant lion algorithm according to claim 1 is characterized in that: The household electrical appliances include rigid appliances and flexible appliances. Rigid appliances are electrical appliances that must operate continuously or in a fixed mode in daily life and are not directly adjusted or interrupted by user behavior. Flexible appliances are electrical appliances whose operating time and power consumption can be adjusted to a certain extent based on user preferences, electricity price policies, or instructions from energy management systems. The flexible devices include flexible interruptible devices and flexible non-interruptible devices; The interruptible device is an electrical device that can receive an interrupt instruction at any time during operation and stop working immediately; The non-interruptible equipment is an electrical equipment that completes the entire working cycle according to a preset program and cannot be stopped or changed during the period.

3. The household electricity bill optimization method based on the improved ant lion algorithm according to claim 2 is characterized in that: The objective function of the household electricity bill is expressed as: ; ; in, Indicates the The total load demand of the user's rigid equipment in each time period. A day is divided into 48 time periods. Indicates the Time period Power consumption of each flexible device; Indicates the The electricity price for each time period; Indicates the The total electricity cost of the user in each time period; Sum represents the total electricity cost in 48 time periods.

4. The household electricity bill optimization method based on the improved ant lion algorithm according to claim 2, characterized in that: The modeling representation of the interruptible device is: ; ; ; ; ; in, Indicates the device number of the flexible device; Indicates the number of interruptible devices; Indicates the The flexible device The working status of each time period, 0 means not running, 1 means running; Indicates the The working status of a flexible device in 48 time periods, When it is an interruptible device; and Respectively represent the start time and end time of the device; Indicates the The total working time of each flexible device; Indicates the Power of a flexible device; Indicates the Flexible devices in Power consumption during the time period.

5. The household electricity bill optimization method based on the improved ant lion algorithm according to claim 2 is characterized in that: The modeling representation of the non-interruptible device is: ; ; ; ; ; in, Indicates the device number of the flexible device; Indicates the number of interruptible devices; Indicates the number of flexible devices; Indicates the The flexible device The working status of each time period, 0 means not running, 1 means running; Indicates the The working status of a flexible device in 48 time periods, When it is a non-interruptible device; and Respectively represent The start and end time of each flexible device; Indicates the The total working time of each flexible device; Indicates the Power of a flexible device; Indicates the Flexible devices in Power consumption during the time period.

6. The household electricity bill optimization method based on the improved ant lion algorithm according to claim 2, characterized in that: The user dissatisfaction is calculated based on the running time offset and is expressed as: ; ; in, It indicates the total dissatisfaction of users with the operational deviation of all flexible devices; Indicates the user's The degree of dissatisfaction with flexible equipment; Indicates the minimum electricity price in 48 time periods; Indicates the number of flexible devices; Indicates the A flexible device offsets the time set by the user. When is the running time offset of the non-interruptible device, Time is the runtime offset of the interruptible device. Indicates the number of interruptible devices; Indicates the number of flexible devices; Indicates the The dissatisfaction coefficient of flexible equipment.

7. The household electricity bill optimization method based on the improved ant lion algorithm according to claim 6, characterized in that: The runtime offset of a non-interruptible device is expressed as; , ; in, Indicates the The lower limit of the working time window set by the user of a flexible device, Indicates the The upper limit of the working time window set by the user of a flexible device, Indicates the The total operating time of each flexible device; represents the maximum function, Indicates the offset of the start time later than the lower limit of the working time. Indicates the offset by which the end time is later than the upper limit of the working hours, ensuring that the offset is only calculated when the time window is exceeded.

8. The household electricity bill optimization method based on the improved ant lion algorithm according to claim 6, characterized in that: The runtime offset of an interruptible device is expressed as; , ; in, Indicates the The lower limit of the working time window set by the user of a flexible device; Indicates the The upper limit of the working time window set by the user of a flexible device; The operating time period of the equipment; Indicates the Flexible devices in The status of the run in the timeslot.

9. The household electricity bill optimization method based on the improved ant lion algorithm according to claim 1, characterized in that: The multi-objective optimization function is the sum of the household electricity bill objective function and user dissatisfaction; the multi-objective optimization function is used as the fitness function of the improved ant lion algorithm, and the household electricity bill model is solved using the improved ant lion algorithm. The specific steps are as follows: S201, the sum of the household electricity bill objective function and user dissatisfaction is used as the improved ant lion algorithm fitness function; S202, using Logistic mapping to initialize the population of the ant lion algorithm; S203, using a fitness function to calculate the fitness of ant lions and ants, and retaining elite ant lions based on the fitness; S204, using a roulette wheel strategy to select the best ant lion; In S205, the superior ant lion and the elite ant lion build a trap together; S206, using t-distribution perturbation to improve the ants' movement strategy, by adding a t-distributed disturbance term to the original ant positions, to guide the ant population to fully move and explore within the ant lion trap, wherein the number of iterations of the disturbance term is used as the degree of freedom parameter of the t-distribution; the ant lion begins to capture the ants; S207, updating the position of the ant population; S208, calculating the new fitness values ​​of the ants and ant lions, selecting a new generation of elite ant lions based on the new fitness values, and updating the position of the ant lion population; S209: If the same fitness value is used as the fitness value of the optimal ant lion twice in a row and is recorded as the historical optimal value, the algorithm is determined to have fallen into a local optimum. Once it is confirmed that it has fallen into a local optimum, a Cauchy mutation operation is performed on the ant lion population and the ant population. After the operation is completed, the fitness values ​​of the ants and ant lions are recalculated. S210, repeat steps S204-S209 until the number of iterations reaches the preset number of iterations, and output the optimal electricity cost corresponding to the elite ant lion and the optimal operation plan for the power consumption time distribution of each device.

10. A household electricity bill optimization device based on an improved ant lion algorithm, comprising the following: A household electricity bill model construction module is used to construct a household electricity bill model for calculating the electricity bill of household electrical equipment and a multi-objective optimization function that combines the household electricity bill objective function and user dissatisfaction; An improved ant lion algorithm solution step module is used to solve a household electricity bill model using a multi-objective optimization function as the improved ant lion algorithm's fitness function to obtain the optimal household electricity bill and the optimal operating plan for the distribution of electricity usage time of each device. The improved ant lion algorithm uses a chaotic map to initialize ants and ant lion populations, utilizes t-distribution perturbations to improve the ants' wandering strategies, and introduces Cauchy mutation perturbations when the algorithm falls into a local optimum.

Citation Information

Patent Citations

  • Household power consumption behavior optimization algorithm

    CN110543969A

  • Unmanned aerial vehicle route planning method based on improved Lycra flying ant lion optimization algorithm

    CN111815055A

  • Building electrical load optimization scheduling method based on improved whale algorithm

    CN112883629A

  • RBF neural network optimization method based on improved ant lion algorithm

    CN113240068A

  • Grid-connected micro-grid capacity optimization configuration method based on improved ant lion algorithm

    CN116231729A

Cited By

  • Multi-target task scheduling method for Internet laundry center

    CN121303785A

  • Multi-objective task scheduling method for internet laundry center

    CN121303785B

  • Data center water-cooling air conditioner energy-saving optimization effect evaluation method and system

    CN121638067A