Campus intelligent power supply system
By constructing a key feature vector group and combining the spatiotemporal characteristics of personnel and factors affecting electricity consumption, the campus electricity consumption can be accurately predicted, solving the problem of low prediction accuracy in existing technologies and realizing efficient electricity management and green living guidance.
Patent Information
- Application Number
- CN202511693608.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-18
- Publication Date
- 2026-02-10
AI Technical Summary
The existing campus power supply system fails to effectively integrate the spatiotemporal characteristics of people when predicting electricity consumption, resulting in low prediction accuracy, high false alarm or missed alarm rates, and affecting the credibility of early warnings.
By constructing a key feature vector group, including spatiotemporal feature vectors of personnel and feature vectors of factors affecting electricity consumption, and matching historical time slices based on vector similarity, the predicted electricity consumption for future time slices is obtained, and a prompt message is sent when the difference between the remaining electricity and the predicted electricity consumption reaches a threshold.
It significantly improves the accuracy of electricity consumption forecasting and the reliability of early warnings, reduces false alarms or missed alarms, enhances the sense of security in electricity use and management efficiency, and promotes the cultivation of green living habits.
Smart Images

Figure CN121503906A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power supply technology, and in particular to a smart power supply system for campuses. Background Technology
[0002] In the campus environment, student dormitories generally implement an electricity management model of "free basic electricity + chargeable use for excess". When the prepaid electricity in a student dormitory is about to run out, if the dormitory members do not notice in time, unplanned power outages are very likely to occur at night or during important periods, which seriously affects the normal study and living experience. Therefore, with the continuous advancement of smart campus construction, the power supply system has become an important direction for upgrading campus infrastructure.
[0003] In existing technologies, most campus power supply systems are data-driven electricity management systems. These systems collect historical electricity consumption data and combine it with external factors affecting electricity consumption, such as weather and seasons, to use machine learning algorithms to predict future electricity consumption in independent electricity-consuming areas (student dormitories). When the predicted total electricity consumption approaches or exceeds the remaining power, an alert is triggered, prompting electricity users (dormitory members) to replenish the power and avoid power outages.
[0004] However, the above method also has the following technical problems: The electricity consumption behavior of independent electricity consumption areas on campus is significantly dependent on the individuals involved, and their electricity consumption patterns are highly influenced by the activity trajectories and class schedules of the users. However, the methods mentioned above only predict future electricity consumption based on historical electricity consumption and external factors such as weather and seasons. They fail to effectively integrate the spatiotemporal characteristics of individuals (such as their dormitory status at different times) to predict future electricity consumption, resulting in low accuracy of the predicted total electricity consumption. Triggering early warnings based on this data can easily lead to false alarms or missed alarms, seriously affecting the credibility of the early warnings. Summary of the Invention
[0005] To address the aforementioned technical problems, the technical solution adopted by this invention is as follows: A smart power supply system for campuses includes a processor and a memory storing a computer program. When the computer program is executed by the processor, the following steps are performed: S1. Obtain the i-th future time slice T corresponding to the current time point Q. i Within the campus, the key feature vector group A corresponding to the independent power consumption areas. i =(A i1 A i2 ); 1≤i≤n, where n is the number of future time slices corresponding to Q; A i1 For A i The first spatiotemporal feature vector of the person in T is used to represent the spatiotemporal feature vector of the person in T. iWithin each sub-time slice, the distance between the electricity user and the independent electricity consumption area; A i1 Through electricity users at T i The schedule and location of the corresponding courses are obtained; A i2 For A i The first characteristic vector of electricity consumption influencing factors.
[0006] S2. Based on the historical feature vector group corresponding to the independent electricity consumption area within each of the several initial historical time slices corresponding to Q, obtain A. i Corresponding to several target historical time slices; A i The corresponding historical feature vector set of the target historical time slice and A i The overall vector similarity between them is not less than the preset similarity threshold; the historical feature vector group includes the second personnel spatiotemporal feature vector and the second electricity consumption influencing factor feature vector.
[0007] S3, when B-∑ n i=1 C i When the value is ≤D, a notification message is sent to the electricity user; B represents the remaining electricity consumption area; C represents the remaining electricity consumption area. i For A i The average historical electricity consumption for all target historical time slices; historical electricity consumption is the electricity consumed by the independent electricity consumption area within its corresponding target historical time slice; D is the preset electricity difference.
[0008] The present invention has at least the following beneficial effects: This invention provides a smart power supply system for campuses. The system includes a processor and a memory storing a computer program. When the computer program is executed by the processor, the following steps are implemented: 1. Obtaining key feature vector groups corresponding to independent power consumption areas within each future time slice corresponding to the current time point; 2. Key feature vector groups include a first spatiotemporal feature vector of personnel and a first feature vector of electricity consumption influencing factors; 3. The first spatiotemporal feature vector of personnel represents the distance between the electricity-consuming personnel and the independent power consumption area within each sub-time slice of the corresponding future time slice; 4. Obtaining the target historical time slice corresponding to each key feature vector group based on the comprehensive vector similarity between the historical feature vector group corresponding to the independent power consumption area and each key feature vector group within each initial historical time slice corresponding to the current time point; 5. Taking the average historical electricity consumption of all target historical time slices corresponding to the key feature vector group as the predicted electricity consumption of the future time slice corresponding to the key feature vector group; 6. Sending a prompt message to the electricity-consuming personnel when the difference between the remaining electricity consumption of the current independent area and the sum of the predicted electricity consumption of all future time slices is not greater than a preset electricity consumption difference. As can be seen, this invention constructs a first spatiotemporal feature vector of personnel based on the distance between the electricity user and the independent electricity consumption area within each sub-time slice of the future time slice. This vector is then combined with a first feature vector of electricity consumption influencing factors to form a multi-dimensional key feature vector group. For each key feature vector group, a target historical time slice is matched based on the comprehensive vector similarity between the key feature vector group and the historical feature vector group. The average historical electricity consumption of all target historical time slices is considered as the predicted electricity consumption of the corresponding future time slice. In obtaining the predicted electricity consumption of the future time slice, the spatiotemporal features of personnel are effectively integrated, significantly improving the accuracy of the predicted electricity consumption. Furthermore, when the difference between the remaining electricity in the current independent electricity consumption area and the sum of the predicted electricity consumption of all future time slices does not exceed a preset electricity difference, a prompt message is sent to the electricity user, which can reduce false alarms or missed alarms and improve the reliability of the early warning. Attached Figure Description
[0009] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0010] Figure 1 This is a flowchart illustrating the execution of a computer program by a processor in a campus smart power supply system, as provided in an embodiment of the present invention. Detailed Implementation
[0011] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0012] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar tasks and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or server that comprises a series of steps or units is not necessarily limited to those explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0013] An embodiment of the present invention provides a smart power supply system for a campus. The system includes a processor and a memory storing a computer program. When the computer program is executed by the processor, it performs the following steps: Figure 1 As shown: S1. Obtain the i-th future time slice T corresponding to the current time point Q. i Within the campus, the key feature vector group A corresponding to the independent power consumption areas. i =(A i1 A i2 ); 1≤i≤n, where n is the number of future time slices corresponding to Q; A i1 For A i The first spatiotemporal feature vector of the person in T is used to represent the spatiotemporal feature vector of the person in T. i Within each sub-time slice, the distance between the electricity user and the independent electricity area corresponding to the independent electricity area; A i1 Through the electricity user at T i The schedule and location of the corresponding courses are obtained; A i2 For A i The first characteristic vector of electricity consumption influencing factors.
[0014] Specifically, T i The starting time point is 00:00 on the i-th day after the date Q is; the number of future time slices corresponding to Q is preset by those skilled in the art according to actual needs, for example: 3, 5, 7, which will not be elaborated here.
[0015] Specifically, the length of the future time slice is one day.
[0016] Specifically, the future time slice is divided into several consecutive and equally long sub-time slices according to the preset time slice length; the preset time slice length is set by those skilled in the art according to actual needs, for example, 5 minutes, which will not be elaborated here.
[0017] In another embodiment, the future time slice is divided into a series of consecutive and non-overlapping sub-time slices according to the campus schedule; for example, the first sub-time slice of the future time slice is from 0:00 to 8:00 (break time), the second sub-time slice is from 8:00 to 8:45 (first class); the third sub-time slice is from 8:45 to 8:55 (break between classes); the fourth time slice is from 8:55 to 9:40 (second class), and so on, which will not be elaborated here.
[0018] Specifically, there are multiple independent power consumption areas on campus. For any independent power consumption area on campus, if its current remaining power is consistent with the preset power, the subsequent analysis process for that independent power consumption area is triggered. This can be understood as: for that independent power consumption area, steps S1-S3 are executed. The preset power is the power that a person skilled in the art sets in advance according to actual needs, such as 5 kWh or 10 kWh, which will not be elaborated here.
[0019] Specifically, the independent electricity use area on campus refers to student dormitories that meet the preset conditions. The preset conditions are: all dormitory members in the student dormitory are from the same class; the electricity users corresponding to the independent electricity use area are the dormitory members corresponding to the independent electricity use area.
[0020] Specifically, step S1 includes the following steps S11-S13: S11, Obtain T i The corresponding sub-time slice list E i =(E i1 E i2 , ..., E ij , ..., E im ); E ij For T i The j-th sub-time slice contained in each future time slice; 1≤j≤m, where m is the number of sub-time slices contained in each future time slice.
[0021] S12, Obtain T i The course schedule information list F for the electricity users mentioned above i =(F i1 F i2 F ie F if(i) ), F ie =(F ie1 Fie2 );F ie For T i The e-th course K corresponding to the electricity user mentioned above ie Course schedule information; 1≤e≤f(i); f(i) is T i The number of courses corresponding to the electricity users mentioned above; F ie1 For K ie The corresponding teaching time slot; F ie2 For K ie Location information of the corresponding teaching location.
[0022] Specifically, the course schedule information for electricity users can be obtained from their class schedules.
[0023] S13, Regarding E ij If F i There exists an F ie E 1 ij ≥F 1 ie1 And E 2 ij ≤F 2 ie1 Then based on F ie2 Get K ie The distance between the corresponding teaching location and the independent power consumption area is used as A. (i1,j) Otherwise, let A (i1,j) =0, to obtain A i1 E 1 ij For E ij The starting time point, E 2 ij For E ij The end time point; F 1 ie1 For F ie1 The starting time point, F 2 ie1 For F ie1 The end time point; A (i1,j) For A i1 The j-th component can be understood as: for E ij If F i There is no expression that satisfies E 1 ij ≥F 1 ie1 And E 2 ij ≤F 2 ie1 F ie Let A (i1,j) =0.
[0024] Specifically, A i1 The vector dimension is n, i.e., A i1 It includes n components.
[0025] Specifically, the distance between the teaching location and the independent power consumption area is the actual travel distance of the power user from the teaching location to the independent power consumption area.
[0026] Through the above steps, based on the course schedule information corresponding to the electricity users within the future time slice, it is determined whether each sub-time slice within the future time slice is occupied by a course. If the completion of a sub-time slice falls within the teaching time period of a certain course, it is determined that the electricity user is attending class and has left the independent electricity consumption area during that sub-time period. In this case, the actual travel path length of the electricity user from the teaching location to the independent electricity consumption area is used as the corresponding component of the first person spatiotemporal feature vector. When the sub-time slice is not occupied by any course, it is assumed that the electricity user is in the independent electricity consumption area. In this case, the corresponding component of the first person spatiotemporal feature vector is set to 0; thus constructing the first person spatiotemporal feature vector; in the first person spatiotemporal feature vector... In the vector, non-zero components not only indicate that the electricity user has left the independent electricity consumption area, but also indicate the distance between the electricity user and the independent electricity consumption area; zero components indicate that the electricity user may be in the independent electricity consumption area or is likely to be in the independent electricity consumption area. Therefore, the first spatiotemporal feature vector of the personnel can directly reflect the dynamic behavior pattern of the electricity user in time and space to a certain extent, effectively characterize the presence status of the personnel in the independent electricity consumption area in the future time slice, and indirectly reflect the electricity consumption behavior characteristics of the independent electricity consumption area in the corresponding future time slice. This provides high-quality input for obtaining the predicted electricity consumption corresponding to the future time slice, which is conducive to improving the accuracy of the predicted electricity consumption.
[0027] Specifically, step S1 also includes the following steps S101-S103: S101, Obtain T i The corresponding list of power consumption impact values G i =(G i1 G i2 , ..., G ik , ..., G it );G ik For the k-th preset electricity consumption influencing factor in T i The corresponding electricity consumption impact value; 1≤k≤t, where t is the number of preset electricity consumption impact factors.
[0028] Specifically, the preset factors affecting electricity use are factors that are predetermined by those skilled in the art based on actual needs and may affect electricity use behavior, such as temperature, humidity, weather conditions, season, and appliance configuration, which will not be elaborated here.
[0029] S102, G ik Perform feature encoding to obtain G ik The corresponding eigenvector H ik .
[0030] Specifically, the feature encoding method corresponding to the electricity impact value can be determined by those skilled in the art according to actual needs, such as: One-hot; Embedding; which will not be elaborated here.
[0031] S103, H i1 H i2 H ik H it Concatenate the vectors sequentially to obtain A. i2 .
[0032] Through the above steps, the electricity consumption impact value corresponding to each preset electricity consumption factor in the future time slice is obtained, and the electricity consumption impact value is feature-encoded to obtain a feature vector. The feature vectors are then concatenated in sequence to obtain the feature vector of the first electricity consumption impact factor. This realizes the structured representation of heterogeneous environmental data, supports flexible expansion and unified calculation, and provides high-quality input for obtaining the predicted electricity consumption corresponding to the future time slice, which is conducive to improving the accuracy of predicted electricity consumption.
[0033] S2. Based on the historical feature vector group corresponding to the independent electricity consumption area in each of the several initial historical time slices corresponding to Q, obtain A. i Corresponding to several target historical time slices; A i The corresponding historical feature vector set of the target historical time slice and A i The overall vector similarity between them is not less than the preset similarity threshold; the historical feature vector group includes the second personnel spatiotemporal feature vector and the second electricity consumption influencing factor feature vector.
[0034] Specifically, step S2 includes the following steps S21-S23: S21. Obtain the historical feature vector set R = {R1, R2, ..., R...} corresponding to the independent electricity consumption area. g , ..., R h}, R g =(R g1 R g2 ); R g For the g-th initial historical time slice corresponding to Q, the historical feature vector group corresponding to the independent power consumption area, 1≤g≤h, where h is the number of initial historical time slices corresponding to Q; R g1 For R g The second person's spatiotemporal feature vector in R; g2 For R gThe second characteristic vector of electricity consumption influencing factors.
[0035] Specifically, the starting time of the g-th initial historical time slice corresponding to Q is the zero point of the g-th day between the dates of Q; the number of initial historical time slices corresponding to Q is preset by those skilled in the art according to actual needs, for example: 100, 150, 200, which will not be elaborated here.
[0036] Specifically, the initial historical time slice is one day long.
[0037] Specifically, in steps S11-S13, according to E i Get A 1i In the same way, based on the list of sub-time slices corresponding to the g-th initial historical time slice corresponding to Q, obtain R. g1 The method for dividing the sub-time slices corresponding to the initial historical time slice is consistent with the method for dividing the sub-time slices corresponding to the future time slice.
[0038] Specifically, in steps S101-S103, according to G i Get A i2 In the same manner, based on the list of electricity consumption impact values corresponding to the g-th initial historical time slice corresponding to Q, obtain R. g2 .
[0039] S22, Obtain A i With R g The comprehensive vector similarity L between them ig L ig Meets the following conditions: L ig =α i ×X 1 ig +(1-α i )×X 2 ig ;α i For A i1 Corresponding importance weight; X 1 ig For A i1 With R g1 Vector similarity between them; X 2 ig For A i2 With R g2 Vector similarity between them.
[0040] Specifically, 0≤X 1 ig ≤1, X 1 ig The larger A is i1 With R g1 The more similar they are.
[0041] In one specific embodiment, A i1 With R g1 The vector distance between them is converted into a value between 0 and 1, and this value is used as X. 1 ig Wherein, the smaller the vector distance, the closer its converted value between 0 and 1 is to 1; the larger the vector distance, the closer its converted value between 0 and 1 is to 0; the vector distance can be Euclidean distance; those skilled in the art know that any existing method for converting vector distance into a value between 0 and 1, and making the smaller the vector distance, the closer its converted value between 0 and 1 is to 1, and the larger the vector distance, the closer its converted value between 0 and 1 is to 0, all fall within the protection scope of this invention, and will not be elaborated further here.
[0042] Specifically, 0≤X 2 ig ≤1, X 2 ig The larger A is i2 With R g2 The more similar they are.
[0043] Specifically, obtain X 1 ig The method of obtaining X 2 ig The methods are consistent.
[0044] Specifically, 0 < α i ≤0.5.
[0045] S23, if L ig ≥L 0 Then R g The corresponding initial historical time slice is A i Corresponding target historical time slice; L 0 This is a preset similarity threshold.
[0046] Specifically, 0.7≤L 0 ≤1.
[0047] Through the above steps, the spatiotemporal feature vectors of the second personnel are obtained using the same method as those for obtaining the first personnel spatiotemporal feature vectors; the feature vectors of the second electricity consumption influencing factors are obtained using the same method as those for obtaining the first electricity consumption influencing factor feature vectors; this constructs a historical feature vector group corresponding to the initial historical time slice; a weighted average calculation is performed on the vector similarity between the first personnel spatiotemporal feature vector in the key feature vector group and the second personnel spatiotemporal feature vector in the historical feature vector group, as well as the vector similarity between the first electricity consumption influencing factor feature vector in the key feature vector group and the second electricity consumption influencing factor feature vector in the historical feature vector group, to obtain the similarity between the key feature vector group and the historical feature vector group. The comprehensive vector similarity method dynamically balances the contributions of spatiotemporal characteristics of individuals and factors influencing electricity consumption. A higher comprehensive vector similarity indicates greater similarity in the spatiotemporal characteristics of electricity consumers in independent electricity-consuming areas within their corresponding future time slice and their corresponding initial historical time slice, as well as greater similarity in the electricity consumption impact values corresponding to preset influencing factors. Therefore, when the comprehensive vector similarity is not less than a preset similarity threshold, it indicates that the electricity consumption behavior of independent electricity-consuming areas within their corresponding initial historical time slice is highly comparable to that within their corresponding future time slice. The historical electricity consumption within the initial historical time slice can serve as a reliable reference for the predicted electricity consumption within the future time slice. Furthermore, when the comprehensive vector similarity is not less than the preset similarity threshold, the initial historical time slice is used as the target time slice for the corresponding key feature vector group, and the average historical electricity consumption of all target historical time slices corresponding to the key feature vector group is considered as the predicted electricity consumption for the future time slice of the key feature vector group, significantly improving the accuracy and reliability of the predicted electricity consumption.
[0048] S3, when B-∑ n i=1 C i When D is less than or equal to 0, a notification message is sent to the electricity user; B represents the remaining electricity consumption corresponding to the current independent electricity consumption area; C represents the remaining electricity consumption. i For A i The average historical electricity consumption of all target historical time slices; historical electricity consumption is the electricity consumed by the independent electricity consumption area within the target historical time slice; D is the preset electricity difference.
[0049] Specifically, in step S3, C i Considered as T i The corresponding predicted electricity consumption.
[0050] Specifically, the preset power difference is a power difference that is preset by those skilled in the art according to actual needs, such as -1 kWh, 0, 1 kWh, which will not be elaborated here.
[0051] Specifically, the prompt message is used to remind the electricity user that they need to replenish the electricity.
[0052] Through the above steps, based on the distance between the electricity users and the independent electricity consumption areas within each sub-time slice of the future time slice, a first spatiotemporal feature vector of the user is constructed. This vector is then combined with the first feature vector of electricity consumption influencing factors to form a multi-dimensional key feature vector group. For each key feature vector group, the target historical time slice is matched based on the comprehensive vector similarity between the key feature vector group and the historical feature vector group. The average historical electricity consumption of all target historical time slices is then considered as the predicted electricity consumption of the corresponding future time slice. In the process of obtaining the predicted electricity consumption of the future time slice, the spatiotemporal features of the user are effectively integrated, significantly improving the accuracy of the predicted electricity consumption. Furthermore, if the difference between the remaining electricity of the current independent electricity consumption area and the sum of the predicted electricity consumption of all future time slices does not exceed a preset electricity difference, it indicates that the current remaining electricity is likely insufficient to support electricity consumption for the next n days. Therefore, an early warning is triggered, and a reminder message is sent to the electricity users, which can reduce false alarms or missed alarms and improve the credibility of the early warning.
[0053] Furthermore, when the system predicts that the current remaining power is insufficient to support the electricity demand for the next n days, it automatically triggers an early warning, sending a reminder message to users (such as "The remaining power is only enough to support 2 days, please use electricity reasonably and replenish power in time"). This accurate and timely power reminder significantly improves students' sense of security regarding electricity use and their satisfaction with the service. Simultaneously, transforming abstract power data into concrete and tangible behavioral guidance helps students develop an intuitive understanding of energy consumption, subtly cultivating energy-saving awareness and green living habits, and effectively contributing to the construction of a green campus. Moreover, through automated prediction and early warning, the system significantly reduces the workload of manual meter reading, inspections, and handling of power outage complaints, significantly improving management efficiency. More importantly, by guiding reasonable electricity use and smoothing peak electricity consumption, it can effectively reduce ineffective energy consumption and tiered electricity pricing, achieving long-term, sustainable energy cost optimization. This mechanism not only effectively avoids the inconvenience caused by sudden power outages to learning and daily life but also significantly improves the level of intelligence in campus energy management.
[0054] Specifically, before step S2, the following steps are included to obtain α. i : S01. Based on the preset number of clusters and the preset clustering algorithm, perform clustering on R... 11 R 21 , ..., R g1 , ..., R h1 Perform clustering and obtain the target vector cluster set M = {M1, M2, ..., M} based on the clustering results. r M s};M rLet M be the r-th target vector cluster, 1≤r≤s, where s is the number of target vector clusters; r The number of spatiotemporal feature vectors of the second person is greater than the preset threshold.
[0055] Optionally, the default clustering algorithm is K-means clustering algorithm.
[0056] Specifically, the preset number of clusters can be set by those skilled in the art based on the number of historical feature vector groups corresponding to the independent power consumption area. For example, if the number of historical feature vector groups corresponding to the independent power consumption area is 100, then the preset number of clusters is 3 or 4; this will not be elaborated further here.
[0057] Specifically, the preset quantity threshold can be set by those skilled in the art based on the preset number of clusters and the number of historical feature vector groups corresponding to the independent power consumption area; for example, if the number of historical feature vector groups corresponding to the independent power consumption area is 100 and the preset number of clusters is 3, then the preset quantity threshold can be set to 25 or 30; this will not be elaborated further here.
[0058] Specifically, step S01 includes the following sub-steps S011-S012: S011. Based on a and the preset clustering algorithm, perform clustering on R... 11 R 21 , ..., R g1 , ..., R h1 Clustering is performed to obtain a clusters of spatiotemporal feature vectors of the second person, where a is the preset number of clusters.
[0059] S012. If the number of second person spatiotemporal feature vectors in the second person spatiotemporal feature vector cluster is greater than a preset number threshold, then the second person spatiotemporal feature vector cluster shall be taken as the target vector cluster.
[0060] S02, Obtain M r The corresponding set of electricity consumption behavior feature vectors N r ={N r1 N r2 ,…,N rx ,…,N rp(r)}, N rx For M rx The corresponding electricity consumption behavior feature vector for the target historical time slice; M rx For M r The spatiotemporal feature vector of the x-th second person in the M; 1≤x≤p(r), p(r) is the second person in the M. r The number of spatiotemporal feature vectors of the second person; the electricity consumption behavior feature vector is used to represent the electricity consumption status of the electricity user in each target time period within the target historical time slice; the target time period is the time period obtained by dividing the target historical time slice according to a preset duration.
[0061] Specifically, the length of the target time period is consistent with the preset duration, and the target historical time slice corresponds to several target time periods that are several consecutive time periods; the preset duration is a duration that is preset by those skilled in the art according to actual needs, such as 5 minutes, 10 minutes, 30 minutes, which will not be elaborated here.
[0062] Specifically, step S02 includes the following steps: S021, Obtain M rx The corresponding target historical time slice and the corresponding target time period list (MB) rx =(MB rx1 MB rx2 ... MB rxy ... MB rxq M rxy For M rx The y-th target time segment within the corresponding target historical time slice, 1≤y≤q, where q is the number of target time segments within the target historical time slice.
[0063] S022, If in MB rxy Within this area, if the electricity consumed by the independent power consumption area does not exceed the preset minimum electricity consumption, then let N... rxy =0, if in MB rxy If the electricity consumed by the independent power consumption area exceeds the preset minimum electricity consumption, then let N... rxy =1, to obtain N rx N rxy For N rx The y-th component; the preset minimum power consumption is the minimum power consumption preset by those skilled in the art based on the length of the target time period. For example, if the length of the target time period is 10 minutes, the preset minimum power consumption is set to 0.01 kWh, which will not be elaborated here.
[0064] Specifically, N rxy When it is 0, it means that in MB rxy Within this area, the individuals described did not engage in any electricity-related activities; N rxy When it is 1, it means in MB rxy Within this area, the person using electricity is engaging in electricity-related activities.
[0065] Specifically, N rx The vector dimension is q; that is, N. rx It includes q components.
[0066] Through the above steps, the target historical time slice is divided into multiple target time periods of equal length, a list of target time periods is constructed, and the power consumption status of each target time period is binarized and encoded based on a preset minimum power consumption to obtain a power consumption behavior feature vector. Specifically, if the power consumption of an independent power consumption area within a target time period is not greater than the preset minimum power consumption, the corresponding component of the power consumption behavior feature vector is determined to be 0; otherwise, the corresponding component of the power consumption behavior feature vector is determined to be 1. 0 indicates no effective power consumption behavior, and 1 indicates the existence of effective power consumption behavior. This effectively filters out noise interference such as standby power consumption, truly reflects the user's active power consumption behavior, and provides high-quality input for subsequent power consumption pattern analysis.
[0067] S03, Obtain N r1 N r2 ,…,N rx ,…,N rp(r) The average vector N 0 r And according to N rx With N 0 r The vector distance between them, to obtain N r The corresponding average vector distance T r and standard deviation U r .
[0068] Specifically, the vector distance is the Euclidean distance.
[0069] Specifically, N 0 r The vector dimension is q, which is N. 0 r Includes q components, N 0 r The y-th component is N r1y N r2y ,…,N rxy ,…,N rp(r)y The average value.
[0070] Specifically, T r Equal to Z r1 Z r2 , ..., Z rx , ..., Z rp(r) The average value of Z; rx For N rx With N 0 r The vector distance between them.
[0071] Specifically, U r Meets the following conditions: U r =[(Σ p(r) x=1 (Zrx -T r ) 2 ) / (p(r)-1)] 1 / 2 .
[0072] S04, Obtain N r The corresponding vector concentration level V r V r Meets the following conditions: V r =W r / p(r); W r For N r In and N 0 r The vector distance between them is in [T r -U r T r +U r The number of electricity consumption behavior feature vectors within ] .
[0073] S05, If A i1 It can be assigned to M r In the middle, let α i =V r ×0.5; if A i1 If it cannot be assigned to any target vector cluster, then let α i =β, where β is the preset minimum weight value.
[0074] Specifically, 0 ≤ β ≤ 0.2.
[0075] Through the above steps, cluster analysis is performed on the spatiotemporal feature vectors of the second person in all historical feature vector groups to identify similar spatiotemporal feature vectors of the second person; and the spatiotemporal feature vector clusters of the second person whose number of spatiotemporal features is greater than a preset threshold are selected as target vector clusters; this avoids accidental clustering or overfitting due to insufficient samples, ensuring the stability and representativeness of the clustering results; for each target vector cluster, the set of electricity consumption behavior feature vectors corresponding to the target vector cluster is obtained; furthermore, the average vector of all electricity consumption behavior feature vectors in the set of electricity consumption behavior feature vectors is obtained, and based on the vector distance between the electricity consumption behavior feature vectors and the average vector, the electricity consumption behavior feature vector is obtained. The average vector distance and standard deviation of the set of electricity behavior feature vectors; the ratio of the number of electricity behavior feature vectors in the set of electricity behavior feature vectors that fall between the average vector distance minus the standard deviation and the average vector distance plus the standard deviation to the total number of electricity behavior feature vectors in the set of electricity behavior feature vectors, is used as the vector concentration degree of the set of electricity behavior feature vectors; the vector concentration degree is used to reflect the consistency of electricity consumption patterns under the same spatiotemporal characteristics of people; the higher the vector concentration degree, the more stable and less random the electricity consumption habits are under the same spatiotemporal characteristics of people, and the more predictable the future electricity demand is. When the first personnel feature vector can be assigned to a target vector cluster, it indicates that the spatiotemporal characteristics of the personnel reflected by the first personnel feature vector are highly similar to the spatiotemporal characteristics of the personnel reflected by all the second personnel feature vectors in the target vector cluster. The corresponding electricity consumption pattern should also be highly similar to the electricity consumption pattern reflected by the electricity consumption behavior feature vectors in the set of electricity consumption behavior feature vectors corresponding to the target vector cluster. Therefore, the product of the degree of vector concentration corresponding to the set of electricity consumption behavior feature vectors corresponding to the target vector cluster and 0.5 is used as the importance weight corresponding to the first personnel feature vector. That is, the more stable the electricity consumption pattern, the higher the weight of the personnel spatiotemporal features in the comprehensive vector similarity calculation. If the first personnel feature vector cannot be assigned to any target vector cluster, the preset minimum weight value is used as the importance weight corresponding to the first personnel feature vector, making the calculation of comprehensive vector similarity more reasonable. For independent electricity consumption areas where the electricity consumption patterns of electricity users are predictable, the importance of the first personnel spatiotemporal feature vector is relatively high; for independent electricity consumption areas where the electricity consumption patterns of electricity users are unpredictable, the importance of the first personnel spatiotemporal feature vector is relatively low.
[0076] Specifically, the following steps are included before step S05: S001, Obtain A i1 With M r The vector distance between the cluster center vectors JL1 ir .
[0077] Specifically, M r The cluster center vector is Mr The average vector of the spatiotemporal feature vectors of all second-person personnel.
[0078] S002, if JL1 ir Not for JL1 i1 JL1 i2 , ..., JL1 ir , ..., JL1 is The minimum value in the range determines A. i1 Cannot be assigned to M r In the middle; if JL1 ir JL1 i1 JL1 i2 , ..., JL1 ir , ..., JL1 is If the minimum value in M is obtained, then M is obtained. rx With M r The vector distance between the cluster center vectors JL2 rx .
[0079] S003, if JL1 ir >max(JL2) r1 JL2 r2 JL2 rx JL2 rp(r) If A is determined, then A is determined. i1 Cannot be assigned to M r If yes, otherwise, determine A. i1 It can be assigned to M r In the middle; max() is the function to get the maximum value.
[0080] Through the above steps, the vector distance between the first person feature vector and the cluster center vector of each target vector cluster is obtained. The smaller the vector distance, the more similar the corresponding two vectors are. The vector distance between each second person spatiotemporal feature vector in the target vector cluster with the smallest vector distance and the cluster center vector in the target vector cluster is obtained. If the vector distance between the first person feature vector and the cluster center vector of the target cluster is greater than the maximum value among the vector distances between all second person spatiotemporal feature vectors in the target vector cluster and the cluster center vector in the target vector cluster, it means that the first person feature vector is not within the reasonable distribution range of the target vector cluster. Therefore, the first person feature vector cannot be assigned to any target vector cluster. Otherwise, it means that the first person feature vector is within the reasonable distribution range of the target vector cluster. Therefore, the first person feature vector can be assigned to the target vector cluster. This avoids the risk of misjudgment caused by classification based on a fixed threshold, effectively prevents abnormal or new behaviors from being misclassified, and improves the accuracy of classification judgment.
[0081] This invention provides a smart power supply system for campuses. The system includes a processor and a memory storing a computer program. When the computer program is executed by the processor, the following steps are implemented: 1. Obtaining key feature vector groups corresponding to independent power consumption areas within each future time slice corresponding to the current time point; 2. Key feature vector groups include a first spatiotemporal feature vector of personnel and a first feature vector of electricity consumption influencing factors; 3. The first spatiotemporal feature vector of personnel represents the distance between the electricity-consuming personnel and the independent power consumption area within each sub-time slice of the corresponding future time slice; 4. Obtaining the target historical time slice corresponding to each key feature vector group based on the comprehensive vector similarity between the historical feature vector group corresponding to the independent power consumption area and each key feature vector group within each initial historical time slice corresponding to the current time point; 5. Taking the average historical electricity consumption of all target historical time slices corresponding to the key feature vector group as the predicted electricity consumption of the future time slice corresponding to the key feature vector group; 6. Sending a prompt message to the electricity-consuming personnel when the difference between the remaining electricity consumption of the current independent area and the sum of the predicted electricity consumption of all future time slices is not greater than a preset electricity consumption difference. As can be seen, this invention constructs a first spatiotemporal feature vector of personnel based on the distance between the electricity user and the independent electricity consumption area within each sub-time slice of the future time slice. This vector is then combined with a first feature vector of electricity consumption influencing factors to form a multi-dimensional key feature vector group. For each key feature vector group, a target historical time slice is matched based on the comprehensive vector similarity between the key feature vector group and the historical feature vector group. The average historical electricity consumption of all target historical time slices is considered as the predicted electricity consumption of the corresponding future time slice. In obtaining the predicted electricity consumption of the future time slice, the spatiotemporal features of personnel are effectively integrated, significantly improving the accuracy of the predicted electricity consumption. Furthermore, when the difference between the remaining electricity in the current independent electricity consumption area and the sum of the predicted electricity consumption of all future time slices does not exceed a preset electricity difference, a prompt message is sent to the electricity user, which can reduce false alarms or missed alarms and improve the reliability of the early warning.
[0082] While specific embodiments of the invention have been described in detail by way of examples, those skilled in the art should understand that the examples are for illustrative purposes only and are not intended to limit the scope of the invention. Those skilled in the art should also understand that various modifications can be made to the embodiments without departing from the scope and spirit of the invention.
Claims
1. A smart power supply system for campuses, characterized in that, The system includes a processor and a memory storing a computer program. When the computer program is executed by the processor, the following steps are performed: S1. Obtain the i-th future time slice T corresponding to the current time point Q. i Within the campus, the key feature vector group A corresponding to the independent power consumption areas. i =(A i1 A i2 ); 1≤i≤n, where n is the number of future time slices corresponding to Q; A i1 For A i The first spatiotemporal feature vector of the person in T is used to represent the spatiotemporal feature vector of the person in T. i Within each sub-time slice, the distance between the electricity user and the independent electricity area corresponding to the independent electricity area; A i1 Through the electricity user at T i The schedule and location of the corresponding courses are obtained; A i2 For A i The first characteristic vector of electricity consumption influencing factors; S2. Based on the historical feature vector group corresponding to the independent electricity consumption area in each of the several initial historical time slices corresponding to Q, obtain A. i Corresponding to several target historical time slices; A i The corresponding historical feature vector set of the target historical time slice and A i The overall vector similarity between them is not less than a preset similarity threshold; the historical feature vector group includes the second personnel spatiotemporal feature vector and the second electricity consumption influencing factor feature vector; S3, when B-∑ n i=1 C i When D is less than or equal to 0, a notification message is sent to the electricity user; B represents the remaining electricity consumption corresponding to the current independent electricity consumption area; C represents the remaining electricity consumption. i For A i The average historical electricity consumption of all target historical time slices; historical electricity consumption is the electricity consumed by the independent electricity consumption area within the target historical time slice; D is the preset electricity difference.
2. The campus intelligent power supply system according to claim 1, characterized in that, Step S1 includes the following steps: S11, Obtain T i The corresponding sub-time slice list E i =(E i1 E i2 , ..., E ij , ..., E im ); E ij For T i The j-th sub-time slice included; 1≤j≤m, where m is the number of sub-time slices included in each future time slice; S12, Obtain T i The course schedule information list F for the electricity users mentioned above i =(F i1 F i2 F ie F if(i) ), F ie =(F ie1 F ie2 );F ie For T i The e-th course K corresponding to the electricity user mentioned above ie Course schedule information; 1≤e≤f(i); f(i) is T i The number of courses corresponding to the electricity users mentioned above; F ie1 For K ie The corresponding teaching time slot; F ie2 For K ie Location information of the corresponding teaching location; S13, Regarding E ij If F i There exists an F ie E 1 ij ≥F 1 ie1 And E 2 ij ≤F 2 ie1 Then based on F ie2 Get K ie The distance between the corresponding teaching location and the independent power consumption area is used as A. (i1,j) Otherwise, let A (i1,j) =0, to obtain A i1 E 1 ij For E ij The starting time point, E 2 ij For E ij The end time point; F 1 ie1 For F ie1 The starting time point, F 2 ie1 For F ie1 The end time point; A (i1,j) For A i1 The j-th component.
3. The campus intelligent power supply system according to claim 2, characterized in that, Step S1 also includes the following steps: S101, Obtain T i The corresponding list of power consumption impact values G i =(G i1 G i2 , ..., G ik , ..., G it );G ik For the k-th preset electricity consumption influencing factor in T i The corresponding electricity consumption impact value; 1≤k≤t, where t is the number of preset electricity consumption impact factors; S102, G ik Perform feature encoding to obtain G ik The corresponding eigenvector H ik ; S103, H i1 H i2 H ik H it Concatenate the vectors sequentially to obtain A. i2 .
4. The campus intelligent power supply system according to claim 3, characterized in that, Step S2 includes the following steps: S21. Obtain the historical feature vector set R = {R1, R2, ..., R...} corresponding to the independent electricity consumption area. g , ..., R h }, R g =(R g1 R g2 ); R g For the g-th initial historical time slice corresponding to Q, the historical feature vector group corresponding to the independent power consumption area, 1≤g≤h, where h is the number of initial historical time slices corresponding to Q; R g1 For R g The second person's spatiotemporal feature vector in R; g2 For R g The second characteristic vector of electricity consumption influencing factors; S22, Obtain A i With R g The comprehensive vector similarity L between them ig L ig Meets the following conditions: L ig =α i ×X 1 ig +(1-α i )×X 2 ig ;α i For A i1 Corresponding importance weight; X 1 ig For A i1 With R g1 Vector similarity between them; X 2 ig For A i2 With R g2 Vector similarity between them; S23, if L ig ≥L 0 Then R g The corresponding initial historical time slice is A i Corresponding target historical time slice; L 0 This is a preset similarity threshold.
5. The campus intelligent power supply system according to claim 4, characterized in that, 0≤X 1 ig ≤1, X 1 ig The larger A is i1 With R g1 The more similar; 0≤X 2 ig ≤1, X 2 ig The larger A is i2 With R g2 The more similar they are.
6. The campus intelligent power supply system according to claim 4, characterized in that, 0<α i ≤0.5。 7. The campus intelligent power supply system according to claim 4, characterized in that, 0.7≤L 0 ≤1。 8. The campus intelligent power supply system according to claim 4, characterized in that, In steps S11-S13, according to E i Get A 1i In the same way, based on the list of sub-time slices corresponding to the g-th initial historical time slice corresponding to Q, obtain R. g1 The method for dividing the sub-time slices corresponding to the initial historical time slice is consistent with the method for dividing the sub-time slices corresponding to the future time slice.
9. The campus intelligent power supply system according to claim 4, characterized in that, In steps S101-S103, according to G i Get A i2 In the same manner, based on the list of electricity consumption impact values corresponding to the g-th initial historical time slice corresponding to Q, obtain R. g2 .
10. The campus intelligent power supply system according to claim 1, characterized in that, The notification message is used to remind the electricity user that they need to replenish the electricity.