A shared battery swap cabinet user behavior analysis method and system

By analyzing user behavior data of shared battery swapping stations, identifying and eliminating false high-frequency accesses, training a residual correction model, and generating a high-precision pre-charging scheduling scheme, the problem of resource allocation misalignment under user package interference was solved, and operational efficiency and resource utilization were improved.

CN122089026BActive Publication Date: 2026-07-21CHINA TOWER CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA TOWER CO LTD
Filing Date
2026-04-27
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing user behavior analysis methods for shared battery swapping cabinets struggle to capture hidden influencing factors when faced with complex changes in user behavior. This is especially true when user package status interferes with resource allocation, making it difficult to accurately identify the stability of battery swapping intervals and resulting in resource waste or idleness.

Method used

By extracting the timestamps of users' battery swapping operations, the remaining number of battery swaps in the package, and the expiration date, a user behavior dataset is formed. The consumption ratio is calculated, false high-frequency access is identified, the stability of access intervals is analyzed, the dataset is cleaned, and a support vector regression residual correction model is trained to correct the prediction residuals and generate a high-precision pre-charging scheduling scheme.

Benefits of technology

This improves the operational efficiency and resource utilization of the battery swapping cabinets, avoids resource scheduling errors caused by short-term abnormal behavior, and ensures that resource allocation is more in line with actual needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122089026B_ABST
    Figure CN122089026B_ABST
Patent Text Reader

Abstract

The application relates to the information technology field and provides a shared battery replacement cabinet user behavior analysis method and system. The method comprises the following steps: extracting an access timestamp, a remaining battery replacement number of a package and an expiration date from a user's successive battery replacement operation, synchronizing a time reference to form a user behavior data set, calculating a ratio of the remaining battery replacement number to the remaining days of each user in a package period, and marking the access timestamp of the user as an abnormal access record; evaluating the concentration and dispersion of the access intervals between the abnormal access records to obtain a false stability index, screening and removing the abnormal access records with false high-frequency access in the user behavior data set to obtain a purified behavior data set; inputting the purified behavior data set into an original demand prediction model of the battery replacement cabinet, calculating a prediction residual between an initial cabinet demand prediction value and an actual power taking demand, and updating the initial cabinet demand prediction value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information technology, and in particular to a method and system for analyzing user behavior of shared battery swapping cabinets. Background Technology

[0002] User behavior analysis of shared electric bicycle battery swapping stations in residential communities is crucial for improving user experience and optimizing operational efficiency. Accurately predicting user demand can effectively reduce resource waste, ensure sufficient battery supply during peak hours, and prevent excessive stockpiling during off-peak periods. However, existing analytical methods often struggle to capture hidden influencing factors when faced with complex changes in user behavior, especially when external conditions interfere with user behavior. These methods focus more on the apparent frequency and time distribution of battery swapping, neglecting the underlying driving reasons for behavior in certain specific contexts. This leads to significant discrepancies between predictions and actual demand, particularly at critical time points, where prediction errors can further amplify resource allocation misalignments. Battery swapping interval stability should be a key indicator of user behavior patterns; for example, regular users swapping batteries twice a week indicates high stability, while irregular users with fluctuating intervals indicate low stability. However, this indicator is easily affected by user subscription plans. For example, when a user's battery swapping plan has few remaining swaps and is nearing its expiration date, some users might suddenly switch from once a week to daily or even multiple swaps a day to avoid wasting swaps. This behavior appears as a sharp shortening of the interval in the data, seemingly a highly stable pattern, but it is actually a short-term anomaly, misleading users into believing it represents a sustained peak in demand. Once the plan expires, if the user doesn't renew, swapping activity will decrease sharply or even stop. Over-allocation of resources based on previously abnormal data leads to significant battery idleness in the swapping cabinets. Suppose a user's plan expires in three days, leaving five swapping opportunities. To avoid wasting swaps, the user might frequently visit the swapping cabinet every day, even swapping multiple times a day, creating the illusion of a surge in demand. However, once the plan expires, the user may not renew, swapping activity will decrease sharply, and cabinet resources, due to the previous misjudgment, will be over-allocated, resulting in idle resources. Therefore, it is crucial to accurately identify the true stability of swapping intervals under the influence of user plan expiration dates and avoid resource allocation errors caused by short-term behavioral anomalies. Summary of the Invention

[0003] To address the aforementioned technical problems, this invention provides a method for analyzing user behavior in shared battery swapping cabinets, mainly comprising: Extract the timestamp of the user's battery swapping operation, the remaining number of battery swaps in the package, and the expiration date, and then generate a user behavior dataset after synchronizing the time base. Calculate the ratio of the remaining number of battery swaps to the remaining days within each user's package cycle; User access records whose consumption ratio exceeds a preset threshold are identified as fake high-frequency accesses, and their access timestamps are marked as abnormal access records. By analyzing the concentration and dispersion of access intervals in abnormal access records, a false stability index is obtained. The purified behavior dataset is obtained by filtering and removing false high-frequency abnormal access records based on false stability indicators; Input the purified behavior dataset into the original demand prediction model, train the residual correction sub-model, and output the corrected prediction residual for the package expiration node. The cabinet demand forecast value is updated by correcting the forecast residual. If the consistency meets the preset threshold, the pre-charging scheduling scheme is output.

[0004] Furthermore, access timestamps, remaining battery swap counts, and expiration dates are extracted from each user's battery swap operation. After synchronizing with the time base, a user behavior dataset is formed, including: When a user performs a battery swap, the operation trigger time is recorded and converted into an access timestamp. At the same time, the remaining number of battery swaps and the expiration date of the user's current package are obtained to form an original access record containing the access timestamp, the remaining number of battery swaps, and the expiration date. Using the local clock of the battery swap cabinet as a time reference, the access timestamp in the original access record is calibrated. The calibrated access timestamp, together with the remaining number of battery swaps and the expiration date, are collected according to the user identifier to form the user behavior dataset.

[0005] Furthermore, based on the user behavior dataset, the ratio of each user's remaining battery swap times to remaining days within the package period is calculated, including: The remaining days of the corresponding package are calculated based on the expiration date and access timestamp of each record in the user behavior dataset. At the same time, the remaining number of battery swaps for that record is extracted. The remaining days and the remaining number of battery swaps are paired according to the user identifier. The remaining number of battery swaps is divided by the remaining days to obtain the consumption ratio of the remaining number of battery swaps to the remaining days.

[0006] Furthermore, a preset threshold upper limit is used to evaluate the consumption ratio, and user access records with a consumption ratio exceeding the threshold upper limit are identified as false high-frequency accesses, and their access timestamps are marked as abnormal access records, including: For each remaining battery swap count to remaining days, the ratio is compared with a preset threshold upper limit. Access records corresponding to consumption ratios exceeding the threshold upper limit are identified as potential false high-frequency access records. The potential false high-frequency access records are aggregated according to user identifiers to form a set of false high-frequency access records. The access timestamp of each record in the set of false high-frequency access records is labeled with an abnormal access tag to obtain abnormal access records.

[0007] Furthermore, based on abnormal access records, the access intervals between each abnormal access record are analyzed to assess the concentration and dispersion of the access intervals, resulting in spurious stability indices, including: Based on abnormal access records, all abnormal access timestamps of the same user are extracted and arranged in chronological order. The time difference between adjacent abnormal access timestamps is calculated to form an abnormal access interval sequence. For the abnormal access interval sequence, the arithmetic mean of all access intervals is calculated as the concentration quantification value. The sum of the squares of the differences between each access interval and the arithmetic mean is divided by the number of access intervals to obtain the access interval variance, which is used as the dispersion quantification value. The dispersion quantification value is divided by the concentration quantification value to obtain the spurious stability index.

[0008] Furthermore, based on the false stability index, abnormal access records containing false high-frequency accesses are filtered and removed from the user behavior dataset to obtain the purified behavior dataset, including: For each user, the earliest access timestamp in the user's abnormal access records is selected as the starting time point, and the remaining period days from the starting time point to the package expiration date are calculated. The remaining period days are compared with a preset period threshold, and the false stability index is also compared with a preset stability threshold. If the remaining period days are less than the preset period threshold and the false stability index is less than the preset stability threshold, the user's abnormal access records are determined to meet the period stability screening conditions. The user behavior dataset is traversed, and the abnormal access records of users who meet the period stability screening conditions are marked to form a set of records to be removed. All abnormal access records in the set of records to be removed are deleted from the user behavior dataset, and the remaining access records are retained to obtain the purified behavior dataset.

[0009] Furthermore, the purified behavioral dataset is input into the original demand prediction model of the battery swapping cabinet to obtain the initial cabinet demand prediction value. The prediction residual between the initial cabinet demand prediction value and the actual power demand is calculated. Based on the prediction residual and the purified behavioral dataset, the corrected prediction residual for the package expiration node is analyzed, including: The purified behavioral dataset is used to input the historical battery swapping frequency and time distribution features of users into the original demand prediction model to obtain the initial cabinet demand prediction value for the corresponding time period. Actual power demand data for the battery swapping cabinets is obtained, and the difference between the initial cabinet demand prediction value and the actual power demand is calculated to form a prediction residual sequence. Using the user access features in the purified behavioral dataset as input and the prediction residual sequence as output, a support vector regression model training sample is constructed. A radial basis function kernel is used, and the mean square error is minimized through gradient descent. A time decay factor that decreases with the number of days remaining until the package expiration date is added to the loss function to complete the training of the demand prediction residual correction sub-model. User access features near the package expiration date are input into the demand prediction residual correction sub-model to output the corrected prediction residual for the package expiration date.

[0010] Furthermore, the initial cabinet demand forecast values ​​of the original demand forecast model are updated using corrected forecast residuals. The degree of agreement between the updated cabinet demand forecast values ​​and the actual power demand is evaluated. If the degree of agreement meets a preset threshold, a pre-charging scheduling scheme is output, including: The corrected prediction residual is added to the initial cabinet demand prediction value by time period to obtain the updated cabinet demand prediction value; the relative deviation rate between the updated cabinet demand prediction value and the actual power demand is calculated, and the reciprocal of the relative deviation rate is used as the conformity quantification value; the conformity quantification value is compared with the preset conformity threshold value. When the conformity quantification value is greater than or equal to the conformity threshold value, the battery pre-charging quantity and charging start time are determined according to the predicted power consumption of each time period in the updated cabinet demand prediction value, forming a pre-charging scheduling scheme and outputting it.

[0011] A shared battery swapping cabinet user behavior analysis system includes: The extraction module extracts the timestamp of the user's battery swapping operation, the remaining number of battery swaps in the package, and the expiration date, and then generates a user behavior dataset after synchronizing the time base. The calculation module calculates the ratio of the remaining number of battery swaps to the remaining days within each user's package cycle; The identification module identifies user access records with a consumption ratio exceeding a preset threshold as false high-frequency access and marks their access timestamps as abnormal access records. The analysis module analyzes the concentration and dispersion of access intervals of abnormal access records to obtain a false stability index; based on the false stability index, it filters and removes false high-frequency abnormal access records to obtain a purified behavior dataset; the purified behavior dataset is input into the original demand prediction model to train the residual correction sub-model and outputs the package expiration node correction prediction residual. The output module updates the cabinet demand forecast value using the corrected prediction residual. When the consistency meets the preset threshold, it outputs the pre-charging scheduling scheme.

[0012] Furthermore, the extraction module extracts the access timestamp, remaining battery swap count, and expiration date from each user's battery swap operation, and forms a user behavior dataset after synchronizing the time base, including: When a user performs a battery swap, the operation trigger time is recorded and converted into an access timestamp. At the same time, the remaining number of battery swaps and the expiration date of the user's current package are obtained to form an original access record containing the access timestamp, the remaining number of battery swaps, and the expiration date. Using the local clock of the battery swap cabinet as a time reference, the access timestamp in the original access record is calibrated. The calibrated access timestamp, together with the remaining number of battery swaps and the expiration date, are collected according to the user identifier to form the user behavior dataset.

[0013] The technical solutions provided by the embodiments of the present invention may include the following beneficial effects: This invention discloses a user behavior analysis method for shared battery swapping cabinets. Addressing the problem of false, high-frequency user access behavior interfering with the accuracy of demand prediction in business scenarios, this invention first identifies abnormal access records by analyzing user package consumption ratios and further evaluates the stability of their time intervals to accurately eliminate false data, thereby purifying the behavior dataset. Based on this, this invention innovatively trains a support vector regression residual correction model. This model specifically introduces a time decay factor for package expiration nodes and uses gradient descent to optimize the correction of the original prediction residuals. Finally, the corrected residuals are used to update the initial demand prediction values, generating a more realistic and accurate pre-charging scheduling scheme, effectively improving the operational efficiency and resource utilization of the battery swapping cabinets. Attached Figure Description

[0014] Figure 1 This is a flowchart of a user behavior analysis method for a shared battery swapping cabinet according to the present invention.

[0015] Figure 2 This is a schematic diagram of a user behavior analysis method for shared battery swapping cabinets according to the present invention.

[0016] Figure 3 This is a flowchart of a user behavior analysis system for a shared battery swapping cabinet according to the present invention. Detailed Implementation

[0017] The technical solutions of the embodiments of the present invention will be clearly and thoroughly described below with reference to the accompanying drawings. The described embodiments are merely some embodiments of the present invention.

[0018] like Figure 1 This embodiment of a shared battery swapping cabinet user behavior analysis method may specifically include: S101. Extract the access timestamp, remaining battery swap count and expiration date from each user's battery swap operation, and form a user behavior dataset after synchronizing the time base.

[0019] The system retrieves the access records embedded in the battery swapping cabinet, extracts the trigger time for each battery swap operation performed by the user, and converts this time into a unified access timestamp format. Simultaneously, it calls an interface to extract the remaining battery swap attempts and expiration date of the current package from the user's bound account, obtaining a raw access record containing three fields: access timestamp, remaining battery swap attempts, and expiration date. Based on the access timestamp in the raw access record, using the local clock of the battery swapping cabinet as the time reference, if the difference between the access timestamp and the local clock exceeds a preset threshold, the access timestamp is calibrated to the corresponding time on the local clock. The calibrated access timestamp, along with the remaining battery swap attempts and expiration date, are then aggregated according to user identifiers to form a user behavior dataset.

[0020] In one embodiment, the access record collection unit is deployed on the control motherboard of the battery swapping cabinet. When a user triggers the battery swapping operation by swiping a card or scanning a code, the unit records the moment the operation is triggered in real time and converts the moment into an access timestamp in the format of year, month, day, hour, minute, and second.

[0021] While the user is performing the battery swap, a query request is sent to the server based on the user's bound account identifier. The server returns the remaining number of battery swaps and the expiration date of the user's current package. The reading unit matches the above information with the access timestamp to form an original access record containing three fields.

[0022] For example, if a user performs a battery swap operation on a certain afternoon, the time is captured and an access timestamp is generated. At the same time, the user's remaining battery swap times are obtained as eight, and the expiration date is the end of the current month. These three fields together constitute an original access record.

[0023] In one possible implementation, the local clock of the battery swapping cabinet is periodically synchronized with a standard time source using a network time protocol, and this serves as the time reference. When the difference between the access timestamp in the original access record and the local clock exceeds a preset threshold, the access timestamp is calibrated to the time corresponding to the local clock.

[0024] The calibrated access timestamps, remaining battery swap counts, and expiration dates are aggregated according to user identifiers. Multiple access records of the same user are arranged in chronological order to form a user behavior dataset. Each record in this dataset contains a calibrated access timestamp, the remaining battery swap counts at the corresponding time, and the package expiration date.

[0025] S102. Based on the user behavior dataset, calculate the ratio of the remaining number of battery swaps to the remaining days for each user within the package period.

[0026] Based on the expiration date and access timestamp of each access record in the user behavior dataset, the remaining days of the corresponding plan for that record are calculated. The remaining days are obtained by subtracting the access timestamp from the expiration date. Simultaneously, the remaining battery swap counts for that record are extracted. The remaining days and remaining battery swap counts are paired and grouped according to user identifiers to obtain the remaining status record for each user at each access time. For each remaining status record, the remaining battery swap counts are divided by the remaining days to obtain the consumption ratio for that user at the corresponding access time. The consumption ratios for each user within the plan period are arranged in order of access timestamps to form a user consumption ratio sequence. If the remaining days are zero, the consumption ratio of that record is marked as an outlier for further processing.

[0027] In one embodiment, the remaining days are calculated based on the difference between the expiration date and the date of the access timestamp. The expiration date is converted into a date format and then the date corresponding to the access timestamp is subtracted to obtain an integer value in days. This integer value is the remaining days of the package.

[0028] For example, if a user's package expires on the 20th of the month and the user performs a battery swap on the 15th of the month, then there are five days remaining. At the same time, the user's current package has ten remaining battery swaps. Dividing the remaining ten battery swaps by the remaining five days gives a consumption ratio of two. This consumption ratio represents the user's expected average daily battery swap frequency during the remaining period.

[0029] When the remaining days are zero, it means that the user will perform a battery swap on the day the package expires. In this case, the division operation cannot be performed, so the consumption ratio of this record is marked as an abnormal value and will be treated differently in subsequent processing.

[0030] In one possible implementation, multiple consumption ratios generated by the same user within the package period are arranged in chronological order of access timestamps to form a user consumption ratio sequence. Each element in the sequence corresponds to the user's consumption status at different access times. By observing the trend of changes in the consumption ratios in the sequence, the evolution pattern of the user's battery swapping behavior within the package period can be identified.

[0031] refer to Figure 2 S103. The consumption ratio is evaluated using a preset threshold upper limit. User access records whose consumption ratio exceeds the threshold upper limit are identified as false high-frequency accesses, and their access timestamps are marked as abnormal access records.

[0032] Based on the user consumption ratio sequence, the consumption ratios in the sequence are compared with a preset threshold upper limit. If the consumption ratio in the sequence exceeds the preset threshold upper limit, the access record corresponding to that consumption ratio is marked as a potential fake high-frequency access record. For each potential fake high-frequency access record, the user identifier and access timestamp are extracted. Multiple potential fake high-frequency access records for the same user are aggregated based on the user identifier to obtain a set of fake high-frequency access records divided by user. Based on the set of fake high-frequency access records, the access timestamp of each record in the set is labeled with an abnormal access tag. The abnormal access tag, user identifier, and access timestamp form an association field to obtain the abnormal access record.

[0033] In one embodiment, the upper limit of the threshold is set based on the consumption ratio distribution characteristics of users under normal battery swapping behavior. By collecting historical normal battery swapping behavior data, the mean μ and standard deviation σ of the consumption ratio are calculated, and then the upper limit of the threshold is set to μ + 2σ. For example, if μ = 1.0 and σ = 0.25, then the upper limit of the threshold is 1.5 to cover 95% of the normal distribution. Normal users have a relatively stable battery swapping frequency within the package period, and their consumption ratio usually remains at a low level. When users suddenly increase their battery swapping frequency due to the nearing expiration of their package, the consumption ratio will rise significantly and exceed the normal range.

[0034] For example, if a user has three days remaining on their data plan and nine battery swaps remaining, the consumption ratio at that moment is three. However, under normal circumstances, a user swaps batteries no more than once per day, with a threshold limit set at two. Therefore, this consumption ratio exceeds the threshold limit, and the corresponding access record is marked as a potentially fraudulent high-frequency access record. A potentially fraudulent high-frequency access record does not mean that the user's behavior itself is fraudulent, but rather that the access behavior is driven by the data plan expiring and lacks continuity and stability. Including such records in regular demand forecasting could lead to misjudgments of the demand for battery swapping station resources.

[0035] In one possible implementation, multiple potentially false high-frequency access records generated by the same user within the package period are aggregated according to user identifiers to form a set of false high-frequency access records per user. This set includes all user consumption ratio exceeding the threshold access records triggered by the user at different times, which facilitates the overall identification of abnormal access behavior of a single user.

[0036] The system can also extract the access timestamp of each record in the set of fake high-frequency access records and label it with an abnormal access tag. The abnormal access tag is in Boolean form, and the labeled access timestamp is associated with the user identifier to obtain the abnormal access record. The abnormal access tag in the abnormal access record is used to distinguish between normal access and abnormal access affected by the expiration of the package. Through this tag, different types of access records can be processed differently in subsequent processing, thereby improving the accuracy of battery swapping cabinet resource scheduling.

[0037] S104. Based on abnormal access records, analyze the access intervals between each abnormal access record, evaluate the concentration and dispersion of the access intervals, and obtain a false stability index.

[0038] Based on the abnormal access records, extract all abnormal access timestamps for the same user, arrange them in chronological order, calculate the time difference between adjacent abnormal access timestamps, and store each time difference in a sequence of access intervals to obtain the abnormal access interval sequence for that user. For this abnormal access interval sequence, calculate the arithmetic mean of all access intervals in the sequence as a quantification value for central tendency. Simultaneously, calculate the sum of the squares of the differences between each access interval and the arithmetic mean, and divide this sum by the number of access intervals to obtain a quantification value for dispersion. Based on the quantification values ​​for central tendency and dispersion, divide the quantification value for dispersion by the quantification value for central tendency to obtain a spurious stability index.

[0039] In one embodiment, the abnormal access interval sequence is constructed based on all access timestamps of the same user in the abnormal access record. The abnormal access timestamps of the user are arranged in chronological order of occurrence. The time difference between the first and second timestamps is calculated, then the time difference between the second and third timestamps is calculated, and so on until the last timestamp. All time differences are then stored in the access interval sequence in sequence.

[0040] For example, a user generates five abnormal access records within three days before the expiration of their package. The access timestamps correspond to 8:00 AM, 12:00 PM, 3:00 PM, 6:00 PM, and 9:00 PM, respectively. The time differences between adjacent timestamps are four hours, three hours, three hours, and three hours, respectively, thus forming an abnormal access interval sequence containing four elements.

[0041] The concentration level quantification value is represented by the arithmetic mean, which is the sum of all access intervals in the abnormal access interval sequence and divided by the number of access intervals. This value reflects the average density of abnormal user access behavior in the time dimension.

[0042] In one possible implementation, the calculation process for the dispersion quantification value is as follows: For each access interval in the abnormal access interval sequence, calculate the difference between the access interval and the arithmetic mean, square the difference, sum all the squared values, and divide by the number of access intervals to obtain the dispersion quantification value. This value reflects the fluctuation range of each access interval relative to the average level. The spurious stability index is obtained by dividing the dispersion quantification value by the central tendency quantification value. This index measures the relative dispersion of abnormal access intervals. When the index value is small, it indicates that the user's abnormal access behavior shows a high degree of consistency in time intervals, that is, the user performs abnormal battery swapping operations at a nearly fixed frequency.

[0043] When the false stability index value is large, it indicates that the user's abnormal access interval fluctuates significantly and the battery swapping behavior is irregular. Such abnormal access is more due to random factors rather than concentrated consumption behavior driven by the expiration of the package. This index can be used to distinguish different types of abnormal access patterns.

[0044] S105. Based on the false stability index, filter and remove abnormal access records with false high-frequency access from the user behavior dataset to obtain the purified behavior dataset.

[0045] The False Stability Index (FSI) is obtained by dividing the dispersion quantification value of the abnormal access interval sequence of the same user by the concentration quantification value, i.e., FSI = Access Interval Variance / Access Interval Mean. A smaller FSI value indicates a more concentrated and regular abnormal access interval. Based on the FSI, the access timestamp of the earliest record in each user's abnormal access records is obtained as the starting time point. Simultaneously, the expiration date of the user's service plan is extracted from the user behavior dataset, and the difference in days between the starting time point and the expiration date is calculated to obtain the remaining period days from the start of the abnormal access to the plan's expiration. The remaining period days are compared with a preset period threshold, and the FSI is also compared with the preset stability threshold. If both the remaining period days and the FSI are less than the preset period threshold, the user's abnormal access record is determined to meet the period stability screening criteria. Based on the period stability screening criteria, all access records in the user behavior dataset are traversed, and the abnormal access records corresponding to users meeting the screening criteria are marked, resulting in a set of records to be removed. All abnormal access records in the set of records to be removed are deleted from the user behavior dataset, while unmarked normal access records are retained, resulting in a purified behavior dataset.

[0046] In one embodiment, the extraction of the starting time point is based on the abnormal access record set corresponding to each user. All abnormal access records of the user are arranged in the order of access timestamps, and the record with the earliest timestamp is taken as the starting record. The access timestamp of the starting record is the starting time point of the abnormal access, which marks the moment when the user begins to exhibit abnormal battery swapping behavior.

[0047] For example, a user's package expires on the 20th of the month, and there are six abnormal access records. The earliest access timestamp of the record corresponds to the 17th of the month, so the starting time point is the 17th of the month. Subtracting the starting time point from the 17th of the month from the expiration date of the 20th, we get the remaining cycle days as three days. This value reflects how many days before the user's package is about to expire, abnormal battery swapping behavior begins.

[0048] The remaining cycle days and the false stability index constitute a two-dimensional judgment basis. The remaining cycle days measure the time node characteristics of abnormal access behavior, while the false stability index measures the regularity characteristics of abnormal access behavior in time intervals. The combination of the two can more accurately identify false high-frequency access affected by the expiration of the package.

[0049] In one possible implementation, the periodic threshold is set based on historical data statistics of the battery swapping station operation. Specifically, the threshold is set as μ+σ by calculating the average value μ and standard deviation σ of the number of days before the expiration of the user's package in the past year. For example, if μ=5 and σ=2, the threshold is about 7 days. When users start to have abnormal access in a short period of time before the expiration of their package, it is more likely that they are rushing to swap batteries to consume the remaining battery swapping times. The periodic threshold is used to define the boundary of this time window. Abnormal access behavior with a remaining period of less than the threshold is included in the key screening scope.

[0050] The stability threshold is set based on the distribution characteristics of false stability indicators. Specifically, the indicator distribution of past data is analyzed, and users' past data indicators are sorted from smallest to largest. The stability threshold is set as the 10th percentile of the indicator distribution (P10=0.5), i.e., 10% from smallest to largest. When a user's false stability indicator is ≤ 0.5, i.e., less than 10% of the indicators in the ascending order, it is judged as abnormal behavior. This indicates that the user's abnormal access intervals are highly concentrated, exhibiting a deliberately regular battery swapping pattern. This behavior is more consistent with planned consumption to avoid wasting the package. The stability threshold is used to filter out such highly regular abnormal access behavior. The judgment logic of the periodic stability screening condition is as follows: if a user's remaining cycle days are less than a preset cycle threshold and the false stability indicator is less than the preset stability threshold, the user's abnormal access record is judged to meet the periodic stability screening condition. This condition indicates that the user performs abnormal battery swapping operations at highly regular intervals within a short period before the package expires, which is a typical example of package expiration-driven false high-frequency access.

[0051] The construction of the set of records to be removed is achieved by traversing the user behavior dataset, determining whether each user meets the periodic stability screening conditions, and if so, marking all abnormal access records corresponding to that user as pending removal. After the traversal is completed, all marked records constitute the set of records to be removed.

[0052] In one embodiment, the purification operation is performed by deleting records. Each record in the set of records to be removed is located from the user behavior dataset and removed from the dataset. Normal access records that are not marked and abnormal access records that do not meet the filtering conditions are retained. This results in a purified behavior dataset, which excludes false high-frequency access records driven by package expiration and better reflects the user's real battery swapping needs.

[0053] The purified behavior dataset retains records of users' normal battery swapping behavior. These records are not affected by the expiration time of the package. Their access frequency and time distribution can truly reflect users' daily battery swapping habits. When making demand forecasts based on this dataset, resource scheduling deviations caused by short-term abnormal behavior can be avoided.

[0054] S106. Input the purified behavior dataset into the original demand prediction model of the battery swapping cabinet to obtain the initial cabinet demand prediction value, and calculate the prediction residual between the initial cabinet demand prediction value and the actual power demand. Based on the prediction residual and the purified behavior dataset, analyze the corrected prediction residual for the package expiration node.

[0055] Based on the purified behavior dataset, historical battery swapping frequency and time distribution features of users are extracted. These features are then input into a pre-established original demand prediction model for the battery swapping cabinet. This model uses an ARIMA model to estimate the cabinet's electricity consumption for future periods based on time-series patterns fitted from historical data, yielding an initial predicted demand value. Actual electricity consumption data for the corresponding time periods is obtained, and the initial predicted demand value is compared with the actual demand for each time period. The difference between the two is calculated as the prediction residual, and these residuals are arranged chronologically to form a prediction residual sequence. Based on the prediction residual sequence and the purified behavior dataset, training samples for a support vector regression model are constructed. These training samples use user access features as input and the prediction residuals as output. The user access features include access frequency, duration, and pattern extracted from the purified dataset. A radial basis function is used as the kernel function, and the mean squared error of the prediction residuals is minimized using a gradient descent algorithm. A time decay factor is introduced into the loss function, which is weighted decreasingly based on the number of days remaining until the package expiration date, resulting in a demand prediction residual correction sub-model. Input the user access characteristics near the package expiration point into the demand prediction residual correction sub-model, and output the corrected prediction residual for the package expiration point.

[0056] In one embodiment, the original demand prediction model is established based on the historical operation data of the battery swapping cabinet. The model uses the user's historical battery swapping frequency, battery swapping time distribution, and the geographical location characteristics of the battery swapping cabinet as input variables. It learns the battery swapping demand pattern of the user group through a time series fitting method and outputs the predicted value of the cabinet's electricity consumption in a specified future time period. The initial cabinet demand prediction value is the output result of the model.

[0057] For example, the average daily electricity consumption, peak-hour electricity consumption frequency, and differences in electricity consumption between weekends and weekdays over the past thirty days constitute a historical feature vector for a certain battery swapping cabinet. The original demand forecasting model calculates the expected daily electricity consumption for the next seven days based on the historical feature vector, forming an initial cabinet demand forecast value sequence.

[0058] The prediction residual is calculated by comparing the initial cabinet demand prediction value with the actual power demand in the same period one by one. The prediction residual for the prediction period is obtained by subtracting the actual power demand value from the initial prediction value for the prediction period. Positive values ​​indicate that the prediction is too high and negative values ​​indicate that the prediction is too low. The prediction residuals of all periods are arranged in chronological order to form a prediction residual sequence.

[0059] In one possible implementation, the training samples of the support vector regression model are constructed based on the pairing association between the purified behavior dataset and the prediction residual sequence. Each training sample contains two parts: the input part is the user access features of the corresponding time period in the purified behavior dataset, including the user battery swapping frequency, access timestamp distribution, and remaining days of the package within that time period; the output part is the prediction residual value corresponding to that time period. The training dataset is constructed by pairing a large number of samples.

[0060] The radial basis function kernel is used to measure the similarity between different training samples. The kernel function calculates the similarity value based on the Euclidean distance between the feature vectors of two samples. The closer the distance, the higher the similarity, and the farther the distance, the lower the similarity. The radial basis function kernel maps the original feature space to a high-dimensional feature space, enabling the support vector regression model to learn the nonlinear mapping relationship between the input features and the prediction residuals.

[0061] The gradient descent algorithm is used to iteratively optimize the weight parameters of a support vector regression model. In each iteration, the mean squared error between the model output and the actual prediction residual under the current weight parameters is calculated. The direction of parameter adjustment is determined based on the partial derivative of the mean squared error with respect to the weight parameters. The weight parameters are updated along the direction of the fastest error descent. After multiple iterations, the mean squared error converges to below the preset threshold, and the model training is completed.

[0062] The introduction of the time decay factor is based on the time sensitivity of the impact of the package expiration date on user behavior. This factor is weighted differently according to the number of days between the access record corresponding to each training sample and the package expiration date. The closer the sample is to the expiration date, the higher the weight is, and the farther the sample is from the expiration date, the lower the weight is. When calculating the loss function, the time decay factor is multiplied by the mean square error, so that the model training process pays more attention to the prediction residual pattern in the period near the package expiration date.

[0063] After the demand prediction residual correction sub-model is trained, for the prediction scenario near the package expiration node, the user access features of that period are extracted as model input. The demand prediction residual correction sub-model outputs the corrected prediction residual according to the learned mapping relationship. The corrected prediction residual reflects the systematic deviation of the package expiration factor on the cabinet demand prediction. The correction value can be used to make targeted adjustments to the output of the original prediction model.

[0064] S107. Update the cabinet demand forecast value using the corrected prediction residual, and output the pre-charging scheduling scheme when the consistency meets the preset threshold.

[0065] Based on the corrected prediction residual and the initial cabinet demand prediction value, the corrected prediction residual and the initial cabinet demand prediction value are added together for each time period to obtain the updated cabinet demand prediction value. The updated cabinet demand prediction value reflects the expected power consumption of the battery swapping cabinet after correction for package expiration date factors. The actual power consumption data of the battery swapping cabinet in the corresponding time period is obtained, and the absolute deviation between the updated cabinet demand prediction value and the actual power consumption demand is calculated. The absolute deviation is divided by the actual power consumption demand to obtain the relative deviation rate, and the reciprocal of the relative deviation rate is used as the conformity quantification value. The conformity quantification value is compared with a preset conformity threshold. If the conformity quantification value is greater than or equal to the preset conformity threshold, the battery pre-charging quantity and charging start time for the corresponding time period are determined based on the predicted power consumption for each time period in the updated cabinet demand prediction value, forming a pre-charging scheduling plan and outputting it.

[0066] In one embodiment, the updated cabinet demand forecast is obtained by adding the corrected forecast residual to the initial cabinet demand forecast over time periods.

[0067] Specifically, the initial forecast value for the forecast period is added to the corresponding corrected forecast residual value. If the corrected forecast residual is positive, it means that the original forecast is too low and needs to be adjusted upward. If the corrected forecast residual is negative, it means that the original forecast is too high and needs to be adjusted downward. This gives the expected electricity consumption for each period after the adjustment for the package expiration date.

[0068] For example, the initial demand forecast for a certain battery swapping cabinet on a certain morning is 80 power withdrawals, while the corrected forecast residual for that period is -15. Therefore, the updated demand forecast for the cabinet is 65 power withdrawals. This correction reflects the actual demand level after false high-frequency accesses near the package expiration date have been eliminated.

[0069] The calculation of the conformity quantification value is based on the degree of deviation between the updated predicted value and the actual power demand. The absolute deviation represents the size of the difference between the predicted value and the actual value. The relative deviation rate normalizes the absolute deviation to the order of actual demand. The conformity quantification value is the reciprocal of the relative deviation rate. The smaller the relative deviation rate, the larger the conformity quantification value, indicating higher prediction accuracy.

[0070] In one possible implementation, the matching threshold is set based on the historical prediction accuracy of the battery swapping cabinet operation. When the quantified value of the matching reaches or exceeds the threshold, it indicates that the updated prediction value has sufficient accuracy and can be used as the basis for resource scheduling.

[0071] The optimized pre-charging scheduling scheme is based on the updated cabinet demand forecast. The number of fully charged batteries required is determined according to the predicted power consumption during the forecast period. The charging start time is calculated by combining the battery charging time. A scheduling list containing the pre-charging quantity and corresponding charging start time for each period is formed.

[0072] The optimized pre-charging scheduling scheme eliminates the interference of false demand driven by package expiration, ensuring that the battery swapping cabinet has a number of batteries that match the actual demand at each time period, avoiding battery idleness due to over-prediction, and preventing battery shortage due to under-prediction.

[0073] refer to Figure 3 A shared battery swapping cabinet user behavior analysis system, comprising: The extraction module extracts the timestamp of the user's battery swapping operation, the remaining number of battery swaps in the package, and the expiration date, and then generates a user behavior dataset after synchronizing the time base. The calculation module calculates the ratio of the remaining number of battery swaps to the remaining days within each user's package cycle; The identification module identifies user access records with a consumption ratio exceeding a preset threshold as false high-frequency access and marks their access timestamps as abnormal access records. The analysis module analyzes the concentration and dispersion of access intervals of abnormal access records to obtain a false stability index; based on the false stability index, it filters and removes false high-frequency abnormal access records to obtain a purified behavior dataset; the purified behavior dataset is input into the original demand prediction model to train the residual correction sub-model and outputs the package expiration node correction prediction residual. The output module updates the cabinet demand forecast value using the corrected prediction residual. When the consistency meets the preset threshold, it outputs the pre-charging scheduling scheme.

[0074] Preferably, the extraction module extracts the access timestamp, remaining battery swap count, and expiration date from each user's battery swap operation, and forms a user behavior dataset after synchronizing with the time base, including: When a user performs a battery swap, the operation trigger time is recorded and converted into an access timestamp. At the same time, the remaining number of battery swaps and the expiration date of the user's current package are obtained to form an original access record containing the access timestamp, the remaining number of battery swaps, and the expiration date. Using the local clock of the battery swap cabinet as a time reference, the access timestamp in the original access record is calibrated. The calibrated access timestamp, together with the remaining number of battery swaps and the expiration date, are collected according to the user identifier to form the user behavior dataset.

[0075] If the technical solution of this application involves the collection, processing, or application of personal information, the relevant products have, before implementing any personal information processing activities, fully and clearly informed individuals of the processing rules in accordance with the "Personal Information Protection Law of the People's Republic of China" and other current laws and regulations, and obtained their voluntary and explicit consent. If sensitive personal information is involved, the product has obtained the individual's separate consent before processing, and such consent is given in an explicit manner. For example, prominent signs are set up in the area where information collection devices such as cameras are located, clearly indicating "Entering is considered as consent to the collection of personal information"; or through pop-ups, checkboxes, user-initiated uploads, etc., under the premise of clearly listing the processor's identity, processing purpose, processing method, and information type, the user actively completes the authorization operation. The above mechanisms ensure that all personal information processing activities are based on legal authorization and fully comply with national compliance requirements regarding personal information protection.

[0076] The above description is merely a preferred embodiment of this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in this application is not limited to the technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the concept of this application. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this application.

Claims

1. A method for analyzing user behavior in shared battery swapping cabinets, characterized in that, The method includes: Extract the timestamp of the user's battery swapping operation, the remaining number of battery swaps in the package, and the expiration date, and then generate a user behavior dataset after synchronizing the time base. Calculate the ratio of the remaining number of battery swaps to the remaining days within each user's package cycle; User access records whose consumption ratio exceeds a preset threshold are identified as fake high-frequency accesses, and their access timestamps are marked as abnormal access records. By analyzing the concentration and dispersion of access intervals in abnormal access records, a false stability index is obtained. The purified behavior dataset is obtained by filtering and removing false high-frequency abnormal access records based on false stability indicators; The purified behavior dataset is input into the original demand prediction model to train the residual correction sub-model, and the corrected prediction residual for the package expiration node is output. This process includes: inputting the historical battery swapping frequency and time distribution characteristics of users in the purified behavior dataset into the original demand prediction model to obtain the initial cabinet demand prediction value for the corresponding time period; acquiring the actual power demand data of the battery swapping cabinet, calculating the difference between the initial cabinet demand prediction value and the actual power demand, and forming a prediction residual sequence; using user access characteristics in the purified behavior dataset as input and the prediction residual sequence as output, constructing a support vector regression model training sample, using a radial basis function kernel, minimizing the mean square error through gradient descent algorithm, and adding a time decay factor that decreases with the number of days remaining until the package expiration node to the loss function to complete the training of the demand prediction residual correction sub-model; inputting user access characteristics near the package expiration node into the demand prediction residual correction sub-model, and outputting the corrected prediction residual for the package expiration node. The method involves updating the cabinet demand forecast value using a corrected prediction residual. If the consistency meets a preset threshold, a pre-charging scheduling scheme is output. This includes: adding the corrected prediction residual to the initial cabinet demand forecast value by time period to obtain an updated cabinet demand forecast value; calculating the relative deviation rate between the updated cabinet demand forecast value and the actual power demand, using the reciprocal of the relative deviation rate as a consistency quantification value; comparing the consistency quantification value with a preset consistency threshold; and determining the battery pre-charging quantity and charging start time based on the predicted power consumption for each time period in the updated cabinet demand forecast value, forming a pre-charging scheduling scheme and outputting it.

2. The method for analyzing user behavior of a shared battery swapping cabinet according to claim 1, characterized in that, The process of extracting the timestamp of the user's battery swapping operation, the remaining number of battery swaps in the plan, and the expiration date, and synchronizing with a time base, forms a user behavior dataset; including: When a user performs a battery swap, the operation trigger time is recorded and converted into an access timestamp. At the same time, the remaining number of battery swaps and the expiration date of the user's current package are obtained to form an original access record containing the access timestamp, the remaining number of battery swaps, and the expiration date. Using the local clock of the battery swap cabinet as a time reference, the access timestamp in the original access record is calibrated. The calibrated access timestamp, together with the remaining number of battery swaps and the expiration date, are collected according to the user identifier to form the user behavior dataset.

3. The method for analyzing user behavior of a shared battery swapping cabinet according to claim 1, characterized in that, The calculation of the ratio of the remaining number of battery swaps to the remaining days for each user within the package period includes: The remaining days of the corresponding package are calculated based on the expiration date and access timestamp of each record in the user behavior dataset. At the same time, the remaining number of battery swaps for that record is extracted. The remaining days and the remaining number of battery swaps are paired according to the user identifier. The remaining number of battery swaps is divided by the remaining days to obtain the consumption ratio of the remaining days to the remaining number of battery swaps.

4. The method for analyzing user behavior of a shared battery swapping cabinet according to claim 1, characterized in that, User access records whose consumption ratio exceeds the upper limit of the pre-screening threshold are identified as fraudulent high-frequency accesses, and their access timestamps are marked as abnormal access records, including: For each remaining day to remaining battery swap times consumption ratio, compare it with a preset threshold upper limit. The access records corresponding to the consumption ratio exceeding the threshold upper limit are identified as potential false high-frequency access records. The potential false high-frequency access records are aggregated according to user identifier to form a false high-frequency access record set. The access timestamp of each record in the false high-frequency access record set is marked with an abnormal access tag to obtain abnormal access records.

5. The method for analyzing user behavior of a shared battery swapping cabinet according to claim 1, characterized in that, The analysis of the concentration and dispersion of access intervals in abnormal access records yields a false stability index, including: Based on abnormal access records, all abnormal access timestamps of the same user are extracted and arranged in chronological order. The time difference between adjacent abnormal access timestamps is calculated to form an abnormal access interval sequence. For the abnormal access interval sequence, the arithmetic mean of all access intervals is calculated as the concentration quantification value. The sum of the squares of the differences between each access interval and the arithmetic mean is divided by the number of access intervals to obtain the access interval variance, which is used as the dispersion quantification value. The dispersion quantification value is divided by the concentration quantification value to obtain the spurious stability index.

6. The method for analyzing user behavior of a shared battery swapping cabinet according to claim 1, characterized in that, The purified behavioral dataset, obtained by filtering and removing false high-frequency abnormal access records based on false stability indicators, includes: For each user, the earliest access timestamp in the user's abnormal access records is selected as the starting time point, and the remaining period days from the starting time point to the package expiration date are calculated. The remaining period days are compared with a preset period threshold, and the false stability index is also compared with a preset stability threshold. If the remaining period days are less than the preset period threshold and the false stability index is less than the preset stability threshold, the user's abnormal access records are determined to meet the period stability screening conditions. The user behavior dataset is traversed, and the abnormal access records of users who meet the period stability screening conditions are marked to form a set of records to be removed. All abnormal access records in the set of records to be removed are deleted from the user behavior dataset, and the remaining access records are retained to obtain the purified behavior dataset.

Citation Information

Patent Citations

  • Method and system for evaluating improvement of new energy acceptance capability of distribution network, and medium

    CN120855537A