Business processing method and device, server and computer readable storage medium
By using a random forest model to predict the service waiting time, the problem of large deviations in the prediction results in the prior art is solved, and more accurate waiting time prediction is achieved, and users' business processing experience is improved.
Patent Information
- Application Number
- CN202411603362.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-11
- Publication Date
- 2025-03-04
AI Technical Summary
When the prior art predicts the waiting time for users' services, it is affected by abnormal data in historical data and different waiting time for different business types, resulting in a huge deviation from the actual waiting time.
The random forest model is adopted, and the waiting time of the service corresponding to the service type is predicted based on historical user sample data. By retrieving the random forest model of the corresponding business type from the model library, processing it in combination with the business initiation time, an accurate wait time prediction is generated.
The prediction accuracy of the waiting time of the service processing is improved, and the error of the waiting time prediction of the user is reduced, so that users can more accurately understand the waiting time of the service processing, thereby improving the service processing experience.
Smart Images

Figure CN119557725A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of big data, and in particular to a business processing method, device, server and computer-readable storage medium. Background Art
[0002] With the rapid development of the economy and society and the rapid improvement of residents' economic level, more and more users go to banks to handle various businesses. In order to provide high-quality services, major banks have established many branches and receive dozens or hundreds of customers every day. Customers often need to queue up multiple times when handling various businesses such as withdrawals, deposits, account opening, transfers, detailed bill inquiries, and account cancellations, which wastes a lot of energy and time and creates a bad experience. Therefore, how to accurately remind users of the waiting time for business has become an important issue that needs to be solved in current business handling.
[0003] In the related technology, historical data is mined and the last estimated service start processing time and the last actual service start processing time are used to predict the time a user needs to wait. However, due to the large impact of abnormal data in historical data and the different waiting times for different types of services, directly using historical data for prediction will result in a huge deviation between the predicted waiting time and the actual waiting time. Summary of the invention
[0004] The present application provides a service processing method, device, server and computer-readable storage medium, which are used to more accurately remind users of the waiting time for service processing, thereby optimizing the user's service processing experience.
[0005] According to a first aspect of the present application, a service processing method is provided, including:
[0006] Responding to a service processing request initiated by a user, the service processing request carrying the service type of the service to be processed and the service initiation time;
[0007] According to the service type, a random forest model is retrieved from a model library; wherein the random forest model is trained based on historical user sample data and is used to predict the waiting time of the service corresponding to the service type, and the waiting time is used to indicate the time between the service initiation time and the service start processing time of the relevant service;
[0008] Inputting the service initiation time and the service type into the random forest model, processing the service initiation time and the service type based on the random forest model, and obtaining the waiting time of the to-be-processed service;
[0009] A service processing prompt message is generated based on the waiting time, and the service processing prompt message is fed back to the terminal device of the user.
[0010] In a possible implementation, the random forest model is a waiting time prediction model for the service corresponding to the service type in each time period; the method further includes:
[0011] Collecting historical user sample data, the historical user sample data including service initiation time of a first user sample for a plurality of first services corresponding to the service type and corresponding service start processing time;
[0012] Determine the waiting time of each first service according to the initiation time of each first service and the corresponding service start processing time;
[0013] After removing abnormal data of the service initiation time and the waiting time of each first service in the first user sample, obtaining first sample processing data, the first sample processing data including the removed service initiation time and the corresponding waiting time;
[0014] Based on the first sample processing data, an initial random forest model is trained to obtain the random forest model.
[0015] In a possible implementation, the random forest model is a waiting time prediction model for services corresponding to multiple different service types in each time period, and the different service types include the service type corresponding to the service to be processed; the method further includes:
[0016] Collecting historical sample data, where the historical sample data includes service initiation time of multiple second services corresponding to different service types and corresponding service start processing time of the second user sample;
[0017] For each service type, determining the waiting time of each second service in each service type according to the initiation time of each of the plurality of second services of the service type and the corresponding service start processing time;
[0018] After removing abnormal data of the service initiation time and waiting time of each second service of each service type in the second user sample, obtaining second sample processing data;
[0019] Based on the second sample processing data, an initial random forest model is trained to obtain the random forest model.
[0020] In a possible implementation manner, removing abnormal data of the service initiation time and the waiting time of each first service in the first user sample includes:
[0021] According to the waiting time record information of each first service, judging whether the service start processing time of each first service is the processing time after multiple service start processing reminders; wherein the waiting time record information is used to record the reminder information of the service start processing time;
[0022] When the service start processing time of the first service is the processing time after multiple service start processing reminders, the service initiation time and waiting time of the first service are determined to be abnormal data, and the abnormal data of the service initiation time and waiting time are eliminated.
[0023] In a possible implementation manner, removing abnormal data of the service initiation time and waiting time of each second service of each service type in the second user sample includes:
[0024] For each service type, judging whether the service start processing time of each second service of the service type is the processing time after multiple service start processing reminders according to the waiting time record information of each second service of the service type;
[0025] When the service start processing time of a second service is the processing time after multiple service start processing reminders, the service initiation time and waiting time of the second service are determined to be abnormal data, and the abnormal data of the service initiation time and waiting time are eliminated.
[0026] In a possible implementation, the method further includes:
[0027] For the random forest model trained with the data of each business type, adding a type label of the corresponding business type to the random forest model, and generating a corresponding relationship between each random forest model and its corresponding business type;
[0028] The step of retrieving a random forest model from a model library according to the business type includes:
[0029] According to the business type and the corresponding relationship, a random forest model corresponding to the business type is retrieved from a model library.
[0030] In a possible implementation manner, the responding to the service processing request initiated by the user includes:
[0031] Respond to business processing requests initiated by users based on multiple channels; wherein the multiple channels include at least one of a queuing number collection terminal, a social media platform, and a mobile application.
[0032] According to a second aspect of the present application, a service processing device is provided, including:
[0033] A response module, used to respond to a service processing request initiated by a user, wherein the service processing request carries the service type and service initiation time of the service to be processed;
[0034] A model retrieval module, used to retrieve a random forest model from a model library according to the service type; wherein the random forest model is trained based on historical user sample data and is used to predict the waiting time of the service corresponding to the service type, and the waiting time is used to indicate the time between the service initiation time and the service start processing time of the relevant service;
[0035] A model processing module, used for inputting the service initiation time and the service type into the random forest model, processing the service initiation time and the service type based on the random forest model, and obtaining the waiting time of the service to be processed;
[0036] A message feedback module is used to generate a service processing prompt message based on the waiting time, and feed back the service processing prompt message to the user's terminal device.
[0037] In a possible implementation manner, the random forest model is a waiting time prediction model for the service corresponding to the service type in each time period; the device further includes:
[0038] A first data collection module, used to collect historical user sample data, wherein the historical user sample data includes a service initiation time of a first user sample for a plurality of first services corresponding to the service type and a corresponding service start processing time;
[0039] A first duration determination module, used to determine the waiting duration of each first service according to the initiation time of each first service and the corresponding service start processing time;
[0040] A first data elimination module is used to obtain first sample processing data after eliminating abnormal data of the service initiation time and the waiting time of each first service in the first user sample, wherein the first sample processing data includes the eliminated service initiation time and the corresponding waiting time;
[0041] The first model training module is used to train an initial random forest model based on the first sample processing data to obtain the random forest model.
[0042] In a possible implementation, the random forest model is a waiting time prediction model for services corresponding to multiple different service types in each time period, and the different service types include the service type corresponding to the service to be processed; the device also includes:
[0043] A second data collection module, used to collect historical sample data, wherein the historical sample data includes a service initiation time of a plurality of second services corresponding to different service types and a corresponding service start processing time for the second user sample;
[0044] A second duration determination module is used to determine, for each service type, the waiting duration of each second service in each service type according to the initiation time of multiple second services of each service type and the corresponding service start processing time;
[0045] A second data elimination module is used to obtain second sample processing data after eliminating abnormal data on the service initiation time and waiting time of each second service of each service type in the second user sample;
[0046] The second model training module is used to train an initial random forest model based on the second sample processing data to obtain the random forest model.
[0047] In a possible implementation, the first data elimination module includes:
[0048] A first judgment unit is used to judge whether the service start processing time of each first service is the processing time after multiple service start processing reminders according to the waiting time record information of each first service; wherein the waiting time record information is used to record the reminder information of the service start processing time;
[0049] The first elimination unit is used to determine that the business initiation time and the waiting time of the first business are abnormal data when the business start processing time of the first business is the processing time after multiple business start processing reminders, and eliminate the abnormal data of the business initiation time and the waiting time.
[0050] In a possible implementation manner, the second data elimination module includes:
[0051] A second judgment unit is used to judge, for each service type, whether the service start processing time of each second service is the processing time after multiple service start processing reminders according to the waiting time record information of each second service of the service type;
[0052] The second elimination unit is used to determine that the business initiation time and the waiting time of the second business are abnormal data when the business start processing time of the second business is the processing time after multiple business start processing reminders, and eliminate the abnormal data of the business initiation time and the waiting time.
[0053] In a possible implementation, the device further includes:
[0054] A generation module is used to add a type label of the corresponding business type to the random forest model trained by the data of each business type, and generate a corresponding relationship between each random forest model and its corresponding business type;
[0055] The model retrieval module is specifically used to: retrieve the random forest model corresponding to the business type from the model library according to the business type and the corresponding relationship.
[0056] In a possible implementation, the response module is specifically used to: respond to a business processing request initiated by a user based on multiple channels; wherein the multiple channels include at least one of a queuing number-taking terminal, a social media platform, and a mobile application.
[0057] According to a third aspect of the present application, a server is provided, comprising: a memory, a processor;
[0058] The memory stores computer-executable instructions;
[0059] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the business processing method as described in any one of the first aspects above.
[0060] According to a fourth aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer execution instructions, and when the computer execution instructions are executed by a processor, they are used to implement the business processing method provided in any one of the first aspects above.
[0061] According to a fifth aspect of the present application, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the business processing method provided in any one of the first aspects above.
[0062] The business processing method, device, server and computer-readable storage medium provided in the embodiments of the present application respond to a business processing request initiated by a user, wherein the business processing request carries a business type and a business initiation time, retrieves a random forest model corresponding to the business type from a model library, and uses the random forest model to predict the user's waiting time according to the user's business type and business initiation time, and generates a business processing prompt message to remind the user. Based on the robustness of the random forest model to abnormal data and the waiting time prediction method for the business type, the user can more accurately know the waiting time for his business processing, so as to perform business processing at the corresponding business start processing time, thereby bringing a better experience to the user. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0064] Figure 1 A possible scenario diagram provided for an embodiment of the present application;
[0065] Figure 2 A flowchart of a business processing method provided in an embodiment of the present application;
[0066] Figure 3 A flowchart of another business processing method provided in an embodiment of the present application;
[0067] Figure 4 A flowchart of another business processing method provided in an embodiment of the present application;
[0068] Figure 5 A schematic diagram of the structure of a service processing device provided in an embodiment of the present application;
[0069] Figure 6 A schematic diagram of the structure of a server provided in an embodiment of the present application.
[0070] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0071] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0072] Figure 1 A scenario diagram of a business processing method is provided for this application, such as Figure 1As shown, the specific application scenario of the present application can be a banking business processing scenario, which can include a user terminal 110, a server 120 and a model library 130, wherein a user can initiate a business processing request to the server 120 through a terminal device (which can be a user terminal, a bank terminal, or other terminal) 110. However, since the bank needs to process a massive amount of business every day, when the user terminal 110 initiates a business processing request, there may be other users who have not processed the business and other waiting users in front of them. They need to queue up and get a number first (which may include offline number queuing or online number queuing). After the business processing of the previous user is completed, the business processing will be carried out. Since it is usually difficult for users to determine the specific waiting time during the waiting process, users either give up the business processing directly or fail to return to the platform in time to handle the business when the business processing starts, thereby affecting the user's business processing experience.
[0073] In the related art, the last estimated service start processing time and the last actual service start processing time in historical data are used to predict the time a user needs to wait. Since abnormal data in historical data has a large impact and the waiting time for different types of services varies, directly using historical data for prediction will lead to a huge deviation between the predicted waiting time and the actual waiting time.
[0074] To this end, in an embodiment of the present application, the server 120 is used to respond to a business processing request initiated by the terminal device 110, and the business processing request carries the business type and the business initiation time. The random forest model corresponding to the business type is retrieved from the model library 130, and the random forest model is used to predict the user's waiting time based on the user's business type and business initiation time, and a business processing prompt message is generated to remind the user. Based on the robustness of the random forest model to abnormal data and the waiting time prediction method for the business type, the user can more accurately know the waiting time for his or her business processing, so that the business processing can be performed at the corresponding business start processing time, which brings a better experience to the user.
[0075] Among them, server 120 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, 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 (Content Delivery Network, CDN), as well as big data and artificial intelligence platforms.
[0076] The terminal device 110 may include, but is not limited to, computers, smart phones, tablet computers, e-book readers, Moving Picture experts group audio layer III (MP3) players, Moving Picture experts group audiolayer IV (MP4) players, portable computers, car computers, wearable devices, desktop computers, set-top boxes, smart TVs, etc.
[0077] It should be noted that the business processing method, device, server and computer-readable storage medium provided by the present application can be used in the field of financial technology, and can also be used in any field outside the field of financial technology. The application field of the business processing method, device, server and computer-readable storage medium of the present application is not limited.
[0078] 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 laws, regulations and standards in the relevant regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0079] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0080] Figure 2 Schematic diagram of the business processing method provided for this application Figure 1 ,like Figure 2 As shown, the execution subject of the method may be a server, which may include the following steps S201-S204:
[0081] Step S201: respond to a service processing request initiated by a user, wherein the service processing request carries the service type of the service to be processed and the service initiation time.
[0082] In this embodiment, the business type may include deposit business, investment business, loan business, etc. The business initiation time is the time when the user initiates the business processing request and the business does not enter the start processing, that is, the start time of the queue. Exemplarily, when the user initiates a business processing request through the user terminal, the server determines that the business of others is currently being processed based on the business type initiated by the user and needs to enter the queue. The server prompts the user whether to enter the queue through a pop-up window prompt. If the user confirms to enter the queue, when the user triggers the confirmation, the queue revelation time is reached. If the user does not enter the queue, the process ends and the server does not make subsequent waiting time predictions.
[0083] It can be understood that in response to the conditions or states on which the executed operations depend, when the dependent conditions or states are met, one or more operations executed can be in real time or have a set delay; unless otherwise specified, there is no restriction on the order of execution of the multiple operations executed.
[0084] In a possible implementation, the above steps, in response to a service processing request initiated by a user, may include the following steps:
[0085] Respond to business processing requests initiated by users based on multiple channels; wherein the multiple channels include at least one of a queuing number collection terminal, a social media platform, and a mobile application.
[0086] In this embodiment, users can initiate requests through multiple channels and estimate the waiting time for the corresponding requests. These channels include but are not limited to: queuing number terminals, where users use self-service terminal devices at bank branches to obtain queuing numbers and select the type of business they need to handle; social media platforms, where users initiate business requests through the bank's official account or chat robot on social media; mobile applications, where users select business types and submit requests through the bank's mobile applications.
[0087] In some embodiments, in addition to responding to business processing requests initiated by users based on the above channels, business processing requests initiated by user terminals can also be responded to based on other channels, such as online banking, etc. This embodiment does not specifically limit this.
[0088] Step S202: retrieve a random forest model from a model library according to the service type; wherein the random forest model is trained based on historical user sample data and is used to predict the waiting time of the service corresponding to the service type, and the waiting time is used to indicate the time interval between the service initiation time and the service start processing time of the related service.
[0089] In this embodiment, the random forest model can be multiple models trained for each service type, or a unified model trained for multiple service types. In practical applications, it can be determined whether to train a unified model or train models for each service type according to the amount of data.
[0090] Exemplarily, when training random forest models for different business types, each business type corresponds to a random forest model of that type, and the model corresponding to that type can be retrieved from the model library by using a business identifier or other mark that can distinguish the type. When training a unified model for multiple business types (one model can be trained for all business types, or one model can be trained for some business types and another model can be trained for another business type), the corresponding random forest model can be retrieved from the model library according to the set identifier of the set to which the business type belongs (i.e., the set corresponding to the part of the business types in a model trained for some business types).
[0091] It is understandable that Random Forest is an integrated learning method, which is mainly used for classification and regression tasks. It improves the accuracy and robustness of the model by constructing multiple decision trees and combining their prediction results. The embodiment of the present application utilizes the Random Forest model to handle nonlinear relationships (there may be a nonlinear relationship between the waiting time and the model input information, and the Random Forest can model these nonlinear relationships well, thereby improving the prediction accuracy), and handle complex feature interactions (Random Forest can capture the complex interactive relationship between features, which is particularly important when predicting the waiting time, because the waiting time may be affected by a variety of factors, such as business type, time period, user attributes, etc.), thereby improving the prediction accuracy of the business processing waiting time. In addition, compared with other models, the Random Forest model has low complexity and is easy to implement, and takes the business initiation time as an important condition for the prediction time, which can reduce the error of the model prediction to a greater extent.
[0092] Step S203: input the service initiation time and the service type into the random forest model, process the service initiation time and the service type based on the random forest model, and obtain the waiting time of the to-be-processed service.
[0093] Exemplarily, necessary preprocessing may be performed on the service initiation time and service type (i.e., the input features of the model). For example, the service type is encoded (such as using one-hot encoding) so that the model can process it, and the above-mentioned input features such as time can be converted into a format that the model can understand, such as decomposing the timestamp into hours, days of the week, etc. The preprocessed features are input into the random forest model, and the model has learned the relationship between the features and the waiting time during the training phase, wherein the random forest model processes the input features through multiple decision trees within it. Each decision tree is used to independently predict the input features, output an estimated value of the waiting time, and integrate the prediction results of all decision trees, for example, taking the average of the prediction results of all trees to obtain the final predicted waiting time.
[0094] In some embodiments, key information such as the user's priority information (e.g., whether the user is a VIP user) and the system load of the current service processing may also be considered as input features and input into the model for processing to obtain a more accurate prediction result of the waiting time. Accordingly, during the model training process, the above key information of the user is also used as a data set for model training.
[0095] Step S204: Generate a service processing prompt message based on the waiting time, and feed back the service processing prompt message to the user's terminal device.
[0096] For example, in a queuing scenario, the predicted queuing time (i.e., waiting time) and sequence number can be displayed to the user terminal through a service processing prompt message to remind the user to handle the service at the corresponding time. In some embodiments, after completing this message prompt, the server can also record the processing time of the current service and pass it to the training module to use the current service (time) data to tune the model to improve the accuracy of the model.
[0097] Taking the traditional queuing for number taking as an example (in some embodiments, the same applies to the offline business handling time reminder), in order to provide efficient services, each bank needs to replace the traditional manual queuing method with high-tech customer management methods. At present, in order to solve this problem, bank branches have developed a queuing and calling system for online number taking, form filling, waiting, calling, business handling, evaluation and other processes. Each customer knows how many people are queuing in the branch, what number they are currently in, and other information. However, during the period from taking the number to handling the business, the customer still has to stay in the bank and wait, and the customer does not know how long to wait. The mechanism of estimating the queuing time in the relevant technology is relatively basic, with large deviations, and the data has great randomness, which makes the predicted queuing time inaccurate, further causing customer dissatisfaction.
[0098] The embodiment of the present application uses random forest to train the impact of various conditions on the queuing time, such as the type of business, the time of business initiation such as the time, day of the week, and month. The characteristics of the random forest model can more accurately predict the waiting time of users under specific conditions. In addition, the model can also adjust parameters based on the actual waiting time, continuously optimize the model with higher accuracy, and reduce the average waiting time for customer business processing as much as possible while achieving the purpose of accurate prediction.
[0099] Figure 3 It is a flowchart of another business processing method provided by an embodiment of the present application. On the basis of the above embodiment, this embodiment further refines the training process of the random forest model. In this embodiment, an example is given in which the random forest model is an optional embodiment of a waiting time prediction model for the business corresponding to the business type in each time period. Specifically, in addition to the above steps S201-S204, the following steps S301-S304 may also be included. In this embodiment, the steps S301-S04 are before step S201. In some embodiments, they are not limited to the order of steps. For example, S301-S304 may be after step S201 and before step S202. This embodiment does not specifically limit the order of the steps, and the same is true for other embodiments.
[0100] Step S301: Collect historical user sample data, where the historical user sample data includes service initiation time of a first user sample for a plurality of first services corresponding to the service type and corresponding service start processing time.
[0101] In this embodiment, historical user sample data can be collected from a database corresponding to business processing, and these data include the business initiation time of multiple first businesses in the first user sample and the corresponding business start processing time. By collecting historical user sample data, a true record of business processing time is obtained, which provides basic data for subsequent waiting time calculation and model training.
[0102] Step S302: Determine the waiting time of each first service according to the initiation time of each first service and the corresponding service start processing time.
[0103] In this embodiment, the waiting time of each service is calculated according to the initiation time of each first service and the corresponding service start processing time. By calculating the waiting time, the original timestamp data can be converted into an indicator directly used to predict and optimize the service process, thereby improving the prediction efficiency of the waiting time.
[0104] Step S303: After removing abnormal data of the service initiation time and the waiting time of each first service in the first user sample, obtain first sample processing data, wherein the first sample processing data includes the removed service initiation time and the corresponding waiting time.
[0105] Considering that there may be a large amount of abnormal data in the historical user sample data, especially for the waiting time during the service processing time, the waiting time may be inconsistent with the objective waiting time due to personal factors of the user, such as the waiting time obtained by the user waiting in line again due to other things, etc. This embodiment can effectively improve the prediction accuracy of the model by eliminating the abnormal data and then entering the subsequent model training process.
[0106] In a possible implementation manner, in the above step, the abnormal data of the service initiation time and the waiting time of each first service in the first user sample is removed in the following manner:
[0107] According to the waiting time record information of each first service, judging whether the service start processing time of each first service is the processing time after multiple service start processing reminders; wherein the waiting time record information is used to record the reminder information of the service start processing time;
[0108] When the service start processing time of the first service is the processing time after multiple service start processing reminders, the service initiation time and waiting time of the first service are determined to be abnormal data, and the abnormal data of the service initiation time and waiting time are eliminated.
[0109] In this embodiment, by obtaining the waiting time record information, the waiting time record information can be obtained from the database, and by analyzing the reminder information of each business, it is identified which businesses have experienced multiple reminders during the processing process. Exemplarily, a threshold (such as more than one reminder) can be set to determine which businesses belong to multiple reminders. By analyzing the reminder pattern, it is possible to more accurately identify those businesses that may be affected by abnormalities, so that users do not process the business on time. Then, those businesses that have been reminded multiple times and have abnormal processing time are marked as abnormal data, which includes the initiation time of the business and its waiting time. By marking the abnormal data, it can be targeted and eliminated in subsequent data processing. After eliminating the abnormal data, the data set can better reflect the normal business processing situation, thereby improving the quality of model training and prediction accuracy.
[0110] In some embodiments, the excluded abnormal data and its reasons can also be recorded, and this information can be fed back to the business process management team for process optimization and improvement. By feeding back abnormal situations, banks can identify potential problems in business processes and reduce the occurrence of abnormal situations in the future.
[0111] Step S304: training an initial random forest model based on the first sample processing data to obtain a random forest model.
[0112] The initial random forest model can be a first version of a model trained based on a preliminarily processed and prepared data set, using default parameter settings and a basic feature set. The initial random forest model is trained using the first sample processing data, and parameter tuning and model convergence are performed to obtain a random forest model, wherein the model training process can refer to the prior art and will not be described in detail here.
[0113] Through the above technical solution, a random forest model can be established to predict the service waiting time for characteristic service types. When a service processing request of the corresponding service type is received, the service waiting time can be predicted based on the specific model. The model focuses on a single service type and can have a deeper understanding of the specific characteristics of the service, and the prediction accuracy is also higher.
[0114] It is understandable that during the model training process, the training process of the random forest model for other business types is the same as above. In some embodiments, the model training process can be performed on other devices or servers and transmitted to the model library. The server only needs to retrieve the corresponding model from the model library for use. This embodiment does not specifically limit the executor of the model training.
[0115] Figure 4 It is a flow chart of another service processing method provided by an embodiment of the present application. On the basis of the above embodiment, this embodiment illustrates another training process of a random forest model, wherein the random forest model is a waiting time prediction model for services corresponding to multiple different service types in each time period, and the different service types include the service type corresponding to the service to be processed; in addition to the above steps S201-S204, the method provided in this embodiment may also include the following steps S401-S401:
[0116] Step S401: Collect historical sample data, where the historical sample data includes service initiation time of multiple second services corresponding to different service types and corresponding service start processing time of the second user sample.
[0117] It should be noted that in this embodiment, the first service and the second service are only used to describe similar objects and have no other special meanings, wherein the first service and the second service can be the same service or different services, depending on the actual application. This embodiment focuses on training a unified model for multiple service types.
[0118] The process of collecting historical sample data is similar to step S301 in the above embodiment, and the relevant description is not repeated here.
[0119] Step S402: for each service type, determine the waiting time of each second service in each service type according to the initiation time of each of the plurality of second services of the service type and the corresponding service start processing time.
[0120] In this embodiment, data processing is performed separately for different business types, such as calculation of waiting time and subsequent elimination of abnormal data, to facilitate model training.
[0121] Step S403: After removing abnormal data on the service initiation time and waiting time of each second service of each service type in the second user sample, obtain second sample processing data.
[0122] Optionally, in the above steps, abnormal data for the service initiation time and waiting time of each second service of each service type in the second user sample may be eliminated in the following manner: for each service type, based on the waiting time record information of each second service of the service type, determine whether the service start processing time of each second service is the processing time after multiple service start processing reminders; when there is a second service whose service start processing time is the processing time after multiple service start processing reminders, determine that the service initiation time and waiting time of the second service are abnormal data, and eliminate the abnormal data of the service initiation time and waiting time.
[0123] In this embodiment, abnormal data is removed for each business type to facilitate subsequent model training. The method for removing abnormal data can be referred to the above implementation, and the relevant description will not be repeated.
[0124] Step S404: training an initial random forest model based on the second sample processing data to obtain the random forest model.
[0125] Exemplarily, the above model training process is explained by taking the queue for number taking as an example. The time for users to handle different types of business can be exported from the database, and the data that does not meet the requirements can be cleaned up. The time (T1) from the time the customer takes the number to the time the business starts to be handled is selected. If the user has missed the number during the queuing process, for example, customer K gets the number Ak, and gets the number after waiting for Tk time, but the customer is not at the branch, and then returns to the branch and gets the business after T2 time, the queuing time in this case is (T1+T2). Since the time T2 is caused by the customer himself, if the data is used for training, it will cause a large error, and the data needs to be cleaned up. Based on the above cleaning rules, the data is divided into a training set and a validation set after cleaning. The business type, time, day of the week, and month of the data are screened out from the training set data as feature vectors, denoted as (X1, X2, X3, X4). The relationship between (X1, X2, X3, X4) and Y (i.e., the business waiting time, or the time when the business starts processing) is fitted based on the random model. The parameter N of the random forest regression model T1 trained above is used, and the predicted time verified by the validation set is Tp. The error between Tp and Y: sum(Y-Tp) is used as the performance indicator of the estimated model T1. The smaller the prediction error, the better the performance. The model parameter N, the maximum decision tree depth, and the minimum extracted features are continuously adjusted and optimized to minimize the error between Tp and Y.
[0126] The above technical solution of this embodiment processes multiple business types through one model, which can reduce the number of models that need to be maintained in the system and reduce management and maintenance costs. In addition, when the amount of data is small, data of multiple business types can be combined and used, which can increase the amount of training data, thereby improving the robustness and generalization ability of the model.
[0127] In some embodiments, considering that a plurality of different models may be stored in the model database, it is difficult to quickly retrieve an adapted model, especially when a single model is trained for a business type. In order to improve the efficiency of retrieval of the model, the method may further include the following steps:
[0128] For the random forest model trained with the data of each business type, adding a type label of the corresponding business type to the random forest model, and generating a corresponding relationship between each random forest model and its corresponding business type;
[0129] The step of retrieving a random forest model from a model library according to the business type includes:
[0130] According to the business type and the corresponding relationship, a random forest model corresponding to the business type is retrieved from a model library.
[0131] In this embodiment, a corresponding business type tag is added to each trained random forest model. This tag is used to identify the business type served by the model. The type tag can be a simple string or a numerical value, representing a specific business type name or code. The type tag enables the model to be correctly identified and used in the subsequent calling process. And by creating a mapping relationship table, each random forest model is associated with its corresponding business type (for example, the type tag of each business type is associated with its corresponding random forest model), so that the server can quickly find and call the model related to the specific business type according to the mapping relationship table.
[0132] Figure 5 is a structural diagram of a service processing device provided in an embodiment of the present application, such as Figure 5 As shown, the device 500 includes a response module 501, a model retrieval module 502, a model processing module 503 and a message feedback module 504, wherein:
[0133] A response module 501 is used to respond to a service processing request initiated by a user, wherein the service processing request carries a service type and service initiation time of the service to be processed;
[0134] The model retrieval module 502 is used to retrieve a random forest model from a model library according to the service type; wherein the random forest model is trained based on historical user sample data and is used to predict the waiting time of the service corresponding to the service type, and the waiting time is used to indicate the time between the service initiation time and the service start processing time of the relevant service;
[0135] A model processing module 503 is used to input the service initiation time and the service type into the random forest model, and process the service initiation time and the service type based on the random forest model to obtain the waiting time of the service to be processed;
[0136] The message feedback module 504 is used to generate a service processing prompt message based on the waiting time, and feed back the service processing prompt message to the terminal device of the user.
[0137] In a possible implementation manner, the random forest model is a waiting time prediction model for the service corresponding to the service type in each time period; the device further includes:
[0138] A first data collection module, used to collect historical user sample data, wherein the historical user sample data includes a service initiation time of a first user sample for a plurality of first services corresponding to the service type and a corresponding service start processing time;
[0139] A first duration determination module, used to determine the waiting duration of each first service according to the initiation time of each first service and the corresponding service start processing time;
[0140] A first data elimination module is used to obtain first sample processing data after eliminating abnormal data of the service initiation time and the waiting time of each first service in the first user sample, wherein the first sample processing data includes the eliminated service initiation time and the corresponding waiting time;
[0141] The first model training module is used to train an initial random forest model based on the first sample processing data to obtain the random forest model.
[0142] In a possible implementation, the random forest model is a waiting time prediction model for services corresponding to multiple different service types in each time period, and the different service types include the service type corresponding to the service to be processed; the device also includes:
[0143] A second data collection module, used to collect historical sample data, wherein the historical sample data includes a service initiation time of a plurality of second services corresponding to different service types and a corresponding service start processing time for the second user sample;
[0144] A second duration determination module is used to determine, for each service type, the waiting duration of each second service in each service type according to the initiation time of multiple second services of each service type and the corresponding service start processing time;
[0145] A second data elimination module is used to obtain second sample processing data after eliminating abnormal data on the service initiation time and waiting time of each second service of each service type in the second user sample;
[0146] The second model training module is used to train an initial random forest model based on the second sample processing data to obtain the random forest model.
[0147] In a possible implementation, the first data elimination module includes:
[0148] A first judgment unit is used to judge whether the service start processing time of each first service is the processing time after multiple service start processing reminders according to the waiting time record information of each first service; wherein the waiting time record information is used to record the reminder information of the service start processing time;
[0149] The first elimination unit is used to determine that the business initiation time and the waiting time of the first business are abnormal data when the business start processing time of the first business is the processing time after multiple business start processing reminders, and eliminate the abnormal data of the business initiation time and the waiting time.
[0150] In a possible implementation manner, the second data elimination module includes:
[0151] A second judgment unit is used to judge, for each service type, whether the service start processing time of each second service is the processing time after multiple service start processing reminders according to the waiting time record information of each second service of the service type;
[0152] The second elimination unit is used to determine that the business initiation time and the waiting time of the second business are abnormal data when the business start processing time of the second business is the processing time after multiple business start processing reminders, and eliminate the abnormal data of the business initiation time and the waiting time.
[0153] In a possible implementation, the device further includes:
[0154] A generation module is used to add a type label of the corresponding business type to the random forest model trained by the data of each business type, and generate a corresponding relationship between each random forest model and its corresponding business type;
[0155] The model retrieval module 502 is specifically used to retrieve the random forest model corresponding to the business type from the model library according to the business type and the corresponding relationship.
[0156] In a possible implementation, the response module 501 is specifically used to: respond to a business processing request initiated by a user based on multiple channels; wherein the multiple channels include at least one of a queuing number-taking terminal, a social media platform, and a mobile application.
[0157] The above-mentioned business processing device provided in this embodiment can execute the method provided in the above-mentioned method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be described in detail here.
[0158] Figure 6 This is a schematic diagram of the server structure provided for this application. Figure 6 As shown, the server 600 provided in this embodiment includes: at least one processor 601 and a memory 602. Optionally, the device 50 further includes a communication component 603. The processor 601, the memory 602 and the communication component 603 are connected via a bus 604.
[0159] In a specific implementation process, at least one processor 601 executes the computer execution instructions stored in the memory 602, so that at least one processor 601 executes the above method.
[0160] The specific implementation process of the processor 601 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.
[0161] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
[0162] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-volatile Memory, NVM), such as at least one disk memory.
[0163] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.
[0164] The present application also provides a computer program product, including a computer program, which implements the above method when executed by a processor.
[0165] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.
[0166] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.
[0167] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.
[0168] The division of units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0169] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0170] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0171] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0172] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0173] Finally, it should be noted that those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention, which follow the general principles of the present invention and include common knowledge or customary technical means in the art not disclosed by the present invention, are not limited to the precise structure described above and shown in the drawings, and may be modified and changed in various ways without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A business processing method, characterized in that: include: Responding to a service processing request initiated by a user, the service processing request carrying the service type of the service to be processed and the service initiation time; According to the service type, a random forest model is retrieved from a model library; wherein the random forest model is trained based on historical user sample data and is used to predict the waiting time of the service corresponding to the service type, and the waiting time is used to indicate the time between the service initiation time and the service start processing time of the relevant service; Inputting the service initiation time and the service type into the random forest model, processing the service initiation time and the service type based on the random forest model, and obtaining the waiting time of the to-be-processed service; A service processing prompt message is generated based on the waiting time, and the service processing prompt message is fed back to the terminal device of the user.
2. The method according to claim 1, characterized in that The random forest model is a waiting time prediction model for the service corresponding to the service type in each time period; the method also includes: Collecting historical user sample data, the historical user sample data including service initiation time of a first user sample for a plurality of first services corresponding to the service type and corresponding service start processing time; Determine the waiting time of each first service according to the initiation time of each first service and the corresponding service start processing time; After removing abnormal data of the service initiation time and the waiting time of each first service in the first user sample, obtaining first sample processing data, the first sample processing data including the removed service initiation time and the corresponding waiting time; Based on the first sample processing data, an initial random forest model is trained to obtain the random forest model.
3. The method according to claim 1, characterized in that The random forest model is a waiting time prediction model for services corresponding to multiple different service types in various time periods, wherein the different service types include the service type corresponding to the service to be processed; the method further includes: Collecting historical sample data, where the historical sample data includes service initiation time of multiple second services corresponding to different service types and corresponding service start processing time of the second user sample; For each service type, determining the waiting time of each second service in each service type according to the initiation time of each of the plurality of second services of the service type and the corresponding service start processing time; After removing abnormal data of the service initiation time and waiting time of each second service of each service type in the second user sample, obtaining second sample processing data; Based on the second sample processing data, an initial random forest model is trained to obtain the random forest model.
4. The method according to claim 2, characterized in that: The removing of abnormal data of the service initiation time and the waiting time of each first service in the first user sample includes: According to the waiting time record information of each first service, judging whether the service start processing time of each first service is the processing time after multiple service start processing reminders; wherein the waiting time record information is used to record the reminder information of the service start processing time; When the service start processing time of the first service is the processing time after multiple service start processing reminders, the service initiation time and waiting time of the first service are determined to be abnormal data, and the abnormal data of the service initiation time and waiting time are eliminated.
5. The method according to claim 3, characterized in that: The removing of abnormal data of the service initiation time and waiting time of each second service of each service type in the second user sample includes: For each service type, judging whether the service start processing time of each second service of the service type is the processing time after multiple service start processing reminders according to the waiting time record information of each second service of the service type; When the service start processing time of a second service is the processing time after multiple service start processing reminders, the service initiation time and waiting time of the second service are determined to be abnormal data, and the abnormal data of the service initiation time and waiting time are eliminated.
6. The method according to claim 2 or 4, characterized in that: The method further comprises: For the random forest model trained with the data of each business type, adding a type label of the corresponding business type to the random forest model, and generating a corresponding relationship between each random forest model and its corresponding business type; The step of retrieving a random forest model from a model library according to the business type includes: According to the business type and the corresponding relationship, a random forest model corresponding to the business type is retrieved from a model library.
7. The method according to any one of claims 1 to 6, characterized in that: The responding to the service processing request initiated by the user includes: Respond to business processing requests initiated by users based on multiple channels; wherein the multiple channels include at least one of a queuing number collection terminal, a social media platform, and a mobile application.
8. A service processing device, characterized in that: include: A response module, used to respond to a service processing request initiated by a user, wherein the service processing request carries the service type and service initiation time of the service to be processed; A model retrieval module, used to retrieve a random forest model from a model library according to the service type; wherein the random forest model is trained based on historical user sample data and is used to predict the waiting time of the service corresponding to the service type, and the waiting time is used to indicate the time between the service initiation time and the service start processing time of the relevant service; A model processing module, used for inputting the service initiation time and the service type into the random forest model, processing the service initiation time and the service type based on the random forest model, and obtaining the waiting time of the service to be processed; A message feedback module is used to generate a service processing prompt message based on the waiting time, and feed back the service processing prompt message to the user's terminal device.
9. A server, characterized in that: include: Memory, processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor executes the business processing method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the business processing method according to any one of claims 1 to 7.