Online car-hailing market resource release method and device, computer equipment and storage medium
By using the LightGBM model and attribution model to analyze and optimize the environmental data of the online ride-hailing market, the scientific and low efficiency of resource delivery strategies in the existing technology are solved, and a more accurate and efficient resource delivery strategy formulation is achieved.
Patent Information
- Application Number
- CN202411403468.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2024-12-31
AI Technical Summary
The existing resource deployment strategy for online ride-hailing market is inadequate due to insufficient manual field research, which leads to low scientificity, accuracy, convenience and efficiency, and time-consuming and labor-intensive.
By obtaining environmental data of the target city, using the trained LightGBM model to predict the investment cost, cost recovery cycle and profit cycle, and optimizing and adjusting the trained attribution model to formulate a scientific resource deployment strategy.
It improves the scientificity, accuracy, convenience and efficiency of resource deployment in the online ride-hailing market, saves labor costs, enhances the interpretability and adaptability of the model, and helps optimize resource allocation and improve resource utilization.
Smart Images

Figure CN119228432A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of traffic big data technology, and in particular to a method, device, computer equipment and storage medium for placing resources in the online car-hailing market. Background Art
[0002] With the rapid development of the online car-hailing market, the demand for online car-hailing market development in many cities is also increasing. Usually, manual field research is conducted in cities with online car-hailing market development needs to formulate resource deployment strategies based on the research results. Due to the large scale of some cities, manual field research is not sufficient, which directly affects the scientificity and accuracy of resource deployment strategies, is time-consuming and labor-intensive, and has low convenience and efficiency. Summary of the invention
[0003] In order to improve the scientificity, accuracy, convenience and efficiency of resource allocation in the online car-hailing market, the present application provides a method, device, computer equipment and storage medium for resource allocation in the online car-hailing market.
[0004] The above-mentioned invention objective of the present application is achieved through the following technical solutions: Obtaining environmental data of the online ride-hailing market in the target city, the environmental data including the population of the target city, the demand for online ride-hailing vehicles, and the number of drivers; The environmental data is analyzed and predicted by the trained LightGBM model to obtain the first predicted investment cost, the first predicted cost recovery period and the first predicted profit period corresponding to the online car-hailing market in the target city; By using the trained attribution model, the first predicted investment cost, the first predicted cost recovery period, and the first predicted profit period are optimized and adjusted to obtain the target predicted investment cost, the target predicted cost recovery period, and the target predicted profit period corresponding to the online car-hailing market in the target city; Based on the target predicted investment cost, the target predicted cost recovery period and the target predicted profit period, a resource allocation strategy for the target city's online ride-hailing market is formulated.
[0005] By adopting the above technical solutions, the scientificity, accuracy, convenience and efficiency of resource allocation in the online car-hailing market can be improved.
[0006] In one example, the present application may be further configured as follows: before obtaining the environmental data of the online car-hailing market in the target city, the method further includes: Obtain historical environmental data, historical input costs, historical cost recovery cycles, and historical profit cycles of online ride-hailing markets in multiple cities; According to the historical environmental data, the historical input costs, the historical cost recovery period and the historical profit period, the preset LightGBM model and the preset attribution model are trained to obtain the trained LightGBM model and the trained attribution model.
[0007] By adopting the above technical solutions, the adaptability and performance of the trained LightGBM model and the trained attribution model in the resource deployment prediction task in the online car-hailing market can be improved.
[0008] In one example, the present application may be further configured as follows: the preset LightGBM model and the preset attribution model are trained according to the historical environmental data, the historical input cost, the historical cost recovery cycle, and the historical profit cycle to obtain the trained LightGBM model and the trained attribution model, including: Input the historical environmental data, the historical input cost, the historical cost recovery period and the historical profit period into the preset LightGBM model, and obtain the second predicted input cost, the second predicted cost recovery period and the second predicted profit period analyzed and predicted by the preset LightGBM model for the historical environmental data; According to the historical input cost, the historical cost recovery period and the historical profit period, as well as the second predicted input cost, the second predicted cost recovery period and the second predicted profit period, the parameters of the preset LightGBM model are adjusted to obtain the trained LightGBM model; The preset attribution model is trained according to the historical input cost, the historical cost recovery period and the historical profit period, as well as the second predicted input cost, the second predicted cost recovery period and the second predicted profit period to obtain the trained attribution model.
[0009] By adopting the above technical solution, since the historical environmental data covers a more comprehensive range of factors affecting the demand for online ride-hailing in the online ride-hailing market, it is helpful to improve the training effect and enhance the adaptability of the trained LightGBM model in the prediction tasks of input cost, cost recovery cycle and profit cycle.
[0010] In one example, the present application may be further configured as follows: adjusting the parameters of the preset LightGBM model according to the historical input cost, the historical cost recovery period and the historical profit period, as well as the second predicted input cost, the second predicted cost recovery period and the second predicted profit period to obtain the trained LightGBM model, including: Obtaining a first predicted loss value of the second predicted input cost relative to the historical input cost, a second predicted loss value of the second predicted cost recovery period relative to the historical cost recovery period, and a third predicted loss value of the second predicted profit period relative to the historical profit period; According to the first prediction loss value, the second prediction loss value and the third prediction loss value, the parameters of the preset LightGBM model are updated to obtain the trained LightGBM model.
[0011] By adopting the above technical solution, the performance of the trained LightGBM model can be ensured.
[0012] In one example, the present application may be further configured as follows: the preset attribution model is trained according to the historical input cost, the historical cost recovery period and the historical profit period, and the second predicted input cost, the second predicted cost recovery period and the second predicted profit period to obtain the trained attribution model, including: Input the historical input cost, the historical cost recovery period, and the historical profit period, as well as the second predicted input cost, the second predicted cost recovery period, and the second predicted profit period into the preset attribution model to obtain a square loss term and a regularization term; Determining a loss function of the preset attribution model according to the square loss term and the regularization term; The regression coefficient of the preset attribution model is adjusted according to the loss function to obtain the trained attribution model.
[0013] By adopting the above technical solution, the trained attribution model can enhance the interpretability of the trained LightGBM model.
[0014] In one example, the present application may be further configured as follows: adjusting the regression coefficient of the preset attribution model according to the loss function includes: Minimize the loss function to minimize the regression coefficient of the preset attribution model.
[0015] By adopting the above technical solution, the generalization ability and stability of the trained Ridge regression model can be improved.
[0016] In one example, the present application may be further configured as follows: the trained attribution model includes a trained Ridge regression model.
[0017] By adopting the above technical solution, the trained attribution model can fit the output of the trained LightGBM model to achieve adjustment and optimization.
[0018] The second object of the invention is achieved by the following technical solutions: A device for placing resources in an online car-hailing market, the device comprising: An acquisition module, used to acquire environmental data of the online car-hailing market in a target city, wherein the environmental data includes the population of the target city, the demand for online car-hailing, and the number of drivers; A prediction module is used to analyze and predict the environmental data through the trained LightGBM model to obtain the first predicted investment cost, the first predicted cost recovery period and the first predicted profit period corresponding to the online car-hailing market in the target city; an optimization module, configured to optimize and adjust the first predicted investment cost, the first predicted cost recovery period, and the first predicted profit period through a trained attribution model, and obtain a target predicted investment cost, a target predicted cost recovery period, and a target predicted profit period corresponding to the online car-hailing market in the target city; A formulation module is used to formulate a resource allocation strategy for the target city's online car-hailing market based on the target predicted investment cost, the target predicted cost recovery period and the target predicted profit period.
[0019] The third objective of the present application is achieved through the following technical solutions: A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the above-mentioned method for placing resources in the online car-hailing market are implemented.
[0020] The fourth objective of the present application is achieved through the following technical solutions: A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the above-mentioned method for allocating resources to the online car-hailing market.
[0021] In summary, this application includes the following beneficial technical effects: On the one hand, through the trained LightGBM model, the investment cost, cost recovery cycle and profit cycle of resource allocation in the online car-hailing market can be quickly predicted, which improves convenience and efficiency and saves labor costs; on the other hand, since the trained attribution model enhances the interpretability of the trained LightGBM model, the prediction results of the trained LightGBM model can be optimized and adjusted through the trained attribution model to obtain more accurate prediction results, thereby being able to more scientifically and effectively help guide the resource allocation of the target city's online car-hailing market, improve scientificity and accuracy, and help optimize resource allocation and improve resource utilization. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 A flowchart of a method for placing resources in the online car-hailing market provided in an embodiment of the present application; Figure 2 Another flowchart of a method for placing resources in the online car-hailing market provided in an embodiment of the present application; Figure 3 Another flow chart of a method for placing resources in an online car-hailing market provided in an embodiment of the present application; Figure 4 A schematic block diagram of a device for placing resources in the online car-hailing market provided in an embodiment of the present application; Figure 5 The present invention is a block diagram showing the structure of a computer device according to an embodiment of the present application.
[0023] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0024] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0025] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.
[0026] It should be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0027] It should be further understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0028] The embodiments of the present application provide a method, device, computer equipment and storage medium for placing resources in the online car-hailing market. Among them, the method for placing resources in the online car-hailing market, on the one hand, can realize rapid prediction of the investment cost, cost recovery cycle and profit cycle of the online car-hailing market resource placement through the trained LightGBM model, improves convenience and efficiency, and saves labor costs; on the other hand, since the trained attribution model enhances the interpretability of the trained LightGBM model, then the prediction results of the trained LightGBM model are optimized and adjusted through the trained attribution model, and more accurate prediction results can be obtained, so that it can help guide the resource placement of the online car-hailing market in the target city more scientifically and effectively, improve scientificity and accuracy, and help optimize resource allocation and improve resource utilization.
[0029] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0030] Please refer to Figure 1 , Figure 1 A flowchart of a method for placing resources in a ride-hailing market provided in an embodiment of the present application. The method for placing resources in a ride-hailing market is mainly applied to computer devices, such as PCs (Personal Computers) or servers and other terminal devices with data processing functions.
[0031] Among them, the server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), as well as big data and data analysis platforms.
[0032] like Figure 1 As shown, the method for allocating resources to the online car-hailing market includes steps S101 to S104.
[0033] Step S101, obtaining environmental data of the online car-hailing market in the target city, the environmental data including the population of the target city, the demand for online car-hailing and the number of drivers.
[0034] The allocation of resources in the online car-hailing market refers to the investment of funds to promote, publicize and promote online car-hailing services to users through various channels and means, so as to attract more users to participate and use them, such as advertising, offline publicity, online promotion and other methods.
[0035] An untrained LightGBM (Light Gradient Boosting Machine) model (defined as a preset LightGBM model) and an untrained attribution model (defined as a preset attribution model) are pre-stored in the computer device.
[0036] The resource delivery method for the online car-hailing market mainly includes two stages. The first is to train the preset LightGBM model and the preset attribution model based on the historical environmental data, historical input costs, historical cost recovery cycles and historical profit cycles of the online car-hailing markets in multiple cities where resource delivery has been implemented, and obtain the trained LightGBM model and the trained attribution model. The second is to use the trained LightGBM model and the trained attribution model to perform the prediction task of resource delivery in the online car-hailing market of the target city, so as to provide a more accurate basis for the resource delivery in the online car-hailing market of the target city, wherein the trained LightGBM model is used to predict the input cost, cost recovery cycle and profit cycle of the environmental data of the online car-hailing market in the target city, and quickly output the first predicted input cost, the first predicted cost recovery cycle and the first predicted profit cycle, and the trained attribution model is used to optimize and adjust the first predicted input cost, the first predicted cost recovery cycle and the first predicted profit cycle, so as to obtain a more accurate target predicted input cost, target predicted cost recovery cycle and target predicted profit cycle corresponding to the online car-hailing market in the target city.
[0037] The following is a detailed explanation of the method of allocating resources to the online car-hailing market.
[0038] In one embodiment, if Figure 2 As shown, before step S101, steps S105 to S106 are included.
[0039] Step S105, obtaining historical environmental data, historical investment costs, historical cost recovery cycles and historical profit cycles of the online car-hailing markets in multiple cities.
[0040] First, obtain the historical environmental data, historical investment costs, historical cost recovery cycles, and historical profit cycles of the online car-hailing market in multiple cities that have implemented resource deployment. For example, the historical environmental data mainly includes the population size, actual demand for online car-hailing, and the number of drivers in each city that has implemented resource deployment.
[0041] It is understandable that the historical environmental data, historical input costs, historical cost recovery cycles and historical profit cycles of the online car-hailing markets in multiple cities that have implemented resource allocation have been cleaned, sorted and feature-engineered in advance, and have been converted into a form that is easy to analyze and understand by the preset LightGBM model. In this way, it can be better used to train the preset LightGBM model and the preset attribution model, thereby ensuring the performance of the trained LightGBM model and the trained attribution model.
[0042] Step S106, training the preset LightGBM model and the preset attribution model according to the historical environmental data, historical input costs, historical cost recovery cycles and historical profit cycles to obtain a trained LightGBM model and a trained attribution model.
[0043] According to the historical environmental data, historical investment costs, historical cost recovery cycles and historical profit cycles of the online car-hailing markets in multiple cities that have implemented resource allocation, the preset LightGBM model and the preset attribution model are trained to obtain the trained LightGBM model and the trained attribution model.
[0044] In this way, the adaptability of the trained LightGBM model and the trained attribution model in the resource allocation prediction task in the online car-hailing market can be improved.
[0045] In one embodiment, if Figure 3 As shown, step S106 may include sub-steps S1061 to S1063.
[0046] Sub-step S1061, inputs the historical environmental data, historical input costs, historical cost recovery periods and historical profit periods into the preset LightGBM model, and obtains the second predicted input costs, the second predicted cost recovery period and the second predicted profit period that are analyzed and predicted by the preset LightGBM model based on the historical environmental data.
[0047] The historical environmental data, historical input costs, historical cost recovery cycles and historical profit cycles of the online ride-hailing markets in multiple cities that have implemented resource deployment are input into the preset LightGBM model, so that the preset LightGBM model is trained with the historical input costs, historical cost recovery cycles and historical profit cycles as training targets, and the second predicted input cost, second predicted cost recovery cycle and second predicted profit cycle are output by the preset LightGBM model through analysis and prediction of the historical environmental data of the online ride-hailing markets in multiple cities that have implemented resource deployment.
[0048] Sub-step S1062, adjusting the parameters of the preset LightGBM model according to the historical input cost, the historical cost recovery period and the historical profit period, as well as the second predicted input cost, the second predicted cost recovery period and the second predicted profit period, to obtain a trained LightGBM model; Then, according to the second predicted input cost, the second predicted cost recovery period and the second predicted profit period, as well as the historical input cost, the historical cost recovery period and the historical profit period, the parameters of the preset LightGBM model are adjusted to obtain the trained LightGBM model.
[0049] Since historical environmental data covers a more comprehensive range of factors affecting the demand for ride-hailing services in the ride-hailing market, it is helpful to improve the training effect and can enhance the adaptability of the trained LightGBM model in the prediction tasks of input cost, cost recovery cycle and profit cycle.
[0050] In one embodiment, the parameters of the preset LightGBM model are adjusted according to the historical input cost, the historical cost recovery period and the historical profit period, as well as the second predicted input cost, the second predicted cost recovery period and the second predicted profit period to obtain a trained LightGBM model, which can be: obtaining a first predicted loss value of the second predicted input cost relative to the historical input cost, a second predicted loss value of the second predicted cost recovery period relative to the historical cost recovery period, and a third predicted loss value of the second predicted profit period relative to the historical profit period; according to the first predicted loss value, the second predicted loss value and the third predicted loss value, the parameters of the preset LightGBM model are updated to obtain a trained LightGBM model.
[0051] Obtain the first predicted loss value of the second predicted input cost relative to the historical input cost, obtain the second predicted loss value of the second predicted cost recovery period relative to the historical cost recovery period, and obtain the third predicted loss value of the second predicted profit period relative to the third predicted loss value of the historical profit period, so as to iteratively update the parameters of the preset LightGBM model through the back propagation algorithm according to the first predicted loss value, the second predicted loss value and the third predicted loss value until the number of iterations reaches the preset threshold, and obtain the trained LightGBM model. In this way, the performance of the trained LightGBM model can be ensured.
[0052] Sub-step S1063, training the preset attribution model according to the historical input cost, the historical cost recovery period and the historical profit period, as well as the second predicted input cost, the second predicted cost recovery period and the second predicted profit period, to obtain a trained attribution model.
[0053] Furthermore, the preset attribution model is trained based on the historical input cost, the historical cost recovery period and the historical profit period, as well as the second predicted input cost, the second predicted cost recovery period and the second predicted profit period to obtain a trained attribution model.
[0054] The preset attribution model is trained through the second predicted input cost, the second predicted cost recovery cycle and the second predicted profit cycle, as well as the historical input cost, the historical cost recovery cycle and the historical profit cycle. This enables the trained attribution model to have the ability to adjust and optimize the output of the trained LightGBM model, thereby enhancing the interpretability of the trained LightGBM model.
[0055] Specifically, the preset attribution model is a linear regression model established based on the attribution algorithm. Exemplarily, the preset attribution model includes an untrained Ridge regression model (defined as a preset Ridge regression model) established based on the Ridge algorithm.
[0056] Taking the preset Ridge regression model as an example, Ridge regression can be used to integrate and optimize the trained LightGBM model to help improve the generalization ability of the trained LightGBM model and improve the performance of the LightGBM model in predicting the input cost, cost recovery cycle and profit cycle of new environmental data.
[0057] The second predicted input cost, the second predicted cost recovery period and the second predicted profit period, as well as the historical input cost, the historical cost recovery period and the historical profit period are input into the preset Ridge regression model, and the preset Ridge regression model is trained to obtain the loss function of the preset Ridge regression model, thereby adjusting the regression coefficient of the preset Ridge regression model according to the loss function to obtain the trained Ridge regression model.
[0058] In one embodiment, a preset attribution model is trained based on historical input costs, historical cost recovery cycles, and historical profit cycles, as well as a second predicted input cost, a second predicted cost recovery cycle, and a second predicted profit cycle. The trained attribution model can be obtained by inputting the historical input costs, the historical cost recovery cycles, and the historical profit cycles, as well as the second predicted input costs, the second predicted cost recovery cycle, and the second predicted profit cycle into the preset attribution model to obtain a square loss term and a regularization term; determining the loss function of the preset attribution model based on the square loss term and the regularization term; and adjusting the regression coefficient of the preset attribution model based on the loss function to obtain the trained attribution model.
[0059] The loss function of the preset Ridge regression model mainly consists of two parts, including the L1 square loss term and the L2 regularization term. Among them, the L1 square loss term is used to measure the difference between the predicted value and the historical value; the L2 regularization term is used to control the complexity of the preset Ridge regression model and limit the change direction of the regression coefficient of the preset Ridge regression model. The purpose is to reduce the size of the regression coefficient of the preset Ridge regression model, so that the regression coefficient of the trained Ridge regression model is as small as possible.
[0060] The historical input costs, historical cost recovery cycles and historical profit cycles, as well as the second predicted input costs, the second predicted cost recovery cycles and the second predicted profit cycles are used as inputs to the preset Ridge regression model, so that the Ridge regression model obtains the L1 square loss term and the L2 regularization term based on the historical input costs, the historical cost recovery cycles and historical profit cycles, as well as the second predicted input costs, the second predicted cost recovery cycles and the second predicted profit cycles.
[0061] Specifically, the L1 square loss term can be constructed according to the second predicted input cost and the historical input cost, the second predicted cost recovery period and the historical cost recovery period, and the second predicted profit period and the historical profit period. The L1 square loss term is expressed in matrix form as follows:
[0062] Among them, X represents the input matrix, y represents the dependent variable vector of the input matrix, and w represents the vector of regression coefficients of the preset Ridge regression model.
[0063] It is also possible to obtain a parameter vector of a preset Ridge regression model according to the second predicted input cost, the second predicted cost recovery period, and the second predicted profit period, thereby constructing an L2 regularization term according to the parameter vector.
[0064] The L2 regularization term is the sum of the squares of the parameter vector w of the preset Ridge regression model, multiplied by a regularization parameter λ. The L2 regularization term is as follows:
[0065] According to the L1 square loss term and the L2 regularization term, the loss function of the preset Ridge regression model is obtained. The L2 regularization term can be added to the L1 square loss term to obtain the loss function L, which is as follows:
[0066] Finally, according to the loss function L, the regression coefficient of the preset Ridge regression model is adjusted to obtain the trained Ridge regression model.
[0067] In one embodiment, adjusting the regression coefficient of the preset attribution model according to the loss function may be to minimize the loss function to minimize the regression coefficient of the preset attribution model.
[0068] The regression coefficient of the preset Ridge regression model can be minimized by minimizing the loss function of the preset Ridge regression model and adjusting the regression coefficient of the preset Ridge regression model. When the regression coefficient of the Ridge regression model is less than the preset regression coefficient threshold, the training is stopped to obtain a trained Ridge regression model.
[0069] By minimizing the regression coefficient of the preset Ridge regression model, the trained Ridge regression model can achieve a balance between fitting and controlling overfitting, thereby improving the generalization ability and stability of the trained Ridge regression model. The trained attribution model can make up for the lack of generalization ability of the trained LightGBM model and assist the trained LightGBM model to obtain more accurate prediction results.
[0070] After obtaining the trained LightGBM model and the trained Ridge regression model, they can be applied to the task of resource allocation in the online car-hailing market in the target city. The target city refers to the city that has demand for resource allocation in the online car-hailing market.
[0071] First, obtain the environmental data of the online ride-hailing market in the target city, which mainly includes the population of the target city, the demand for online ride-hailing and the number of drivers.
[0072] Step S102: Analyze and predict the environmental data through the trained LightGBM model to obtain the first predicted investment cost, the first predicted cost recovery period and the first predicted profit period corresponding to the online car-hailing market in the target city.
[0073] The environmental data of the target city's online car-hailing market is used as the input of the trained LightGBM model, so that the trained LightGBM model analyzes and predicts the environmental data, thereby outputting the first predicted investment cost, the first predicted cost recovery period and the first predicted profit period corresponding to the target city's online car-hailing market.
[0074] Step S103, optimizing and adjusting the first predicted investment cost, the first predicted cost recovery period, and the first predicted profit period through the trained attribution model, and obtaining the target predicted investment cost, the target predicted cost recovery period, and the target predicted profit period corresponding to the online car-hailing market in the target city.
[0075] The first predicted input cost, the first predicted cost recovery period and the first predicted profit period are used as the input of the trained Ridge regression model, so that the trained Ridge regression model can fit the first predicted input cost, the first predicted cost recovery period and the first predicted profit period, and optimize and adjust the first predicted input cost, the first predicted cost recovery period and the first predicted profit period to obtain the target predicted input cost, the target predicted cost recovery period and the target predicted profit period for output.
[0076] The target predicted input cost, target predicted cost recovery period, and target predicted profit period obtained after optimization and adjustment of the trained Ridge regression model have improved accuracy compared to the first predicted input cost, first predicted cost recovery period, and first predicted profit period output by the trained LightGBM model.
[0077] Step S104, formulate a resource allocation strategy for the target city's online car-hailing market based on the target predicted investment cost, the target predicted cost recovery period, and the target predicted profit period.
[0078] Finally, we can refer to the target predicted input cost, target predicted cost recovery period and target predicted profit period output by the trained Ridge regression model to formulate a resource allocation strategy for the target city's online ride-hailing market, thereby providing scientific guidance for the resource allocation of the target city's online ride-hailing market, achieving optimal resource allocation in the target city's online ride-hailing market and improving resource utilization.
[0079] The method for allocating resources to the online car-hailing market provided in the above embodiment obtains environmental data of the online car-hailing market in the target city, and the environmental data includes the population size, the demand for online car-hailing vehicles and the number of drivers in the target city; the environmental data is analyzed and predicted through the trained LightGBM model to obtain the first predicted investment cost, the first predicted cost recovery period and the first predicted profit period corresponding to the online car-hailing market in the target city; the first predicted investment cost, the first predicted cost recovery period and the first predicted profit period are optimized and adjusted through the trained attribution model to obtain the target predicted investment cost, the target predicted cost recovery period and the target predicted profit period corresponding to the online car-hailing market in the target city; a resource allocation strategy for the online car-hailing market in the target city is formulated based on the target predicted input cost, the target predicted cost recovery period and the target predicted profit period. On the one hand, through the trained LightGBM model, the investment cost, cost recovery cycle and profit cycle of resource allocation in the online car-hailing market can be quickly predicted, which improves convenience and efficiency and saves labor costs; on the other hand, since the trained attribution model enhances the interpretability of the trained LightGBM model, the prediction results of the trained LightGBM model can be optimized and adjusted through the trained attribution model to obtain more accurate prediction results, thereby being able to more scientifically and effectively help guide the resource allocation of the target city's online car-hailing market, improve scientificity and accuracy, and help optimize resource allocation and improve resource utilization.
[0080] Please refer to 4. Figure 4 A schematic block diagram of a device for deploying resources in the online car-hailing market provided in an embodiment of the present application.
[0081] like Figure 4 As shown, the online car-hailing market resource deployment device 400 includes: an acquisition module 401, a prediction module 402, an optimization module 403 and a formulation module 404.
[0082] An acquisition module 401 is used to acquire environmental data of the online car-hailing market in a target city, wherein the environmental data includes the population of the target city, the demand for online car-hailing, and the number of drivers; The prediction module 402 is used to analyze and predict the environmental data through the trained LightGBM model to obtain the first predicted investment cost, the first predicted cost recovery period and the first predicted profit period corresponding to the online car-hailing market in the target city; The optimization module 403 is used to optimize and adjust the first predicted investment cost, the first predicted cost recovery period and the first predicted profit period through the trained attribution model to obtain the target predicted investment cost, the target predicted cost recovery period and the target predicted profit period corresponding to the online car-hailing market in the target city; The formulation module 404 is used to formulate a resource allocation strategy for the target city's online car-hailing market based on the target predicted investment cost, the target predicted cost recovery period and the target predicted profit period.
[0083] The apparatus provided in the above embodiment may be implemented in the form of a computer program. The computer program may be Figure 5 Runs on the computer device shown.
[0084] See also Figure 5 , Figure 5 A schematic block diagram of the structure of a computer device provided in an embodiment of the present application.
[0085] like Figure 5 As shown, the computer device 500 includes a processor 502, a memory 503 and a communication interface 504 connected via a system bus 501, wherein the memory may include a non-volatile storage medium and an internal memory.
[0086] The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute any one of the methods for placing resources in the online car-hailing market.
[0087] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.
[0088] The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor, the processor can execute any method for allocating resources in the online car-hailing market.
[0089] The communication interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art will understand that Figure 5 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.
[0090] It should be understood that the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a processor or the processor may also be any conventional processor, etc.
[0091] In one embodiment, the processor is used to run a computer program stored in the memory to implement the following steps: Obtaining environmental data of the online ride-hailing market in the target city, the environmental data including the population of the target city, the demand for online ride-hailing vehicles, and the number of drivers; The environmental data is analyzed and predicted by the trained LightGBM model to obtain the first predicted investment cost, the first predicted cost recovery period and the first predicted profit period corresponding to the online car-hailing market in the target city; By using the trained attribution model, the first predicted investment cost, the first predicted cost recovery period, and the first predicted profit period are optimized and adjusted to obtain the target predicted investment cost, the target predicted cost recovery period, and the target predicted profit period corresponding to the online car-hailing market in the target city; Based on the target predicted investment cost, the target predicted cost recovery period and the target predicted profit period, a resource allocation strategy for the target city's online ride-hailing market is formulated.
[0092] In one embodiment, before the processor implements the acquisition of the environmental data of the online car-hailing market in the target city, the processor is further configured to implement: Obtain historical environmental data, historical input costs, historical cost recovery cycles, and historical profit cycles of online ride-hailing markets in multiple cities; According to the historical environmental data, the historical input costs, the historical cost recovery period and the historical profit period, the preset LightGBM model and the preset attribution model are trained to obtain the trained LightGBM model and the trained attribution model.
[0093] In one embodiment, the processor implements the training of the preset LightGBM model and the preset attribution model according to the historical environmental data, the historical input cost, the historical cost recovery cycle and the historical profit cycle, and obtains the trained LightGBM model and the trained attribution model, and is used to implement: Input the historical environmental data, the historical input cost, the historical cost recovery period and the historical profit period into the preset LightGBM model, and obtain the second predicted input cost, the second predicted cost recovery period and the second predicted profit period analyzed and predicted by the preset LightGBM model for the historical environmental data; According to the historical input cost, the historical cost recovery period and the historical profit period, as well as the second predicted input cost, the second predicted cost recovery period and the second predicted profit period, the parameters of the preset LightGBM model are adjusted to obtain the trained LightGBM model; The preset attribution model is trained according to the historical input cost, the historical cost recovery period and the historical profit period, as well as the second predicted input cost, the second predicted cost recovery period and the second predicted profit period to obtain the trained attribution model.
[0094] In one embodiment, the processor implements adjusting the parameters of the preset LightGBM model according to the historical input cost, the historical cost recovery period and the historical profit period, as well as the second predicted input cost, the second predicted cost recovery period and the second predicted profit period to obtain the trained LightGBM model, and is used to implement: Obtaining a first predicted loss value of the second predicted input cost relative to the historical input cost, a second predicted loss value of the second predicted cost recovery period relative to the historical cost recovery period, and a third predicted loss value of the second predicted profit period relative to the historical profit period; According to the first prediction loss value, the second prediction loss value and the third prediction loss value, the parameters of the preset LightGBM model are updated to obtain the trained LightGBM model.
[0095] In one embodiment, the processor implements the training of the preset attribution model according to the historical input cost, the historical cost recovery period, and the historical profit period, as well as the second predicted input cost, the second predicted cost recovery period, and the second predicted profit period, and when obtaining the trained attribution model, is used to implement: Input the historical input cost, the historical cost recovery period, and the historical profit period, as well as the second predicted input cost, the second predicted cost recovery period, and the second predicted profit period into the preset attribution model to obtain a square loss term and a regularization term; Determining a loss function of the preset attribution model according to the square loss term and the regularization term; The regression coefficient of the preset attribution model is adjusted according to the loss function to obtain the trained attribution model.
[0096] In one embodiment, when the processor implements the step of adjusting the regression coefficient of the preset attribution model according to the loss function, the processor is used to implement: Minimize the loss function to minimize the regression coefficient of the preset attribution model.
[0097] In one embodiment, the trained attribution model includes a trained Ridge regression model.
[0098] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. The computer program includes program instructions. The method implemented when the program instructions are executed can refer to the various embodiments of the method for deploying resources in the online car-hailing market of the present application.
[0099] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc., equipped on the computer device.
[0100] Furthermore, the computer-readable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the blockchain node, etc.
[0101] The blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0102] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a" does not exclude the presence of other identical elements in the process, method, article or system including the element.
[0103] The serial numbers of the embodiments of the present application are for description only and do not represent the advantages and disadvantages of the embodiments. The above description is only a specific implementation mode of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A method for placing resources in the online car-hailing market, characterized in that: The method comprises: Obtaining environmental data of the online ride-hailing market in the target city, the environmental data including the population of the target city, the demand for online ride-hailing vehicles, and the number of drivers; The environmental data is analyzed and predicted by the trained LightGBM model to obtain the first predicted investment cost, the first predicted cost recovery period and the first predicted profit period corresponding to the online car-hailing market in the target city; By using the trained attribution model, the first predicted investment cost, the first predicted cost recovery period, and the first predicted profit period are optimized and adjusted to obtain the target predicted investment cost, the target predicted cost recovery period, and the target predicted profit period corresponding to the online car-hailing market in the target city; Based on the target predicted investment cost, the target predicted cost recovery period and the target predicted profit period, a resource allocation strategy for the target city's online ride-hailing market is formulated.
2. The method for placing resources in the online car-hailing market according to claim 1, characterized in that: Before obtaining the environmental data of the online car-hailing market in the target city, the method further includes: Obtain historical environmental data, historical input costs, historical cost recovery cycles, and historical profit cycles of online ride-hailing markets in multiple cities; According to the historical environmental data, the historical input costs, the historical cost recovery period and the historical profit period, the preset LightGBM model and the preset attribution model are trained to obtain the trained LightGBM model and the trained attribution model.
3. The method for placing resources in the online car-hailing market according to claim 2, characterized in that: The method of training a preset LightGBM model and a preset attribution model according to the historical environmental data, the historical input cost, the historical cost recovery cycle and the historical profit cycle to obtain the trained LightGBM model and the trained attribution model includes: Input the historical environmental data, the historical input cost, the historical cost recovery period and the historical profit period into the preset LightGBM model, and obtain the second predicted input cost, the second predicted cost recovery period and the second predicted profit period analyzed and predicted by the preset LightGBM model for the historical environmental data; According to the historical input cost, the historical cost recovery period and the historical profit period, as well as the second predicted input cost, the second predicted cost recovery period and the second predicted profit period, the parameters of the preset LightGBM model are adjusted to obtain the trained LightGBM model; The preset attribution model is trained according to the historical input cost, the historical cost recovery period and the historical profit period, as well as the second predicted input cost, the second predicted cost recovery period and the second predicted profit period to obtain the trained attribution model.
4. The method for placing resources in the online car-hailing market according to claim 3, characterized in that: The step of adjusting the parameters of the preset LightGBM model according to the historical input cost, the historical cost recovery period and the historical profit period, as well as the second predicted input cost, the second predicted cost recovery period and the second predicted profit period, to obtain the trained LightGBM model includes: Obtaining a first predicted loss value of the second predicted input cost relative to the historical input cost, a second predicted loss value of the second predicted cost recovery period relative to the historical cost recovery period, and a third predicted loss value of the second predicted profit period relative to the historical profit period; According to the first prediction loss value, the second prediction loss value and the third prediction loss value, the parameters of the preset LightGBM model are updated to obtain the trained LightGBM model.
5. The method for placing resources in the online car-hailing market according to claim 3, characterized in that: The step of training the preset attribution model according to the historical input cost, the historical cost recovery period, and the historical profit period, and the second predicted input cost, the second predicted cost recovery period, and the second predicted profit period to obtain the trained attribution model includes: Input the historical input cost, the historical cost recovery period, and the historical profit period, as well as the second predicted input cost, the second predicted cost recovery period, and the second predicted profit period into the preset attribution model to obtain a square loss term and a regularization term; Determining a loss function of the preset attribution model according to the square loss term and the regularization term; The regression coefficient of the preset attribution model is adjusted according to the loss function to obtain the trained attribution model.
6. The method for placing resources in the online car-hailing market according to claim 5, characterized in that: The step of adjusting the regression coefficient of the preset attribution model according to the loss function includes: Minimize the loss function to minimize the regression coefficient of the preset attribution model.
7. The method for placing resources in the online car-hailing market according to claim 1, characterized in that: The trained attribution model includes a trained Ridge regression model.
8. A device for placing resources in the online car-hailing market, characterized in that: The online car-hailing market resource delivery device comprises: An acquisition module, used to acquire environmental data of the online car-hailing market in a target city, wherein the environmental data includes the population of the target city, the demand for online car-hailing, and the number of drivers; A prediction module is used to analyze and predict the environmental data through the trained LightGBM model to obtain the first predicted investment cost, the first predicted cost recovery period and the first predicted profit period corresponding to the online car-hailing market in the target city; an optimization module, configured to optimize and adjust the first predicted investment cost, the first predicted cost recovery period, and the first predicted profit period through a trained attribution model, and obtain a target predicted investment cost, a target predicted cost recovery period, and a target predicted profit period corresponding to the online car-hailing market in the target city; A formulation module is used to formulate a resource allocation strategy for the target city's online car-hailing market based on the target predicted investment cost, the target predicted cost recovery period and the target predicted profit period.
9. A computer device, characterized in that: It includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the method for allocating resources to the online car-hailing market as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the method for allocating resources to the online car-hailing market as described in any one of claims 1 to 7.
