Data processing method and device, computer equipment and computer readable storage medium
通过对共享单车的数据处理,利用均值处理和余弦相似度算法的聚类方法,解决了现有技术中车辆需求量预测的准确性不足的问题,提高了需求量的准确性。
Patent Information
- Application Number
- CN202510035574.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-09
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2045-01-09
AI Technical Summary
When the existing data processing method predicts vehicle demand, due to the small amount of data in the target historical order quantity, the vehicle's estimated usage is more accidental, which in turn reduces the 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 comprehensive time period is clustered based on the cosine similarity algorithm to form a comprehensive time period group, and The vehicle demand for the period to be evaluated is determined in these groups.
Through clustering and mean processing, the data volume of target order user information is enriched, the accidentality of vehicle demand is reduced, and the accuracy of vehicle demand is improved.
Smart Images

Figure CN119444307A_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 device and computer-readable storage medium. Background Art
[0002] Shared bicycles are a common mode of transportation. Due to people's travel habits, the number of shared bicycles at each station is often uneven. Therefore, it is necessary to determine the vehicle demand at each station through data processing methods and adjust the shared vehicles at each station based on the vehicle 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 of each target historical time period in the same period as the period to be evaluated. Then, based on the LSTM network (Long Short-Term Memory, long short-term memory network) and each target historical order volume, the estimated vehicle usage in the period to be evaluated is predicted, and the vehicle demand is determined based on the estimated vehicle usage.
[0004] However, the current data processing method has fewer target historical time periods in the same period as the period to be evaluated, resulting in a smaller amount of data on the target historical order volume. Furthermore, the estimated vehicle usage based on the target historical order volume will be more accidental, resulting in lower accuracy of 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 in 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 data set of each user in 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] Each of the order data sets is traversed to determine the order users of the target station in each of the historical time periods, and the order user information of the order users is determined.
[0015] In one embodiment, obtaining an order data set of each user in a historical time period includes:
[0016] Acquire an initial historical order data set of each user in a historical time period; the initial historical order data set includes a starting time and a 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 use time of each of the historical orders is converted to obtain the starting vehicle use time period;
[0018] Based on the station locations of each station, determine the starting station corresponding to the starting vehicle location of the historical order;
[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, 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 is calculated;
[0022] Based on the cosine similarities and a preset cosine similarity threshold, similar comprehensive time periods are selected 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 of the 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 of the 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 each 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 the similar historical time period of each target is determined in each order user information.
[0027] In one embodiment, determining the vehicle demand of the target station in the period to be evaluated based on the target order user information includes:
[0028] Determine a group of intended users based on each of the target order user information, and determine 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 period to be evaluated is determined according to the intended user number group and the fixed user number, 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 intended user number group and the fixed user number, 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 a mean mobile user number, and determining an estimated vehicle usage based on the mean 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 acquire 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 in the same period in each historical time period to obtain the order volume mean vector of each comprehensive time period;
[0036] A clustering module, used for clustering each of the comprehensive time periods based on a cosine similarity algorithm and each of the order quantity mean vectors to obtain each comprehensive time period group;
[0037] A first determination module is used 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 time period to be evaluated based on the target order user information.
[0039] In a third aspect, the present application further provides a computer device, including 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 in 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 in 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, including a computer program, which implements the following steps when executed by a processor:
[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 in 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 above data processing method, device, computer equipment, computer-readable storage medium and computer program product 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 time period in each of the historical time periods to obtain the order volume mean vector of each comprehensive time period; based on the cosine similarity algorithm and the order volume mean vector, cluster the comprehensive time periods to obtain each comprehensive time period group; determine the target comprehensive time period group where 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; determine the vehicle demand of the target station in the time period to be evaluated based on each of the target order user information. Using this method, clustering is performed on each comprehensive time period through the order volume mean vector and cosine similarity to obtain each comprehensive time period group with similar riding habits. Then, by determining the target comprehensive time period group where the time period to be evaluated is located, and determining each 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 drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. 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 creative work.
[0056] Figure 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 quantity and order user information in one embodiment;
[0058] Figure 3 A schematic diagram of a process for obtaining a historical order data set 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] Fig. 9 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0065] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0066] Shared bicycles are a common mode of transportation. Due to people's travel habits, shared bicycles are often piled up at popular stations, while there are no shared bicycles at unpopular stations. That is, the number of shared bicycles at each station is unbalanced. Therefore, it is necessary to determine the vehicle demand for shared bicycles at each station through data processing methods, and adjust the shared vehicles at each station according to the vehicle demand, so that each station has enough shared bicycles for users to use.
[0067] The current data processing method needs to determine the vehicle demand of the target station in the period to be evaluated. Obtain the historical order volume of the target station in each historical time period. Then, determine the target historical order volume of each target historical time period in the same period as the period to be evaluated from each historical order volume. Input each target historical order volume into the LSTM network, and use the LSTM network to predict and process each target historical order volume to obtain the estimated vehicle usage of the target station in the period to be evaluated. Then, based on the actual number of vehicles and the estimated vehicle usage of the target station in the period to be evaluated, determine the vehicle demand.
[0068] In an exemplary embodiment, the time period to be evaluated is from 17:00 on December 26, 2024 to 18:00 on December 26, 2024. That is, the computer device needs to determine the vehicle demand of the target station from 17:00 on December 26, 2024 to 18:00 on December 26, 2024. The computer device obtains the historical order volume of the target station in the historical time period. The historical time period is from June 26, 2024 to December 25, 2024. The computer device divides the historical time period into historical time periods with a division period of 1 hour. That is, a historical time period is from 0:00 on June 26, 2024 to 1:00 on June 26, 2024. Since the time period to be evaluated from 17:00 on December 26, 2024 to 18:00 on December 26, 2024 is from 17:00 to 18:00 on Thursday, the same time period as the time period to be evaluated is from 17:00 to 18:00 on Thursday. The computer device determines the historical order volume between 17:00 and 18:00 on Thursday as the target historical order volume from each historical order volume. The computer device inputs each target historical order volume into the LSTM network, and performs prediction processing on each target historical order volume through the LSTM network to obtain the estimated vehicle usage volume of the target station during the period to be evaluated. Then, the computer device determines the difference between the actual number of vehicles and the estimated vehicle usage volume of the target station during the period to be evaluated as the vehicle demand.
[0069] Then, the current data processing method has fewer target historical time periods in the same period as the period to be evaluated, resulting in less data on the target historical order volume. Furthermore, the estimated vehicle usage based on the target historical order volume will be more accidental, resulting in lower accuracy of vehicle demand.
[0070] In the above embodiment, the target historical order volume corresponding to each target historical time period is only 26, and the data volume of the target historical order volume is relatively small. In addition, the target historical order volume may also fluctuate greatly due to the influence of holidays. Therefore, the estimated vehicle usage volume determined based on the target historical order volume will be more accidental, resulting in a lower accuracy of 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 explanation. The embodiment of the present application does not limit the execution device of the data processing method, and 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 in 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 the 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] In implementation, the computer device obtains the historical order data set of each user in the historical time period. Then, the computer device traverses each historical order data set to determine the historical order volume of the target station in each historical time period and the order user information of each historical time period. The computer device divides each historical order volume in the same period of each historical time period into the same historical order volume group to obtain a historical order volume group. Then, the computer device performs a mean operation 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 data set of each user within a historical time period. Then, the computer device traverses each historical order data set, counts the historical order volume of the target station within each historical time period, and determines each order user of the target station within each historical time period. Then, the computer device determines the order user information of each order user based on the historical order data set. The computer device divides 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 to obtain each historical order volume group. Then, for each historical order volume group, the computer device performs a mean operation on each historical order volume in the historical order volume group to obtain an order volume mean. Then, the computer device constructs an order volume mean vector based on the mean of each order volume with the same weekly cycle.
[0076] In an exemplary embodiment, the specific process of determining the order volume mean vector is introduced in the form of an example: the same weekly cycle means that the two time periods belong to Monday, Tuesday, Wednesday, Thursday, Friday, Saturday or Sunday. The time periods of the same hourly cycle means that the two time periods have the same hours. For example, the two time periods belong to the hour from 8:00 to 9:00, or the two time periods belong to the hour from 9:00 to 10:00. For each hourly cycle under each weekly cycle, the computer device counts the historical order volumes under the weekly cycle and the hourly cycle according to the historical order volume data. Then, the computer device performs mean processing on the historical order volumes to obtain the order volume mean. For example, the historical time period is from June 26, 2024 to December 25, 2024. The computer device counts the historical order volumes from 8:00 to 9:00 every Thursday in the historical time period. Then, the computer device determines the mean of the historical order volumes to obtain the order volume mean from 8:00 to 9:00 every Thursday. Then, the computer device combines the order volume mean values in each weekly cycle to obtain the order volume mean vector. For example, if the weekly cycle is Monday, the computer device combines the order volume mean values on Monday to obtain the order volume mean vector on Monday.
[0077] To put it another way, the computer device calculates the average order volume of the target station from Monday to Sunday for each hour based on the historical order volume of each historical time period. Then, the computer device constructs the order volume vectors R_d(s)= [n1, n2, ..., n24] of the target station based on the average order volume. Among them, d is the number of week cycles, with a value of 1-7, representing Monday to Sunday. s is the station id, and n is the average order volume of event_day with the same number of week cycles. That is, the target station id corresponds to 7 groups of 1X24 vectors.
[0078] Step 104 , clustering 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.
[0079] Among them, the cosine similarity is the similarity of riding habits between the comprehensive time period and the other comprehensive time periods. The higher the cosine similarity, the more similar the riding habits between the comprehensive time period and the other comprehensive time periods. The lower the cosine similarity, the more different the riding habits between the comprehensive time period and the other comprehensive time periods.
[0080] In implementation, the computer device determines the cosine similarities between the integrated time period and the remaining integrated time periods based on the cosine similarity algorithm for each integrated time period. Then, the computer device determines the 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] In implementation, the computer device determines the target comprehensive time period group in each comprehensive time period based on the target week cycle in which the time period to be evaluated is located. Then, the computer device determines each first target order user information in each order user information based on the time period to be evaluated. The computer device determines each second target order user information in each order user information based on the target comprehensive time period and the time period to be evaluated.
[0084] Step 108, determining the vehicle demand of the target station in the period to be evaluated based on the information of each target order user.
[0085] In implementation, the computer device determines the fixed number of users and the intended number of users based on the information of each target order user, and determines the estimated station usage of the target station in the period to be evaluated based on the fixed number of users and the intended number of users. Then, the computer device determines the vehicle demand of the target station in the period to be evaluated based on the estimated vehicle usage.
[0086] In an optional embodiment, the computer device directly determines each target order user information based on the target comprehensive time period group and the time period to be evaluated. Then, the computer device divides each target order user information with the same weekly cycle into each target order user information group. The computer device determines the number of intended users based on each target order user information group, and performs mean processing on each number of intended users to obtain the estimated vehicle usage. Then, the computer device 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 in 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 condition is that the number of times the car is used 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 time period to be evaluated is from 17:00 on December 26, 2024 to 18:00 on December 26, 2024. That is, from 17:00 to 18:00 on Thursday. Based on the target comprehensive time period group and the time period to be evaluated, the computer device determines that the target historical time period is from 17:00 to 18:00 every Tuesday, 17:00 to 18:00 every Wednesday, and 17:00 to 18:00 every Thursday from June 26, 2024 to December 25, 2024. The computer device determines the order user information corresponding to the time period to be evaluated as the target order user information. The computer device divides each target order user information corresponding to 17:00 to 18:00 on Tuesday into a target order user information group, and divides each target order user information corresponding to 17:00 to 18:00 on Wednesday into a target order user information group. At the same time, the computer device divides each 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 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 vehicle. If the number of vehicle usages 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 made 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 makes vehicle adjustments at the target station based on the vehicle demand.
[0089] In the above data processing method, each comprehensive time period is clustered by the mean vector of each order quantity and the cosine similarity, and each comprehensive time period group with similar riding habits is obtained. Then, by determining the target comprehensive time period group where the time period to be evaluated is located, and determining each 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 each target order user information, which reduces the randomness of the vehicle demand and improves the accuracy of the vehicle demand.
[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, obtaining 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 in the 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 the initial order data set of all users in the historical time period from the shared bicycle platform. The initial order data set contains the starting time and starting location of each historical order. The computer device converts the format of each starting user time in each initial order data set according to the time period format, and converts the format of each starting location according to the station location of each station to obtain the order data set.
[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 data set contains the starting time period and the starting station.
[0097] In implementation, the computer device divides the historical time period into historical time periods in units of hours. The computer device traverses each order data set and counts the historical order volume of the target station in each historical time period. The historical order volume represents the number of orders with the target station as the riding starting point in the historical time period.
[0098] Specifically, the computer device initializes the historical order volume of the target station in each historical time period. That is, the computer device sets the historical order volume to 0. For each historical time period in the target station, the computer device determines whether the starting time period in each order data set is a historical time period, and determines 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 0:00 on June 26, 2024 to 24:00 on December 25, 2024 at an interval of one hour. For example, a historical time period is from 0:00 on June 26, 2024 to 1:00 on June 26, 2024. A specific process of determining the historical order volume is described by taking a historical time period as an example. The historical time period is from 0:00 on June 26, 2024 to 1:00 on June 26, 2024. The computer device determines whether the starting vehicle time period in each order data set is from 0:00 on June 26, 2024 to 1: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 time period is from 0:00 on June 26, 2024 to 1: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 of the historical order volume in each historical time period is (station_id, event_day, span, order_cnt). Among them, station_id is the station ID, event_day is the date, span is the hour cycle, which is also the time period. order_cnt is the historical order volume.
[0100] In an optional embodiment, the computer device selects each initial target order data set whose starting station is the target station from the order data set of each historical time period. Then, for each historical time period, the computer device determines whether the starting vehicle use time period in each initial target order data set is a historical time period. If the starting vehicle use 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 contains the user's number of car usage, car usage intention, starting station and starting car usage time period.
[0104] In implementation, the computer device traverses each order data set and counts each order user of the target station in each historical time period. Then, the computer device determines the order user information of each order user based on each order data set. The order user of the historical time period is the user corresponding to the order with the target station as the riding starting point in the historical time period.
[0105] Specifically, the computer device selects each initial target order data set whose starting station is the target station from each order data set. For each historical time period, the computer determines whether the starting car use time period in the initial order data set is a historical time period. If the starting car use time period is a historical time period, the computer device determines the user corresponding to the initial order data set as the order user, and constructs the order user information of the order user based on the number of car uses and car use intentions in the order data set.
[0106] In an exemplary embodiment, the computer device selects each initial target order data set whose starting station is the target station from each order data set. Each historical time period is a historical time period from 0:00 on June 26, 2024 to 24:00 on December 25, 2024 at a time interval of one hour. For example, a historical time period is from 0:00 on June 26, 2024 to 1:00 on June 26, 2024. The specific process of determining order user information is described by taking a historical time period as an example. The historical time period is from 0:00 on June 26, 2024 to 1: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 1:00 on June 26, 2024. If the starting car use 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 uses and the intention to use the car 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 hour cycle, which is also the time period. User_id is the identifier of the order user. Order_cnt_30day is the number of car uses, and is_use_3day is the intention to use the car. For example, the number of car uses is the number of times the user has used the car in the past month. The intention to use the car represents whether the user has used the car in the past 3 days.
[0107] In an optional embodiment, the computer device determines whether the starting time period of each order data set is a historical time period, and determines whether the starting station is the target station for each historical time period in the target station. If the starting time period of each order data set is a historical time period and the starting station is the target station, the computer device determines the user corresponding to the initial order data set as the order user, and constructs the order user information of the order user based on the number of times the order is used and the intention to use the order in the order data set.
[0108] Optionally, the target station may be any of the stations corresponding to the shared bicycle platform, and the number of times the bicycle is used may not be limited to the number of times the user has used the bicycle in the last month, or may be the number of times the user has used the bicycle in the last 20 days. The intention to use the bicycle may not be limited to whether the user has used the bicycle in the last 3 days, or may be whether the user has used the bicycle in the last 4 days. The embodiment of the present application does not limit the target station, and does not limit the time period of the intention to use the bicycle and the number of times the 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, obtaining an initial historical order data set 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 the historical time period based on the period to be evaluated. Then, the computer device sends an initial order data set acquisition request to the database corresponding to the shared bicycle platform based on the historical time period. In response to the initial order data set acquisition request, the database queries the initial historical order data sets of all users in the historical time period, and returns each initial historical order data set to the computer device. The computer device receives the initial historical order data set of each user in the historical time period.
[0115] In an exemplary embodiment, the period to be evaluated is from 17:00 on December 26, 2024 to 18:00 on December 26, 2024. Then the computer device determines that the six months before the period to be evaluated is a historical time period. That is, the historical time period is from June 26, 2024 to December 25, 2024. The computer device sends an initial order data set acquisition request to the database corresponding to the shared bicycle platform based on the historical time period. In response to the initial order data set acquisition request, the database queries the number of times each user used the bicycle from June 26, 2024 to December 25, 2024, the intention to use the bicycle, the timestamp of the bicycle use, and the longitude and latitude of the start position of the ride. Then, the database constructs the initial historical order data set of the user based on the user ID, the number of times the bicycle was used, the intention to use the bicycle, the timestamp of the bicycle use, and the longitude and latitude of the start position of the ride. Then, the database returns the initial historical order data set of each user to the computer device. The computer device receives the initial historical order data set of each user. For example, a user's initial historical order data set contains the user ID, the number of times the user used the bike in the past month (order_cnt_30day), whether the user used the bike in the past three days (is_use_3day), the bike use timestamp of each historical order, and the latitude and longitude of the ride start location. If the user rides a shared bike once in the historical period, a historical order will be generated, which contains the user's bike use timestamp and the latitude and longitude of the ride start location. The user's bike timestamp contains the start and end time of the bike use.
[0116] Step 304 , for each initial historical order data set, based on the time period format, the format of the starting vehicle use time of each historical order is converted to obtain the starting vehicle use time period.
[0117] The initial historical order data set contains each historical order, and each historical order contains a riding timestamp and the latitude and longitude of the riding start location. The riding timestamp contains the starting time of the ride. The latitude and longitude of the riding start location is also the starting location of the ride.
[0118] During implementation, the computer device converts the format of the starting vehicle use 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, and obtains the starting vehicle use time period.
[0119] In an exemplary embodiment, taking the starting time of a historical order data as an example, the detailed process of determining the starting time period for using the vehicle is introduced. 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 present. 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 to June 26, 2024, [14, 15], and obtains 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] In implementation, the computer device obtains the station location of each station from the database of the shared bicycle platform. Then, the computer device 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 each vehicle usage timestamp 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 vehicle is converted according to the hourly time period format to obtain the starting time period, which is convenient for the subsequent statistics of the historical order volume of the target station in units of hourly time periods. In addition, the riding location is mapped as the starting station, which is convenient for the subsequent statistics of the historical order volume of the station.
[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] In implementation, the computer device determines each integrated time period as the current integrated time period. Then, the computer device calculates the similarity between the order volume mean vector of the current integrated time period and the order volume mean vector of each remaining integrated time period based on the cosine similarity algorithm to obtain the cosine similarity between the current time period and each remaining integrated time period. The cosine similarity is 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. The 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 vehicle 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 volume 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 comprehensive time periods are selected from the remaining comprehensive 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 the 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. Then, the computer device determines the remaining integrated time period as a similar integrated time period.
[0135] In an exemplary embodiment, Monday is taken as an example to introduce 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 similar integrated time periods with cosine similarity greater than 0.8 in the six remaining integrated time periods from Tuesday to Saturday, and the obtained similar integrated time periods are Tuesday, Wednesday and Thursday.
[0136] Optionally, the cosine similarity threshold may be, but is not limited to, set to 0.8, which is determined according to screening requirements. The embodiment of the present application does not limit 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 implementation, the computer device groups the integrated time period and each other similar integrated time period 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 through the mean vector of each order quantity and the cosine similarity, and each comprehensive time period group with similar riding habits is obtained, which facilitates the determination of the target order user information based on the comprehensive time period. Compared with directly determining the target historical order quantity based on the time 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 of each target in the same period as the time 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.
[0143] The same time period refers to a time period with the same weekly cycle and the same hourly cycle.
[0144] In implementation, the computer device determines the same historical time period of each target that has the same week period and the same hour period as the time period to be evaluated within the historical time period. Then, the computer device determines the order user information of the same historical time period of each target in each order user information as the first target order user information.
[0145] In an exemplary embodiment, the specific process of determining the first target order user information is introduced in the form of an example: the same week cycle means that the two time periods belong to Monday, Tuesday, Wednesday, Thursday, Friday, Saturday or Sunday. The time period of the same hour cycle means that the two time periods have the same hours. For example, the two time periods belong to the same hour from 8:00 to 9:00, or the two time periods belong to the same hour from 9:00 to 10:00. The time period to be evaluated is from 17:00 on December 26, 2024 to 18:00 on December 26, 2024. The historical time period is from June 26, 2024 to December 25, 2024. Since the time period to be evaluated is from 17:00 to 18:00 on Thursday. The computer device determines that 17:00 to 18:00 every Thursday in the historical time period from June 26, 2024 to December 25, 2024 is the same target historical time period. Then, the computer device determines the order user information of each target same historical time period in 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 each target comprehensive time period.
[0148] In 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. Then, the computer device selects each target similar historical time period in each initial target historical time period based on each target same historical time period. 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.
[0149] Specifically, the target comprehensive time period group includes each target weekly cycle. The computer device determines the weekly cycle in which the time period to be evaluated is the first target weekly cycle. The computer device determines the remaining target weekly cycles except the first target weekly cycle in the comprehensive time period group as the second target weekly cycle. Then, the computer device determines each target similar historical time period in the historical time period that has the same hour cycle as the time period to be evaluated. 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.
[0150] In an exemplary embodiment, the specific process of determining the second target order user information is introduced in the form of an example: the comprehensive time period is Monday to Sunday. The target comprehensive time period group includes Tuesday, Wednesday and Thursday. The time period of the same hour cycle refers to two time periods having the same hours. For example, the two time periods also belong to the hour from 8:00 to 9:00, or the two time periods also belong to the hour from 9:00 to 10:00. The time period to be evaluated is from 17:00 on December 26, 2024 to 18:00 on December 26, 2024. Since the first target weekly cycle in which the time period to be evaluated is Thursday, the computer device determines that the second target weekly cycle is Tuesday and Wednesday. The historical time period is from June 26, 2024 to December 25, 2024. Since the time period to be evaluated is from 17:00 to 18:00 on Thursday. The computer device determines that 17:00 to 18:00 on Tuesdays and 17:00 to 18:00 on Wednesdays in the historical time period from June 26, 2024 to December 25, 2024 are 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, which provides 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 each target order user information, and determine the number of fixed users based on each first target order user information.
[0154] The target order user information includes first target order user information and second target order user information.
[0155] In implementation, a screening condition is pre-set in the computer device. The computer device divides each target order user information combination belonging to the same weekly cycle into a target order user information group. Based on the preset screening condition, the computer device screens the intended users that meet the screening condition in the target order user information group to obtain the number of intended users. Then, the computer device combines the number of intended users to obtain a group of intended users. The computer device determines that the users who appear in each weekly cycle in each first target order user information are fixed users, and counts the number of fixed users.
[0156] In an exemplary embodiment, the target order user information includes the number of times the car is used and the intention to use the car. The screening condition is that the number of times the car is used 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 times each target order user information in the target order user information group uses the car is greater than 6 and whether there is an intention to use the car. If the number of times the target order user information uses the car 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 period to be evaluated according to the number of intended users and the number of fixed users, and determining the vehicle demand based on the estimated vehicle usage.
[0158] In implementation, the computer device determines the average number of mobile users based on the intended user number group and the fixed user number. Then, the computer device determines the sum of the fixed user number and the average number of mobile 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, and determines the vehicle demand based on the estimated vehicle usage and the actual number of vehicles.
[0159] In an optional embodiment, the computer device constructs vehicle dispatch information based on vehicle demand and feeds back the vehicle dispatch information to the vehicle dispatcher. Specifically, the computer device determines whether the vehicle demand is greater than 0 and obtains a determination result. Then, the computer device constructs vehicle dispatch information based on the determination result, the target station and the time period to be evaluated, and sends the vehicle dispatch information to the terminal of the vehicle dispatcher closest to the target station.
[0160] In this embodiment, the number of intended users and fixed users is determined through the information of each target order user, and the number of users who frequently appear at the target station during the period to be evaluated is obtained. Then, the estimated vehicle usage is determined based on the number of intended users and fixed users, and the vehicle demand is determined based on the estimated vehicle usage. The vehicle demand is determined from the user's perspective, and then the vehicle is dispatched based on the user value, which meets the vehicle demand of high-frequency users, improves the user experience, and avoids user loss.
[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 , average processing is performed on the mobile user number group to obtain the average mobile user number, and the estimated vehicle usage is determined based on the average mobile user number and the fixed user number.
[0165] In implementation, the computer device averages the number of mobile users in the mobile user number group to obtain the average number of mobile users. Then, the computer device adds the average number of mobile users and the number of fixed users to obtain the 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] In implementation, the computer device obtains the actual number of vehicles at the target station during the period to be evaluated. Then, the computer device performs a subtraction operation on the estimated vehicle usage and the actual number of vehicles to obtain the vehicle demand. If the vehicle demand is greater than 0, the computer device constructs vehicle dispatching information based on the target station, the period to be evaluated, and the vehicle demand, and feeds back the vehicle dispatching information to the vehicle dispatcher. If the vehicle demand is less than or equal to 0, the computer device determines that the target station does not need to be dispatched during the period to be evaluated. Then, the computer device constructs vehicle dispatching information based on the target station, the period to be evaluated, and the information that does not require dispatching, and feeds back the vehicle dispatching information to the vehicle dispatcher.
[0168] In this embodiment, the estimated vehicle usage is determined based on the number of intended user groups and the fixed number of users. The estimated number of vehicles used at 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, meeting the vehicle needs of high-frequency users, improving user experience, and avoiding user churn.
[0169] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed 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 part of the steps or stages in other steps.
[0170] Based on the same inventive concept, the embodiment of the present application also provides a data processing device for implementing the data processing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more data processing device embodiments provided below can refer to the limitations on the data processing method above, 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 determination module 803 is used to determine the target comprehensive time period group where the time period to be evaluated is located in each comprehensive time period, and determine 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.
[0175] The second determination module 804 is used to determine the vehicle demand of the target station in the time period to be evaluated based on the user information of each target order.
[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 acquire the order data set of each user in a historical time period; the historical time period includes each historical time period.
[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 volume mean vector of the comprehensive time period and the order volume mean vectors of other comprehensive time periods based on the cosine similarity algorithm.
[0187] The first screening submodule is used to screen similar comprehensive time periods from other 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. Among them, the fourth determination submodule includes:
[0190] The fifth determination submodule is used to determine the same historical time period of each target in the same period as the time 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.
[0191] The sixth determination submodule is used to determine the similar historical time periods of each target based on the target comprehensive time period group and the same historical time periods 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 used to determine the number of intended users based on each target order user information, and to 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 period to be evaluated 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 used to determine the number group of mobile users based on the number group of intended users and the number of fixed users.
[0197] The second processing submodule is used to perform mean processing on the mobile user number group to obtain the average mobile user number, and determine the estimated vehicle usage based on the average mobile user number and the fixed user number.
[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 determine the vehicle demand based on the actual number of vehicles and the estimated vehicle usage.
[0199] Each module in the above data processing device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to 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. Fig. 9As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through 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 an 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 the 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 an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a data processing method is implemented. The display unit of the computer device is used to form a visually visible picture, which 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 shell, or an external keyboard, touchpad or mouse.
[0201] Those skilled in the art will understand that Fig. 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 those shown in the figure, or combine certain components, or have a different arrangement of components.
[0202] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, 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] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and 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. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present 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. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0207] The technical features of the above embodiments may be combined arbitrarily. 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 only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached 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 in the same period in each historical time period to obtain the order volume mean vector of each comprehensive time period; 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; The vehicle demand of the target station in the time period to be evaluated is determined based on the target order user information.
2. The method according to claim 1, characterized in that The obtaining of historical order volume and order user information of the target station in each historical time period includes: Obtaining an order data set of each user in 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; Each of the order data sets is traversed to determine the order users of the target station in each of the historical time periods, and the order user information of the order users is determined.
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: Acquire an initial historical order data set of each user in a historical time period; the initial historical order data set includes a starting time and a 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 use time of each of the historical orders is converted to obtain the starting vehicle use time period; Based on the station locations of each station, determine the starting station corresponding to the starting vehicle location of the historical order; 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, characterized in that: The clustering process is performed on each of the comprehensive time periods based on the cosine similarity algorithm and each of the order quantity mean vectors to obtain each comprehensive time period group, including: For each of the comprehensive time periods, based on the cosine similarity algorithm, 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 is calculated; Based on the cosine similarities and a preset cosine similarity threshold, similar comprehensive time periods are selected from the remaining comprehensive time periods; The integrated time period and the similar integrated time period are combined to obtain an integrated time period group.
5. The method according to claim 1, characterized in that Each of the target order user information includes each of the first target order user information and each of the second target order user information. The determining of each of the 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 includes: 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; 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 the similar historical time period of each target is determined in each order user information.
6. The method according to claim 5, characterized in that The determining of the vehicle demand of the target station in the period to be evaluated based on the target order user information includes: Determine a group of intended users based on each of the target order user information, and determine 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 period to be evaluated is determined according to the intended user number group and the fixed user number, and the vehicle demand is determined based on the estimated vehicle usage.
7. The method according to claim 6, characterized in that The step of determining the estimated vehicle usage of the target station during the period to be evaluated according to the intended user number 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 a mean mobile user number, and determining an estimated vehicle usage based on the mean 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 acquire 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 in the same period in each historical time period to obtain the order volume mean vector of each comprehensive time period; A clustering module, used for clustering each of the comprehensive time periods based on a cosine similarity algorithm and each of the order quantity mean vectors to obtain each comprehensive time period group; A first determination module is used 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; The second determination module is used to determine the vehicle demand of the target station in the time period to be evaluated based on the target 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
Method and device for predicting shared bicycle flow based on AP-TI (Affinity Propagation-Trend Iteration) clustering
CN108960476A
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
Systems, methods, and storage devices for data clustering
WO2023174304A1