Data processing method, device, computer equipment, and computer-readable storage medium
By performing order quantity mean processing and cosine similarity clustering in the data processing method, the problem of low vehicle demand accuracy is solved, and more accurate vehicle demand prediction is achieved.
Patent Information
- Application Number
- CN202510035574.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-09
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2045-01-09
AI Technical Summary
The existing data processing methods have fewer target historical time periods in the same period to be evaluated, resulting in less data volume of target historical orders, high chances of vehicle estimate usage, and low accuracy of vehicle demand.
By obtaining the historical order quantity and order user information of the target station in each historical time period, the mean processing is performed to obtain the order quantity mean vector, the cosine similarity algorithm is used for clustering processing, the target comprehensive time period group where the time period to be evaluated is determined, and the vehicle demand is determined based on the target order user information.
By enriching the data volume of target order user information, the accidentality of vehicle demand is reduced and the accuracy of vehicle demand is improved.
Smart Images

Figure CN119444307B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of shared items, and in particular to a data processing method, apparatus, computer equipment, and computer-readable storage medium. Background Art
[0002] Bike-sharing is a common mode of transportation. Due to people's travel habits, the number of shared bikes at each station is often uneven. Therefore, data processing methods are needed to determine the demand for bikes at each station and adjust the number of shared bikes at each station based on the demand.
[0003] The current data processing method obtains the historical order volume of the target station in each historical time period and determines the target historical order volume for each target historical time period that coincides with the period to be evaluated. Then, based on the LSTM network (Long Short-Term Memory) and the target historical order volume, the estimated vehicle usage for the period to be evaluated is predicted, and the vehicle demand is determined based on the estimated vehicle usage.
[0004] However, current data processing methods use fewer target historical time periods corresponding to the period being evaluated, resulting in a smaller amount of data on target historical order volumes. Consequently, the estimated vehicle usage based on target historical order volumes is subject to higher levels of randomness, leading to lower accuracy in vehicle demand. Summary of the Invention
[0005] Based on this, it is necessary to provide a data processing method, apparatus, computer device and computer-readable storage medium to address the above technical problems.
[0006] In a first aspect, the present application provides a data processing method, comprising:
[0007] Obtain the historical order volume and order user information of the target station in each historical time period, and perform mean processing on the historical order volume of the same period in each historical time period to obtain the order volume mean vector of each comprehensive time period;
[0008] Based on the cosine similarity algorithm and the mean vector of each order quantity, clustering processing is performed on each comprehensive time period to obtain each comprehensive time period group;
[0009] Determine a target comprehensive time period group in which the time period to be evaluated is located in each of the comprehensive time period groups, and determine each target order user information in each of the order user information based on the target comprehensive time period group and the time period to be evaluated;
[0010] The vehicle demand of the target station in the time period to be evaluated is determined based on the target order user information.
[0011] In one embodiment, obtaining the historical order volume and order user information of the target station in each historical time period includes:
[0012] Obtaining an order dataset for each user within a historical time period; the historical time period includes each historical time period;
[0013] Traversing each of the order data sets, and counting the historical order volume of the target station in each of the historical time periods;
[0014] Traverse each of the order data sets to determine the order users of the target station in each of the historical time periods, and determine the order user information of the order users.
[0015] In one embodiment, obtaining an order dataset of each user within a historical time period includes:
[0016] Obtaining an initial historical order dataset for each user within a historical time period; the initial historical order dataset includes the starting time and starting location of each historical order;
[0017] For each of the initial historical order data sets, based on the time period format, the format of the starting vehicle usage time of each of the historical orders is converted to obtain the starting vehicle usage time period;
[0018] Determine the starting station corresponding to the starting vehicle location of the historical order based on the station location of each station;
[0019] The initial historical order data set is updated according to each of the starting vehicle use time periods and each of the starting stations to obtain a historical order data set.
[0020] In one embodiment, clustering is performed on each of the comprehensive time periods based on the cosine similarity algorithm and the mean vector of each order quantity to obtain each comprehensive time period group, including:
[0021] For each of the comprehensive time periods, based on the cosine similarity algorithm, calculating the cosine similarity between the order volume mean vector of the comprehensive time period and the order volume mean vectors of the remaining comprehensive time periods;
[0022] Based on the cosine similarities and a preset cosine similarity threshold, screening similar comprehensive time periods from the remaining comprehensive time periods;
[0023] The integrated time period and the similar integrated time period are combined to obtain an integrated time period group.
[0024] In one embodiment, each target order user information includes each first target order user information and each second target order user information, and determining each target order user information in each order user information based on the target comprehensive time period group and the time period to be evaluated includes:
[0025] Determine the same historical time period for each target in the same period as the time period to be evaluated, and determine the first target order user information in the same historical time period for each target in the order user information;
[0026] Based on the target comprehensive time period group and the same historical time period of each target, the similar historical time period of each target is determined, and the second target order user information of each target similar historical time period is determined in the order user information.
[0027] In one embodiment, determining the vehicle demand of the target station during the evaluation period based on the target order user information includes:
[0028] Determining a group of intended users based on each of the target order user information, and determining a fixed number of users based on each of the first target order user information;
[0029] The estimated vehicle usage of the target station during the evaluation period is determined according to the group of intended users and the number of fixed users, and the vehicle demand is determined based on the estimated vehicle usage.
[0030] In one embodiment, determining the estimated vehicle usage of the target station during the evaluation period according to the number of intended users and the number of fixed users, and determining the vehicle demand based on the estimated vehicle usage includes:
[0031] Determining a mobile user number group based on the intended user number group and the fixed user number;
[0032] performing mean processing on the mobile user number group to obtain an average mobile user number, and determining an estimated vehicle usage based on the average mobile user number and the fixed user number;
[0033] The actual number of vehicles at the target station during the period to be evaluated is obtained, and the vehicle demand is determined based on the actual number of vehicles and the estimated vehicle usage.
[0034] In a second aspect, the present application further provides a data processing device, comprising:
[0035] An acquisition module is used to obtain the historical order volume and order user information of the target station in each historical time period, and perform mean processing on the historical order volume of the same period in each historical time period to obtain the order volume mean vector of each comprehensive time period;
[0036] A clustering module, configured to perform clustering processing on each of the comprehensive time periods based on a cosine similarity algorithm and the mean vector of each order quantity, to obtain each comprehensive time period group;
[0037] A first determining module is configured to determine a target comprehensive time period group in which the time period to be evaluated is located in each of the comprehensive time periods, and determine each target order user information in each of the order user information based on the target comprehensive time period group and the time period to be evaluated;
[0038] The second determination module is used to determine the vehicle demand of the target station in the evaluation period based on the target order user information.
[0039] In a third aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0040] Obtain the historical order volume and order user information of the target station in each historical time period, and perform mean processing on the historical order volume of the same period in each historical time period to obtain the order volume mean vector of each comprehensive time period;
[0041] Based on the cosine similarity algorithm and the mean vector of each order quantity, clustering processing is performed on each comprehensive time period to obtain each comprehensive time period group;
[0042] Determine a target comprehensive time period group in which the time period to be evaluated is located in each of the comprehensive time period groups, and determine each target order user information in each of the order user information based on the target comprehensive time period group and the time period to be evaluated;
[0043] The vehicle demand of the target station in the time period to be evaluated is determined based on the target order user information.
[0044] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0045] Obtain the historical order volume and order user information of the target station in each historical time period, and perform mean processing on the historical order volume of the same period in each historical time period to obtain the order volume mean vector of each comprehensive time period;
[0046] Based on the cosine similarity algorithm and the mean vector of each order quantity, clustering processing is performed on each comprehensive time period to obtain each comprehensive time period group;
[0047] Determine a target comprehensive time period group in which the time period to be evaluated is located in each of the comprehensive time period groups, and determine each target order user information in each of the order user information based on the target comprehensive time period group and the time period to be evaluated;
[0048] The vehicle demand of the target station in the time period to be evaluated is determined based on the target order user information.
[0049] In a fifth aspect, the present application further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the following steps:
[0050] Obtain the historical order volume and order user information of the target station in each historical time period, and perform mean processing on the historical order volume of the same period in each historical time period to obtain the order volume mean vector of each comprehensive time period;
[0051] Based on the cosine similarity algorithm and the mean vector of each order quantity, clustering processing is performed on each comprehensive time period to obtain each comprehensive time period group;
[0052] Determine a target comprehensive time period group in which the time period to be evaluated is located in each of the comprehensive time period groups, and determine each target order user information in each of the order user information based on the target comprehensive time period group and the time period to be evaluated;
[0053] The vehicle demand of the target station in the time period to be evaluated is determined based on the target order user information.
[0054] The data processing method, apparatus, computer device, computer-readable storage medium, and computer program product described above obtain historical order volume and order user information for each historical time period at a target station, average the historical order volume for the same period within each historical time period, and obtain an order volume mean vector for each comprehensive time period. Clustering is performed on each comprehensive time period based on a cosine similarity algorithm and the order volume mean vectors to obtain comprehensive time period groups. Within each comprehensive time period group, a target comprehensive time period group is determined for the time period to be evaluated, and based on the target comprehensive time period group and the time period to be evaluated, target order user information is determined within each order user information. Vehicle demand for the target station during the time period to be evaluated is determined based on the target order user information. Using this method, each comprehensive time period is clustered using the order volume mean vectors and cosine similarity to obtain comprehensive time period groups with similar riding habits. Subsequently, by determining the target comprehensive time period group for the time period to be evaluated and determining target order user information based on the target comprehensive time period group and the time period to be evaluated, the data volume of each target order user information is enriched. Furthermore, the vehicle demand is determined based on the user information of each target order, which reduces the randomness of the vehicle demand and improves the accuracy of the vehicle demand. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments of the present application or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying any creative work.
[0056] Figure 1 1 is a flow chart of a data processing method in one embodiment;
[0057] Figure 2 A schematic diagram of a process for determining historical order volume and order user information in one embodiment;
[0058] Figure 3 A schematic diagram of a process for obtaining a historical order dataset in one embodiment;
[0059] Figure 4 A schematic diagram of a process for determining a comprehensive time period group in one embodiment;
[0060] Figure 5 A schematic diagram of a process for determining target order user information in one embodiment;
[0061] Figure 6 A schematic diagram of a process for determining vehicle demand in one embodiment;
[0062] Figure 7 A schematic diagram of a process for determining vehicle demand in another embodiment;
[0063] Figure 8 is a structural block diagram of a data processing device in one embodiment;
[0064] Figure 9 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0065] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0066] Shared bikes are a common mode of transportation. Due to travel habits, shared bikes often accumulate at popular stations, while unpopular stations lack them. This results in an imbalance in the number of shared bikes across stations. Therefore, data processing methods are needed to determine the demand for shared bikes at each station and adjust the number of shared bikes at each station based on this demand, ensuring that each station has sufficient shared bikes for users.
[0067] Current data processing methods require determining the vehicle demand at the target station during the period to be evaluated. The target station's historical order volume for each historical time period is obtained. Then, from these historical order volumes, target historical order volumes for each target historical time period corresponding to the period to be evaluated are determined. Each target historical order volume is input into an LSTM network, which then performs prediction processing on each target historical order volume to obtain the estimated vehicle usage at the target station during the period to be evaluated. The vehicle demand is then determined based on the target station's actual number of vehicles during the period to be evaluated and the estimated vehicle usage.
[0068] In one exemplary embodiment, the period to be evaluated is from 5:00 PM on December 26, 2024, to 6:00 PM on December 26, 2024. Specifically, the computer device needs to determine the vehicle demand at the target station from 5:00 PM on December 26, 2024, to 6:00 PM on December 26, 2024. The computer device obtains the historical order volume for the target station during a historical time period. This historical time period is from June 26, 2024, to December 25, 2024. The computer device divides the historical time period into historical time periods using one-hour periods. Specifically, a historical time period is from 0:00 AM on June 26, 2024, to 1:00 AM on June 26, 2024. Since the period to be evaluated, from 5:00 PM on December 26, 2024, to 6:00 PM on December 26, 2024, falls on Thursdays from 5:00 PM to 6:00 PM, the same period as the period to be evaluated is from 5:00 PM to 6:00 PM every Thursday. The computer determines the target historical order volume from each historical order volume between 5:00 PM and 6:00 PM on Thursdays. The computer inputs each target historical order volume into an LSTM network, which then performs prediction processing on each target historical order volume to obtain the estimated vehicle usage at the target station during the evaluation period. The computer then determines the difference between the actual number of vehicles at the target station during the evaluation period and the estimated vehicle usage as the vehicle demand.
[0069] However, current data processing methods have fewer target historical time periods corresponding to the period to be evaluated, resulting in a smaller amount of data on target historical order volumes. Consequently, the estimated vehicle usage based on target historical order volumes is more random, resulting in lower accuracy in vehicle demand.
[0070] In the above embodiment, the target historical order volumes corresponding to each target historical time period are only 26, resulting in a relatively small amount of data. Furthermore, the target historical order volumes may fluctuate significantly due to holidays. Therefore, the estimated vehicle usage determined based on the target historical order volumes is subject to high randomness, resulting in low accuracy in vehicle demand.
[0071] In one embodiment, Figure 1 As shown, a data processing method is provided. The embodiment of the present application takes the method applied to a computer device as an example for description. The embodiment of the present application does not limit the execution device of the data processing method. The method includes the following steps 102 to 108:
[0072] Step 102: Obtain the historical order volume and order user information of the target station in each historical time period, and perform mean processing on the historical order volumes of the same period in each historical time period to obtain the order volume mean vector of each comprehensive time period.
[0073] The historical time period includes various historical time periods. The target station is the station for which vehicle demand needs to be determined. The same time period is a time period with the same weekly cycle and the same hourly cycle.
[0074] During implementation, the computer device obtains a historical order dataset for each user within a historical time period. The computer device then traverses each historical order dataset to determine the target station's historical order volume and order user information for each historical time period. The computer device groups each historical order volume within the same time period into a historical order volume group, generating a historical order volume group. The computer device then performs a mean calculation on each historical order volume group to obtain an order volume mean. The computer device constructs an order volume mean vector based on each order volume mean.
[0075] Specifically, the computer device obtains a historical order dataset for each user within a historical time period. The computer device then traverses each historical order dataset, calculates the historical order volume of the target station within each historical time period, and determines each order user at the target station within each historical time period. The computer device then determines order user information for each order user based on the historical order dataset. The computer device groups the historical order volumes of each historical time period with the same weekly cycle and the same hourly cycle into the same historical order volume group, thereby obtaining each historical order volume group. The computer device then performs a mean calculation on each historical order volume in each historical order volume group to obtain an order volume mean. The computer device then constructs an order volume mean vector based on the mean order volumes of each order volume with the same weekly cycle.
[0076] In one exemplary embodiment, the specific process of determining the order volume mean vector is described by way of example: The same weekly period refers to two time periods falling on Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, or Sunday. Time periods falling on the same hourly period refer to two time periods falling on the same hourly period. For example, two time periods may fall on the same hourly period from 8:00 to 9:00, or two time periods may fall on the same hourly period from 9:00 to 10:00. For each hourly period within each weekly period, the computer device calculates the historical order volumes for that weekly period and hourly period based on the historical order volume data. The computer device then averages these historical order volumes to obtain the order volume mean. For example, the historical period is from June 26, 2024, to December 25, 2024. The computer device calculates the historical order volumes from 8:00 to 9:00 every Thursday within the historical period. The computer device then determines the mean of these historical order volumes to obtain the order volume mean for each Thursday between 8:00 and 9:00. Then, for each weekly period, the computer combines the order volume averages for that weekly period to obtain a mean order volume vector. For example, if the weekly period is Monday, the computer combines the order volume averages for Monday to obtain a mean order volume vector for Monday.
[0077] To put it another way, the computer calculates the average order volume for each hour from Monday to Sunday at the target station based on the historical order volume for each time period. Then, based on these average order volume values, the computer constructs the target station's order volume vectors R_d(s) = [n1, n2, ..., n24]. Here, d is the week number, ranging from 1 to 7, representing Monday through Sunday. s is the station ID, and n is the average event_day order volume for the same week number. Thus, each target station ID corresponds to seven 1x24 vectors.
[0078] Step 104 : clustering the comprehensive time periods based on the cosine similarity algorithm and the mean vectors of the order quantities to obtain comprehensive time period groups.
[0079] The cosine similarity measures the similarity of cycling habits between the integrated time period and the rest of the integrated time periods. A higher cosine similarity indicates a more similar cycling habit between the integrated time period and the rest of the integrated time periods. A lower cosine similarity indicates a more different cycling habit between the integrated time period and the rest of the integrated time periods.
[0080] In implementation, the computer device determines, for each integrated time period, the cosine similarities between the integrated time period and the remaining integrated time periods based on the cosine similarity algorithm, and then determines an integrated time period group based on the cosine similarities, the integrated time period, and the remaining integrated time periods.
[0081] Step 106 : determining the target comprehensive time period group where the time period to be evaluated is located in each comprehensive time period group, and determining each target order user information in each order user information based on the target comprehensive time period group and the time period to be evaluated.
[0082] Each target order user information includes first target order user information and second target order user information.
[0083] During implementation, the computer device determines a target integrated time period group within each integrated time period based on the target weekly period in which the time period to be evaluated falls. The computer device then determines first target order user information within each order user information based on the time period to be evaluated. The computer device also determines second target order user information within each order user information based on the target integrated time period and the time period to be evaluated.
[0084] Step 108: Determine the vehicle demand of the target station during the evaluation period based on the target order user information.
[0085] During implementation, the computer device determines the fixed number of users and the number of intended users based on the information of each target order user. It also determines the estimated station usage for the target station during the evaluation period based on the fixed number of users and the number of intended users. The computer device then determines the vehicle demand for the target station during the evaluation period based on the estimated vehicle usage.
[0086] In an optional embodiment, the computer device directly determines the information of each target order user based on the target comprehensive time period group and the time period to be evaluated. The computer device then divides the target order user information with the same weekly cycle into target order user information groups. Based on each target order user information group, the computer device determines the number of potential users and averages the number of potential users to obtain an estimated vehicle usage. The computer device then determines the vehicle demand based on the estimated vehicle usage.
[0087] Specifically, the target comprehensive time period group includes each target comprehensive time period. For each target comprehensive time period, the computer device determines a target historical time period that matches the target comprehensive time period and the time period to be evaluated, and determines the order user information corresponding to the target historical time period as the target order user information. Then, the computer device divides each target order user information with the same weekly cycle into each target order user information group. Based on the preset filtering conditions, the computer device filters the intended users who meet the filtering conditions in the target order user information group to obtain the number of intended users. Then, the computer device determines the average of the number of intended users as the estimated vehicle usage. The computer device obtains the actual number of vehicles at the target station during the time period to be evaluated, and determines the vehicle demand based on the actual number of vehicles and the estimated vehicle usage.
[0088] In an exemplary embodiment, the screening criteria are that the number of vehicle usages is greater than 6 and there is an intention to use the vehicle. The target comprehensive time period group is Tuesday, Wednesday, and Thursday. The period to be evaluated is from 5:00 PM on December 26, 2024, to 6:00 PM on December 26, 2024. That is, from 5:00 PM to 6:00 PM on Thursday. Based on the target comprehensive time period group and the period to be evaluated, the computer device determines the target historical time period as 5:00 PM to 6:00 PM every Tuesday, 5:00 PM to 6:00 PM every Wednesday, and 5:00 PM to 6:00 PM every Thursday from June 26, 2024 to December 25, 2024. The computer device determines the order user information corresponding to the period to be evaluated as the target order user information. The computer device groups each target order user information corresponding to 5:00 PM to 6:00 PM on Tuesday into a target order user information group, and groups each target order user information corresponding to 5:00 PM to 6:00 PM on Wednesday into a target order user information group. At the same time, the computer device divides the target order user information corresponding to 17:00 to 18:00 on Thursday into a target order user information group. For each target order user information group, the computer device determines whether the number of vehicle usage of each target order user information in the target order user information group is greater than 6 and whether there is an intention to use the vehicle. If the number of vehicle usage of the target order user information is greater than 6 and there is an intention to use the vehicle, the computer device updates the number of intended users. Then, the computer device determines the average of the number of intended users as the estimated vehicle usage. The computer device obtains the actual number of vehicles at the target station during the period to be evaluated. If the actual number of vehicles is greater than the estimated vehicle usage, no vehicle adjustment is performed at the target station. If the actual number of vehicles is less than the estimated vehicle usage, the computer device determines the difference between the actual number of vehicles and the estimated vehicle usage as the vehicle demand, and performs vehicle adjustment at the target station based on the vehicle demand.
[0089] In this data processing method, each comprehensive time period is clustered using the mean vector of each order volume and cosine similarity, resulting in groups of comprehensive time periods with similar riding habits. Next, by identifying the target comprehensive time period group within which the time period to be evaluated falls, and determining the target order user information based on the target comprehensive time period group and the time period to be evaluated, the data volume of each target order user information is enriched. Furthermore, vehicle demand is determined based on this target order user information, reducing the randomness of vehicle demand and improving its accuracy.
[0090] In an exemplary embodiment, Figure 2 As shown, the specific processing process of obtaining the historical order volume and order user information of the target station in each historical time period in step 102 includes steps 202 to 206. Among them:
[0091] Step 202: Obtain the order data set of each user in the historical time period.
[0092] Among them, the historical time period includes various historical time periods.
[0093] In implementation, the computer device obtains the initial order data set of each user within a historical time period, and then converts the format of each initial order data set according to the time period format and the station location of each station to obtain each order data set.
[0094] Specifically, the computer device obtains a dataset of initial orders from all users of the shared bike platform over a historical period. This dataset contains the start time and location of each historical order. The computer device converts the start time of each order in the dataset into a time period format, and converts the start location of each order into a station location format, thereby generating the order dataset.
[0095] Step 204 , traverse each order data set and count the historical order volume of the target station in each historical time period.
[0096] The target station is the station for which the vehicle demand needs to be predicted. The order dataset contains the starting time period and the starting station.
[0097] During implementation, the computer divides the historical time period into historical time periods, using hourly units. The computer then traverses each order dataset and calculates the historical order volume for the target station during each historical time period. The historical order volume represents the number of orders originating from the target station during the historical time period.
[0098] Specifically, the computer device initializes the historical order volume for each historical time period at the target station. That is, the computer device sets the historical order volume to 0. For each historical time period at the target station, the computer device determines whether the starting time period in each order dataset is a historical time period and whether the starting station is the target station. If the starting time period is a historical time period and the starting station is the target station, the computer device updates the historical order volume corresponding to the target station.
[0099] In an exemplary embodiment, each historical time period is a time period from 00:00 on June 26, 2024, to 24:00 on December 25, 2024, at one-hour intervals. For example, one historical time period is from 00:00 on June 26, 2024, to 01:00 on June 26, 2024. The specific process of determining the historical order volume is described using one historical time period as an example. This historical time period is from 00:00 on June 26, 2024, to 01:00 on June 26, 2024. The computer device determines whether the starting vehicle usage time period in each order data set is from 00:00 on June 26, 2024, to 01:00 on June 26, 2024, and determines whether the identifier of the starting station is the same as the identifier of the target station. If the starting vehicle usage time period is from 00:00 on June 26, 2024, to 01:00 on June 26, 2024, and the identifier of the starting station is the same as the identifier of the target station, the computer device updates the historical order volume corresponding to the target station. The data format for historical order volume for each historical time period is (station_id, event_day, span, order_cnt). Station_id is the station ID, event_day is the date, and span is the hourly period, also known as the time period. Order_cnt is the historical order volume.
[0100] In an optional embodiment, the computer device filters the order datasets for each historical time period for each initial target order dataset whose starting station is the target station. Then, for each historical time period, the computer device determines whether the starting vehicle usage time period in each initial target order dataset is a historical time period. If the starting vehicle usage time period is a historical time period, the computer device updates the historical order volume corresponding to the target station.
[0101] Optionally, the target station may be any station corresponding to the shared bicycle platform, and the embodiment of the present application does not limit the target station.
[0102] Step 206 , traverse each order data set, determine the order user of the target station in each historical time period, and determine the order user information of the order user.
[0103] Among them, the user's order data set includes the user's number of car usage, car usage intention, starting station and starting car usage time period.
[0104] During implementation, the computer device traverses each order data set and counts the order users who placed rides at the target station during each historical time period. The computer device then determines the order user information for each order user based on each order data set. The order users in a historical time period are the users who placed rides with the target station as their starting point during that historical time period.
[0105] Specifically, the computer device selects each initial target order data set from each order data set whose starting station is the target station. For each historical time period, the computer device determines whether the starting time period of the vehicle usage in the initial order data set is a historical time period. If the starting time period of the vehicle usage is a historical time period, the computer device identifies the user corresponding to the initial order data set as the order user and constructs order user information for the order user based on the number of vehicle usages and vehicle usage intentions in the order data set.
[0106] In an exemplary embodiment, the computer device selects each initial target order data set from each order data set whose starting station is the target station. Each historical time period is a historical time period from 0:00 on June 26, 2024 to 24:00 on December 25, 2024, at one-hour intervals. For example, a historical time period is from 0:00 on June 26, 2024 to 01:00 on June 26, 2024. The specific process of determining order user information is described using a historical time period as an example. The historical time period is from 0:00 on June 26, 2024 to 01:00 on June 26, 2024. The computer device determines whether the starting vehicle use time period in each initial target order data set is from 0:00 on June 26, 2024 to 01:00 on June 26, 2024. If the starting car usage time period is from 0:00 on June 26, 2024 to 1:00 on June 26, 2024, the computer device determines the user corresponding to the initial target order data set as the order user, and constructs the order user information of the order user based on the number of car usage and car usage intention in the order data set. The data format of the order user information under each historical time period is (station_id, event_day, span, user_id, order_cnt_30day, is_use_3day). Among them, station_id is the identifier of the station, event_day is the date, and span is the hourly cycle, which is also the time period. user_id is the identifier of the order user. order_cnt_30day is the number of car usages, and is_use_3day is the intention to use the car. For example, the number of car usages is the number of times the user has used the car in the past month. The intention to use the car indicates whether the user has used the car in the past three days.
[0107] In an optional embodiment, the computer device determines, for each historical time period at the target station, whether the starting time period in each order dataset is a historical time period and whether the starting station is the target station. If the starting time period is a historical time period and the starting station is the target station, the computer device identifies the user corresponding to the initial order dataset as the order user and constructs order user information for the order user based on the number of rides and ride usage intentions in the order dataset.
[0108] Optionally, the target station can be any station corresponding to the shared bicycle platform. The number of times a user uses a bicycle can be not limited to the number of times a user uses a bicycle in the past month, but can also be the number of times a user uses a bicycle in the past 20 days. The intention to use a bicycle can be not limited to whether a user has used a bicycle in the past three days, but can also be whether a user has used a bicycle in the past four days. This embodiment of the application does not limit the target station, nor does it limit the time period of the intention to use a bicycle and the number of times a bicycle is used.
[0109] In this embodiment, by counting the historical order volume of the target station in each time period and the user information of each order, the order situation of the target station in each hour is obtained, the statistical granularity is refined, and data support is provided for the subsequent determination of the similarity of the comprehensive time period.
[0110] In an exemplary embodiment, Figure 3 As shown, the specific processing process of step 202 includes steps 302 to 308. Among them:
[0111] Step 302: Obtain an initial historical order dataset of each user within a historical time period.
[0112] The initial historical order data set includes the starting time and location of each historical order.
[0113] During implementation, the computer device obtains the initial historical order data set of all users from the database corresponding to the shared bicycle platform according to the historical time period.
[0114] Specifically, the computer device determines a historical time period based on the period to be evaluated. Then, the computer device sends a request to obtain an initial order dataset based on the historical time period to the database corresponding to the shared bicycle platform. In response to the request, the database queries the initial historical order datasets for all users within the historical time period and returns each initial historical order dataset to the computer device. The computer device receives the initial historical order datasets for each user within the historical time period.
[0115] In one exemplary embodiment, the evaluation period is from 5:00 PM on December 26, 2024, to 6:00 PM on December 26, 2024. The computer device then determines the six months prior to the evaluation period as a historical time period. Specifically, the historical time period is from June 26, 2024, to December 25, 2024. Based on the historical time period, the computer device sends a request to the database corresponding to the shared bicycle platform to obtain an initial order dataset. In response to the request, the database queries each user for their number of bike rides, their intention to use the bike, the timestamp of their use, and the longitude and latitude of their ride start location from June 26, 2024, to December 25, 2024. The database then constructs an initial historical order dataset for each user based on their user ID, number of bike rides, their intention to use the bike, the timestamp of their use, and the longitude and latitude of their ride start location. The database then returns each user's initial historical order dataset to the computer device. The computer device then receives each user's initial historical order dataset. For example, a user's initial historical order dataset contains the user ID, the number of times the user used a bike in the past month (order_cnt_30day), whether the user used a bike in the past three days (is_use_3day), the bike usage timestamp, and the latitude and longitude of each historical order. If the user rides a shared bike once within the historical period, a historical order is generated, which includes the user's bike usage timestamp and the ride's starting latitude and longitude. The user's bike usage timestamp includes the start and end times of the bike usage.
[0116] Step 304 : for each initial historical order data set, based on the time period format, convert the format of the starting vehicle usage time of each historical order to obtain the starting vehicle usage time period.
[0117] The initial historical order dataset contains all historical orders. Each historical order includes a ride timestamp and the latitude and longitude of the ride's starting location. The ride timestamp includes the time of the start of the ride. The latitude and longitude of the ride's starting location also represent the starting location of the ride.
[0118] During implementation, the computer device converts the format of the starting vehicle usage time of each historical order data set into a time period format based on the time period format for each initial historical order data set to obtain the starting vehicle usage time period.
[0119] In an exemplary embodiment, the detailed process of determining the starting time period for using the vehicle is described by taking the starting time of a historical order data as an example. Specifically, a time period format is pre-set in the computer device. The time period format is span, and the span value range is [0, 24]. If span is [1, 2], it indicates that the starting time for using the vehicle corresponding to the historical order is between 1 o'clock and 2 o'clock at the current time. The starting time for using the vehicle of the historical order data is 14:20:35 on June 26, 2024. Based on the time period format, the computer device converts the starting time for using the vehicle of the historical order data into June 26, 2024, [14, 15], to obtain the starting time period for using the vehicle.
[0120] Step 306: Based on the station locations of each station, determine the starting station corresponding to the starting vehicle location of the historical order.
[0121] During implementation, the computer device obtains the station location of each station from the shared bicycle platform's database. The computer device then traverses the station location of each station and determines the station with the same station location as the starting station of the historical order as the starting station of the historical order.
[0122] Step 308 : updating the initial historical order data set according to each starting vehicle use time period and each starting station to obtain a historical order data set.
[0123] During implementation, the computer device updates the vehicle usage timestamps corresponding to each starting vehicle usage time period based on each starting vehicle usage time period, and updates the longitude and latitude of the riding start position corresponding to each starting station according to each starting station.
[0124] In this embodiment, the starting time of the ride is converted into an hourly time period format to obtain the starting time period, which facilitates the subsequent calculation of the target station's historical order volume in hourly time periods. In addition, the ride location is mapped to the starting station to facilitate the subsequent calculation of the station's historical order volume.
[0125] In an exemplary embodiment, Figure 4 As shown, the specific processing process of step 104 includes steps 402 to 406. Among them:
[0126] Step 402 : For each comprehensive time period, based on the cosine similarity algorithm, calculate the cosine similarity between the order volume mean vector of the comprehensive time period and the order volume mean vectors of the remaining comprehensive time periods.
[0127] Among them, the remaining comprehensive time periods are comprehensive time periods except the current comprehensive time period.
[0128] During implementation, the computer device determines each integrated time period as the current integrated time period. Then, the computer device calculates the similarity between the mean order volume vector of the current integrated time period and the mean order volume vector of each remaining integrated time period using a cosine similarity algorithm, thereby obtaining the cosine similarity between the current time period and each remaining integrated time period. The cosine similarity represents the order correlation between the remaining integrated time periods and the current integrated time period. The higher the cosine similarity, the higher the order correlation between the remaining integrated time periods and the current integrated time period, and the more similar the order situations are.
[0129] Specifically, each comprehensive time period is Monday to Sunday. Taking Monday as an example, the computer device determines Monday as the current comprehensive time period, and calculates the similarity between the mean vector of the order volume on Monday and the mean vector of the order volume on Tuesday based on the cosine similarity algorithm to obtain the cosine similarity between Monday and Tuesday. This cosine similarity represents the similarity of the riding habits of the target station on Monday and Tuesday, which is also the similarity of the order habits. The higher the cosine similarity, the higher the similarity of the order habits of the target station on Monday and Tuesday, that is, the more similar the car usage on Monday and Tuesday. Then, the computer device determines the cosine similarity between Monday and Wednesday, Monday and Thursday, Monday and Friday, Monday and Saturday, and Monday and Sunday based on the cosine similarity algorithm. Among them, the cosine similarity algorithm is shown in the following formula (1):
[0130] (1)
[0131] In the above formula (1), is the mean vector of order volume in the current comprehensive time period, is the mean vector of order quantities in the remaining comprehensive time periods. Represents the mean vector of order quantity The Euclidean norm of . Represents the mean vector of order quantity The Euclidean norm of . Represents the mean vector of order quantity and the order quantity mean vector The dot product of D.
[0132] Step 404 : Based on the cosine similarities and a preset cosine similarity threshold, similar integrated time periods are selected from the remaining integrated time periods.
[0133] In implementation, a cosine similarity threshold is set for the cosine in the computer device, and the computer device selects similar comprehensive time periods whose cosine similarity is greater than the cosine similarity threshold from the remaining comprehensive time periods.
[0134] Specifically, the computer device determines, for each remaining integrated time period, whether the cosine similarity corresponding to the remaining integrated time period is greater than a cosine similarity threshold. If the cosine similarity of the remaining integrated time period is greater than the cosine similarity threshold, the computer device determines that the order performance between the current integrated time period and the remaining integrated time period is similar. The computer device then determines the remaining integrated time period as a similar integrated time period.
[0135] In an exemplary embodiment, Monday is used as an example to describe the screening of similar integrated time periods corresponding to Monday. The cosine similarity between Monday and Tuesday is 0.85, the cosine similarity between Monday and Wednesday is 0.84, the cosine similarity between Monday and Thursday is 0.88, the cosine similarity between Monday and Friday is 0.75, the cosine similarity between Monday and Saturday is 0.6, and the cosine similarity between Monday and Sunday is 0.5. The cosine similarity threshold is 0.8. The computer device screens for similar integrated time periods with a cosine similarity greater than 0.8 from the remaining six integrated time periods from Tuesday to Saturday, resulting in the following similar integrated time periods: Tuesday, Wednesday, and Thursday.
[0136] Optionally, the cosine similarity threshold may be, but is not limited to, set to 0.8, which is determined based on screening requirements. The embodiment of the present application does not impose a limitation on the cosine similarity threshold.
[0137] Step 406: Combine the comprehensive time period and the similar comprehensive time period to obtain a comprehensive time period group.
[0138] In an implementation, the computer device groups the integrated time period and other similar integrated time periods into an integrated time period group.
[0139] In an exemplary embodiment, the integrated time period is Monday. Similar integrated time periods are Tuesday, Wednesday, and Thursday. The computer device determines Monday, Tuesday, Wednesday, and Thursday as a group of integrated time periods.
[0140] In this embodiment, each comprehensive time period is clustered by the mean vector and cosine similarity of each order quantity, and each comprehensive time period group with similar riding habits is obtained, which facilitates the determination of target order user information based on the comprehensive time period. Compared with directly determining the target historical order quantity based on the period to be evaluated, the data volume of the target order user information is increased.
[0141] In an exemplary embodiment, each target order user information includes each first target order user information and each second target order user information, such as Figure 5 As shown, the specific processing process of determining each target order user information in each order user information based on the target comprehensive time period group and the time period to be evaluated in step 106 includes steps 502 to 504. Among them:
[0142] Step 502: determine the same historical time period for each target in the same period as the time period to be evaluated, and determine the first target order user information in the same historical time period for each target in each order user information.
[0143] The same time period refers to a time period with the same weekly cycle and the same hourly cycle.
[0144] During implementation, the computer device determines, within the historical time period, the same historical time period for each target that has the same weekly period and the same hourly period as the period to be evaluated. The computer device then determines, from the order user information, the order user information for each target that has the same historical time period as the first target order user information.
[0145] In an exemplary embodiment, the specific process of determining the first target order user information is described by way of example: The same weekly period refers to two time periods falling on Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, or Sunday. Time periods falling on the same hourly period refer to two time periods having the same hour. For example, two time periods fall on the same hour from 8:00 AM to 9:00 AM, or two time periods fall on the same hour from 9:00 AM to 10:00 AM. The time period to be evaluated is from 5:00 PM on December 26, 2024, to 6:00 PM on December 26, 2024. The historical time period is from June 26, 2024, to December 25, 2024. Since the time period to be evaluated falls on Thursdays from 5:00 PM to 6:00 PM, the computer device determines that every Thursday from 5:00 PM to 6:00 PM within the historical time period from June 26, 2024, to December 25, 2024, is the target same historical time period. The computer device then determines the order user information for each target same historical time period within each order user information as the first target order user information.
[0146] Step 504 : Based on the target comprehensive time period group and the same historical time period of each target, determine the similar historical time period of each target, and determine the second target order user information of the similar historical time period of each target in each order user information.
[0147] The target comprehensive time period group includes various target comprehensive time periods.
[0148] During implementation, the computer device determines each initial target historical time period within the historical time period based on the target comprehensive time period group and the time period to be evaluated. The computer device then selects similar historical time periods for each target within each initial target historical time period based on the target's common historical time period. The computer device determines the order user information for each target's similar historical time period within each order user information as the second target order user information.
[0149] Specifically, the target comprehensive time period group includes target weekly periods. The computer device determines the weekly period in which the time period to be evaluated falls as the first target weekly period. The computer device then determines the remaining target weekly periods in the comprehensive time period group, excluding the first target weekly period, as the second target weekly period. The computer device then determines, within the historical time period, target similar historical time periods that have the same hourly period as the time period to be evaluated and that are within the second target weekly period. The computer device then determines, within each order user information, the order user information for each target similar historical time period as the second target order user information.
[0150] In an exemplary embodiment, the specific process of determining the second target order user information is described as follows: the comprehensive time period is Monday to Sunday. The target comprehensive time period group includes Tuesday, Wednesday, and Thursday. Time periods with the same hourly cycle refer to two time periods with the same hour. For example, two time periods fall within the same hour period of 8:00 to 9:00, or two time periods fall within the same hour period of 9:00 to 10:00. The time period to be evaluated is from 5:00 PM on December 26, 2024, to 6:00 PM on December 26, 2024. Since the first target weekly period within which the time period to be evaluated falls is Thursday, the computer device determines that the second target weekly period is Tuesday and Wednesday. The historical time period is from June 26, 2024, to December 25, 2024. Since the time period to be evaluated falls between 5:00 PM and 6:00 PM on Thursdays, the computer device determines that 5:00 PM to 6:00 PM on Tuesdays and 5:00 PM to 6:00 PM on Wednesdays within the historical time period from June 26, 2024, to December 25, 2024, are the target similar historical time periods. Then, the computer device determines the order user information of each target similar historical time period in each order user information as the second target order user information.
[0151] In this embodiment, the user information of each target order is determined by the target comprehensive time period group and the time period to be evaluated. Compared with directly determining the target historical order volume based on the time period to be evaluated, the data volume of each target order user information is increased, the data sparsity is reduced, and the data quality is improved, providing data support for the subsequent determination of vehicle demand.
[0152] In an exemplary embodiment, Figure 6 As shown, the specific processing process of step 108 includes steps 602 to 604. Among them:
[0153] Step 602: Determine the number of intended user groups based on the information of each target order user, and determine the number of fixed users based on the information of each first target order user.
[0154] The target order user information includes first target order user information and second target order user information.
[0155] In implementation, the computer device is pre-configured with screening conditions. The computer device groups the target order user information belonging to the same weekly period into a target order user information group. Based on the pre-set screening conditions, the computer device filters the target order user information group for potential users that meet the screening conditions, and obtains the number of potential users. The computer device then combines the numbers of potential users to obtain a group of potential users. The computer device identifies users in each first target order user information period as regular users, and counts the number of regular users.
[0156] In an exemplary embodiment, the target order user information includes the number of car usages and the intention to use the car. The screening condition is that the number of car usages is greater than 6 and there is an intention to use the car. The target comprehensive time period group is Tuesday, Wednesday and Thursday. The computer device divides each target order user information belonging to Tuesday into a target order user information group, and divides each target order user information belonging to Wednesday into a target order user information group. At the same time, the computer device divides each target order user information belonging to Thursday into a target order user information group. The computer device obtains three target order user information groups. For each target order user information group, the computer device determines whether the number of car usages of each target order user information in the target order user information group is greater than 6 and whether there is an intention to use the car. If the number of car usages of the target order user information is greater than 6 and there is an intention to use the car, the computer device updates the number of intended users. The computer device combines the number of intended users of each target order user information group into an intended user number group.
[0157] Step 604 : determining the estimated vehicle usage of the target station during the evaluation period according to the number of intended user groups and the number of fixed users, and determining the vehicle demand based on the estimated vehicle usage.
[0158] During implementation, the computer device determines the average number of mobile users based on the number of prospective users and the number of fixed users. The computer device then calculates the sum of the number of fixed users and the average number of mobile users as the estimated vehicle usage. The computer device then obtains the actual number of vehicles at the target station during the evaluation period and determines the vehicle demand based on the estimated vehicle usage and the actual number of vehicles.
[0159] In one optional embodiment, a computer device constructs vehicle dispatch information based on vehicle demand and feeds the vehicle dispatch information back to the vehicle dispatcher. Specifically, the computer device determines whether the vehicle demand is greater than 0 and obtains a determination result. The computer device then constructs vehicle dispatch information based on the determination result, the target station, and the time period to be evaluated, and transmits the vehicle dispatch information to the terminal of the vehicle dispatcher closest to the target station.
[0160] In this example, the user information for each target order is used to determine the number of prospective users and the number of fixed users. This yields the number of users who frequently appear at the target station during the evaluation period. Estimated vehicle usage is then determined based on the prospective user groups and the number of fixed users. Furthermore, vehicle demand is determined based on the estimated vehicle usage. This determines vehicle demand from the user's perspective, and then vehicle scheduling is performed based on user value. This satisfies the needs of frequent users, improves user experience, and prevents user churn.
[0161] In an exemplary embodiment, Figure 7 As shown, the specific processing process of step 604 includes steps 702 to 706. Among them:
[0162] Step 702: Determine the number of mobile users based on the number of intended users and the number of fixed users.
[0163] In implementation, the computer device performs a subtraction operation on the number of each intended user in the intended user group and the number of fixed users to obtain the number of each mobile user. Then, the computer device constructs a mobile user number group based on the number of each mobile user.
[0164] Step 704 : performing mean processing on the mobile user number group to obtain the average mobile user number, and determining the estimated vehicle usage based on the average mobile user number and the fixed user number.
[0165] During implementation, the computer device averages the number of mobile users in the mobile user number group to obtain an average number of mobile users. The computer device then adds the average number of mobile users to the number of fixed users to obtain an estimated vehicle usage.
[0166] Step 706 , obtaining the actual number of vehicles at the target station during the period to be evaluated, and determining the vehicle demand based on the actual number of vehicles and the estimated vehicle usage.
[0167] During implementation, the computer device obtains the actual number of vehicles at the target station during the time period to be evaluated. The computer device then subtracts the estimated vehicle usage from the actual number of vehicles to determine the vehicle demand. If the vehicle demand is greater than 0, the computer device constructs vehicle dispatch information based on the target station, the time period to be evaluated, and the vehicle demand, and provides feedback to the vehicle dispatcher. If the vehicle demand is less than or equal to 0, the computer device determines that dispatch is not required for the target station during the time period to be evaluated. The computer device then constructs vehicle dispatch information based on the target station, the time period to be evaluated, and the information that no dispatch is required, and provides feedback to the vehicle dispatcher.
[0168] In this embodiment, the estimated vehicle usage is determined based on the number of intended users and the fixed number of users. The estimated vehicle usage of the target station during the evaluation period is determined from the user's perspective, and the vehicle demand is determined based on the estimated vehicle usage. This enables vehicle scheduling based on user value, meets the vehicle needs of high-frequency users, improves user experience, and avoids user churn.
[0169] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0170] Based on the same inventive concept, the present application also provides a data processing device for implementing the aforementioned data processing method. The implementation solution provided by this device is similar to the implementation solution described in the aforementioned method. Therefore, the specific limitations in one or more data processing device embodiments provided below can be found in the above-mentioned limitations on the data processing method and will not be repeated here.
[0171] In an exemplary embodiment, Figure 8 As shown, a data processing device 800 is provided, comprising: an acquisition module 801, a clustering module 802, a first determination module 803 and a second determination module 804, wherein:
[0172] The acquisition module 801 is used to obtain the historical order volume and order user information of the target station in each historical time period, and perform mean processing on the historical order volume of the same period in each historical time period to obtain the order volume mean vector of each comprehensive time period.
[0173] The clustering module 802 is used to perform clustering processing on each comprehensive time period based on the cosine similarity algorithm and the mean vector of each order quantity to obtain each comprehensive time period group.
[0174] The first determining module 803 is configured to determine the target integrated time period group where the time period to be evaluated is located in each integrated time period, and determine each target order user information in each order user information based on the target integrated time period group and the time period to be evaluated.
[0175] The second determining module 804 is configured to determine the vehicle demand of the target station during the period to be evaluated based on the information of each target order user.
[0176] In an exemplary embodiment, the acquisition module 801 includes a first acquisition submodule and a first processing submodule. The first acquisition submodule includes:
[0177] The second acquisition submodule is used to obtain the order data set of each user in a historical time period; the historical time period includes various historical time periods.
[0178] The first statistical submodule is used to traverse each order data set and count the historical order volume of the target station in each historical time period.
[0179] The first determination submodule is used to traverse each order data set, determine the order user of the target station in each historical time period, and determine the order user information of the order user.
[0180] In an exemplary embodiment, the second acquisition submodule includes:
[0181] The third acquisition submodule is used to obtain the initial historical order data set of each user in the historical time period; the initial historical order data set includes the starting vehicle use time and starting vehicle use location of each historical order.
[0182] The conversion submodule is used to convert the format of the starting car use time of each historical order based on the time period format for each initial historical order data set to obtain the starting car use time period.
[0183] The second determination submodule is used to determine the starting station corresponding to the starting vehicle position of the historical order based on the station location of each station.
[0184] The first updating submodule is used to update the initial historical order data set according to each starting vehicle use time period and each starting station to obtain a historical order data set.
[0185] In an exemplary embodiment, the clustering module 802 includes:
[0186] The first calculation submodule is used to calculate, for each comprehensive time period, the cosine similarity between the order quantity mean vector of the comprehensive time period and the order quantity mean vectors of the remaining comprehensive time periods based on the cosine similarity algorithm.
[0187] The first screening submodule is configured to screen similar comprehensive time periods from the remaining comprehensive time periods based on the cosine similarities and a preset cosine similarity threshold.
[0188] The first combining submodule is used to combine the comprehensive time period and the similar comprehensive time period to obtain a comprehensive time period group.
[0189] In an exemplary embodiment, each target order user information includes each first target order user information and each second target order user information, and the first determination module 803 includes a third determination submodule and a fourth determination submodule. The fourth determination submodule includes:
[0190] The fifth determining submodule is configured to determine the same historical time period for each target in the same period as the time period to be evaluated, and determine the first target order user information in the same historical time period for each target in each order user information.
[0191] The sixth determination submodule is used to determine the similar historical time period of each target based on the target comprehensive time period group and the same historical time period of each target, and determine the second target order user information of the similar historical time period of each target in each order user information.
[0192] In an exemplary embodiment, the second determining module 804 includes:
[0193] The seventh determination submodule is configured to determine the number of intended user groups based on each target order user information, and determine the number of fixed users based on each first target order user information.
[0194] The eighth determination submodule is used to determine the estimated vehicle usage of the target station during the evaluation period according to the number of intended users and the number of fixed users, and to determine the vehicle demand based on the estimated vehicle usage.
[0195] In an exemplary embodiment, the eighth determining submodule includes:
[0196] The ninth determination submodule is configured to determine the number of mobile user groups based on the number of intended user groups and the number of fixed users.
[0197] The second processing submodule is used to perform mean processing on the number of mobile users to obtain the average number of mobile users, and determine the estimated vehicle usage based on the average number of mobile users and the number of fixed users.
[0198] The tenth determination submodule is used to obtain the actual number of vehicles at the target station during the period to be evaluated, and to determine the vehicle demand based on the actual number of vehicles and the estimated vehicle usage.
[0199] Each module in the above-mentioned data processing device can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.
[0200] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 9As shown. The computer device includes a processor, memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals via wired or wireless means, and the wireless means can be implemented via Wi-Fi, a mobile cellular network, near-field communication (NFC), or other technologies. When executed by the processor, the computer program implements a data processing method. The display unit of the computer device is used to form a visually visible image, and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse.
[0201] Those skilled in the art will understand that Figure 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0202] In one embodiment, a computer device is further provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program.
[0203] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0204] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0205] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0206] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), quantum computing-based data processing logic devices, artificial intelligence (AI) processors, and the like.
[0207] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0208] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A data processing method, characterized in that: The method comprises: Obtain the historical order volume and order user information of the target station in each historical time period, and perform mean processing on the historical order volume of the same period in each historical time period to obtain the order volume mean vector of each comprehensive time period; the comprehensive time period is any day from Monday to Sunday; Based on the cosine similarity algorithm and the mean vector of each order quantity, clustering processing is performed on each comprehensive time period to obtain each comprehensive time period group; Determine a target comprehensive time period group in which the time period to be evaluated is located in each of the comprehensive time period groups, and determine each target order user information in each of the order user information based on the target comprehensive time period group and the time period to be evaluated; Determining the vehicle demand of the target station during the evaluation period based on the target order user information; The clustering process is performed on each of the comprehensive time periods based on the cosine similarity algorithm and the mean vector of each order quantity to obtain each comprehensive time period group, including: For each of the integrated time periods, the cosine similarity between the order volume mean vector of the integrated time period and the order volume mean vectors of the remaining integrated time periods is calculated based on the cosine similarity algorithm; the cosine similarity represents the order correlation between the integrated time period and the current integrated time period; the higher the cosine similarity, the higher the order correlation between the remaining integrated time periods and the current integrated time period; Based on the cosine similarities and a preset cosine similarity threshold, screening similar comprehensive time periods from the remaining comprehensive time periods; combining the comprehensive time period and the similar comprehensive time period to obtain a comprehensive time period group; The target order user information includes first target order user information and second target order user information. Determining the target order user information in the order user information based on the target comprehensive time period group and the time period to be evaluated includes: Determine the same historical time period for each target in the same period as the period to be evaluated, and determine the first target order user information in the same historical time period for each target in the order user information; the same time period is a time period with the same weekly cycle and the same hourly cycle; Based on the target comprehensive time period group and the same historical time period of each target, the similar historical time period of each target is determined, and the second target order user information of each target similar historical time period is determined in the order user information.
2. The method according to claim 1, characterized in that The acquisition of historical order volume and order user information of the target station in each historical time period includes: Obtaining an order dataset for each user within a historical time period; the historical time period includes each historical time period; Traversing each of the order data sets, and counting the historical order volume of the target station in each of the historical time periods; Traverse each of the order data sets to determine the order users of the target station in each of the historical time periods, and determine the order user information of the order users.
3. The method according to claim 2, characterized in that The step of obtaining the order data set of each user in the historical time period includes: Obtaining an initial historical order dataset for each user within a historical time period; the initial historical order dataset includes the starting time and starting location of each historical order; For each of the initial historical order data sets, based on the time period format, the format of the starting vehicle usage time of each of the historical orders is converted to obtain the starting vehicle usage time period; Determine the starting station corresponding to the starting vehicle location of the historical order based on the station location of each station; The initial historical order data set is updated according to each of the starting vehicle use time periods and each of the starting stations to obtain a historical order data set.
4. The method according to claim 1, wherein The screening of similar integrated time periods from the remaining integrated time periods based on the cosine similarities and a preset cosine similarity threshold includes: A similar comprehensive time period whose cosine similarity is greater than a preset cosine similarity threshold is selected from the remaining comprehensive time periods.
5. The method according to claim 1, wherein The determining of the vehicle demand of the target station in the evaluation period based on the target order user information includes: Determining a group of intended users based on each of the target order user information, and determining a fixed number of users based on each of the first target order user information; The estimated vehicle usage of the target station during the evaluation period is determined according to the group of intended users and the number of fixed users, and the vehicle demand is determined based on the estimated vehicle usage.
6. The method according to claim 5, characterized in that The determining of the number of intended users based on each target order user information, and determining the number of fixed users based on each first target order user information, includes: Dividing the target order user information combinations belonging to the same weekly period into a target order user information group; Based on the preset screening conditions, the target order user information group is screened for potential users that meet the screening conditions to obtain the number of potential users, and the numbers of potential users are combined to obtain a group of potential users; In the information of each first target order user, it is determined that the users who appear every week are regular users, and the number of the regular users is counted.
7. The method according to claim 6, characterized in that Determining the estimated vehicle usage of the target station during the evaluation period according to the intended user group and the fixed user number, and determining the vehicle demand based on the estimated vehicle usage, includes: Determining a mobile user number group based on the intended user number group and the fixed user number; performing mean processing on the mobile user number group to obtain an average mobile user number, and determining an estimated vehicle usage based on the average mobile user number and the fixed user number; The actual number of vehicles at the target station during the period to be evaluated is obtained, and the vehicle demand is determined based on the actual number of vehicles and the estimated vehicle usage.
8. A data processing device, characterized in that: The device comprises: An acquisition module is used to obtain the historical order volume and order user information of the target station in each historical time period, and perform mean processing on the historical order volume of the same period in each historical time period to obtain the order volume mean vector of each comprehensive time period; the comprehensive time period is any day from Monday to Sunday; A clustering module, configured to perform clustering processing on each of the comprehensive time periods based on a cosine similarity algorithm and the mean vector of each order quantity, to obtain each comprehensive time period group; A first determining module is configured to determine a target comprehensive time period group in which the time period to be evaluated is located in each of the comprehensive time periods, and determine each target order user information in each of the order user information based on the target comprehensive time period group and the time period to be evaluated; A second determining module is configured to determine the vehicle demand of the target station during the period to be evaluated based on the target order user information; The clustering module is specifically configured to calculate, for each of the comprehensive time periods, a cosine similarity between the order volume mean vector of the comprehensive time period and the order volume mean vectors of the remaining comprehensive time periods based on a cosine similarity algorithm; the cosine similarity represents the order correlation between the comprehensive time period and the current comprehensive time period; the higher the cosine similarity, the higher the order correlation between the remaining comprehensive time periods and the current comprehensive time period; based on each of the cosine similarities and a preset cosine similarity threshold, screen similar comprehensive time periods from the remaining comprehensive time periods; and combine the comprehensive time period and the similar comprehensive time periods to obtain a comprehensive time period group; The target order user information includes first target order user information and second target order user information. The first determination module is specifically used to determine the same historical time periods of each target in the same period as the period to be evaluated, and determine the first target order user information of the same historical time period of each target in each order user information; the same time period is a time period with the same weekly cycle and the same hourly cycle; based on the target comprehensive time period group and the same historical time periods of each target, determine the similar historical time period of each target, and determine the second target order user information of the similar historical time period of each target in each order user information.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Information processing method and device, electronic device and computer readable storage medium
CN111612183A
Traffic prediction method and system for shared travel station
CN115545252A
Shared vehicle scheduling method and device, computer equipment and storage medium
CN116362431A