Task document distribution method and device
Through the method based on the activity model and combined with the random forest model, the medical life scores are calculated in real time and task documents are allocated, which solves the problem of unreasonable assignment of task documents caused by low activity accuracy in the existing technology, and the reasonable allocation and efficient processing of task documents are achieved.
Patent Information
- Application Number
- CN202311684686.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-08
- Publication Date
- 2025-06-10
AI Technical Summary
The medical life degree obtained by the prior art by weighting a small number of influence factors is low, resulting in unreasonable allocation of task documents and accumulation of task documents, which is not conducive to the timely processing of tasks.
Using an activity model-based method, it is converted into real-time active scores by responding to user behavior data, and filtering order-received users based on real-time active scores, and reasonably allocating task documents. This model comprehensively considers a variety of factors that affect user activity level through the random forest model to improve the accuracy of the activity model.
It realizes the rational allocation of task documents, improves the efficiency of task documents processing, avoids the accumulation of task documents, enhances users' enthusiasm for processing task documents, and helps the platform to develop stably.
Smart Images

Figure CN120126701A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet medical technology, and particularly to a method and device for allocating task documents. Background Art
[0002] The Internet hospital provides an online consultation platform for doctors and patients. After receiving a patient's consultation request, it allocates corresponding task documents to doctors. The activity level of doctors has an important impact on the development of the Internet hospital. Generally, the activity level of doctors is calculated based on data such as the doctor's average daily consultation volume, average daily online duration, and patient click volume. For example, taking the above data as influencing factors, setting corresponding weights for each influencing factor, and obtaining the activity level of doctors by weighted summation of the influencing factors. The Internet hospital dispatches orders to doctors according to the activity level of doctors. For example, when the activity level of a doctor is relatively high, fewer task documents are allocated to the doctor, and when the activity level of a doctor is relatively low, more task documents are allocated to the doctor.
[0003] In the process of implementing the present invention, the inventors found that the prior art has at least the following problems:
[0004] The activity level obtained by the simple method of weighting a small number of influencing factors has low accuracy, and it is easy to allocate more task documents to doctors with a relatively high actual activity level, resulting in unreasonable allocation of task documents, causing task documents to pile up, and being unfavorable for the timely processing of tasks. Summary of the Invention
[0005] In view of this, embodiments of the present invention provide a method and device for allocating task documents, which can reasonably allocate task documents, avoid the accumulation of task documents, and improve the processing efficiency of task documents.
[0006] To achieve the above object, according to the first aspect of the embodiments of the present invention, there is provided a method for allocating task documents, including:
[0007] Responding to receiving user behavior data of a target user, and converting the user behavior data into a real-time activity score of the target user according to a pre-set activity model;
[0008] Responding to receiving a dispatch request, obtaining the real-time activity score of each user, and taking the users whose real-time activity scores meet the pre-set allocation conditions as order-receiving users;
[0009] Allocating the task documents corresponding to the dispatch request to the order-receiving users.
[0010] Optionally, before converting the user behavior data into the real-time activity score of the target user according to the pre-set activity model, the method further includes:
[0011] Obtain the historical behavior data of each user, and perform multiple samplings on the historical behavior data to obtain multiple training data sets;
[0012] Train multiple decision tree models based on the multiple training data sets, and use the multiple decision tree models as a random forest model;
[0013] Repeat the following steps until the step stop condition is met: Determine the proportion of the first active users according to the random forest model, determine the proportion of the second active users according to the preset business rules, compare the proportion of the first active users and the proportion of the second active users, and adjust the parameters of the random forest model according to the comparison result; The step stop condition is: the proportion of the first active users is equal to the proportion of the second active users;
[0014] Use the random forest model with adjusted parameters as the activity model.
[0015] Optionally, determining the proportion of the first active users according to the random forest model includes:
[0016] Determine the active scores of the leaf nodes of the random forest model, and calculate the average value of the scores of the leaf nodes to obtain the average active score;
[0017] Input the historical behavior data of each user into the random forest model to obtain the historical active scores of each user;
[0018] Compare the historical active scores of each user with the average active score, and regard the users with historical active scores greater than or equal to the average active score as active users, and use the proportion of the active users among all users as the proportion of the first active users.
[0019] Optionally, before performing multiple samplings on the historical behavior data to obtain multiple training data sets, the method further includes: According to the preset business scenarios, perform feature selection on the historical behavior data to obtain historical feature data corresponding to multiple business scenarios;
[0020] Performing multiple samplings on the historical behavior data to obtain multiple training data sets includes: respectively sampling the historical feature data corresponding to multiple business scenarios to obtain training data sets corresponding to multiple business scenarios, and the training data sets corresponding to multiple business scenarios are used to train multiple decision tree models corresponding to multiple business scenarios.
[0021] Optionally, the method further includes:
[0022] According to a preset timing task, obtain the new user behavior data of each user within a preset time range, and convert the new user behavior data into a new real-time activity score of the corresponding user according to the activity model;
[0023] Update the real-time activity score according to the new real-time activity score.
[0024] Optionally, the method further includes:
[0025] In response to receiving an activity query request of a target user, determine the real-time activity score of the target user and return the real-time activity score to the target user;
[0026] In response to receiving an order-taking request of a target user, determine a corresponding target task document from a preset task document set according to the real-time activity score of the target user, and assign the target task document to the target user.
[0027] Optionally, before receiving a dispatch request, the method further includes: determining target activity scores of multiple business systems according to the activity model, and synchronizing the target activity scores to the corresponding business systems;
[0028] Obtain the real-time activity score of each user, and use the user whose real-time activity score meets the preset assignment condition as the order-taking user, including: determining the target business system corresponding to the dispatch request, and obtaining the real-time activity score of each user in the target business system; comparing the target activity score of the target business system with the real-time activity score of each user in the target business system, and using the user whose real-time activity score in the target business system is less than the target activity score as the order-taking user.
[0029] According to a second aspect of an embodiment of the present invention, there is provided an apparatus for assigning task documents, including:
[0030] A conversion module, configured to, in response to receiving user behavior data of a target user, convert the user behavior data into a real-time activity score of the target user according to a preset activity model;
[0031] A determination module, configured to, in response to receiving a dispatch request, obtain the real-time activity score of each user, and use the user whose real-time activity score meets the preset assignment condition as the order-taking user;
[0032] An assignment module, configured to assign the task document corresponding to the dispatch request to the order-taking user.
[0033] Optionally, the apparatus further includes:
[0034] An acquisition module, configured to acquire the historical behavior data of each user, perform multiple samplings on the historical behavior data, and obtain multiple training data sets;
[0035] A training module, configured to train multiple decision tree models based on the multiple training data sets, and use the multiple decision tree models as a random forest model;
[0036] An adjustment module, configured to repeatedly execute the following steps until the step stop condition is met: determine the proportion of the first active users according to the random forest model, determine the proportion of the second active users according to the preset business rules, compare the proportion of the first active users and the proportion of the second active users, and adjust the parameters of the random forest model according to the comparison result; the step stop condition is that the proportion of the first active users is equal to the proportion of the second active users;
[0037] A generation module, configured to use the random forest model with adjusted parameters as the activity model.
[0038] Optionally, determining the proportion of the first active users according to the random forest model includes:
[0039] Determine the active scores of the leaf nodes of the random forest model, calculate the average value of the scores of the leaf nodes to obtain the average active score;
[0040] Input the historical behavior data of each user into the random forest model to obtain the historical active scores of each user;
[0041] Compare the historical active scores of each user with the average active score, use the users whose historical active scores are greater than or equal to the average active score as active users, and use the proportion of the active users in all users as the proportion of the first active users.
[0042] Optionally, the device further includes: a feature selection module, configured to perform feature selection on the historical behavior data according to the preset business scenarios to obtain historical feature data corresponding to multiple business scenarios;
[0043] Performing multiple samplings on the historical behavior data to obtain multiple training data sets includes: respectively performing samplings on the historical feature data corresponding to multiple business scenarios to obtain training data sets corresponding to multiple business scenarios, and the training data sets corresponding to the multiple business scenarios are used to train multiple decision tree models corresponding to multiple business scenarios.
[0044] Optionally, the device further includes:
[0045] A timing module, configured to obtain, according to a preset timing task, new user behavior data of each user within a preset time range, and convert the new user behavior data into a new real-time activity score of the corresponding user according to the activity model;
[0046] An update module, configured to update the real-time activity score according to the new real-time activity score.
[0047] Optionally, the device further includes:
[0048] A query module, configured to, in response to receiving an activity query request of a target user, determine the real-time activity score of the target user and return the real-time activity score to the target user;
[0049] An order receiving module, configured to, in response to receiving an order receiving request of a target user, determine a corresponding target task document from a preset task document set according to the real-time activity score of the target user, and allocate the target task document to the target user.
[0050] Optionally, the device further includes: a synchronization module, configured to determine target activity scores of multiple service systems according to the activity model, and synchronize the target activity scores to the corresponding service systems;
[0051] Obtaining the real-time activity score of each user, and using the users whose real-time activity scores meet the preset allocation conditions as order receiving users, includes: determining a target service system corresponding to the order dispatching request, and obtaining the real-time activity scores of each user in the target service system; comparing the target activity score of the target service system with the real-time activity scores of each user in the target service system, and using the users whose real-time activity scores in the target service system are less than the target activity score as order receiving users.
[0052] According to a third aspect of an embodiment of the present invention, there is provided an electronic device, including:
[0053] One or more processors;
[0054] A storage device, configured to store one or more programs,
[0055] When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of the above embodiments.
[0056] According to a fourth aspect of an embodiment of the present invention, there is provided a computer-readable medium, on which a computer program is stored, and when the program is executed by a processor, the method according to any one of the above embodiments is implemented.
[0057] One embodiment of the above invention has the following advantages or beneficial effects: determining the real-time activity score of a user based on the activity model, and allocating task documents to the user according to the real-time activity score can reasonably allocate task documents, improve the enthusiasm of the user for processing task documents, improve the processing efficiency of task documents, and avoid the backlog of task documents; training a random forest model with the training data set obtained by data sampling, and adjusting the parameters of the random forest model according to the comparison result of the first active user ratio and the second active user ratio to obtain the activity model can comprehensively consider various factors affecting the user activity level and improve the accuracy of the activity model; determining the average activity score according to the leaf nodes of the random forest, and comparing the average activity score with the historical activity score to obtain the first active user ratio can quickly and accurately obtain the first active user ratio; selecting features from the historical behavior data according to the business scenario, and training decision tree models corresponding to multiple business scenarios with the data after feature selection can improve the accuracy of each decision tree model; regularly updating the real-time activity data can improve the timeliness of the real-time activity data and improve the rationality of task document allocation; informing the user of his own real-time activity score and dispatching orders to the user according to the user's order receiving request can enable the user to understand his own activity situation, facilitate improving the enthusiasm of the user for processing task documents, and contribute to the stable development of the platform; synchronizing the activity score to each business system can enable each business system to operate doctor resources more accurately, allocate task documents more reasonably, and improve the processing efficiency of task documents.
[0058] The further effects of the above non-conventional optional methods will be described below in combination with specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] The drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention. Among them:
[0060] Figure 1 is a schematic diagram of the main process of the task document allocation method according to an embodiment of the present invention;
[0061] Figure 2 is a schematic diagram of the activity model according to a referenceable embodiment of the present invention;
[0062] Figure 3 is a schematic diagram of the overall process of the task document allocation method according to a referenceable embodiment of the present invention;
[0063] Figure 4 is a schematic diagram of the random forest model according to a referenceable embodiment of the present invention;
[0064] Figure 5 is a schematic diagram of the multi-module collaboration of the task document allocation method according to a referenceable embodiment of the present invention;
[0065] Figure 6 It is a schematic diagram of the main process of the method for allocating task documents according to a reference embodiment of the present invention;
[0066] Figure 7 It is a schematic diagram of the main modules of the device for allocating task documents according to an embodiment of the present invention;
[0067] Figure 8 It is an exemplary system architecture diagram to which the embodiments of the present invention can be applied;
[0068] Figure 9 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing the embodiments of the present invention. Detailed implementation manners
[0069] The following describes exemplary embodiments of the present invention with reference to the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding. It should be considered that they are merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted below.
[0070] It should be noted that in the technical solution of the present invention, the processing of collecting, using, storing, sharing, and transferring user personal information complies with the provisions of relevant laws and regulations, and the user needs to be informed and obtain the consent or authorization of the user. When applicable, technical processing of de-identifying and / or anonymizing and / or encrypting the user personal information is performed.
[0071] The Internet hospital provides an online consultation platform for doctors and patients. After receiving a patient's consultation request, it allocates corresponding task documents to doctors. The activity level of doctors has an important impact on the development of the Internet hospital. Usually, the activity level of doctors is calculated based on data such as the doctor's average daily consultation volume, average daily online duration, and patient click volume. For example, the above data are used as influencing factors, corresponding weights are set for each influencing factor, and the activity level of doctors is obtained by weighted summation of the influencing factors. The Internet hospital dispatches orders to doctors according to the activity level of doctors. For example, when the activity level of doctors is relatively high, it means that doctors have processed more task documents previously, so fewer task documents are allocated to doctors. When the activity level of doctors is relatively low, it means that doctors have processed fewer task documents previously, so more task documents are allocated to doctors.
[0072] The activity level obtained by simply weighting a small number of influencing factors has low accuracy and cannot reflect the actual activity of doctors. It is easy to assign more task documents to doctors with higher actual activity levels, or assign fewer task documents to doctors with lower actual activity levels, resulting in unreasonable distribution of task documents, which can easily cause task document accumulation, hinder the timely processing of tasks, and slow down the processing efficiency of task documents.
[0073] In view of this, according to a first aspect of an embodiment of the present invention, a method for allocating task documents is provided.
[0074] Figure 1 FIG. 1 is a schematic diagram of the main process of the method for allocating task documents according to an embodiment of the present invention. Figure 1 As shown, the method for allocating task documents according to an embodiment of the present invention mainly includes the following steps S101 to S103.
[0075] Step S101, in response to receiving user behavior data of a target user, converting the user behavior data into a real-time activity score of the target user according to a preset activity model.
[0076] When users perform operations on the platform, the platform generates user behavior data accordingly. For example, when a doctor performs a consultation operation on the Internet hospital platform, the Internet hospital platform adds 1 to the doctor's consultation record and records the consultation time, patients, consultation results and other data. In the Internet hospital scenario, user behavior data includes: the doctor's online status, average daily online time, average daily number of orders, average daily number of sensitive clicks, platform exposure times, patient clicks, etc. Among them, the average daily number of sensitive clicks represents the total number of clicks by the doctor on menu functions such as the order grabbing area, consultation list, consultation button, patient management menu, and income.
[0077] The execution subject of the embodiment of the present invention receives user behavior data, and takes the user to which the user behavior data belongs as the target user. The user behavior data is the user behavior data of the target user in the past period of time, and can represent the activity level of the target user in the past period of time. The user behavior data is input into a pre-set activity model, and the activity model is used to summarize and analyze the user behavior data and make conditional judgments, and a real-time activity score of the target user is generated based on the user behavior data. The activity model is obtained by iteratively training the random forest model. The activity model includes multiple decision modules, and the user behavior data is used as a decision condition. The decision conditions of each decision module can be the same or different. The activity score corresponding to each user behavior data is determined, or the activity score after the combination of multiple user behavior data is determined, and then all the activity scores are aggregated to obtain the real-time activity score of the target user.
[0078] Figure 2 It is a schematic diagram of an activity model according to a reference embodiment of the present invention. Exemplarily, as Figure 2 shown, the execution subject of the embodiment of the present invention inputs the obtained user behavior data into the activity model 201. The obtained user behavior data includes: user status, user online duration, user platform exposure, order receiving volume, sensitive click times, patient click times, and other data; the activity model 201 includes multiple decision trees such as decision tree 202 and decision tree 203. Each decision tree includes multiple condition judgment modules. The leaf node of each decision tree is an activity score. According to the user behavior data, each decision tree is judged to determine the activity score of the user behavior data relative to each decision tree. For example, when the user behavior data includes: the user is online, the user online duration is 13 hours, and the user exposure is 25 times, it is determined that the activity score obtained by decision tree 201 is score 3. When the user behavior data includes: the order receiving volume is 30, the sensitive click times is 90 times, and the patient click times is 75 times, it is determined that the activity score obtained by decision tree 202 is score 5, and so on. The activity scores of the user behavior data relative to all decision trees are determined, and the multiple activity scores are added to output the real-time activity score of the target user.
[0079] Obtaining high-dimensional user behavior data, making decisions on the user behavior data using the activity model, and determining the real-time activity score of the user behavior data can comprehensively consider various factors affecting user activity, improve the accuracy of user activity calculation, provide a reliable basis for the allocation of task documents, and facilitate improving the rationality of task document allocation; avoid R & D personnel from adjusting the weights of user behavior data, reduce labor costs, improve the efficiency of user activity calculation, and improve the timeliness of the real-time activity score.
[0080] According to a reference embodiment of the present invention, the method further includes: obtaining, according to a preset timing task, new user behavior data of each user within a preset time range. For example, using the timing task framework Quartz to generate a timing task, every hour, obtain the newly generated user behavior data of each user within the past hour as the new user behavior data. Then, according to the activity model, convert the new user behavior data into the new real-time activity score of the corresponding user. Specifically, input the new user behavior data into the activity model to obtain the activity score of the new user behavior data relative to each decision tree, sum up the activity scores of all decision trees to obtain the new real-time activity score. Update the real-time activity score according to the new real-time activity score. Exemplarily, the execution entity of the embodiment of the present invention uses a message queue to store the real-time activity score of each user. After calculating the new real-time activity score of the user, use the new real-time activity score to replace the old real-time activity score in the message queue to update the real-time activity score of each user.
[0081] Timely updating the real-time activity data can improve the timeliness of the real-time activity data, improve the rationality of task document allocation, ensure that the real-time activity score of each user can more accurately reflect the actual activity of the user, and provide a continuous and reliable basis for the allocation of task documents.
[0082] Step S102, in response to receiving a dispatch request, obtain the real-time activity score of each user, and use the users whose real-time activity scores meet the preset allocation conditions as the receiving users.
[0083] The dispatch request is used to assign corresponding task documents to users. For example, in the scenario of an Internet hospital, a patient who wishes to consult a doctor sends a dispatch request corresponding to the reception task to the execution entity of the embodiment of the present invention through the Internet hospital platform. Or, after the reception, the patient needs to be followed up every week. When the follow-up time arrives, the Internet hospital platform automatically sends a dispatch request corresponding to the follow-up task to the execution entity of the embodiment of the present invention. After receiving the dispatch request, the execution entity of the embodiment of the present invention obtains the real-time activity score of each user. The larger the real-time activity score, the more active the user has been in the past period of time, and the smaller the real-time activity score, the less active the user has been in the past period of time. It is judged whether the real-time activity score of each user meets the pre-set assignment conditions. For example, in the case where the dispatch request indicates that task documents need to be assigned to 5 users, the execution entity of the embodiment of the present invention sorts all users in ascending order of the real-time activity score, and takes the top 5 users as the receiving users. Among them, the higher the ranking, the less active the user is, and the lower the ranking, the more active the user is. In order to improve the enthusiasm of users to process task documents, improve the processing efficiency of task documents, and avoid a large backlog of task documents on active users, less active users should be used as receiving users.
[0084] In another referenceable embodiment of the present invention, before obtaining the real-time activity score of each user, the business scenario corresponding to the dispatch request is first determined. The business scenarios include: reception scenario, follow-up scenario, patient information management scenario, etc. Each scenario corresponds to a different real-time activity score, and the business scenario corresponding to the dispatch scenario is used as the target business scenario. When obtaining the real-time activity score of each user, the real-time activity score of each user in the target business scenario is obtained. The receiving users are determined according to the real-time activity score in the target business scenario.
[0085] In yet another referenceable embodiment of the present invention, before obtaining the real-time activity score of each user, the receiving users corresponding to the previous dispatch request are excluded from the screening range of the receiving users corresponding to the current dispatch request, so as to avoid a user being selected as a receiving user continuously for multiple times, narrow the screening range of the receiving users, improve the screening efficiency of the receiving users, and save system resources. Exemplarily, the Internet hospital platform includes: Doctor A1, Doctor A2, and Doctor A3. Among them, Doctor A1 is the receiving user corresponding to the previous dispatch request. After receiving the new dispatch request, the execution entity of the embodiment of the present invention screens the receiving users from Doctor A2 and Doctor A3.
[0086] In another reference embodiment of the present invention, when the cumulative generation time of the real-time activity score is relatively long, for example, the cumulative generation time of the real-time activity score is greater than a preset duration threshold, it is determined that the real-time activity score is not time-effective, and it is necessary to re-determine the real-time activity score of the user, and then screen the order-receiving users according to the re-determined real-time activity score.
[0087] Screening the order-receiving users according to the real-time activity score can improve the rationality of task document allocation, avoid allocating task documents to inactive users, improve the processing efficiency of task documents, and improve the user experience.
[0088] Step S103, allocate the task document corresponding to the order dispatch request to the order-receiving user.
[0089] After determining the order-receiving users, the execution entity of the embodiment of the present invention allocates the task document corresponding to the order dispatch request to the order-receiving user. For example, each order dispatch request corresponds to one task document, and one or more task documents are allocated to the order-receiving user according to the real-time activity score of the order-receiving user. Exemplarily, there are multiple order dispatch requests received by the execution entity of the embodiment of the present invention, that is, there are multiple task documents to be allocated, the preset activity score threshold is 10, and the real-time activity score of each user should be greater than or equal to the activity score threshold. Among them, the real-time activity score of order-receiving user B1 is 7, the real-time activity score of order-receiving user B2 is 8, and the real-time activity score of order-receiving user B3 is 9. For each task document allocated to a user, the real-time activity score of this user is increased by 1. In the case of 6 task documents, 3 task documents are allocated to order-receiving user B1, 2 task documents are allocated to order-receiving user B2, and 1 task document is allocated to order-receiving user B3, so that the real-time activity score of each order-receiving user after task document allocation is equal to the activity score threshold.
[0090] Allocating the task document to the order-receiving user can improve the rationality of task document allocation, avoid allocating task documents to inactive users, improve the processing efficiency of task documents, and improve the user experience; determining the number of task documents allocated to each order-receiving user according to the real-time activity score can further improve the rationality of task documents, is conducive to improving the enthusiasm of users to process task documents, avoiding the backlog of task documents, facilitating the timely processing of task documents, and improving the processing efficiency of task documents.
[0091] According to a reference embodiment of the present invention, before converting user behavior data into the real-time active score of the target user according to a preset activity model, the method further includes: obtaining the historical behavior data of each user, where the historical behavior data is the user behavior data of the user in the past period of time. For example, the user behavior data generated by the user from the past two months to the past six months is used as the historical behavior data. The historical behavior data is sampled multiple times to obtain multiple training data sets. According to the multiple training data sets, multiple decision tree models are trained, and the multiple decision tree models are used as a random forest model.
[0092] Exemplarily, the obtained historical behavior data is used as the training set T, and the training set T is sampled by sampling with replacement, that is, the historical behavior data drawn each time is put back into the training set T, and sampled N times, and the drawn historical behavior data is used as the new training set D; the historical behavior data in the training set D includes M features, and m features are selected from the M features, where m < M, preferably, m = M / 3 and m > 5; using the new training set D and m features, multiple decision tree models are trained, and the multiple decision tree models are used as a random forest model.
[0093] Repeat the following steps until the step stop condition is met: determine the proportion of the first active users according to the random forest model, determine the proportion of the second active users according to the preset business rules, compare the proportion of the first active users and the proportion of the second active users, and adjust the parameters of the random forest model according to the comparison result. Exemplarily, according to the random forest model, determine the historical active score corresponding to the historical behavior data of each user, compare the historical active score with the preset active score threshold, and use the users with the historical active score greater than or equal to the active score threshold as the first active users, and use the proportion of the first active users in all users participating in the training as the proportion of the first active users; obtain the preset business rules, and the business rules include: daily average online duration, daily average number of consultations, daily average number of follow-ups, daily average exposure volume, daily average order click volume, and use the users who meet all business rules or a certain number of business rules as the second active users, and use the proportion of the second active users in all users participating in the training as the proportion of the second active users. Compare the proportion of the first active users and the proportion of the second active users. In the case where the proportion of the first active users is not equal to the proportion of the second active users, adjust the parameter weights of the random forest model so that the proportion of the first active users approaches the proportion of the second active users. In the case where the proportion of the first active users is equal to the proportion of the second active users, stop executing the above steps, that is, the step stop condition is: the proportion of the first active users is equal to the proportion of the second active users. Use the random forest model with adjusted parameters as the activity model. At this time, the proportion of active users determined based on the random forest model is the same as the proportion of active users expected by the business, and it can be considered that the parameters of the random forest model at this time are optimal.
[0094] A training data set obtained through data sampling is used to train a random forest model. According to the comparison result of the proportion of the first active users and the proportion of the second active users, the parameters of the random forest model are adjusted to obtain an activity model, which can comprehensively consider various factors affecting user activity and improve the accuracy of the activity model.
[0095] According to another referenceable embodiment of the present invention, determining the proportion of the first active users according to the random forest model includes: The random forest model includes multiple decision trees, each decision tree includes multiple leaf nodes, and each leaf node corresponds to an activity score. Determine the activity scores of the leaf nodes of the random forest model, and calculate the average value of the activity scores of the leaf nodes to obtain the average activity score. Input the historical behavior data of each user into the random forest model to obtain the historical activity score of each user; compare the historical activity score of each user with the average activity score, and use the users whose historical activity score is greater than or equal to the average activity score as active users, and use the proportion of active users among all users as the proportion of the first active users.
[0096] Exemplarily, the calculation formula for the average activity score is: k, where score avg represents the average activity score, score(k) represents the activity score of the k-th leaf node, and there are n leaf nodes in the random forest model in total; according to the above calculation formula, the average activity score of the random forest model is determined to be 20, the historical activity score of user C1 is 25, the historical activity score of user C2 is 30, the historical activity score of user C3 is 15, and the historical activity score of user C4 is 18; the users whose historical activity score is greater than or equal to the average activity score include user C1 and user C2, accounting for half of all users. Therefore, the proportion of the first active users is 50%.
[0097] Determining the average activity score according to the leaf nodes of the random forest and comparing the average activity score with the historical activity score to obtain the proportion of the first active users can quickly and accurately obtain the proportion of the first active users.
[0098] According to another referenceable embodiment of the present invention, before performing multiple samplings on the historical behavior data to obtain multiple training data sets, the method further includes: selecting features from the historical behavior data according to a preset business scenario to obtain historical feature data corresponding to multiple business scenarios. Specifically, the business scenarios include: first diagnosis scenario, follow-up diagnosis scenario, patient information management scenario, follow-up scenario, doctor information display scenario, etc. Selecting the historical feature data corresponding to the first diagnosis scenario from the historical behavior data includes: average daily first diagnosis volume, first diagnosis reception frequency, average first diagnosis duration, etc.; selecting the historical feature data corresponding to the follow-up diagnosis scenario from the historical behavior data includes: average daily follow-up diagnosis volume, follow-up diagnosis reception frequency, average follow-up diagnosis duration, etc.; selecting the historical feature data corresponding to the patient information management scenario from the historical behavior data includes: number of patient information clicks, number of medical record updates, number of medical record queries, etc.; selecting the historical feature data corresponding to the follow-up scenario from the historical behavior data includes: average monthly follow-up volume, follow-up frequency, average follow-up duration, etc.
[0099] When performing multiple samplings on the historical behavior data to obtain multiple training data sets, sample the historical feature data corresponding to multiple business scenarios respectively to obtain training data sets corresponding to multiple business scenarios, and the training data sets corresponding to multiple business scenarios are used to train decision tree models corresponding to multiple business scenarios.
[0100] Training decision tree models corresponding to different business scenarios according to the historical behavior data corresponding to different business scenarios can improve the calculation efficiency and accuracy of the real-time active scores of users in different business scenarios, facilitate the allocation of task documents according to business scenarios, and improve the efficiency and rationality of task document allocation.
[0101] According to a referenceable embodiment of the present invention, the method further includes: in response to receiving an active score query request of a target user, determining the real-time active score of the target user and returning the real-time active score to the target user. Specifically, the execution entity of the embodiment of the present invention parses the received active score query request to determine user information such as the user code and user name of the target user, and then queries the real-time active score matching the user code or user name in the database, cache or message queue, and returns the real-time active score to the target user.
[0102] In response to receiving a task acceptance request from a target user, according to the real-time activity score of the target user, determine the corresponding target task document from a pre-set set of task documents, and assign the target task document to the target user. The set of task documents is a collection of unassigned task documents. For example, after the target user knows their real-time activity score based on an activity query request, when the target user believes that they have processed fewer task documents (i.e., lower activity level), they send a task acceptance request to the execution entity of the embodiment of the present invention. The execution entity of the embodiment of the present invention parses the received task acceptance request to determine the corresponding target task document. Exemplarily, determine the difference between the real-time activity score of the target user determined according to the task acceptance request and the average activity score of all users, and assign the corresponding number of task documents to the target user according to the difference. For example, if the difference is equal to 3, then screen out the three target task documents with the closest due time to the current time from the set of task documents and assign the target task documents to the target user. Another example is to determine in which business scenarios the target user is active enough and in which business scenarios the target user is not active enough according to the real-time activity score of the target user, and then screen out the corresponding number of target task documents from the less active business scenarios and assign the target task documents to the target user. Another example is to parse the task acceptance request to determine the number of task documents that the target user hopes to be assigned and the business scenarios to which the task documents belong, determine the target task documents according to the parsed business scenarios and quantity, and assign the target task documents to the target user.
[0103] Informing the user of their real-time activity score and dispatching tasks to the user according to the user's task acceptance request can enable the user to understand their activity situation, facilitate improving the enthusiasm of the user to process task documents, avoid the accumulation of task documents, facilitate improving the processing efficiency of task documents, and contribute to the stable development of the platform.
[0104] According to another referenceable embodiment of the present invention, before receiving a task dispatching request, the method further includes: determining the target activity scores of multiple business systems according to an activity model, and synchronizing the target activity scores to the corresponding business systems. For example, different business systems are responsible for processing task documents in different business scenarios. The execution entity of the embodiment of the present invention synchronizes the real-time activity scores of users to different business systems through a message queue.
[0105] When obtaining the real-time activity score of each user and using the users whose real-time activity scores meet the pre-set allocation conditions as the order-receiving users, determine the target business system corresponding to the order dispatching request, and obtain the real-time activity score of each user in the target business system. Specifically, users can perform business operations in different business systems, thereby generating user behavior data corresponding to different business systems. According to the user behavior data corresponding to different business systems, generate the real-time activity score of the user in different business systems. Parse the order dispatching request to determine the corresponding target business system, and then query the real-time activity score of each user in the target business system.
[0106] Compare the target activity score of the target business system with the real-time activity score of each user in the target business system, and use the users whose real-time activity scores in the target business system are less than the target activity score as the order-receiving users. Exemplarily, pre-set 5 business systems such as business systems D1 to D5, parse the order dispatching request to obtain {'sys': 'D1'; 'taskCount': '3'}, where "‘sys’:‘D1’" indicates that the target business system corresponding to this order dispatching request is business system D1, and "‘taskCount’:‘3’" indicates that there are 3 task documents corresponding to this order dispatching request. Therefore, obtain the real-time activity score of each user in the target business system, determine the 3 users with the smallest activity scores in the target business system, and allocate the 3 task documents corresponding to the order dispatching request to each of the above 3 users one by one.
[0107] Allocating task documents according to the real-time activity score of the target business system can improve the flexibility of task document allocation, avoid allocating task documents to active users, improve the processing efficiency of task documents, improve the user experience, be conducive to improving the enthusiasm of users to process task documents, and avoid the backlog of task documents.
[0108] Figure 3 It is a schematic diagram of the overall process of the task document allocation method according to a reference embodiment of the present invention. Exemplarily, as Figure 3 shown, the execution subject of the embodiment of the present invention obtains historical behavior data and generates a training set; performs feature selection on the training set to generate historical feature data; determines the size of the random forest model. Preferably, the size of the random forest model is 10, that is, 10 decision tree models are trained, and the 10 trained decision tree models are used as the random forest model; uses the historical feature data to train the random forest and adjusts the parameter weights; determines whether the training result meets the training termination condition. If not, repeat the above steps of feature selection, model training, parameter adjustment, etc. If so, stop training and use the trained random forest model as the activity model; determine the real-time activity score of the user according to the activity model and the user behavior data; allocate task documents according to the real-time activity score.
[0109] Figure 4 It is a schematic diagram of a random forest model according to a reference embodiment of the present invention. Exemplarily, as Figure 4 shown, the random forest model includes multiple decision trees such as decision tree 401, decision tree 402, decision tree 403, and decision tree 404. Each decision tree includes multiple nodes. Among them, the leaf nodes represent the active scores, and the other nodes except the leaf nodes represent decision conditions. According to the decision conditions, the historical feature data is decided to determine the historical active scores corresponding to each decision tree. The combiner is used to perform summary analysis on the historical active scores of all decision trees to obtain the historical active scores corresponding to the user.
[0110] Figure 5 It is a schematic diagram of multi-module collaboration of the task document allocation method according to a reference embodiment of the present invention. Exemplarily, as Figure 5 shown, the user operates the business system module. The business system module includes multiple business systems. Each business system is responsible for processing task documents in different business scenarios. The business system module stores the user's behavior data in the database, cache, or message queue; the model training module includes: a model building sub-module, a data acquisition sub-module, and a parameter adjustment sub-module. Among them, the data acquisition sub-module obtains historical behavior data from the storage, uses the historical behavior data to train the built random forest model, and adjusts the parameters of the random forest model to finally generate an activity model; the document allocation module includes: a data acquisition sub-module, a data conversion sub-module, a user screening sub-module, and a document allocation sub-module. Among them, the data acquisition sub-module obtains user behavior data from the storage, the data conversion sub-module uses the activity model to convert the user behavior data into real-time active scores, the user screening sub-module screens the order-receiving users according to the real-time active scores, and the document allocation sub-module returns the document allocation result to the business system module. The business system module then allocates task documents to the user according to the document allocation result.
[0111] Figure 6 It is a schematic diagram of the main process of the task document allocation method according to a reference embodiment of the present invention. As Figure 6 shown, the task document allocation method may include:
[0112] Step S601, obtain the historical behavior data of each user, and perform multiple samplings on the historical behavior data to obtain multiple training data sets;
[0113] Step S602, train multiple decision tree models according to the multiple training data sets, and use the multiple decision tree models as the random forest model;
[0114] Step S603: Determine the proportion of the first active users according to the random forest model, and determine the proportion of the second active users according to the preset business rules;
[0115] Step S604: Determine whether the proportion of the first active users is equal to the proportion of the second active users. If so, jump to Step S606; otherwise, jump to Step S605;
[0116] Step S605: Adjust the parameters of the random forest model according to the comparison result;
[0117] Step S606: In response to receiving the user behavior data of the target user, convert the user behavior data into the real-time active score of the target user according to the preset activity model;
[0118] Step S607: In response to receiving a dispatch request, obtain the real-time active score of each user, and use the users whose real-time active scores meet the preset allocation conditions as the users to receive the order;
[0119] Step S608: Allocate the task document corresponding to the dispatch request to the user who receives the order;
[0120] Step S609: In response to receiving an activity query request of the target user, determine the real-time active score of the target user, and return the real-time active score to the target user;
[0121] Step S610: In response to receiving an order receiving request of the target user, determine the corresponding target task document from the preset task document set according to the real-time active score of the target user, and allocate the target task document to the target user.
[0122] The specific implementation content of the task document allocation method according to a reference embodiment of the present invention has been described in detail in the above-mentioned task document allocation method, so the repeated content will not be described here.
[0123] According to the second aspect of the embodiments of the present invention, a task document allocation device is provided.
[0124] Figure 7 is a schematic diagram of the main modules of the task document allocation device according to the embodiments of the present invention. As Figure 7 shown, the task document allocation device 700 mainly includes:
[0125] A conversion module 701, configured to, in response to receiving the user behavior data of the target user, convert the user behavior data into the real-time active score of the target user according to the preset activity model;
[0126] A determination module 702, configured to, in response to receiving a task assignment request, obtain the real-time activity scores of each user, and use the users whose real-time activity scores meet the pre-set assignment conditions as the task-receiving users;
[0127] An assignment module 703, configured to assign the task document corresponding to the task assignment request to the task-receiving users.
[0128] According to a reference embodiment of the present invention, the task document assignment device 700 further includes:
[0129] An acquisition module, configured to obtain the historical behavior data of each user, perform multiple samplings on the historical behavior data to obtain multiple training data sets;
[0130] A training module, configured to train multiple decision tree models according to the multiple training data sets, and use the multiple decision tree models as a random forest model;
[0131] An adjustment module, configured to repeatedly execute the following steps until the step stop condition is met: determine the first active user ratio according to the random forest model, determine the second active user ratio according to the pre-set business rules, compare the first active user ratio and the second active user ratio, and adjust the parameters of the random forest model according to the comparison result; the step stop condition is: the first active user ratio is equal to the second active user ratio;
[0132] A generation module, configured to use the random forest model with adjusted parameters as the activity model.
[0133] According to another reference embodiment of the present invention, determining the first active user ratio according to the random forest model includes:
[0134] Determine the activity scores of the leaf nodes of the random forest model, and average the scores of the leaf nodes to obtain an average activity score;
[0135] Input the historical behavior data of each user into the random forest model to obtain the historical activity scores of each user;
[0136] Compare the historical activity score of each user with the average activity score, use the users whose historical activity scores are greater than or equal to the average activity score as active users, and use the ratio of the active users to all users as the first active user ratio.
[0137] According to another reference embodiment of the present invention, the task document assignment device 700 further includes: a feature selection module, configured to perform feature selection on the historical behavior data according to the pre-set business scenarios to obtain historical feature data corresponding to multiple business scenarios;
[0138] Perform multiple samplings on the historical behavior data to obtain multiple training data sets, including: respectively sampling the historical feature data corresponding to multiple business scenarios to obtain the training data sets corresponding to multiple business scenarios, and the training data sets corresponding to the multiple business scenarios are used to train decision tree models corresponding to the multiple business scenarios.
[0139] According to another referenceable embodiment of the present invention, the task document allocation device 700 further includes:
[0140] A timing module, configured to regularly obtain the new user behavior data of each user within a preset time range according to a preset timing task, and convert the new user behavior data into a new real-time activity score of the corresponding user according to the activity model;
[0141] An update module, configured to update the real-time activity score according to the new real-time activity score.
[0142] According to another referenceable embodiment of the present invention, the task document allocation device 700 further includes:
[0143] A query module, configured to determine the real-time activity score of the target user in response to receiving an activity query request of the target user, and return the real-time activity score to the target user;
[0144] An order receiving module, configured to determine a corresponding target task document from a preset task document set according to the real-time activity score of the target user in response to receiving an order receiving request of the target user, and allocate the target task document to the target user.
[0145] According to a referenceable embodiment of the present invention, the task document allocation device 700 further includes: a synchronization module, configured to determine the target activity scores of multiple business systems according to the activity model, and synchronize the target activity scores to the corresponding business systems;
[0146] Obtain the real-time activity score of each user, and use the users whose real-time activity scores meet the preset allocation conditions as order receiving users, including: determining the target business system corresponding to the order dispatch request, and obtaining the real-time activity score of each user in the target business system; comparing the target activity score of the target business system with the real-time activity score of each user in the target business system, and using the users whose real-time activity scores in the target business system are less than the target activity score as order receiving users.
[0147] It should be noted that the specific implementation content of the task document allocation device in the embodiments of the present invention has been described in detail in the above-mentioned task document allocation method, so the repeated content will not be described here.
[0148] According to the technical solution of the embodiment of the present invention, the real-time activity score of the user is determined based on the activity model, and the task document is allocated to the user according to the real-time activity score, which can reasonably allocate the task document, improve the enthusiasm of the user to process the task document, improve the processing efficiency of the task document, and avoid the backlog of task documents; the training data set obtained by data sampling is used to train the random forest model, and the parameters of the random forest model are adjusted according to the comparison result of the first active user ratio and the second active user ratio to obtain the activity model, which can comprehensively consider various factors affecting the user activity degree and improve the accuracy of the activity model; the average activity score is determined according to the leaf nodes of the random forest, and the average activity score is compared with the historical activity score to obtain the first active user ratio, which can quickly and accurately obtain the first active user ratio; according to the business scenario, feature selection is performed on the historical behavior data, and the decision tree models corresponding to multiple business scenarios are trained according to the data after feature selection, which can improve the accuracy of each decision tree model; the real-time activity data is updated regularly, which can improve the timeliness of the real-time activity data and the rationality of task document allocation; the user's own real-time activity score is informed, and orders are dispatched to the user according to the user's order receiving request, which can enable the user to understand their own activity situation, facilitate improving the enthusiasm of the user to process task documents, and contribute to the stable development of the platform; the activity score is synchronized to each business system, which can enable each business system to operate doctor resources more accurately, allocate task documents more reasonably, and improve the processing efficiency of task documents.
[0149] According to the third aspect of the embodiments of the present invention, an electronic device is provided, including: one or more processors; a storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method provided in the first aspect of the embodiments of the present invention.
[0150] According to the fourth aspect of the embodiments of the present invention, a computer-readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method provided in the first aspect of the embodiments of the present invention is implemented.
[0151] Figure 8 An exemplary system architecture 800 is shown to which the task document allocation method or the task document allocation device of the embodiments of the present invention can be applied.
[0152] As Figure 8As shown, the system architecture 800 may include terminal devices 801, 802, 803, a network 804, and a server 805. The network 804 is used to provide a medium for communication links between the terminal devices 801, 802, 803 and the server 805. The network 804 may include various connection types, such as wired, wireless communication links, or fiber optic cables, etc.
[0153] Users can use the terminal devices 801, 802, 803 to interact with the server 805 through the network 804 to receive or send messages, etc. Various communication client applications may be installed on the terminal devices 801, 802, 803, such as task assignment applications, order delivery applications, search applications, instant messaging tools, email clients, social platform software, etc. (for example only).
[0154] The terminal devices 801, 802, 803 may be various electronic devices with a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop computers, and desktop computers, etc.
[0155] The server 805 may be a server providing various services, such as a background management server (for example only) that supports the distribution request of task documents sent by the upstream using the terminal devices 801, 802, 803. The background management server may, in response to receiving the user behavior data of the target user, convert the user behavior data into the real-time active score of the target user according to a pre-set activity model; in response to receiving a dispatch request, obtain the real-time active score of each user, and use the users whose real-time active score meets the pre-set distribution conditions as the order-receiving users; assign the task document corresponding to the dispatch request to the order-receiving users; and feedback the distribution situation of the task document (for example only) to the terminal device.
[0156] It should be noted that the task document distribution method provided by the embodiments of the present invention is generally executed by the server 805. Correspondingly, the task document distribution device is generally set in the server 805. The task document distribution method provided by the embodiments of the present invention may also be executed by the terminal devices 801, 802, 803. Correspondingly, the task document distribution device may be set in the terminal devices 801, 802, 803.
[0157] It should be understood that Figure 8 the numbers of terminal devices, networks, and servers in
[0158] are merely illustrative. According to the implementation requirements, there may be any number of terminal devices, networks, and servers. Figure 9 is a schematic structural diagram of a computer system 900 of a terminal device suitable for implementing the embodiments of the present invention.Figure 9 The terminal device shown is merely an example and should not impose any limitation on the functions and scope of use of the embodiments of the present invention.
[0159] As Figure 9 shown, the computer system 900 includes a central processing unit (CPU) 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage section 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the system 900 are also stored. The CPU 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0160] The following components are connected to the I / O interface 905: an input section 906 including a keyboard, a mouse, etc.; an output section 907 including, for example, a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN card, a modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the I / O interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as needed so that a computer program read from it can be installed into the storage section 908 as needed.
[0161] Specifically, according to the embodiments disclosed in the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present invention include a computer program that includes a computer program carried on a computer-readable medium, and the computer program includes program codes for performing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 909 and / or installed from the removable medium 911. When the computer program is executed by the central processing unit (CPU) 901, the above-described functions defined in the system of the embodiments of the present invention are performed.
[0162] It should be noted that the computer-readable medium shown in the embodiments of the present invention can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the embodiments of the present invention, the computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in conjunction with an instruction execution system, apparatus, or device. In the embodiments of the present invention, the computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, in which computer-readable program code is carried. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable storage medium, and this computer-readable medium can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted by any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0163] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer programs according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagram can represent a module, a program segment, or a part of code, and the above module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks can occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks shown can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, and the combination of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0164] The modules involved in the embodiments of the present invention can be implemented in software or in hardware. The described modules can also be provided in a processor. For example, it can be described as: a processor includes a conversion module, a determination module, and an allocation module. In some cases, the names of these modules do not limit the modules themselves. For example, the conversion module can also be described as "the module that converts user behavior data into real-time active scores".
[0165] As another aspect, the embodiments of the present invention also provide a computer-readable medium. The computer-readable medium can be included in the device described in the above embodiments; or it can exist alone without being assembled into the device. The above computer-readable medium carries one or more programs. When the one or more programs are executed by the device, the device implements the following method: in response to receiving user behavior data of a target user, according to a pre-set activity model, convert the user behavior data into the real-time active score of the target user; in response to receiving a dispatch request, obtain the real-time active scores of each user, and use the users whose real-time active scores meet the pre-set allocation conditions as the receiving users; allocate the task document corresponding to the dispatch request to the receiving users.
[0166] According to the technical solution of the embodiments of the present invention, determining the real-time active score of a user based on the activity model and allocating task documents to the user according to the real-time active score can reasonably allocate task documents, improve the enthusiasm of users to process task documents, improve the processing efficiency of task documents, and avoid the backlog of task documents; training a random forest model through a training data set obtained by data sampling, and adjusting the parameters of the random forest model according to the comparison result of the first active user ratio and the second active user ratio to obtain an activity model can comprehensively consider various factors affecting user activity and improve the accuracy of the activity model; determining the average active score according to the leaf nodes of the random forest and comparing the average active score with the historical active score to obtain the first active user ratio can quickly and accurately obtain the first active user ratio; selecting features from historical behavior data according to the business scenario and training decision tree models corresponding to multiple business scenarios based on the data after feature selection can improve the accuracy of each decision tree model; regularly updating the real-time active data can improve the timeliness of the real-time active data and the rationality of task document allocation; informing the user of their own real-time active score and dispatching tasks to the user according to the user's receiving request can enable the user to understand their own activity situation, facilitate improving the enthusiasm of the user to process task documents, and contribute to the stable development of the platform; synchronizing the active score to each business system can enable each business system to more accurately operate doctor resources, more reasonably allocate task documents, and improve the processing efficiency of task documents.
[0167] The above specific embodiments do not constitute a limitation on the protection scope of the embodiments of the present invention. Those skilled in the art should understand that various modifications, combinations, sub - combinations and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principle of the embodiments of the present invention shall be included within the protection scope of the embodiments of the present invention.
Claims
1. A method for allocating task documents, characterized in that, it includes: In response to receiving the user behavior data of the target user, according to the pre-set activity model, convert the user behavior data into the real-time activity score of the target user; In response to receiving a dispatch request, obtain the real-time activity score of each user, and use the users whose real-time activity score meets the pre-set allocation conditions as the receiving users; Allocate the task document corresponding to the dispatch request to the receiving user.
2. The method according to claim 1, characterized in that, Before converting the user behavior data into the real-time activity score of the target user according to the pre-set activity model, the method further includes: Obtain the historical behavior data of each user, and perform multiple samplings on the historical behavior data to obtain multiple training data sets; Train multiple decision tree models based on the multiple training data sets, and use the multiple decision tree models as a random forest model; Repeat the following steps until the step stop condition is met: Determine the proportion of the first active users according to the random forest model, determine the proportion of the second active users according to the pre-set business rules, compare the proportion of the first active users and the proportion of the second active users, and adjust the parameters of the random forest model according to the comparison result; The step stop condition is: the proportion of the first active users is equal to the proportion of the second active users; Use the random forest model with adjusted parameters as the activity model.
3. The method according to claim 2, characterized in that, Determining the proportion of the first active users according to the random forest model includes: Determine the activity scores of the leaf nodes of the random forest model, calculate the average value of the scores of the leaf nodes to obtain the average activity score; Input the historical behavior data of each user into the random forest model to obtain the historical activity score of each user; Compare the historical activity score of each user with the average activity score, use the users whose historical activity score is greater than or equal to the average activity score as active users, and use the proportion of the active users among all users as the proportion of the first active users.
4. The method according to claim 2, characterized in that, Before performing multiple samplings on the historical behavior data to obtain multiple training data sets, the method further includes: According to the pre-set business scenarios, select features from the historical behavior data to obtain historical feature data corresponding to multiple business scenarios; Performing multiple samplings on the historical behavior data to obtain multiple training data sets includes: respectively sampling the historical feature data corresponding to multiple business scenarios to obtain training data sets corresponding to multiple business scenarios, and the training data sets corresponding to multiple business scenarios are used to train multiple decision tree models corresponding to multiple business scenarios.
5. The method according to claim 1, characterized in that, The method further includes: According to a preset timing task, obtain the new user behavior data of each user within a preset time range, and convert the new user behavior data into a new real-time activity score of the corresponding user according to the activity model; Update the real-time activity score according to the new real-time activity score.
6. The method according to claim 1, wherein, the method further includes: In response to receiving an activity query request of a target user, determine the real-time activity score of the target user, and return the real-time activity score to the target user; In response to receiving an order receiving request of a target user, determine a corresponding target task document from a preset task document set according to the real-time activity score of the target user, and assign the target task document to the target user.
7. The method according to claim 1, wherein, Before receiving a dispatch request, the method further includes: determining the target activity scores of multiple business systems according to the activity model, and synchronizing the target activity scores to the corresponding business systems; Obtain the real-time activity score of each user, and use the user whose real-time activity score meets the preset assignment condition as the order receiving user, including: determining the target business system corresponding to the dispatch request, and obtaining the real-time activity score of each user in the target business system; comparing the target activity score of the target business system with the real-time activity score of each user in the target business system, and using the user whose real-time activity score in the target business system is less than the target activity score as the order receiving user.
8. An apparatus for allocating task documents, wherein, it includes: A conversion module, configured to, in response to receiving user behavior data of a target user, convert the user behavior data into a real-time activity score of the target user according to a preset activity model; A determination module, configured to, in response to receiving a dispatch request, obtain the real-time activity score of each user, and use the user whose real-time activity score meets the preset assignment condition as the order receiving user; An allocation module, configured to allocate the task document corresponding to the dispatch request to the order receiving user.
9. An electronic device, wherein, it includes: One or more processors; A storage device, configured to store one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1-7.
10. A computer-readable medium, on which a computer program is stored, wherein, the program, when executed by a processor, implements the method according to any one of claims 1-7.