A method and device for generating a power consumption portrait of a single-phase smart power meter
By calculating the average and difference power values of single-phase smart meters, the similarity of changes in electricity consumption curves is determined, solving the problem of constructing accurate user profiles in the power industry and achieving accuracy in electricity consumption profiles and precision in product recommendations.
Patent Information
- Application Number
- CN202511523042.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-23
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2045-10-23
AI Technical Summary
Existing technologies struggle to build accurate user profiles that can dynamically adapt to different business needs, resulting in inefficiencies in precision marketing and in-depth data insights within the power industry.
By acquiring power data and timestamps from single-phase smart meters, the average and difference of power during the hourly time period are calculated to determine the similarity of changes in the electricity consumption curves, and the electricity consumption profile with the highest similarity is selected as the target electricity consumption profile.
Accurately identifying users' electricity consumption profiles reduces the impact of electricity fluctuations, improves the accuracy of product recommendations, and enhances the operational efficiency of the power industry.
Smart Images

Figure CN120996913B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computers, in particular to a method and device for generating a power consumption portrait of a single-phase smart power meter. BACKGROUND
[0002] In the process of the power industry moving towards digitization and refinement, the user power consumption portrait is the core asset for realizing accurate marketing and deep data insight. In the face of an increasingly diversified product system (such as peak-valley electricity prices, electric vehicle charging discounts, smart home packages, etc.), different business scenarios have put forward differentiated requirements for the dimensions and accuracy of the user portrait. Therefore, building an accurate user portrait that can dynamically adapt to different business needs has become a key challenge for the industry to improve operational efficiency and service quality. SUMMARY
[0003] Therefore, the embodiments of the present application provide a method and device for generating a power consumption portrait of a single-phase smart power meter to accurately obtain the power consumption portrait of a user.
[0004] In a first aspect, the embodiments of the present application provide a method for generating a power consumption portrait of a single-phase smart power meter, which comprises:
[0005] acquiring power collected by a target single-phase smart power meter according to a preset collection period and a timestamp corresponding to the power;
[0006] after determining that the power of a preset number of days is acquired according to the timestamp, calculating a first power average of each whole hour time period within the preset number of days;
[0007] calculating a first difference between the first power averages of adjacent whole hour time periods;
[0008] determining a change similarity between the first difference and a second difference corresponding to a second power average of each whole hour time period according to a change between the first difference and the second difference of a target preset power consumption portrait;
[0009] after obtaining the change similarity corresponding to each preset power consumption portrait of the target single-phase smart power meter, determining a preset power consumption portrait corresponding to the highest similarity, and taking the preset power consumption portrait corresponding to the highest similarity as the power consumption portrait of the target single-phase smart power meter.
[0010] In a second aspect, the embodiments of the present application provide a device for generating a power consumption portrait of a single-phase smart power meter, which comprises:
[0011] an acquisition unit configured to acquire power collected by a target single-phase smart power meter according to a preset collection period and a timestamp corresponding to the power;
[0012] The first calculation unit is configured to calculate, after determining the power collected in the preset number of days according to the time stamp, a first power average in each whole hour time period in the preset number of days;
[0013] The second calculation unit is configured to calculate a first difference between the first power averages of adjacent whole hour time periods.
[0014] The third calculation unit is configured to determine a change similarity between the first difference and a second difference corresponding to a change in the second power average of each whole hour time period according to the first difference and the second difference corresponding to the change in the second power average of each whole hour time period of the target preset power consumption profile.
[0015] The determination unit is configured to determine the preset power consumption profile corresponding to the highest similarity after obtaining the change similarity corresponding to each preset power consumption profile of the target single-phase smart electric energy meter, and take the preset power consumption profile corresponding to the highest similarity as the power consumption profile of the target single-phase smart electric energy meter.
[0016] The technical scheme provided in the present application includes but is not limited to the following beneficial effects:
[0017] In the present application, after obtaining the power collected in the preset number of days by the target single-phase smart electric energy meter, the first power average in each whole hour time period in a day is calculated. The first power average can reduce the data fluctuation caused by the burst of user power consumption. Then, the first difference between the first power averages of adjacent whole hour time periods is calculated. The first difference can represent the slope change of the user power consumption curve, which is convenient for subsequent shape comparison and reduces the influence of numerical values on similarity. Then, the change similarity between the first difference and the second difference corresponding to the slope change of the power consumption curve corresponding to the target preset power consumption profile is determined according to the change between the first difference and the second difference. The preset power consumption profile corresponding to the highest similarity in the change similarity corresponding to each preset power consumption profile of the target single-phase smart electric energy meter is taken as the power consumption profile of the target single-phase smart electric energy meter. The power consumption profile of the user can be determined relatively accurately through the above method, thereby providing a recommendation basis for subsequent product recommendation.
[0018] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the following preferred embodiments are described in detail below, and the accompanying drawings are described as follows. BRIEF DESCRIPTION OF DRAWINGS
[0019] In order to more clearly illustrate the technical scheme of the embodiments of the present application, the following will briefly introduce the drawings needed in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.
[0020] Figure 1 A flowchart of a method for generating a power consumption portrait of a single-phase smart electric energy meter according to an embodiment of the present application is shown in FIG. 1.
[0021] Figure 2 A flowchart of another method for generating a power consumption portrait of a single-phase smart electric energy meter according to an embodiment of the present application is shown in FIG. 2.
[0022] Figure 3 A structural diagram of a device for generating a power consumption portrait of a single-phase smart electric energy meter according to an embodiment of the present application is shown in FIG. 3. DETAILED DESCRIPTION
[0023] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the following will be combined with the accompanying drawings for the embodiments of the present application to make a clear and complete description of the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the accompanying drawings can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.
[0024] It needs to be noted in advance that a single-phase smart electric energy meter is generally used by a family, so a single-phase smart electric energy meter represents a family. Since a single-phase smart electric energy meter is bound to a user, a single-phase smart electric energy meter also represents a user. Therefore, a single-phase smart electric energy meter, a family and a user are equally described.
[0025] Figure 1 A flowchart of a method for generating a power consumption portrait of a single-phase smart electric energy meter according to an embodiment of the present application is shown in FIG. 1. Figure 1 As shown in FIG. 1, the generating method includes the following steps:
[0026] Step 101, acquiring power collected by a target single-phase smart electric energy meter according to a preset collection period and a timestamp corresponding to the power.
[0027] Step 102, after determining that the power in a preset number of days is acquired according to the timestamp, calculating a first power average in each whole hour time period in the preset number of days.
[0028] Step 103, calculating a first difference between the first power averages of adjacent whole hour time periods.
[0029] Step 104, according to the first difference value and the target preset power consumption image, the change between the second difference value corresponding to the second power mean value of each integral point time period is determined, and the change similarity between the first difference value and the second difference value is determined.
[0030] Step 105, after obtaining the change similarity corresponding to each preset power consumption image of the target single-phase smart electric energy meter, the preset power consumption image corresponding to the highest similarity is determined, and the preset power consumption image corresponding to the highest similarity is taken as the power consumption image of the target single-phase smart electric energy meter.
[0031] Specifically, in order to reduce the influence of the power consumption fluctuation caused by the excessive or insufficient power consumption of the user in a certain period of time, a certain amount of power needs to be obtained, and each power has a time stamp when collected, so that the power in a preset number of days (for example, three days) can be selected according to the time stamp, and then the first power mean value of each integral point time period in the preset number of days is calculated, for example, the average value of the power of 0-1 o'clock of the first day, 0-1 o'clock of the second day and 0-1 o'clock of the third day is calculated, and the first power mean value of the integral point time period of 0-1 o'clock is obtained. Similarly, the first power mean value of the integral point time period of 1-2 o'clock can be obtained, and so on, and the first power mean value of 24 integral point time periods can be obtained.
[0032] After obtaining the first power mean value of each integral point time period in a day, the first difference value between the first power mean values of adjacent integral point time periods is calculated, so that the change slope of adjacent integral point time periods can be determined, and further, the first difference value can represent the slope of the power curve between adjacent integral point time periods in the power curve composed of the first power mean values of each integral point time period.
[0033] The application also needs to preset the second power mean value of each power consumption image in each integral point time period, and for each preset power consumption image, the second difference value between adjacent integral point time periods of the user image is determined. The preset multiple power consumption images include but are not limited to the power consumption image of high-peak office worker family, the power consumption image of intermittent low-consumption family, the power consumption image of home stability family, the power consumption image of night shift family, the power consumption image of vacant house and the power consumption image of abnormal power consumption family, etc. Taking the power consumption image of high-peak office worker family as an example, the second power mean value of each integral point time period includes the second power mean value of 0-1 o'clock, the second power mean value of 1-2 o'clock, and the second power mean value of 23-24 o'clock.
[0034] Then the curves of the sequence corresponding to the first difference value and the curves of the sequence corresponding to the second difference value are compared to determine the change between them, that is, the similarity of the change rule of the curve shape, so as to obtain the change similarity between the first difference value and the second difference value. After obtaining the change similarity corresponding to the target single-phase smart electric energy meter and each preset electricity image, the preset electricity image corresponding to the highest similarity can be determined, which indicates that the electricity consumption rule of the preset electricity image corresponding to the highest similarity is the same as the electricity consumption rule of the user corresponding to the target single-phase smart electric energy meter, avoiding the influence of the electricity consumption value on the similarity. For example, when the electricity consumption of a certain user is much larger than the electricity consumption of a certain preset electricity image, but the shapes of their electricity consumption curves are similar, the above method compares the slope change of the curve, not the original electricity consumption value. For the slope change of the curve, attention is paid to when the electricity consumption starts to rise, when the peak value is reached and starts to decline, etc. The absolute value of the electricity consumption is not sensitive, and the noise resistance is strong. Finally, the preset electricity image with the most similar electricity consumption curve change of the user can be determined, so as to obtain the electricity image of the target single-phase smart electric energy meter.
[0035] For example, the user corresponding to the target single-phase smart electric energy meter is user A, and the preset electricity image is the electricity image of a high-peak office worker family, hereinafter referred to as user B. It is known that user B includes 24 second power mean values of integral point time periods. After obtaining the first power mean values of user A in the 24 integral point time periods, the first difference value of the first power mean values of adjacent integral point time periods of user A is calculated, and 23 first difference value sequences can be obtained. The second difference value of the second power mean values of adjacent integral point time periods of user B is calculated, and 23 second difference value sequences can be obtained. Then, the change similarity of user A and user B is determined by comparing and analyzing the change of the 23 first difference value sequences and the 23 second difference value sequences. After obtaining the change similarity of user A and multiple user B, the electricity image of user B corresponding to the highest similarity is determined as the electricity image of user A.
[0036] In this application, after obtaining the power of the target single-phase smart energy meter for a preset number of days, the first power average value is calculated for each hourly time period during the day. The first power average value can reduce data fluctuations caused by sudden changes in user electricity consumption. Then, the first difference between the first power average values of adjacent hourly time periods is calculated. The first difference can characterize the slope change of the user's electricity consumption curve, which facilitates subsequent shape comparison and reduces the influence of numerical values on similarity. Then, the change between the first difference and the second difference corresponding to the slope change of the electricity consumption curve corresponding to the target preset electricity consumption profile is used to determine the change similarity between the first difference and the second difference. The preset electricity consumption profile corresponding to the highest similarity among the change similarities between the target single-phase smart energy meter and each preset electricity consumption profile is taken as the electricity consumption profile of the target single-phase smart energy meter. Through the above method, the user's electricity consumption profile can be determined relatively accurately, thereby providing a recommendation basis for subsequent product recommendations.
[0037] In a feasible implementation plan Figure 2 This is a flowchart illustrating another method for generating an electricity consumption profile for a single-phase smart energy meter provided in this application embodiment. During step 104, as follows... Figure 2 As shown, the method includes the following steps:
[0038] Step 201: Based on the Euclidean distance between each first difference and each second difference, construct a distance matrix in chronological order.
[0039] Step 202: Calculate the cost matrix according to Formula 1:
[0040] Formula 1
[0041] in, Indicates the position of the distance matrix at the th position. Line number The first element of the column, This represents the second element in the distance matrix that is directly above the first element. This represents the third element in the distance matrix that is adjacent to the left of the first element. The fourth element in the distance matrix is located directly above the third element. The boundary conditions of the cost matrix are: , , .
[0042] Step 203: Based on the position of each element in the cost matrix, determine each cost path from the last element to the first element in the cost matrix.
[0043] Step 204: For each cost path, calculate the sum of the elements on that cost path.
[0044] Step 205, determining a first minimum sum value from the sum values corresponding to each cost path, and taking the first minimum sum value as the change similarity.
[0045] For example, when the first difference value includes A1 and A2, and the second difference value includes B1, B2 and B3, the Euclidean distances between A1 and B1, B2 and B3 are calculated respectively, and the Euclidean distances between A2 and B1, B2 and B3 are calculated respectively, so that a distance matrix of 2 rows and 3 columns can be obtained. Each Euclidean matrix can be an element in the distance matrix, so the elements in the distance matrix include 6, as follows:
[0046]
[0047] The distance matrix is as follows:
[0048]
[0049] Then, the cost matrix is calculated according to Formula One, wherein, , , The other elements in the cost matrix are determined according to Formula One. In the calculation process, the cost matrix can be filled step by step from the of the distance matrix, so that a cost matrix with the same number of rows and columns as the distance matrix can be obtained.
[0050] Any element in the cost matrix represents the minimum cumulative distance (cost) obtained after the optimal alignment of the first i difference values in the sequence to the first j difference values in the second sequence. For example, the sequence of the first difference value is A', which includes 3 and 2, and the sequence of the second difference value is B', which includes 2, 1 and 4. The filled cost matrix is as follows:
[0051]
[0052] D(1,1)=1;
[0053] The corresponding subsequence: the first 1 point of A' is [3], and the first 1 point of B' is [2];
[0054] D(1,1) represents the minimum cost of aligning the two single nodes [3] and [2]. Since there is only one point pair, the cost is the local distance d(1,1)=1. This path is unique and determined.
[0055] D(1,2)=5;
[0056] Corresponding subsequence: A's first 1 point: [3], B's first 2 points: [2, 1];
[0057] D(1,2) represents the minimum cost of aligning [3] with [2, 1], since A' has only one point, it must match multiple points of B', the path can only be: (1,1)->(1,2), total cost = cost of matching (1,1) + cost of matching (1,2) = d(1,1) + d(1,2) = 1 + 4 = 5. This cost is high (5) because one point 3 of A' has to explain the trend of two points of B' (2->1), which is very difficult to match perfectly.
[0058] D(1,3) = 6;
[0059] Corresponding subsequence: A's first 1 point: [3], B's first 3 points: [2, 1, 4];
[0060] D(1,3) represents the minimum cost of aligning [3] with [2, 1, 4], the path is (1,1)->(1,2)->(1,3), total cost = d(1,1) + d(1,2) + d(1,3) = 1 + 4 + 1 = 6. The cost is even higher (6) because it is even more difficult to make one point match the trend of three points.
[0061] D(2, 2) = 2;
[0062] Corresponding subsequence: A's first 2 points: [3, 2], B's first 2 points: [2, 1];
[0063] This is the first selected cell. It calculates the minimum cost among all possible ways of aligning [3, 2] and [2, 1].
[0064] Path 1 (↖):(1,1)->(2,2), cost = D(1,1) + d(2,2) = 1 + 1 = 2;
[0065] Path 2 (↑):(1,1)->(1,2)->(2,2), cost = D(1,2) + d(2,2) = 5 + 1 = 6;
[0066] Path 3 (←):(1,1)->(2,1)->(2,2), cost = D(2,1) + d(2,2) = 1 + 1 = 2;
[0067] min(2,6,2) = 2;
[0068] The cost of the optimal path is 2. This indicates that the two sequences [3, 2] and [2, 1] have some similarity in shape, but not complete agreement.
[0069] D(2,3) = 6;
[0070] Corresponding subsequences: first 2 points of A': [3, 2] (whole sequence A'), first 3 points of B': [2, 1, 4] (whole sequence B');
[0071] This is the ultimate goal, which represents the minimum cumulative cost after the optimal dynamic alignment of the whole sequence A' and the whole sequence B', which is calculated by D(2,3) = d(2,3) + min(D(1,3), D(2,2), D(1,2)) = 4 + min(6, 2, 5) = 4 + 2 = 6.
[0072] This value 6 is the final distance between the two complete sequences. It is composed of the optimal solution of a previous subproblem (D(2,2) = 2) plus the matching cost of the current point (d(2,3) = 4). The size of this value itself is not important, what matters is which template calculates a smaller value when comparing multiple templates.
[0073] The filling process of the cost matrix is to solve all subproblems from bottom to top, and the value of each cell D(i,j) depends on and only on the optimal solutions of its left (i,j-1), upper (i-1,j) and upper-left (i-1,j-1) subproblems. The final answer pursued by the entire algorithm is the value of the right-bottom element of the cumulative cost matrix D. It contains the information of the optimal solutions of all previous subproblems, which finally converges into the global optimal solution.
[0074] After obtaining the cost matrix, it is necessary to backtrack to find the optimal alignment path, which is from the last element in the cost matrix (usually located in the right-bottom corner of the matrix) to the first element in the distance matrix (usually located in the left-top corner of the matrix). A path with the smallest total cumulative cost is found, and the smaller the cumulative cost, the smaller the total cost required to optimally align the shapes of the two original curves. The smaller the value, the more similar the shapes of the two curves. Therefore, the first minimum sum value, i.e. the change similarity, can be determined by the above method.
[0075] In a feasible implementation, when step 105 is performed, after obtaining the first minimum sum value corresponding to each preset power consumption image of the target single-phase smart electric energy meter, a second minimum sum value is selected from the first minimum sum values corresponding to each preset power consumption image, and the preset power consumption image corresponding to the second minimum sum value is taken as the power consumption image of the target single-phase smart electric energy meter.
[0076] Specifically, for each preset power consumption image, the first minimum sum value of the preset power consumption image and the target single-phase smart power meter represents the similarity between the power consumption of the target single-phase smart power meter and the preset image, and the second minimum sum value determined by comparing each first minimum sum value represents that the power consumption of the target single-phase smart power meter is most similar to the power consumption of the user image corresponding to the second minimum sum value. Therefore, the preset power consumption image corresponding to the second minimum sum value can be determined as the power consumption image of the target single-phase smart power meter. In the above manner, the preset power consumption image most similar to the power consumption of the target single-phase smart power meter can be selected from a plurality of preset power consumption images, so that the obtained power consumption image of the target single-phase smart power meter has high accuracy.
[0077] In a feasible implementation, when performing the step of constructing the distance matrix according to the Euclidean distance between each first difference value and each second difference value in chronological order, the element in the i-th row and the j-th column of the distance matrix can be calculated according to Formula Two as follows:
[0078] Formula Two
[0079] wherein, is the first difference value, is the second difference value.
[0080] Then, the obtained elements are arranged in chronological order to obtain the distance matrix.
[0081] In a feasible implementation, when there are multiple recommended contents, the recommended content configured for the user image of the target single-phase smart power meter is sent to the mobile device bound to the target single-phase smart power meter, so that the recommendation hit rate can be improved.
[0082] Figure 3 FIG. 1 is a structural schematic diagram of a power consumption image generation device of a single-phase smart power meter according to an embodiment of the present application. As shown in FIG. 1, the device comprises: Figure 3
[0083] An acquisition unit 31 is configured to acquire power collected by a target single-phase smart power meter according to a preset collection period and a timestamp corresponding to the power.
[0084] A first calculation unit 32 is configured to, after determining that power in a preset number of days is acquired according to the timestamp, calculate a first power mean value of each whole point time period in the preset number of days.
[0085] A second calculation unit 33 is configured to calculate a first difference value between first power mean values of adjacent whole point time periods.
[0086] The third calculation unit 34 is configured to determine a change similarity between the first difference and a second difference corresponding to a change between second power averages of each whole point time period according to the first difference and the second difference corresponding to the second power averages of each whole point time period of the target preset power consumption image.
[0087] The determination unit 35 is configured to determine a preset power consumption image corresponding to a highest similarity after obtaining the change similarity corresponding to each preset power consumption image of the target single-phase smart electric energy meter, and take the preset power consumption image corresponding to the highest similarity as the power consumption image of the target single-phase smart electric energy meter.
[0088] In a feasible implementation, when the third calculation unit is configured to determine the change similarity between the first difference and the second difference corresponding to the change between the second power averages of each whole point time period according to the first difference and the second difference corresponding to the second power averages of each whole point time period of the target preset power consumption image, the third calculation unit comprises:
[0089] According to the Euclidean distance between each first difference and each second difference, a distance matrix is constructed in chronological order.
[0090] The cost matrix is calculated according to the following formula:
[0091] ;
[0092] wherein, denotes a first element in the distance matrix located in the i th row and the j th column, denotes a second element in the distance matrix located directly above the first element, denotes a third element in the distance matrix located adjacent to the left of the first element, denotes a fourth element in the distance matrix located directly above the third element, and the boundary condition of the cost matrix is: , , ; According to the positions of each element in the cost matrix, each cost path from the last element to the first element in the cost matrix is determined.
[0093] For each cost path, the sum value of each element on the cost path is calculated.
[0094] The first minimum sum value is determined from the sum values corresponding to each cost path, and the first minimum sum value is taken as the change similarity.
[0095] The first minimum sum value is determined from the sum values corresponding to each cost path, and the first minimum sum value is taken as the change similarity.
[0096] In an implementable embodiment, the third computing unit is configured to, after obtaining the variation similarity of the target single-phase smart electric energy meter and each preset power consumption profile, determine the preset power consumption profile corresponding to the highest similarity, and when the preset power consumption profile corresponding to the highest similarity is taken as the power consumption profile of the target single-phase smart electric energy meter, the method comprises the following steps:
[0097] After obtaining the first minimum sum value of the target single-phase smart electric energy meter and each preset power consumption profile, the second minimum sum value is selected from the first minimum sum value of each preset power consumption profile, and the preset power consumption profile corresponding to the second minimum sum value is taken as the power consumption profile of the target single-phase smart electric energy meter.
[0098] In an implementable embodiment, when the third computing unit is configured to construct a distance matrix according to the Euclidean distance between each first difference value and each second difference value in chronological order, the method comprises the following steps:
[0099] The element in the i-th row and the j-th column of the distance matrix is calculated according to the following formula:
[0100] ;
[0101] wherein, the first difference value is denoted as di, j, and the second difference value is denoted as d j.
[0102] The obtained elements are arranged in chronological order to obtain the distance matrix.
[0103] In an implementable embodiment, the device further comprises:
[0104] A recommendation unit configured to send the recommended content configured for the user profile of the target single-phase smart electric energy meter to the mobile device bound to the target single-phase smart electric energy meter.
[0105] The principle of the related content can be referred to the related explanations of Figure 3 and Figure 1 , which will not be described in detail here. Figure 2
[0106] In the embodiments of the present application, it should be understood that the disclosed apparatus and method can be implemented in other manners. The embodiments described above are merely exemplary, for example, the division of the units is only a logical function division, and there can be another division manner in actual implementation; for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections can be indirect couplings or communication connections through some interfaces, and electrical, mechanical or other forms.
[0107] The units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purposes of the embodiments.
[0108] In addition, each functional unit in the embodiments of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit.
[0109] If the functions are implemented in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the parts that make contributions to the prior art or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0110] It should be noted that: similar reference numerals and letters in the following drawings represent similar items, and therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. In addition, the terms "first", "second", "third" and the like are only used to distinguish descriptions, and cannot be understood as indicating or implying relative importance.
[0111] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present application, and are used to illustrate the technical solutions of the present application, but not to limit the same. The protection scope of the present application is not limited thereto. Although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those skilled in the art that any person skilled in the art can make modifications or easily think of changes to the technical solutions recorded in the foregoing embodiments, or make equivalent replacements to some of the technical features within the technical scope disclosed by the present application. The modifications, changes or replacements do not cause the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application. All of them should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method for generating a power consumption portrait of a single-phase smart electricity meter, characterized in that, The method comprises: acquiring power collected by a target single-phase smart electric energy meter according to a preset collection period and a timestamp corresponding to the power; after determining that the power of a preset number of days is acquired according to the timestamp, calculating, for each whole point time period within the preset number of days, a first power average value of the whole point time period within the preset number of days; calculating a first difference value between the first power average values of adjacent whole point time periods; constructing a distance matrix according to the Euclidean distances between the first difference values and second difference values corresponding to second power average values of the target preset power consumption image at the whole point time periods in chronological order; calculating a cost matrix according to the following formula: ; wherein, denotes a first element of the distance matrix located in the row and the column, denotes a second element of the distance matrix located directly above the first element, denotes a third element of the distance matrix located adjacent to the left of the first element, denotes a fourth element of the distance matrix located directly above the third element, the boundary conditions for the cost matrix are: ; in , , in , ; determining, according to positions of elements in the cost matrix, each cost path from the last element to the first element in the cost matrix; for each cost path, calculating a sum value of elements on the cost path; determining a first minimum sum value from the sum values corresponding to the cost paths, and taking the first minimum sum value as a change similarity between the first difference values and the second difference values; after obtaining the change similarities corresponding to the target single-phase smart electric energy meter and each preset power consumption image, determining a preset power consumption image corresponding to the highest similarity, and taking the preset power consumption image corresponding to the highest similarity as the power consumption image of the target single-phase smart electric energy meter.
2. The generation method of claim 1, wherein, The method further comprises: after obtaining the first minimum sum values corresponding to the target single-phase smart electric energy meter and each preset power consumption image, selecting a second minimum sum value from the first minimum sum values corresponding to each preset power consumption image, and taking the preset power consumption image corresponding to the second minimum sum value as the power consumption image of the target single-phase smart electric energy meter.
3. The generation method of claim 1, wherein, The method further comprises: The element in the distance matrix at row i and column j is calculated according to the formula: d(i, j) = 1 - (cos(θ(i, j)) - 1) / (1 - cos(θ(i, j)) where ; wherein, is the first difference, is the second difference; arranging the obtained elements in chronological order to obtain the distance matrix.
4. The generation method of claim 1, wherein, The method further comprises: sending, to a mobile device bound to the target single-phase smart electric energy meter, recommended content configured for a user image of the target single-phase smart electric energy meter.
5. A power consumption portrait generating device of a single-phase smart electric energy meter, characterized in that, The device comprises: an acquisition unit configured to acquire power collected by a target single-phase smart electric energy meter according to a preset collection period and a timestamp corresponding to the power; a first calculation unit configured to, after determining that the power of a preset number of days is acquired according to the timestamp, calculate, for each whole point time period within the preset number of days, a first power average value of the whole point time period within the preset number of days; a second calculation unit configured to calculate a first difference value between the first power average values of adjacent whole point time periods; a third calculation unit configured to construct a distance matrix according to the Euclidean distances between the first difference values and second difference values corresponding to second power average values of the target preset power consumption image at the whole point time periods in chronological order, and to calculate a cost matrix according to the following formula: ; wherein, denotes a first element of the distance matrix located in the row and the column, denotes a second element of the distance matrix located directly above the first element, denotes a third element of the distance matrix located directly left of the first element, denotes a fourth element of the distance matrix located directly above the third element, the boundary conditions for the cost matrix are: ; in , , in , ; The third calculation unit is further configured to determine each cost path from the last element to the first element in the cost matrix according to positions of the elements in the cost matrix, calculate a sum value of the elements in each cost path, and determine a first minimum sum value from the sum values corresponding to the cost paths, so as to take the first minimum sum value as the change similarity between the first difference value and the second difference value. The determination unit is configured to determine a preset power consumption image corresponding to the highest similarity after obtaining the change similarity between the target single-phase smart electric energy meter and each preset power consumption image, and take the preset power consumption image corresponding to the highest similarity as the power consumption image of the target single-phase smart electric energy meter.
6. The generating device of claim 5, wherein, When the third calculation unit is configured to determine a preset power consumption image corresponding to the highest similarity after obtaining the change similarity between the target single-phase smart electric energy meter and each preset power consumption image, and take the preset power consumption image corresponding to the highest similarity as the power consumption image of the target single-phase smart electric energy meter, the third calculation unit comprises: After obtaining the first minimum sum value corresponding to the target single-phase smart electric energy meter and each preset power consumption image, the third calculation unit is configured to select a second minimum sum value from the first minimum sum values corresponding to the preset power consumption images, and take the preset power consumption image corresponding to the second minimum sum value as the power consumption image of the target single-phase smart electric energy meter.
7. The generating device of claim 5, wherein, When the third calculation unit is configured to construct a distance matrix according to the Euclidean distance between each first difference value and each second difference value in the order of time, the third calculation unit comprises: The element in the distance matrix at row i and column j is calculated according to the formula: d(i, j) = 1 - (cos(θ(i, j)) - 1) / (1 - cos(θ(i, j)) ) ; wherein, is the first difference, is the second difference; The third calculation unit is configured to arrange the obtained elements in the order of time to obtain the distance matrix.
8. The generating device of claim 5, wherein, The device further comprises: The recommendation unit is configured to send recommended content configured for the user image of the target single-phase smart electric energy meter to a mobile device bound to the target single-phase smart electric energy meter.
Citation Information
Patent Citations
Shared power utilization oriented multimode networking communication and selection method
CN107483560A
Method and device for calculating corrected electric quantity of electric energy meter, electronic equipment and storage medium
CN119646372A