A battery inventory dynamic prediction method based on rider trajectory for battery swap station
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ESSENTONGDA ENERGY TECH DEV (TIANJIN) CO LTD
- Filing Date
- 2026-07-08
- Publication Date
- 2026-08-07
AI Technical Summary
[0003]现有换电站库存预测方式大多仍然基于换电历史次数、站点当前库存数量或者短时间订单热力进行预测,而该类方式通常仅能够识别已经发生的换电行为或者已经进入换电站范围的骑手行为,难以提前识别骑手在连续配送过程中已经形成但尚未显式触发的潜在换电需求,同时也难以识别某一换电站缺电后骑手向周边站点迁移所引发的库存风险传播情况,导致显示站点仍存在可用库存,但实际上相关库存已经被未来潜在骑手提前占用,进而造成库存预测结果与真实换电需求之间存在明显偏差
(1)通过骑手轨迹订单数据和换电站库存网络数据,提前识别尚未到达换电站但已形成换电需求的骑手,并将该部分未来需求转换为虚拟占用库存量参与库存预测,使换电站库存判断不再仅依赖当前可换电池数量或已发生换电记录,从而能够提前反映未来时间窗内的真实库存压力,提高换电站电池库存动态预测的准确性。
Smart Images

Figure CN122529628A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of battery swapping station operation and management technology, specifically a method for dynamic prediction of battery inventory at battery swapping stations based on rider trajectories. Background Technology
[0002] With the continuous growth of on-demand delivery services, the battery swapping operation system for food delivery riders, same-city delivery riders, and on-demand delivery personnel has gradually formed a high-frequency battery swapping, dynamic flow, and regional linkage operation mode. Under this operation mode, riders usually move continuously between multiple areas based on real-time order distribution, delivery routes, battery status, and order density, which makes the battery inventory status of battery swapping stations exhibit obvious dynamic changes. Therefore, how to dynamically predict the battery inventory of battery swapping stations based on rider trajectories has become an important technical direction affecting riders' continuous delivery capabilities and the efficiency of battery swapping resource scheduling in the field of battery swapping operations.
[0003] Most existing battery swapping station inventory forecasting methods still rely on historical swapping frequency, current station inventory levels, or short-term order volume. These methods typically only identify swapping activities that have already occurred or rider behavior within the station's range. They struggle to identify potential swapping needs that riders have generated but not yet explicitly triggered during continuous deliveries. Furthermore, they fail to recognize the propagation of inventory risks caused by riders migrating to nearby stations after a station runs out of power. This results in the station displaying available inventory, even though the relevant inventory has already been used by potential future riders, leading to a significant discrepancy between inventory forecasts and actual swapping demand. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this invention provides a method for dynamically predicting battery inventory at battery swapping stations based on rider trajectories, thus solving the problems mentioned in the background section.
[0005] To achieve the above objectives, the present invention provides the following technical solution: a method for dynamically predicting battery inventory at battery swapping stations based on rider trajectories, comprising the following steps: S1. Obtain rider trajectory order dataset and battery swapping station inventory network dataset, and determine the rider operation status of each rider based on the rider trajectory order dataset; S2. Based on the riders' operational status, select riders who have not yet reached the battery swapping station but have a need for battery swapping from among the riders, and build a potential battery swapping rider set. S3. Based on the potential battery swapping rider set and the battery swapping station inventory network dataset, determine the target battery swapping station list, and generate the virtual occupied inventory of the corresponding battery swapping station and the list of riders who have not yet accepted the service based on the target battery swapping station list. S4. Based on the swappable inventory and corresponding virtual occupied inventory of each swapping station, determine the future available inventory of each swapping station, and determine the list of power shortage risk sites based on the future available inventory. S5. Based on the list of power shortage risk sites, the battery swapping station inventory network dataset, and the list of riders not yet accepted, determine the list of battery swapping stations to accept and the list of power shortage propagation binding. Combine the virtual occupied inventory, future available inventory, the list of power shortage risk sites, the list of battery swapping stations to accept, and the list of power shortage propagation binding to generate a dynamic inventory prediction list.
[0006] Preferably, the acquisition of rider trajectory order dataset and battery swapping station inventory network dataset includes: By using riders' mobile terminals and order delivery platforms, the current order data set of each rider's trajectory is obtained. The order data set of rider trajectory includes the rider's initial location, rider's direction, driving speed, current battery level, order status and remaining delivery distance. The order status includes delivery status and not delivery status. Feature recognition is performed on the back-end inventory data of the battery swapping stations stored in the operation and management platform to obtain the inventory network dataset of each battery swapping station at the current time. The inventory network dataset of the battery swapping stations includes the station location, station service range, destination range, swappable inventory quantity, and a list of neighboring stations.
[0007] The preferred logic for determining the rider operational status of each rider is as follows: Based on the order dataset of each rider's trajectory, the order status of each rider is read, and the riders in the delivery status are constructed into an operational status judgment group. The current battery level and remaining delivery distance of each rider in the operational status judgment group are read to determine the battery availability status of each rider after completing the current delivery task. The rider's initial position and rider direction are read, and the trajectory pointing path formed by the rider's initial position and the rider's direction is matched with the service range of each battery swapping station to determine the path matching status of each rider. Based on the order status, battery availability status and path matching status of the corresponding rider, the rider's operational status is constructed, where the trajectory pointing path is the driving trajectory path formed by starting from the rider's initial position and extending along the rider's direction. The available battery status includes a status where delivery can continue and a status where delivery cannot continue. If the current battery level of the corresponding rider is not less than the battery level required to complete the current delivery task, the rider's available battery status will be marked as a status where delivery can continue. If the current battery level is less than the battery level required to complete the current delivery task, the rider's available battery status will be marked as a status where delivery cannot continue. The battery level required to complete the current delivery task is the battery level required to travel the remaining delivery distance. The path matching status includes a matchable battery swap station status and an unmatchable battery swap station status. The rider's trajectory path is determined based on the rider's initial location and direction. If the trajectory path intersects with the service area of any battery swap station, the corresponding rider's path matching status is marked as a matchable battery swap station status. If the trajectory path does not intersect with the service area of any battery swap station, the corresponding rider's path matching status is marked as an unmatchable battery swap station status.
[0008] Preferably, the logic for determining the potential battery swapping rider set is as follows: Based on the order dataset of each rider's trajectory and the inventory network dataset of each battery swapping station, the rider's initial position and the arrival range of each battery swapping station are extracted. When the rider's initial position does not fall within the arrival range of any battery swapping station, the rider is determined to be in a state of not having arrived at the battery swapping station. Based on the determination that the corresponding rider is not yet at the battery swapping station, and combined with the order status and rider operation status of each rider, the corresponding riders who are simultaneously in the delivery, delivery cannot continue, not yet at the battery swapping station, and available battery swapping station status are marked as potential battery swapping riders. The rider's initial location, rider direction, current battery level, order status, and remaining delivery distance of each potential battery swapping rider are recorded to construct a potential battery swapping rider set. Among them, potential battery swapping riders are riders who have not yet arrived at the battery swapping station and need to consume the battery swapping station's inventory within a future time window.
[0009] Preferably, the logic for determining the target battery swapping station list is as follows: Based on the potential battery swapping rider set, the rider's initial position and direction are extracted for each potential battery swapping rider. Based on the inventory network dataset of each battery swapping station, the station location, station service range, and available swapping inventory are extracted for each battery swapping station. The potential battery swapping riders' trajectories intersect with the service area of the station and are recorded as candidate battery swapping stations. The availability of inventory of the candidate battery swapping stations is analyzed. When the available inventory of a candidate battery swapping station is greater than zero, the corresponding candidate battery swapping station is recorded as a bindable battery swapping station. Among the available battery swapping stations corresponding to the same potential battery swapping rider, the one with the shortest distance from the rider's initial location will be designated as the target battery swapping station for that potential rider. A list of target battery swapping stations will be determined based on the binding relationship between each potential rider and its corresponding target battery swapping station. Each potential rider will be bound to a unique target battery swapping station in the list of target battery swapping stations.
[0010] Preferably, the logic for generating the virtual inventory quantity of the corresponding battery swapping station is as follows: Statistical analysis is performed on potential battery swapping riders bound to the same target battery swapping station in the target battery swapping station list to obtain the number of potential battery swapping riders for each target battery swapping station. The number of potential battery swapping riders and the available swapping inventory of the corresponding target battery swapping station are analyzed by deducting inventory from the arrival sequence to determine the virtual occupied inventory of the corresponding target battery swapping station. The virtual occupied inventory is the inventory occupied amount that is deducted in advance from the available swapping inventory of the corresponding target battery swapping station during the calculation of future available inventory.
[0011] The preferred logic for inventory deduction analysis in the arrival sequence is as follows: The number of potential battery swapping riders bound to the corresponding target battery swapping station is compared and analyzed with the available battery swapping inventory of the corresponding target battery swapping station. If the number of potential battery swapping riders is less than or equal to the available battery swapping inventory, the number of potential battery swapping riders of the corresponding target battery swapping station is used as the virtual occupied inventory. If the number of potential battery swapping riders is greater than the available battery swapping inventory, then based on the target battery swapping station list, the station location of the corresponding target battery swapping station and the rider's initial location and speed of each potential battery swapping rider bound to the corresponding target battery swapping station are obtained, and each potential battery swapping rider is written into the arrival sequence list of the corresponding target battery swapping station according to the order in which each potential battery swapping rider bound to the same target battery swapping station arrives at the target battery swapping station. For any target battery swapping station's arrival sequence list, based on the order in which each potential battery swapping rider arrives at the target battery swapping station, obtain the sorting number of each potential battery swapping rider arriving at the corresponding target battery swapping station. For any target battery swapping station's arrival sequence list, read the corresponding sorting number sequentially according to the arrival order of each potential battery swapping rider. Subtract the number of potential battery swapping riders who have been identified as effectively occupied before the sorting number from the available swapping inventory of the target battery swapping station. The difference is the actual available swapping inventory when the potential battery swapping rider arrives at the station. Among them, the actual available swapping inventory corresponding to the potential battery swapping rider with sorting number 1 is equal to the available swapping inventory of the corresponding target battery swapping station, and the actual available swapping inventory corresponding to the potential battery swapping rider with sorting number k is equal to the available swapping inventory of the corresponding target battery swapping station minus k-1. Potential riders whose actual available swap inventory upon arrival is less than one are identified as unaccepted potential riders, and these riders are added to the unaccepted rider list of the corresponding target swap station. Potential riders whose actual available swap inventory upon arrival is not less than one are identified as actual potential riders, and the number of actual potential riders at the corresponding target swap station is counted. This number is used as the virtual occupied inventory of the corresponding target swap station. The unaccepted rider list includes unaccepted potential riders, the corresponding target swap station, and the actual available swap inventory of the corresponding target swap station.
[0012] Preferably, the logic for determining future available inventory and the list of sites at risk of power shortages is as follows: Based on the target battery swapping station list, read the swappable inventory of each target battery swapping station from the battery swapping station inventory network dataset, and read the virtual occupied inventory of each target battery swapping station. The future available inventory of a target battery swapping station is obtained by subtracting the inventory quantity already occupied by potential riders in the arrival sequence inventory deduction analysis from the station's available inventory. It should be noted that the virtual occupied inventory subtracted here is the same value as the rider-occupied quantity sequentially deducted from the available inventory during the arrival sequence inventory deduction analysis; there is no double deduction. If there are no potential riders at the station, the virtual occupied inventory is zero, and the future available inventory equals the available inventory. In this embodiment, the virtual inventory occupancy level serves to quantify future riders' battery swapping needs as inventory occupancy in advance. However, this occupancy level is only deducted once during the arrival sequence deduction analysis. When calculating future available inventory, the already deducted result is used directly, rather than subtracting the same value from the original swappable inventory. This method avoids duplicate deductions for the same batch of riders' needs, ensuring the accuracy of inventory forecasting results. A safety stock threshold greater than zero is pre-set, and the future available inventory of the corresponding target battery swapping station is compared with the safety stock threshold. When the future available inventory of the corresponding target battery swapping station is less than the safety stock threshold, the corresponding target battery swapping station is identified as a power shortage risk site, and a power shortage risk site list is constructed. The list of power shortage risk sites includes the power shortage risk site, the corresponding swappable inventory for the power shortage risk site, the corresponding virtual occupied inventory for the power shortage risk site, the corresponding future available inventory for the power shortage risk site, and the corresponding number of potential battery swapping riders for the power shortage risk site.
[0013] Preferably, the logic for determining the list of battery swapping stations and the list of power shortage propagation linkages is as follows: Based on the battery swapping station inventory network dataset of each station, for any station in the list of stations at risk of power shortage, the list of riders who have not accepted the swapping service corresponding to that station is read, and the list of neighboring stations for that station is extracted. Combining the list of riders who have not accepted the swapping service, the initial location of each potential rider who has not accepted the swapping service is extracted, and the location and available swapping inventory of the corresponding neighboring stations in the list of neighboring stations for each station at risk of power shortage are obtained. The neighboring swapping stations that simultaneously meet the following conditions are selected as accepting swapping stations: the distance between them and the initial location of the rider who has not accepted the swapping service is the shortest, and their available swapping inventory is greater than zero. The number of potential riders who have not yet accepted battery swapping at each designated battery swapping station is counted, and the number of potential riders who have not yet accepted battery swapping at each designated battery swapping station is recorded as the inventory occupied by the corresponding designated battery swapping station; the difference between the swappable inventory and the occupied inventory of the corresponding designated battery swapping station is taken as the future available inventory of the corresponding designated battery swapping station. When the future available inventory of a corresponding battery swapping station is less than the safety stock threshold, the corresponding battery swapping station will be marked as a new power shortage risk site, and the migration binding relationship between the corresponding power shortage risk site, the corresponding potential battery swapping rider who has not yet accepted the service, and the corresponding battery swapping station will be written into the power shortage propagation binding list; when the future available inventory of a corresponding battery swapping station is greater than or equal to the safety stock threshold, the corresponding battery swapping station will be bound to the corresponding potential battery swapping rider who has not yet accepted the service, and written into the battery swapping station list; those already written into the battery swapping station list or power shortage propagation binding list will be... The list of potential riders who have not accepted battery swapping is removed from the list of riders who have not accepted battery swapping in the current round; each power shortage risk station in the power shortage propagation binding list is used as a new processing starting point, and the steps of iterating and reading its list of riders who have not accepted battery swapping, extracting its list of neighboring stations and determining the battery swapping station are repeated until there are no potential riders who have not accepted battery swapping in the list of riders who have not accepted battery swapping. The list of battery swapping stations is used to record the acceptance relationship that has not triggered the power shortage risk after acceptance, and the power shortage propagation binding list is used to record the migration binding relationship that has triggered a new power shortage risk after acceptance. The dynamic inventory forecast list includes current inventory items, virtual occupied items, future available inventory items, power shortage risk items, items for receiving swapping stations, and power shortage propagation items. Among them, the current inventory item records the swappable inventory quantity of the corresponding swapping station, the virtual occupied item records the virtual occupied inventory quantity of the corresponding swapping station, the future available inventory item records the future available inventory quantity of the corresponding swapping station, the power shortage risk item records whether the corresponding swapping station belongs to the power shortage risk site list, the item for receiving swapping stations records whether the corresponding swapping station belongs to the receiving swapping station list, and the power shortage propagation item records whether the corresponding swapping station belongs to the power shortage propagation binding list.
[0014] This invention provides a method for dynamically predicting battery inventory at battery swapping stations based on rider trajectories, which has the following beneficial effects: (1) By using rider trajectory order data and battery swapping station inventory network data, riders who have not yet arrived at the battery swapping station but have formed a battery swapping demand can be identified in advance. This part of the future demand is converted into virtual occupied inventory to participate in inventory forecasting. This makes the battery swapping station inventory judgment no longer rely solely on the current number of swappable batteries or battery swapping records. This allows the real inventory pressure within the future time window to be reflected in advance, thereby improving the accuracy of dynamic forecasting of battery swapping station inventory.
[0015] (2) By analyzing the potential battery swapping rider set, the target battery swapping station list and the inventory deduction of the arrival sequence, it is possible to determine which riders will prioritize occupying the target battery swapping station inventory and which riders cannot be accepted by the target battery swapping station when they arrive at the station, thereby forming a virtual inventory occupied and a list of unaccepted riders, solving the problem in the existing technology that the station currently shows that there is inventory but there is no battery available for swapping after riders arrive at the station in a concentrated manner.
[0016] (3) After identifying the power shortage risk sites, further combine the list of riders who have not accepted the power supply and the list of nearby sites to generate a list of power swapping stations and a list of power shortage propagation binding, identify the process of power shortage risk spreading from the original site to nearby sites, avoid making isolated predictions for a single site, reduce the risk of nearby sites being concentrated and transferred to further reduce inventory, and improve the reliability of cross-site inventory scheduling and power replenishment decisions.
[0017] (4) By introducing effective location point screening, road network path generation, departure protection status, arrival credibility conversion and virtual occupancy rollback mechanism, the prediction process can simultaneously handle uncertainties such as GPS noise, intersection turning, parking waiting, signal drift, rider detour and order cancellation, and avoid misjudgment of power shortage risk due to static snapshot or absolute occupancy assumption, thereby improving the feasibility and correction capability of dynamic inventory prediction. Attached Figure Description
[0018] Figure 1 This is a schematic diagram of the process of a method for dynamic prediction of battery inventory at battery swapping stations based on rider trajectories according to the present invention. Figure 2 This is a schematic diagram illustrating the process of constructing a potential battery-swapping rider pool for this invention. Detailed Implementation
[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0020] Example 1 Please see Figure 1In this embodiment, the application scenario is set as an urban instant delivery battery swapping operation scenario. The operation platform deploys multiple battery swapping stations in the target urban area. Each battery swapping station is used to provide electric vehicle battery swapping services for food delivery riders, same-city delivery riders, and instant delivery personnel. During the delivery process, riders receive delivery tasks assigned by the order delivery platform through their mobile terminals and continuously move between different business districts, communities, office buildings, and road areas based on the order pickup point, delivery point, real-time route, and their own battery status. This causes the battery inventory demand of each battery swapping station to change dynamically with the rider's trajectory.
[0021] In practice, riders generate data such as their initial location, direction, speed, current battery level, order status, and remaining delivery distance through their mobile terminals and the order delivery platform. Battery swapping stations store data such as battery swapping cabinet operation records, warehouse status records, battery status records, battery swapping order records, station basic profile records, and station spatial relationship records through their operation and management platform. Based on the above data, rider trajectory order datasets and battery swapping station inventory network datasets are obtained. Within the same future time window, it is determined whether riders have not yet arrived at the battery swapping station but already have a battery swapping need, whether the corresponding battery swapping station inventory has been pre-occupied by future riders, and whether the risk of power shortage will spread to neighboring battery swapping stations.
[0022] In the scenario set in this embodiment, the future time window can be configured as 15 minutes, 30 minutes or 60 minutes according to the operator's predicted demand. If the target urban area is in the midday peak, evening peak, rainy day delivery peak or concentrated food preparation period in the business district, 15 minutes or 30 minutes will be used as the future time window in order to identify the inventory occupation caused by the concentrated arrival of riders at the station more quickly. If the order density of the target urban area is low, the distance between stations is far, or the rider battery swapping frequency is low, 60 minutes will be used as the future time window in order to obtain a more stable inventory change trend.
[0023] In practice, this method does not require modification of the battery swapping cabinet hardware, nor does it require adding sensors to the battery or rider's vehicle. Rider-side data comes from rider's mobile terminal and order delivery platform, while battery swapping station-side data comes from the backend data already stored in the battery swapping station operation and management platform. The system can generate a potential battery swapping rider set, a target battery swapping station list, virtual occupied inventory, a list of riders not yet accepted, future available inventory, a list of stations at risk of power shortage, a list of accepted battery swapping stations, a list of power shortage propagation bindings, and a dynamic inventory prediction list through backend data processing. This provides a data foundation for subsequent maintenance and power replenishment, station inventory scheduling, and rider battery swapping guidance. To avoid misjudgment caused by location drift, the location points uploaded by rider's mobile terminal can be read at sampling intervals of 5 to 30 seconds. If the distance between two consecutive sampling points of a rider is abnormally greater than the road reachable distance, the location point is marked as an abnormal location point and is not included in the calculation of rider direction and speed.
[0024] This invention provides a method for dynamically predicting battery inventory at battery swapping stations based on rider trajectories, comprising the following steps: S1. Obtain rider trajectory order dataset and battery swapping station inventory network dataset, and determine the rider operation status of each rider based on the rider trajectory order dataset; S2. Based on the riders' operational status, select riders who have not yet reached the battery swapping station but have a need for battery swapping from among the riders, and build a potential battery swapping rider set. S3. Based on the potential battery swapping rider set and the battery swapping station inventory network dataset, determine the target battery swapping station list, and generate the virtual occupied inventory of the corresponding battery swapping station and the list of riders who have not yet accepted the service based on the target battery swapping station list. S4. Based on the swappable inventory and corresponding virtual occupied inventory of each swapping station, determine the future available inventory of each swapping station, and determine the list of power shortage risk sites based on the future available inventory. S5. Based on the list of power shortage risk sites, the battery swapping station inventory network dataset, and the list of riders not yet accepted, determine the list of battery swapping stations to accept and the list of power shortage propagation binding. Combine the virtual occupied inventory, future available inventory, the list of power shortage risk sites, the list of battery swapping stations to accept, and the list of power shortage propagation binding to generate a dynamic inventory prediction list.
[0025] In this embodiment, the rider trajectory order dataset is used to identify the rider's operational status. Then, riders who already have a need for battery swapping are selected from those who have not yet arrived at a battery swapping station, forming a potential battery swapping rider set. This potential rider set is then matched with the battery swapping station inventory network dataset to generate a target battery swapping station list. Furthermore, the number of batteries that may be consumed by these riders in the future is pre-converted into the virtual inventory of the corresponding battery swapping station. This avoids the problem of judging inventory sufficiency solely based on the current battery quantity at the station while ignoring future concentrated rider arrival demand. Simultaneously, when some potential battery swapping riders are added to the list of riders not accepted due to insufficient inventory at the target battery swapping station, the list of accepting battery swapping stations and the battery shortage propagation binding list are determined by combining the list of stations with power shortage risks and the battery swapping station inventory network dataset. This not only predicts the future available inventory of a single battery swapping station within a future time window but also identifies power shortage risks. The path of diffusion from one battery swapping station to neighboring stations; for example, in a concentrated delivery scenario during the evening rush hour, if a battery swapping station in a business district currently shows 8 swappable batteries, but the system judges based on the potential set of swapping riders that 10 riders who have not yet arrived at the station will arrive at the station in the near future, then the virtual occupied inventory of the station can reflect the future inventory occupancy situation in advance, and expose the power shortage risk in advance through the future available inventory and the list of stations with power shortage risk. If some of these riders cannot be taken over by the station, the system further identifies the additional inventory pressure caused by these riders being transferred to surrounding battery swapping stations through the list of accepting battery swapping stations and the power shortage propagation binding list. In this way, the operating platform can obtain a more accurate dynamic inventory prediction list before the riders actually arrive at the station, reducing the situation of sudden power shortages at battery swapping stations, riders waiting at the station, delayed maintenance and power replenishment, and continuous power shortages at multiple battery swapping stations in the area.
[0026] Example 2 Please refer to Figure 1 Specifically: Obtain rider trajectory order dataset and battery swapping station inventory network dataset, including: By using riders' mobile terminals and order delivery platforms, the current order data set of each rider is obtained. The order data set of each rider includes the rider's initial location, rider's direction, driving speed, current battery level, order status and remaining delivery distance. The order status includes delivery status and not delivery status.
[0027] The rider's direction is not determined directly by the instantaneous orientation of a single GPS point, but is determined by a combination of the sequence of consecutive valid location points before the current sampling time, location reliability, road matching identifiers, dwell time, change in turning angle, and the most recent battery swap record. The rider trajectory order dataset also includes the sequence of valid location points, location point timestamps, location reliability, road matching segments, the time of the most recent entry into the arrival range, the time of the most recent departure from the arrival range, and the time of the most recent battery swap completion.
[0028] The rider's initial position is the location coordinates uploaded by the rider's mobile terminal at the current sampling time, using latitude and longitude coordinates or road network coordinates. If no location coordinates are uploaded at the current sampling time, the most recent valid location coordinates before the current sampling time are read as the rider's initial position. The time interval between this coordinate and the current sampling time shall not exceed 60 seconds; if it exceeds 60 seconds, the rider will not be included in the current round of prediction calculation.
[0029] The rider's direction is determined by at least two valid location points continuously uploaded by the rider's mobile terminal. The two most recent valid location points are read in chronological order, and the direction from the previous valid location point to the next valid location point is determined as the rider's direction. If the road distance between the two most recent valid location points is less than the preset direction determination distance, more location points are read forward, and the main movement direction formed between the most recent valid location point and the previous valid location point is taken as the rider's direction. The preset direction determination distance can be set to 20 meters to 50 meters to avoid incorrect direction caused by location shaking when the rider is waiting to pick up food.
[0030] The driving speed is directly uploaded by the rider's mobile terminal, or it is obtained by dividing the road distance between two consecutive valid positioning points by the corresponding time interval. If the difference between the directly uploaded driving speed and the speed calculated by the positioning point exceeds the preset speed difference threshold, the speed calculated by the positioning point will be used first. The preset speed difference threshold is set to 10 km / h to 20 km / h.
[0031] During data processing, the current battery level is obtained from the rider's vehicle battery status reporting interface, or estimated by the battery swapping operation platform based on the rider's battery level after the last battery swap, the distance the rider has traveled, and the vehicle's power consumption per unit distance. If the same rider has both vehicle-reported battery level and platform-estimated battery level, the vehicle-reported battery level will be used first. If the vehicle-reported battery level is not updated within a preset time, the platform-estimated battery level will be used. The preset time is set to 3 to 10 minutes.
[0032] In this embodiment, the order status is determined by the order execution status in the order delivery platform. When a rider has an incomplete order and the order stage is in the process of picking up, delivering, or en route, the order status is determined to be in the process of delivery. When a rider has no incomplete orders, the order is completed, the order is canceled, the rider is offline, or the rider has suspended accepting orders, the order status is determined to be in the process of not being delivered.
[0033] In practice, the remaining delivery distance is determined by the order delivery platform based on the navigation path between the rider's initial location and the current order destination. If the order includes a pickup point and a delivery point and the rider has not yet arrived at the pickup point, the remaining delivery distance is the sum of the road distance from the rider's initial location to the pickup point and the road distance from the pickup point to the delivery point. If the rider has already picked up the goods, the remaining delivery distance is the road distance from the rider's initial location to the delivery point.
[0034] Feature recognition is performed on the back-end inventory data of the battery swapping stations stored in the operation and management platform to obtain the inventory network dataset of each battery swapping station at the current time. The inventory network dataset of the battery swapping stations includes the station location, station service range, destination range, swappable inventory quantity, and a list of neighboring stations.
[0035] In practice, the back-end inventory data of the battery swapping station is obtained by the battery swapping station operation and management platform, which stores the battery swapping cabinet operation records, bay status records, battery status records, battery swapping order records, site basic file records, and site spatial relationship records. The battery swapping cabinet operation records include the battery swapping cabinet number, the battery swapping cabinet online status, and the site to which the battery swapping cabinet belongs. The bay status records include the bay number, bay occupancy status, and bay availability status. The battery status records include the battery number, battery power status, battery charging status, battery fault status, and battery lock status. The battery swapping order records include battery removal records, battery return records, and battery swapping completion records. The site basic file records include the site number, site name, site address, and site location. The site spatial relationship records include the road distance between sites, the site service area, and a list of neighboring sites.
[0036] During data processing, the site location is determined by the latitude and longitude of the site in the site basic file record. If the site basic file record only contains the site address, the site latitude and longitude are obtained through address coordinate processing. After the address coordinate processing is completed, it should be confirmed by the operations personnel once. The confirmed site location is used as the fixed site location for subsequent calculations.
[0037] In practice, the service area of a station is determined in two ways. The first way is to take the station location as the center and combine it with the road network to generate a service area that can be reached within a certain travel time. The second way is to set a service radius centered on the station location to form a service area. In the scenario of urban food delivery riders, the radius of the station service area can be set to 300 meters to 1000 meters. In densely populated commercial areas, it can be 300 meters to 600 meters. In residential areas or areas where stations are sparsely distributed, it can be 600 meters to 1000 meters.
[0038] It should be noted that the arrival range is used to determine whether the rider has actually arrived at the battery swapping station. The arrival range should be smaller than the station's service area. The arrival radius should be set at 30 to 80 meters with the station location as the center. If the station is located in a large commercial area, park, or underground parking area, the arrival range can be adjusted to the area around the station entrance, rather than just being defined by the station's center point.
[0039] During data processing, the exchangeable inventory is determined by the battery status record and the warehouse status record. Only batteries that simultaneously meet the following conditions are included in the exchangeable inventory: the battery is fully charged, the warehouse occupancy status is "battery available", the warehouse availability status is "available", the battery fault status is "normal", the battery lock status is "unlocked", and the battery charging status is "completed" or "allowed to be exchanged". Batteries that are charging, faulty, locked, under maintenance, occupied by orders, or have not reached the exchangeable power standard are not included in the exchangeable inventory.
[0040] In practice, the list of neighboring stations is generated based on the road distance between stations, road access time, and the proximity of the station service areas. If the road distance between two battery swapping stations is less than the preset proximity distance, or if the service areas of the two stations overlap, they will be added to the list of neighboring stations. The preset proximity distance is set to 800 to 3000 meters, 800 to 1500 meters in densely populated commercial areas, and 1500 to 3000 meters in sparsely distributed areas.
[0041] Example 3 Please refer to Figure 1 Specifically, the logic for determining the rider operational status of each rider is as follows: Based on the order dataset of each rider's trajectory, the order status of each rider is read, and the corresponding riders in the delivery status are constructed into an operational status judgment group. The current battery level and remaining delivery distance of each rider in the operational status judgment group are read to determine the battery availability status of each rider after completing the current delivery task.
[0042] In practice, the order status is read first. Only riders whose orders are in delivery status are included in the operation status judgment group. Riders whose orders are not in delivery status are not included in the potential battery swapping rider judgment, so as to avoid misjudging riders who are resting, offline, pausing order taking, or have completed orders as riders who are about to consume battery swapping inventory.
[0043] During data processing, the amount of electricity required to complete the current delivery task is determined based on the remaining delivery distance and the vehicle's power consumption per unit distance. The vehicle's power consumption per unit distance can be the average power consumption of similar vehicles in the same area over the past 7 to 30 days, or the average actual power consumption of the rider over the past 3 to 10 deliveries. When the rider's personal historical data is insufficient, the regional average power consumption of similar vehicles is used.
[0044] In practice, if the operator needs to make a conservative prediction, a reserved operating power should be added to the power consumption for completing the current delivery task. The reserved operating power is used to cover the basic power demand of the rider when he / she arrives at the order destination and goes to the battery swapping station. The reserved operating power is set according to the power consumption corresponding to the average distance between stations, or set to 5% to 15% of the current full battery capacity, 5% to 10% in densely populated commercial areas, and 10% to 15% in sparsely populated areas.
[0045] The system reads the rider's initial position and direction, and matches the path formed by the rider's initial position along the rider's direction with the service area of each battery swapping station to determine the path matching status of each rider.
[0046] In practice, the trajectory pointing path is not an infinitely extending straight line, but a predicted driving path formed within a future time window based on the rider's initial position, rider's direction, and driving speed. If the order delivery navigation route can be obtained, it will be used as the trajectory pointing path. If the navigation route cannot be obtained, the trajectory pointing path will be formed by extending along the road network from the rider's initial position.
[0047] During data processing, if the trajectory path intersects with the station's service area, it means that any part of the trajectory path enters the station's service area, or the trajectory path intersects with the boundary of the station's service area. The judgment is made by geofencing or road grid matching, and the output result is either a matchable or unmatchable battery swapping station status.
[0048] Based on the order status, battery availability, and route matching status of the corresponding rider, the rider operation status of the corresponding rider is constructed. The trajectory pointing to the path is the driving trajectory path formed by starting from the rider's initial position and extending along the rider's direction.
[0049] In practice, the rider's operational status includes the order status field, the battery availability status field, and the route matching status field. The order status field records whether the rider is in the process of delivery or not. The battery availability status field records whether the rider can continue delivery or not. The route matching status field records whether the rider can be matched with a battery swapping station or not. These three fields together form the data basis for subsequent screening of potential battery swapping riders.
[0050] The available battery status includes a status where delivery can continue and a status where delivery cannot continue. If the current battery level of the corresponding rider is not less than the battery level required to complete the current delivery task, the rider's available battery status will be marked as a status where delivery can continue. If the current battery level is less than the battery level required to complete the current delivery task, the rider's available battery status will be marked as a status where delivery cannot continue. The battery level required to complete the current delivery task is the battery level required to travel the remaining delivery distance.
[0051] In practice, the current battery level and the battery level used to complete the current delivery task should both be converted to the same unit before comparison. They should be uniformly converted to battery percentage, remaining battery capacity, or driving range. When using battery percentage, the battery level used to complete the current delivery task should also be converted to battery percentage. When using driving range, the current battery level should be converted to remaining driving range.
[0052] The path matching status includes a matchable battery swap station status and an unmatchable battery swap station status. The rider's trajectory path is determined based on the rider's initial location and direction. If the trajectory path intersects with the service area of any battery swap station, the corresponding rider's path matching status is marked as a matchable battery swap station status. If the trajectory path does not intersect with the service area of any battery swap station, the corresponding rider's path matching status is marked as an unmatchable battery swap station status.
[0053] Specifically, the rider's direction is not directly determined by a single location point or abstract direction vector. Instead, the validity of the trajectory points continuously uploaded by the rider's mobile terminal before the current prediction time is first filtered. Specifically, the location confidence, sampling time, location coordinates, instantaneous speed, and road reachability distance corresponding to each trajectory point are read. Trajectory points with location confidence below a preset confidence threshold are marked as drift points and removed. The straight-line distance, road reachability distance, and sampling time interval between two adjacent sampling points are compared. When the road reachability distance corresponding to an adjacent sampling point is significantly greater than the distance the rider could reach within that sampling time interval according to the road speed limit or the historical highest delivery speed, the subsequent sampling point is marked as a jump point and removed. When the speed corresponding to multiple consecutive sampling points is lower than the dwell speed threshold, and the duration exceeds the dwell time threshold, this trajectory segment is marked as a parking waiting segment. Location points within this parking waiting segment are not included in the rider's direction calculation. After the above filtering is completed, the retained valid location points are mapped to passable road segments in the road network, and a sequence of valid road matching points is generated in chronological order. Subsequently, the most recent effective road matching points before the current prediction time are selected. The road segments formed on the road network between adjacent effective road matching points are taken as road forward segments, and a stable direction is determined based on the continuous travel direction of multiple road forward segments. When the angle between adjacent road forward segments is greater than a preset turning angle threshold, it is determined that the rider has turned at the intersection. The road forward segments before the turn are no longer used in the direction calculation. Instead, the rider's direction is re-determined based on the continuous effective road forward segments formed after the turn. Thus, the rider's direction is a stable driving direction determined jointly by the denoised effective trajectory points, the road network matching results, and the continuous road forward segments after the turn. This can eliminate interference caused by signal drift, waiting in place, short-term point drops, and intersection turns on the direction judgment.
[0054] It should be noted that, in practice, the trajectory pointing path is not an infinite ray drawn from the rider's initial position, but rather a finite-length projected travel path formed under the constraints of the road network. Specifically, if the order delivery platform can return the navigation path corresponding to the rider's current order, the navigation path from the rider's initial position to the order's destination or waypoint will be prioritized as the trajectory pointing path. If the order delivery platform cannot return the navigation path temporarily, the road matching point corresponding to the rider's initial position or its road node will be used as the path starting point. The passable candidate road segments connected to this path starting point will be read in the road network, and the angle between the road extension direction of each candidate road segment and the aforementioned stable direction will be compared. The candidate road segment with the smallest angle that satisfies the vehicle passage attributes, road passage direction, and road connectivity relationship will be selected as the starting extension road segment. Subsequently, the system iterates segment by segment along the road network according to road connectivity. Upon reaching each road node, it continues to select the next accessible road segment connected to that node that has a smaller angle with the current stable direction or the extension direction of the previous road segment, and does not violate the road's travel direction. This continues until the cumulative road length reaches the maximum extension distance determined by the driving speed and future time window, or until the order navigation endpoint, road breakpoint, or impassable road segment is reached. This generates a finite-length road network path composed of multiple road segment polylines. This trajectory path is used for spatial matching with the service area of the battery swapping station. During matching, the station service area is used as a geofence region. It is determined whether any road segment polyline in the trajectory path enters the geofence or intersects its boundary. If any road segment polyline enters the station service area or intersects its boundary, it is determined that the trajectory path intersects with the station service area; otherwise, it is determined that there is no intersection. Therefore, the trajectory pointing to the path is generated based on the priority of order navigation path, the recursive supplement of road network, and the combination of driving speed and future time window to limit the path length. This can be clearly distinguished from simple ray drawing and can form a specific spatial path object that can be directly matched by geofencing.
[0055] Example 4 Please refer to Figure 1 and Figure 2 Specifically, the logic for determining the potential set of battery swapping riders is as follows: Based on the order dataset of each rider's trajectory and the inventory network dataset of each battery swapping station, the rider's initial position and the arrival range of each battery swapping station are extracted. When the rider's initial position does not fall within the arrival range of any battery swapping station, the rider is determined to be in a state of not having arrived at the battery swapping station.
[0056] Furthermore, the status of not having reached a battery swapping station is not only determined by the current location, but also dynamically determined by combining the time of the most recent entry into the station's range, the time of the most recent departure from the station's range, the time of the most recent battery swap completion, and the duration of the departure protection period. When a rider is not currently within any station's range, but the interval between the time of their most recent battery swap completion and the current time is less than the duration of the departure protection period, or their current battery level is higher than the departure battery level confirmation threshold, they are marked as being in the departure protection state and excluded from the set of potential battery swapping riders. Only after the departure protection state ends, and based on the remaining delivery distance, the power consumption per unit distance, and the trajectory pointing to the path, if it is predicted that there is a battery swapping gap in the future time window, are they marked as potential battery swapping riders.
[0057] In practice, the rider's initial location is spatially matched with the arrival range of all battery swapping stations. If the rider's initial location is within the arrival range of any battery swapping station, it is determined that the rider has arrived at or is near a battery swapping station and is not considered a potential battery swapping rider who has not yet arrived at a battery swapping station. If the rider's initial location is not within the arrival range of any battery swapping station, it is determined that the rider has not yet arrived at a battery swapping station.
[0058] In this embodiment, the arrival range and the station service range serve different purposes. The station service range is used to determine whether the rider is likely to enter the battery swapping station coverage area in the future, while the arrival range is used to determine whether the rider has already arrived at the station. The radius of the arrival range is smaller than the radius of the station service range.
[0059] Based on the determination that the corresponding rider is not yet at the battery swapping station, and combined with the order status and rider operation status of each rider, the corresponding riders who are simultaneously in the delivery, delivery cannot continue, not yet at the battery swapping station, and available battery swapping station status are marked as potential battery swapping riders. The rider's initial location, rider direction, current battery level, order status, and remaining delivery distance of each potential battery swapping rider are recorded to construct a potential battery swapping rider set. Among them, potential battery swapping riders are riders who have not yet arrived at the battery swapping station and need to consume the battery swapping station's inventory within a future time window.
[0060] In practice, four conditions are checked for each rider: first, whether the order status is in delivery; second, whether the battery status is unavailable for delivery; third, whether the rider is not yet at a battery swapping station; and fourth, whether the route matching status is a matchable battery swapping station. When all four conditions are met, the rider is added to the potential battery swapping rider set.
[0061] During data processing, each record in the potential battery swapping rider set includes the potential battery swapping rider's identifier, rider's initial location, rider's direction, driving speed, current battery level, order status, remaining delivery distance, and trajectory path. This allows the basic data of the same rider to be read for subsequent target battery swapping station matching, arrival sequence sorting, and transfer of riders who have not yet been accepted.
[0062] Example 5 Please refer to Figure 1 Specifically, the logic for determining the target list of battery swapping stations is as follows: Based on the potential battery swapping rider set, the rider's initial position and direction are extracted for each potential battery swapping rider. Based on the inventory network dataset of each battery swapping station, the station location, station service range, and available swapping inventory are extracted for each battery swapping station.
[0063] In practice, each potential battery swapping rider is processed individually. The rider's initial location, direction, and trajectory are read one by one. At the same time, the location, service range, and available battery swapping inventory of all battery swapping stations are read to form the station matching data corresponding to the potential battery swapping rider.
[0064] The potential battery swapping riders' trajectories intersect with the service area of the station at the battery swapping station, and the station is recorded as a candidate battery swapping station. The availability of inventory at the candidate battery swapping station is analyzed. When the available inventory of the candidate battery swapping station is greater than zero, the corresponding candidate battery swapping station is recorded as a bindable battery swapping station.
[0065] In practice, candidate battery swapping stations refer to battery swapping stations on the spatial path that can be passed by or entered into the service area by the potential battery swapping rider. Bindable battery swapping stations are those that are further filtered from candidate battery swapping stations and currently have available swapping inventory. When the available swapping inventory of a candidate battery swapping station is zero, it will not be considered as a bindable battery swapping station even if the spatial location matches.
[0066] Among the available battery swapping stations corresponding to the same potential battery swapping rider, the one with the shortest distance from the rider's initial location will be designated as the target battery swapping station for that potential rider. A list of target battery swapping stations will be determined based on the binding relationship between each potential rider and its corresponding target battery swapping station. Each potential rider will be bound to a unique target battery swapping station in the list of target battery swapping stations.
[0067] During data processing, the shortest distance between the rider's initial location and the location of the available battery swapping station is determined by the road distance between the rider's initial location and the location of the station, rather than the straight-line distance. If the platform cannot obtain the road distance temporarily, the straight-line distance is used as an approximate distance. However, when road network data can be obtained, the road distance is given priority.
[0068] In practice, if a potential battery swapping rider has multiple available battery swapping stations with the same road travel distance, the station with the larger available battery swapping inventory will be selected as the target station. If the available battery swapping inventory is also the same, the station with the longer intersection distance between its service area and the trajectory path will be selected as the target station, so as to ensure that each potential battery swapping rider will ultimately only be bound to one target battery swapping station.
[0069] Example 6 Please refer to Figure 1 Specifically, the logic for generating the virtual inventory of the corresponding battery swapping station is as follows: The number of potential battery swapping riders bound to the same target battery swapping station in the target battery swapping station list is counted to obtain the number of potential battery swapping riders for each target battery swapping station.
[0070] In practice, the target battery swapping station list is grouped according to the target battery swapping station identifier. The number of potential battery swapping riders bound under the same target battery swapping station identifier is the number of potential battery swapping riders for that target battery swapping station.
[0071] The number of potential battery swapping riders and the available swapping inventory of the corresponding target battery swapping station are analyzed by deducting inventory from the arrival sequence to determine the virtual occupied inventory of the corresponding target battery swapping station. The virtual occupied inventory is the inventory occupied amount that is deducted in advance from the available swapping inventory of the corresponding target battery swapping station during the calculation of future available inventory.
[0072] In practice, the virtual inventory occupancy represents the inventory occupancy of the target battery swapping station that has not yet been actually swapped, but has been determined to be consumed within a future time window based on rider trajectory and order status. This value does not change the actual storage status of the battery swapping cabinet, and is not shown to riders as real locked inventory, but is used for dynamic inventory prediction calculation in the background.
[0073] During data processing, the role of virtual inventory occupancy is to write the future inventory consumption caused by potential battery swapping riders into the inventory forecast in advance, so as to identify the future inventory pressure of the target battery swapping station before the riders arrive at the station.
[0074] Example 7 Please refer to Figure 1 Specifically, the logic for the arrival sequence inventory deduction analysis is as follows: The number of potential battery swapping riders bound to the corresponding target battery swapping station is compared and analyzed with the available battery swapping inventory of the corresponding target battery swapping station. If the number of potential battery swapping riders is less than or equal to the available battery swapping inventory, the number of potential battery swapping riders of the corresponding target battery swapping station is used as the virtual occupied inventory.
[0075] In practice, when the number of potential battery swapping riders is less than or equal to the available inventory, it means that the target battery swapping station can accommodate all the bound potential battery swapping riders. Therefore, each potential battery swapping rider corresponds to one inventory unit, and the virtual inventory unit is equal to the number of potential battery swapping riders.
[0076] If the number of potential battery swapping riders exceeds the available inventory, then based on the target battery swapping station list, the station location of the corresponding target battery swapping station and the rider's initial location and speed of each potential battery swapping rider bound to the corresponding target battery swapping station are obtained. Then, according to the order in which each potential battery swapping rider bound to the same target battery swapping station arrives at the target battery swapping station, each potential battery swapping rider is written into the arrival sequence list of the corresponding target battery swapping station.
[0077] In practice, the order of arrival at the target battery swapping station is determined by the estimated arrival time. The estimated arrival time is determined by the road distance and speed from the rider's initial location to the target battery swapping station. If the speed is zero or missing, the average speed of the rider's most recent effective delivery route is used. If the rider's historical speed is also missing, the average speed of riders of the same type in the same area is used.
[0078] During data processing, if two potential battery swapping riders have the same estimated arrival time, the rider with the lower current battery level will be prioritized. If the current battery levels are also the same, the rider with the longer remaining delivery distance will be prioritized. If they are still the same, they will be sorted according to the rider identifier in the rider trajectory order dataset to ensure that each potential battery swapping rider in the arrival sequence list has a unique sorting number.
[0079] For any target battery swapping station's arrival sequence list, based on the order in which each potential battery swapping rider arrives at the target battery swapping station, obtain the sorting number of each potential battery swapping rider arriving at the corresponding target battery swapping station. For any target battery swapping station's arrival sequence list, read the corresponding sorting number sequentially according to the arrival order of each potential battery swapping rider. Subtract the number of potential battery swapping riders who have been identified as effectively occupied before the sorting number from the available swapping inventory of the target battery swapping station. The difference is the actual available swapping inventory when the potential battery swapping rider arrives at the station. Among them, the actual available swapping inventory corresponding to the potential battery swapping rider with sorting number 1 is equal to the available swapping inventory of the corresponding target battery swapping station, and the actual available swapping inventory corresponding to the potential battery swapping rider with sorting number k is equal to the available swapping inventory of the corresponding target battery swapping station minus k-1. To avoid treating preceding riders as absolute occupancy, arrival credibility is calculated for each potential battery swapping rider. Arrival credibility is determined by trajectory stability, overlap between the trajectory path and the service area of the target battery swapping station, battery shortage, order continuity status, and historical station preferences. When deducting inventory in the arrival sequence, the effective occupancy quantity is calculated by summing the arrival credibility of each potential battery swapping rider before the sort number, and the calculated effective occupancy quantity is used to calculate the actual swappable inventory at the time of arrival.
[0080] In this embodiment, the arrival sequence inventory deduction process involves, for the potential battery swapping rider with the kth sorted number within the same target battery swapping station, first reading the arrival credibility of each potential battery swapping rider with a sorted number less than k, summing them up, and then rounding up to obtain the effective occupancy quantity already formed before the rider's arrival. The calculation formula is as follows: In the formula, This represents the effective number of battery swapping stations occupied before the k-th potential battery swapping rider reaches the target station. This represents the arrival confidence level of the potential battery swapping rider with sort number i. This indicates the rounding up operator; however, this formula does not simply deduct one battery per rider for all riders who have not yet arrived at their destination. Instead, it calculates based on the reliability of each rider's actual arrival and consumption of inventory, thereby reducing the problem of excessive virtual inventory due to riders temporarily changing routes, canceling orders, changing batteries en route, or stopping delivery. To extract a more stable rider orientation from noisy GPS track points, before calculating the arrival confidence level, the trajectory stability is first calculated based on the deviation fluctuation between the location point and the matching road segment, as well as the directional angle fluctuation of the continuous road travel segment. The calculation formula is as follows: In the formula, Indicates trajectory stability. This represents the distance fluctuation value from the valid location point to the road segment being matched. This formula represents the fluctuation value of the direction angle of continuous road travel. It is used to analyze the following: When the rider is in a stable driving state, the distance fluctuation between the positioning point and the road matching segment is small, and the change of the continuous forward direction angle is also small. At this time, the trajectory stability is high. When the rider turns at an intersection, stops and waits, or experiences positioning drift or GPS jitter, the distance fluctuation value or direction angle fluctuation value increases, which reduces the trajectory stability and thus reduces the impact of abnormal trajectories on subsequent route prediction and inventory occupancy judgment. To calculate the trajectory stability, the distance fluctuation and direction angle fluctuation values need to be determined first. The distance fluctuation value is determined as follows: Using the current prediction time as a baseline, multiple valid location points continuously reported by the rider are retrieved. The number of valid location points is dynamically determined based on the riding status, ranging from 5 to 10. Each valid location point is matched to the nearest passable road segment in the road network, obtaining the perpendicular point of that location point on that road segment, and the straight-line distance between the location point and the perpendicular point is calculated as the lateral offset. A sequence is formed from the lateral offsets corresponding to all valid location points, and the sample standard deviation of this sequence is calculated. The result is the distance fluctuation value. A smaller distance fluctuation value indicates a more stable lateral deviation between the rider's actual trajectory and the road network; conversely, a larger value indicates significant deviation fluctuation.
[0081] The direction angle fluctuation value is determined as follows: Two adjacent valid positioning points are selected sequentially over time. The shortest travel path from the former to the latter is planned on the road network, and the overall orientation angle of this path is extracted. The angle is measured clockwise with true north as the reference. Multiple consecutively obtained direction angles are then de-circled. Specifically, if the difference between two adjacent angles is greater than 180 degrees, it is adjusted to within the range of -180 to +180 degrees by adding or subtracting 360 degrees. The standard deviation of the de-circled direction angle sequence is calculated, and the result is the direction angle fluctuation value. A smaller direction angle fluctuation value indicates a more stable riding direction, while a larger value indicates frequent changes in direction.
[0082] After obtaining the distance fluctuation value and the direction angle fluctuation value, add the two together, add 1, and then divide 1 by the sum. The quotient is the trajectory stability. When the rider is in a stable riding state, both the distance fluctuation value and the direction angle fluctuation value are close to 0, and the trajectory stability is close to 1. When the rider changes lanes, stops and waits, drifts in positioning, or frequently changes direction, the fluctuation value increases, and the trajectory stability decreases accordingly. To determine the spatial matching strength between the trajectory path and the service area of the target battery swapping station, the path hit rate is calculated using the following formula: In the formula, Indicates path hit rate. This indicates the length of the road segment within the service area of the target battery swapping station along the trajectory. This indicates the total length of the path pointed to by the trajectory. The longer the overlapping section of the path pointed to by the trajectory is within the service area of the target battery swapping station, the higher the probability that the rider will pass through or enter the service area of the battery swapping station in the future, and the greater the path hit rate. When the path pointed to by the trajectory only slightly intersects the boundary of the service area or basically does not enter the service area, the path hit rate is low, thus avoiding the mistaken binding of riders to the target battery swapping station based solely on a rough consistency of direction. To determine whether a rider has a genuine need for battery swapping, the battery gap is calculated based on the difference between the battery required to complete the current delivery task and reach the battery swapping station and the rider's current battery level. The calculation formula is as follows: In the formula, Indicates the degree of power shortage; This indicates the amount of electricity required to complete the current delivery task and reach the battery swapping station. This indicates the rider's current battery level. This means that when the current battery level is low, the remaining battery level is deducted; when the current battery level is sufficient, zero is retrieved. Less than This indicates that the rider's current battery level is insufficient to complete the current delivery task and reach the battery swapping station. Greater than zero, when Not less than hour, A value of zero indicates that the rider has a low urgency to swap batteries within the current forecast time window; After obtaining trajectory stability, path hit rate, and battery shortage, the arrival credibility of potential battery swapping riders is calculated by combining the order status interruption flag value and the departure protection attenuation value after the most recent battery swap. The calculation formula is as follows: In the formula, Indicates the reliability of the arrival station. , and These represent trajectory stability, path hit rate, and battery gap, respectively. and These represent the order status interruption flag value and the rider's departure protection attenuation value after the most recent battery swap, respectively. This formula is used to comprehensively judge the probability that the rider actually reaches the target battery swap station and consumes the inventory. The more stable the trajectory, the closer the path is to the target battery swap station, and the more obvious the battery shortage, the higher the probability of the rider actually reaching the target battery swap station and consuming the inventory. The higher the value, the better; if the rider's order is interrupted, delivery stops, or they have just completed a battery swap and are in the off-site protection phase, then... or Increase, make This reduces the risk of misjudging riders who have just left the station or whose order status is unstable as riders who are about to arrive at the station to exchange batteries; The order status interruption flag value ranges from 0 to 1, representing the degree to which the order status inhibits the rider from continuing to the target battery swapping station. The specific assignment rules are as follows: when the order status is in the process of picking up, delivering, or en route and no abnormality occurs, the value is 0; when the order is reassigned, the destination is changed, or the route is recalculated but the rider is still in the delivery state, the value is 0.3; when the rider stops accepting orders, the location is continuously missing for a preset location missing time, or the order is waiting for the merchant to prepare the food or waiting for the user to receive the goods, causing the forward trend to be interrupted, the value is 0.5; when the order is canceled, the order is completed, the rider is offline, the rider quits delivery, or the order is terminated by the system, the value is 1, and the virtual occupancy record corresponding to the rider is marked as a pending invalidation record, and will no longer participate in the next round of deduction as valid inventory occupancy.
[0083] Furthermore, the off-station protection attenuation value is used to distinguish between riders who have not yet arrived at the station and those who have just left after completing a battery swap. The initial value of the off-station protection attenuation value is 1. Its attenuation process is related to the time interval after the rider's last battery swap and the distance traveled after leaving the battery swap station. A pre-set off-station protection duration and an off-station protection distance are used. The off-station protection duration ranges from 120 seconds to 300 seconds, and the off-station protection distance ranges from 150 meters to 300 meters. Timing starts from the moment the rider completes their last battery swap, and simultaneously, the rider's actual travel distance on the road network is accumulated from the moment they last left the battery swap station's arrival area. The ratio of the current time interval to the off-station protection duration and the ratio of the current travel distance to the off-station protection distance are calculated, and the larger of the two is taken as the attenuation progress. Subtracting this attenuation progress from 1 yields the current off-station protection attenuation value. When the attenuation progress reaches or exceeds 1, the off-site protection attenuation value is directly set to 0. Before the attenuation value drops to 0, the rider is marked as being in the off-site protection state and will not participate in the judgment of potential battery swapping riders. After the attenuation value drops to 0, the rider will resume the normal judgment process.
[0084] In practice, k in the sorting number is a positive integer, which is used to indicate the arrival order of the potential battery swapping rider in the arrival sequence list of the same target battery swapping station. The number of actual potential battery swapping riders determined before the sorting number is the number of riders who have already occupied the inventory of the target battery swapping station before the potential battery swapping rider arrives.
[0085] Potential riders with less than one available swap space upon arrival are identified as unaccepted potential swap riders and added to the unaccepted rider list of the corresponding target swap station. Potential riders with at least one available swap space upon arrival are identified as actual potential swap riders. Those potential riders with at least one available swap space upon arrival in the arrival sequence list of the corresponding target swap station are identified as actual potential swap riders. The number of these actual potential swap riders is counted, and this number is the virtual occupied inventory of the target swap station.
[0086] The virtual occupied inventory is used to represent the number of riders who will actually consume the station's inventory in the future time window, based on the rider's trajectory prediction before actual battery swapping occurs. This number has been used to screen potential battery swapping riders in the arrival sequence deduction analysis process, so it should not be deducted from the swappable inventory again when calculating the future available inventory. The list of riders who have not accepted battery swaps includes potential battery swapping riders who have not accepted battery swaps, the corresponding target battery swapping station, and the actual swappable inventory of the corresponding target battery swapping station.
[0087] In practice, if the actual available battery swap inventory is less than one, it means that when the potential battery swap rider arrives at the target battery swap station, the target battery swap station has no batteries available for the rider to swap out, so the rider is added to the list of riders who have not been accepted; if the actual available battery swap inventory is not less than one, it means that when the potential battery swap rider arrives at the target battery swap station, the target battery swap station still has at least one battery available for swapping, so the rider is identified as an actual potential battery swap rider.
[0088] Example 8 Please refer to Figure 1 Specifically, the logic for determining future available inventory and the list of sites at risk of power shortages is as follows: Based on the target battery swapping station list, read the swappable inventory of each target battery swapping station from the battery swapping station inventory network dataset, and read the corresponding virtual occupied inventory of each target battery swapping station.
[0089] In practice, the target battery swapping station identifier in the target battery swapping station list is used as an index to read the swappable inventory of the target battery swapping station from the battery swapping station inventory network dataset, and the virtual occupied inventory of the target battery swapping station is read from the aforementioned arrival sequence inventory deduction analysis results.
[0090] Subtract the virtual occupied inventory of the corresponding target battery swapping station from the swappable inventory of the target battery swapping station to obtain the future available inventory of the target battery swapping station.
[0091] Furthermore, the future available inventory is calculated using rollbackable virtual occupancy records. Each virtual occupancy record is bound to a potential battery swapping rider identifier, a target battery swapping station, an estimated arrival time, an arrival credibility, and an expiration time. If a rider fails to enter the target battery swapping station's arrival range after the estimated arrival time and the rollback waiting time has expired, or if their trajectory has deviated from the target battery swapping station's service range, or if the order status changes to canceled, completed, or suspended, or if the rider completes a battery swap at another battery swapping station, the corresponding virtual occupancy record will be marked as invalid and released from the virtual occupancy inventory. The future available inventory and the list of stations at risk of power shortage will then be recalculated.
[0092] In the rolling forecasting process, in order to determine the deviation between the virtual inventory occupancy and the actual battery swapping occupancy, a forecast deviation correction is calculated, specifically as follows: In the formula, This indicates the actual number of batteries occupied during the future time window after it ends. This indicates the effective virtual occupancy quantity obtained from this round of prediction; when When the deviation exceeds the preset threshold, the screening requirements for trajectory stability, path hit rate and order continuity status in subsequent rounds are increased, or the expiration time of virtual occupancy records is shortened, so that the next round of inventory forecasting can reduce false reports of recharging due to riders who have not arrived at their destination.
[0093] In this embodiment, the future available inventory is the remaining inventory of the target battery swapping station after deducting the inventory that has been pre-occupied by potential battery swapping riders. The future available inventory is used to determine whether the target battery swapping station can still maintain the minimum battery swapping service capacity within the future time window.
[0094] Furthermore, an inventory change monitoring mechanism is set up for the actual inventory of battery swapping stations. When the battery swapping station operation and management platform detects that maintenance personnel manually replenish fully charged batteries, batteries are transferred to the station from other stations, riders actually complete battery swaps, swappable batteries are locked, faulty batteries are made available again, or batteries are removed from the shelves for maintenance, an inventory change event is generated, which includes the station identifier, change type, change quantity, and change time. Upon receiving an inventory change event, the previous round of future available inventory is not used. Instead, the latest swappable inventory after the inventory change event is immediately used as the new calculation benchmark, and the previous round of power shortage risk warning for that station is marked as pending review.
[0095] During recalculation, virtual occupancy records are first deleted for those that have actually completed battery swapping, whose orders have been terminated, whose expiration time has expired, or whose trajectories have deviated from the service range of the target battery swapping station. Then, virtual occupancy records that are still in delivery, still meet the path matching requirements, and whose arrival credibility is not lower than the credibility threshold are retained. Subsequently, based on the new swappable inventory, the arrival sequence inventory deduction, future available inventory calculation, and power shortage risk assessment are re-executed. If the recalculated future available inventory is no longer lower than the safety inventory threshold, the original power shortage risk site warning is revoked or downgraded. If the recalculated inventory is still lower than the safety inventory threshold, the swappable inventory, virtual occupancy inventory, future available inventory, and warning generation time in the power shortage risk site list are updated, and the calculation of the receiving battery swapping station list and the power shortage propagation binding list is retried.
[0096] Through the aforementioned inventory change synchronization update mechanism, manual power replenishment or on-site inventory changes will be immediately reflected in the virtual occupancy model, ensuring that the virtual occupancy inventory is no longer disconnected from the real physical inventory. At the same time, the system can avoid continuing to output old power shortage risk warnings after the site has been replenished, and can also avoid judging sufficient inventory based on old inventory levels after batteries are locked or removed from the shelves, thereby ensuring that the dynamic inventory prediction results are consistent with the real-time swappable inventory status of the battery swapping station.
[0097] A safety stock threshold greater than zero is pre-set, and the future available inventory of the corresponding target battery swapping station is compared with the safety stock threshold. When the future available inventory of the corresponding target battery swapping station is less than the safety stock threshold, the corresponding target battery swapping station is identified as a power shortage risk site, and a power shortage risk site list is constructed.
[0098] In practice, the safety stock threshold is set by the operators based on the historical battery swapping intensity and maintenance power replenishment response time of the site. If the historical average battery swapping demand of a site is high within the maintenance power replenishment response time, the safety stock threshold is set to a higher value. If the historical average battery swapping demand of a site is low within the maintenance power replenishment response time, the safety stock threshold is set to a lower value. Usually, the safety stock threshold is greater than zero in order to retain the minimum emergency stock.
[0099] During data processing, the safety stock threshold is determined based on the historical average number of battery swaps at the site within the power replenishment response time. For example, if the power replenishment response time is 30 minutes, the number of batteries corresponding to the historical average number of battery swaps in the same 30-minute period at the site is taken as the safety stock threshold, or 1 to 2 batteries are added on top of this number as an emergency reserve. The specific value is pre-configured by the operation platform according to the site level and operation strategy.
[0100] The list of power shortage risk sites includes the power shortage risk site, the corresponding swappable inventory for the power shortage risk site, the corresponding virtual occupied inventory for the power shortage risk site, the corresponding future available inventory for the power shortage risk site, and the corresponding number of potential battery swapping riders for the power shortage risk site.
[0101] In practice, each record in the list of power shortage risk sites corresponds to a target battery swapping station. This record includes at least the site identifier, available swappable inventory, virtual occupied inventory, future available inventory, number of potential battery swapping riders, and safety stock threshold, which facilitates the subsequent matching of battery swapping stations to power shortage risk sites.
[0102] Example 9 Please refer to Figure 1 Specifically, the logic for determining the list of battery swapping stations and the list of issues related to power shortage propagation is as follows: Based on the network dataset of battery swapping station inventory, for any battery swapping risk station in the list of power shortage risk stations, the list of unaccepted riders corresponding to the power shortage risk station is read, and the list of neighboring stations of the power shortage risk station is extracted; combined with the list of unaccepted riders, the initial location of each unaccepted potential battery swapping rider in the list of unaccepted riders is extracted, and the station location and available battery swapping inventory of the corresponding neighboring stations in the list of neighboring stations of each power shortage risk station are obtained; the neighboring battery swapping station that meets the following conditions is selected as the accepting battery swapping station: the distance between it and the initial location of the unaccepted potential battery swapping rider is the shortest, and its available battery swapping inventory is greater than zero.
[0103] In practice, the power shortage risk site is used as the processing unit. The list of riders who have not been accepted for the power shortage risk site is read. The riders in the list of riders who have been matched with the original target battery swapping station but cannot be accepted by the original target battery swapping station's inventory are then matched with battery swapping stations from the list of neighboring sites of the power shortage risk site.
[0104] During data processing, the selection of a battery swapping station must meet two conditions simultaneously: first, the battery swapping station must be on the list of neighboring stations of the station at risk of power shortage; second, the battery swapping station must have a battery swapping inventory greater than zero. Among the neighboring battery swapping stations that meet the above two conditions, the nearest battery swapping station with the shortest road distance to the initial location of the rider who has not yet accepted potential battery swapping riders is selected as the battery swapping station.
[0105] In practice, if multiple nearby battery swapping stations have the same road distance from the rider who has not yet accepted the battery swapping, the nearby battery swapping station with the larger amount of available swapping stock will be selected as the accepting station; if the available swapping stock is still the same, the nearby battery swapping station that intersects with the trajectory of the rider who has not yet accepted the battery swapping will be selected as the accepting station.
[0106] The number of potential riders who have not yet accepted battery swapping at each designated battery swapping station is counted, and the number of potential riders who have not yet accepted battery swapping at each designated battery swapping station is recorded as the occupied inventory of the corresponding designated battery swapping station; the difference between the swappable inventory and the occupied inventory of the corresponding designated battery swapping station is taken as the future available inventory of the corresponding designated battery swapping station.
[0107] In practice, the amount of inventory occupied represents the amount of inventory occupied by potential riders who have not yet been accepted for battery swapping and have been transferred from power shortage risk sites to accepting battery swapping stations. The future available inventory of accepting battery swapping stations is used to determine whether the accepting battery swapping station can still maintain a safe inventory threshold after accepting transferred riders.
[0108] When the future available inventory of a corresponding battery swapping station is less than the safety stock threshold, the corresponding battery swapping station will be marked as a new power shortage risk site, and the migration binding relationship between the corresponding power shortage risk site, the corresponding unaccepted potential battery swapping rider, and the corresponding battery swapping station will be written into the power shortage propagation binding list; when the future available inventory of a corresponding battery swapping station is greater than or equal to the safety stock threshold, the corresponding battery swapping station will be bound to the corresponding unaccepted potential battery swapping rider, and written into the battery swapping station list; the migration binding relationship between the corresponding battery swapping station and the unaccepted potential battery swapping rider will be written into the battery swapping station list; For riders who have not yet accepted battery swapping services, remove them from the current round's list of riders who have not accepted services. Use each power shortage risk station in the power shortage propagation binding list as a new starting point, iterate and read its list of riders who have not accepted services, extract its list of neighboring stations, and determine the steps of accepting battery swapping stations, until there are no more riders who have not accepted services in the list of riders who have not accepted services. The list of accepting battery swapping stations is used to record the acceptance relationship that has not triggered a power shortage risk after acceptance, and the power shortage propagation binding list is used to record the migration binding relationship that has triggered a new power shortage risk after acceptance.
[0109] It should be noted that generating new migration binding relationships based on the list of neighboring sites corresponding to new power shortage risk sites means that when a battery swapping station, after accepting potential riders who have not yet accepted battery swapping, still has less than the safety stock threshold in its future available inventory, this station is no longer treated as a regular accepting station, but is upgraded to a new power shortage risk site. Starting with this new power shortage risk site, the process continues by reading its list of neighboring sites. From this list, the station with the highest available swapping inventory and the shortest road distance to the unaccepted potential riders is selected as the next round of accepting stations. Then, a new migration binding relationship is established between the new power shortage risk site, the unaccepted potential riders, and the next round of accepting stations. After each round of processing, Riders who have been successfully added to the list of riders eligible for battery swapping but have not yet been accepted, as well as riders who have been added to the list of riders eligible for battery swapping but have not yet been accepted, will be removed from the current round's list of riders eligible for battery swapping. The remaining riders eligible for battery swapping will continue to be matched with neighboring stations until there are no riders eligible for battery swapping in the list of riders eligible for battery swapping, or there are no neighboring stations with a greater than zero inventory available for swapping in the corresponding list of neighboring stations for the remaining riders eligible for battery swapping. The purpose of this process is to simulate the process of the risk of power shortage spreading from the original power shortage risk station to the accepting battery swapping station. It can not only determine whether a station is experiencing a power shortage, but also further identify whether the transfer of riders after the power shortage at that station will continue to reduce the inventory of neighboring stations, thereby forming a multi-site propagation chain of power shortage risk.
[0110] In this embodiment, the list of stations accepting battery swapping services records the relationships between stations that can stably accept potential battery swapping riders who have not yet accepted them. The list of stations with power shortage propagation binding records the relationships between stations that will still be below the safety stock threshold after acceptance. Each record in the list of stations with power shortage propagation binding includes at least the original power shortage risk station, potential battery swapping riders who have not yet accepted them, the battery swapping station accepting them, the amount of inventory occupied after acceptance, and the amount of future available inventory after acceptance.
[0111] In practice, riders who have not yet accepted battery swapping services but are already included in the list of accepting battery swapping stations or the list of stations linked to power shortages will be removed from the list of riders who have not accepted services in the current round. This is to prevent the same rider from being repeatedly matched to multiple accepting battery swapping stations in subsequent rounds. If a rider who has not yet accepted battery swapping services cannot be matched with a nearby battery swapping station with a swapping inventory greater than zero in the list of nearby stations of the current power shortage risk station, then the rider will be retained in the list of riders who have not accepted services and will be used as an early warning target for maintenance power replenishment or manual dispatch.
[0112] The dynamic inventory forecast list includes current inventory items, virtual occupied items, future available inventory items, power shortage risk items, items for receiving swapping stations, and power shortage propagation items. Among them, the current inventory item records the swappable inventory quantity of the corresponding swapping station, the virtual occupied item records the virtual occupied inventory quantity of the corresponding swapping station, the future available inventory item records the future available inventory quantity of the corresponding swapping station, the power shortage risk item records whether the corresponding swapping station belongs to the power shortage risk site list, the item for receiving swapping stations records whether the corresponding swapping station belongs to the receiving swapping station list, and the power shortage propagation item records whether the corresponding swapping station belongs to the power shortage propagation binding list.
[0113] In practice, the dynamic inventory forecast list serves as the final output of this method. Its output objects can be the scheduling page of the battery swapping station operation and management platform, the operation and maintenance power replenishment task generation module, or the rider battery swapping recommendation module. Operators can view the current inventory, future occupied inventory, future available inventory, power shortage risk status, and power shortage risk propagation relationship of each battery swapping station based on the dynamic inventory forecast list.
[0114] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, in the form of a computer program product.
[0115] Those skilled in the art will recognize that the modules and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0116] In addition, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module.
[0117] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0118] In conclusion, the above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for dynamic prediction of battery inventory at battery swapping stations based on rider trajectories, characterized in that: Includes the following steps: S1. Obtain rider trajectory order dataset and battery swapping station inventory network dataset, and determine the rider operation status of each rider based on the rider trajectory order dataset; S2. Based on the riders' operational status, select riders who have not yet reached the battery swapping station but have a need for battery swapping from among the riders, and build a potential battery swapping rider set. S3. Based on the potential battery swapping rider set and the battery swapping station inventory network dataset, determine the target battery swapping station list, and generate the virtual occupied inventory of the corresponding battery swapping station and the list of riders who have not yet accepted the service based on the target battery swapping station list. S4. Based on the swappable inventory and corresponding virtual occupied inventory of each swapping station, determine the future available inventory of each swapping station, and determine the list of power shortage risk sites based on the future available inventory. S5. Based on the list of power shortage risk sites, the battery swapping station inventory network dataset, and the list of riders not yet accepted, determine the list of battery swapping stations to accept and the list of power shortage propagation binding. Combine the virtual occupied inventory, future available inventory, the list of power shortage risk sites, the list of battery swapping stations to accept, and the list of power shortage propagation binding to generate a dynamic inventory prediction list.
2. The method for dynamic prediction of battery inventory at battery swapping stations based on rider trajectories according to claim 1, characterized in that, Obtain rider trajectory order dataset and battery swapping station inventory network dataset, specifically including: By using riders' mobile terminals and order delivery platforms, the current order data set of each rider's trajectory is obtained. The order data set of rider trajectory includes the rider's initial location, rider's direction, driving speed, current battery level, order status and remaining delivery distance. The order status includes delivery status and not delivery status. Feature recognition is performed on the back-end inventory data of the battery swapping stations stored in the operation and management platform to obtain the inventory network dataset of each battery swapping station at the current time. The inventory network dataset of the battery swapping stations includes the station location, station service range, destination range, swappable inventory quantity, and a list of neighboring stations.
3. The method for dynamic prediction of battery inventory at battery swapping stations based on rider trajectories according to claim 2, characterized in that, The specific details of each rider's operational status are as follows: Based on the order dataset of each rider's trajectory, read the order status of each rider, construct the corresponding riders in the delivery status into an operational status judgment group, and read the current battery level and remaining delivery distance of each rider in the operational status judgment group to determine the battery availability status of each rider after completing the current delivery task. The system reads the rider's initial position and direction, and matches the trajectory path formed by the rider's initial position along the rider's direction with the service range of each battery swapping station to determine the path matching status of each rider. Based on the order status, battery availability status, and path matching status of the corresponding rider, the system constructs the rider's operational status, where the trajectory path is the driving trajectory path formed by starting from the rider's initial position and extending along the rider's direction. The available battery status includes a status where delivery can continue and a status where delivery cannot continue. If the current battery level of the corresponding rider is not less than the battery level required to complete the current delivery task, the rider's available battery status will be marked as a status where delivery can continue. If the current battery level is less than the battery level required to complete the current delivery task, the rider's available battery status will be marked as a status where delivery cannot continue. The battery level required to complete the current delivery task is the battery level required to travel the remaining delivery distance. The path matching status includes a matchable battery swap station status and an unmatchable battery swap station status. The rider's trajectory path is determined based on the rider's initial location and direction. If the trajectory path intersects with the service area of any battery swap station, the corresponding rider's path matching status is marked as a matchable battery swap station status. If the trajectory path does not intersect with the service area of any battery swap station, the corresponding rider's path matching status is marked as an unmatchable battery swap station status.
4. The method for dynamic prediction of battery inventory at battery swapping stations based on rider trajectories according to claim 3, characterized in that, The specific group of potential battery swapping riders identified is as follows: Based on the order dataset of each rider's trajectory and the inventory network dataset of each battery swapping station, the rider's initial position and the arrival range of each battery swapping station are extracted. When the rider's initial position does not fall within the arrival range of any battery swapping station, the rider is determined to be in a state of not having arrived at the battery swapping station. Based on the determination that the corresponding rider is not yet at the battery swapping station, and combined with the order status and rider operation status of each rider, the corresponding riders who are simultaneously in the delivery, delivery cannot continue, not yet at the battery swapping station, and available battery swapping station status are marked as potential battery swapping riders. The rider's initial location, rider direction, current battery level, order status, and remaining delivery distance of each potential battery swapping rider are recorded to construct a potential battery swapping rider set. Among them, potential battery swapping riders are riders who have not yet arrived at the battery swapping station and need to consume the battery swapping station's inventory within a future time window.
5. The method for dynamic prediction of battery inventory at battery swapping stations based on rider trajectories according to claim 4, characterized in that, The target list of battery swapping stations includes: Based on the potential battery swapping rider set, the rider's initial position and direction are extracted for each potential battery swapping rider. Based on the inventory network dataset of each battery swapping station, the station location, station service range, and available swapping inventory are extracted for each battery swapping station. The potential battery swapping riders' trajectories intersect with the service area of the station and are recorded as candidate battery swapping stations. The availability of inventory of the candidate battery swapping stations is analyzed. When the available inventory of a candidate battery swapping station is greater than zero, the corresponding candidate battery swapping station is recorded as a bindable battery swapping station. Among the available battery swapping stations corresponding to the same potential battery swapping rider, the one with the shortest distance from the rider's initial location will be designated as the target battery swapping station for that potential rider. A list of target battery swapping stations will be determined based on the binding relationship between each potential rider and its corresponding target battery swapping station. Each potential rider will be bound to a unique target battery swapping station in the list of target battery swapping stations.
6. The method for dynamic prediction of battery inventory at battery swapping stations based on rider trajectories according to claim 5, characterized in that, The virtual inventory of the corresponding battery swapping station includes: Statistical analysis is performed on potential battery swapping riders bound to the same target battery swapping station in the target battery swapping station list to obtain the number of potential battery swapping riders for each target battery swapping station. The number of potential battery swapping riders and the available swapping inventory of the corresponding target battery swapping station are analyzed by deducting inventory from the arrival sequence to determine the virtual occupied inventory of the corresponding target battery swapping station. The virtual occupied inventory is the inventory occupied amount that is deducted in advance from the available swapping inventory of the corresponding target battery swapping station during the calculation of future available inventory.