Event stream distribution method, event stream distribution device and electronic equipment

By calculating the priority of the event stream and the user's event stream queue, the tasks to be processed are intelligently allocated, which solves the problems of resource waste and unfair allocation caused by manual specification in the existing technology, and achieves fairness and efficiency in task allocation.

CN111582678BActive Publication Date: 2024-09-17PINGAN INT SMART CITY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010330956.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-04-24
Publication Date
2024-09-17
Estimated Expiration
2040-04-24

AI Technical Summary

Technical Problem

The allocation of tasks to be processed in the existing technology still relies on manual designation, resulting in resource waste and unfair or unbalanced allocation.

Method used

By obtaining the event stream collection, calculate the priority of the event stream, and allocate tasks in order of priority based on the user's event stream queue and preset filter conditions, ensuring that each user processes at most one event stream in each round of allocation until the event The stream collection is empty.

Benefits of technology

It realizes the intelligent allocation of tasks to be processed, improves allocation efficiency, ensures fairness and balance in task allocation, and reduces the waste of human resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111582678B
    Figure CN111582678B
Patent Text Reader

Abstract

The present application belongs to the field of artificial intelligence technology, and discloses an event stream allocation method, device and electronic device, wherein the method includes: obtaining an event stream set containing more than one event stream to be allocated; calculating the priority of each event stream to be allocated according to the attribute information of each event stream to be allocated; respectively obtaining the event stream queue of each user; filtering the users corresponding to each event stream queue based on the preset filtering conditions to obtain the user queue; according to the priority of each event stream to be allocated, in order from high to low, the event stream to be allocated is allocated to the users in the user queue, and the event stream set is updated after the current round of allocation is completed; if the event stream set is not empty, then returning to execute the step of respectively obtaining the event stream queue of each user and subsequent steps until the event stream set is empty. This scheme can realize the intelligent and automatic allocation of event streams and ensure fair allocation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of artificial intelligence technology, and in particular, relates to an event stream distribution method, an event stream distribution device, an electronic device, and a computer-readable storage medium. Background Art

[0002] Currently, many units / institutions have realized online office work. For example, pending tasks can be assigned to each employee user through an online platform. However, although the above-mentioned pending task assignment process has been digitized, the specific assignment objects of the pending tasks are still manually designated by the assigning personnel. For example, when the court conducts case assignment online (referring to the assignment of filed cases to the corresponding professional court judges), although the case assignment process has been digitized, the case assignment operation is essentially still an online manual operation based on the case filing review results, that is, manual case assignment, which not only consumes human resources, but also easily leads to unfair or unbalanced allocation. Therefore, current units / institutions are still unable to achieve intelligent allocation of pending tasks. Summary of the invention

[0003] The present application provides an event stream distribution method, an event stream distribution device, an electronic device and a computer-readable storage medium, which can realize the intelligent distribution of tasks to be processed and ensure the fairness and balance of the distribution of tasks to be processed to a certain extent.

[0004] In a first aspect, the present application provides an event stream allocation method, comprising:

[0005] Acquire an event stream set, wherein the event stream set includes more than one event stream to be assigned to the user;

[0006] Calculating the priority of each event flow to be allocated according to the attribute information of each event flow to be allocated in the above event flow set;

[0007] Obtaining the event stream queue of each user respectively, wherein the event stream queue is used to represent the event stream that the user is currently processing;

[0008] Filter the users corresponding to each event stream queue based on the preset filtering conditions to obtain a user queue;

[0009] According to the priority of each event flow to be allocated in the event flow set, the event flow to be allocated is allocated to the users in the user queue in descending order, wherein any event flow to be allocated is allocated only once, and one user in the user queue is allocated at most one event flow in this round of allocation, and the event flow set is updated after this round of allocation is completed;

[0010] If the updated event stream set is not empty, return to execute the above step of obtaining the event stream queue of each user and subsequent steps until the event stream set is empty.

[0011] In a second aspect, the present application provides an event stream distribution device, comprising:

[0012] An event stream set acquisition unit, used to acquire an event stream set, wherein the event stream set includes more than one event stream to be allocated to a user;

[0013] An event flow priority calculation unit, used to calculate the priority of each event flow to be allocated according to the attribute information of each event flow to be allocated in the above event flow set;

[0014] An event stream queue acquisition unit, used to respectively acquire the event stream queue of each user, wherein the event stream queue is used to represent the event stream currently being processed by the user;

[0015] A user screening unit, used to screen users corresponding to each event stream queue based on a preset screening condition to obtain a user queue;

[0016] An event stream allocation unit, configured to allocate the event streams to be allocated to the users in the user queue according to the priority of each event stream to be allocated in the event stream set, in descending order, wherein any event stream to be allocated is allocated only once, and one user in the user queue is allocated at most one event stream in this round of allocation, and the event stream set is updated after this round of allocation is completed;

[0017] Wherein, after the above-mentioned event stream allocation unit is run, if the updated above-mentioned event stream set is not empty, the operation of the above-mentioned event stream queue acquisition unit and subsequent units is triggered until the above-mentioned event stream set is empty.

[0018] In a third aspect, the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method of the first aspect when executing the computer program.

[0019] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method of the first aspect are implemented.

[0020] In a fifth aspect, the present application provides a computer program product, which includes a computer program. When the computer program is executed by one or more processors, it implements the steps of the method of the first aspect.

[0021] As can be seen from the above, in the scheme of the present application, firstly, an event stream set is obtained, wherein the event stream set contains more than one event stream to be allocated to the user, and then, according to the attribute information of each event stream to be allocated in the event stream set, the priority of each event stream to be allocated is calculated, and then the event stream queue of each user is obtained respectively, wherein the event stream queue is used to represent the event stream that the user is currently processing, and then the users corresponding to each event stream queue are filtered based on the preset filtering conditions to obtain the user queue, and finally, according to the priority of each event stream to be allocated in the event stream set, the event stream to be allocated is allocated to the users in the user queue in a descending order, wherein any event stream to be allocated is allocated only once, and one user in the user queue is allocated at most one event stream in this round of allocation process, and the event stream set is updated after the allocation is completed, and if the updated event stream set is not empty, then the step of obtaining the event stream queue of each user and the subsequent steps are returned to execute until the event stream set is empty. Through the scheme of the present application, on the one hand, the priority of the event stream to be allocated is considered according to the attributes of the event stream to be allocated, so that the event stream to be allocated with a high priority (i.e., more important) can be allocated earlier, thereby improving the allocation efficiency; on the other hand, when allocating, users will be screened based on the event stream queue of each user and the preset screening conditions, so as to avoid the situation where the number of event streams allocated to users is too large or too small, thereby ensuring fair allocation. It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0023] Figure 1 It is a schematic diagram of the implementation flow of the event stream allocation method provided in the embodiment of the present application;

[0024] Figure 2 is a structural block diagram of an event stream distribution device provided in an embodiment of the present application;

[0025] Figure 3 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0026] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0027] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or their collections. The terms "comprising", "including", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.

[0028] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0029] Embodiment 1

[0030] The following describes an event stream allocation method provided in an embodiment of the present application. Figure 1 , the event stream allocation method in the embodiment of the present application includes:

[0031] Step 101, obtaining an event stream set;

[0032] In an embodiment of the present application, the above-mentioned event stream allocation method can be performed on the event stream allocation platform of the unit / institution. The event stream allocation platform can receive manually entered event streams to be allocated, or the event stream allocation platform can also receive event streams to be allocated sent by other devices. The method for obtaining the event streams to be allocated is not limited here. It should be noted that the above-mentioned event streams to be allocated refer to the event streams to be allocated to the user. Optionally, the event stream allocation platform can periodically create the current event stream set based on the event streams to be allocated received within a certain period of time. For example, at 6 pm every day, all the event streams to be allocated received by the above-mentioned event stream allocation platform within the period of time (24 hours) from 6 pm the previous day to the current time are summarized, and the current event stream set is created based on all the summarized event streams to be allocated; the above-mentioned certain time can be set or changed according to the needs of the unit / institution, and is not limited here. Alternatively, after the previous allocation task is completed, the supervisor can manually start this allocation task (for example, input the allocation start instruction to the event stream allocation platform), and the event stream allocation platform can create this event stream set based on the event streams to be allocated received during the period from the start of the previous allocation task to the current moment. The timing of obtaining the event stream set is not limited here. It should be noted that the above event stream set should not be empty, so there should be at least one event stream to be allocated in the above event stream set; if the above event stream set is empty in the initial situation, it means that there is no event stream to be allocated this time, and there is no need to execute the allocation task.

[0033] Take the case division in the court as an example: every time there is a need for case division and the case division begins, the newly added cases in the court from the last case division to the current time are taken as the cases to be assigned, and a case collection is created based on them. In other words, the case collection contains the cases that have not been assigned during the current case division. In the above example, the cases to be assigned are the event flows to be assigned, and the case collection is the event flow collection.

[0034] Step 102, calculating the priority of each event flow to be allocated according to the attribute information of each event flow to be allocated in the above event flow set;

[0035] In an embodiment of the present application, the priority of each event stream to be allocated in the event stream set can be determined by reading the attribute information of the event stream to be allocated, wherein the above attribute information includes but is not limited to one or more of the following: the event stream type to which the event stream to be allocated belongs, the event stream size of the event stream to be allocated, the status of a specified flag bit in the event stream to be allocated, and the creation time of the event stream to be allocated.

[0036] Specifically, the above step 102 may be specifically performed as follows:

[0037] A1. Obtaining the event flow type to which the target event flow to be allocated belongs, and determining the primary priority of the target event flow to be allocated according to the event flow type to which the target event flow to be allocated belongs, wherein the target event flow to be allocated is any event flow to be allocated in the event flow set;

[0038] In an embodiment of the present application, the unit / institution can pre-set several event flow types, and each event flow type can correspond to a first-level priority. Then in this step, the event flow type to which the target event flow to be assigned belongs can be determined first, and the first-level priority of the above target event flow to be assigned can be determined according to the event flow type to which the above target event flow to be assigned belongs. Specifically, the event flow type to which the target event flow to be assigned belongs can be obtained in the following way: the unit / institution pre-sets a keyword library associated with each event flow type; the keywords carried by the content of the target event flow to be assigned are analyzed to determine the event flow type to which the target event flow to be assigned belongs, specifically: the keyword library to which each keyword in the target event flow to be assigned belongs is counted separately to obtain the occurrence ratio of the event flow type associated with each keyword library; according to the occurrence ratio of each event flow type, the event flow type to which the target event flow to be assigned belongs is determined. For example, there are 40 keywords in the content of the target event stream to be assigned, of which 29 keywords belong to the keyword library associated with event stream type A, 6 keywords belong to the keyword library associated with event stream type B, and 5 keywords belong to the keyword library associated with event stream type C. It can be determined that event stream type A has the highest appearance ratio, and the event stream type of the target event stream to be assigned is preliminarily determined to be A. Through the above process, the event stream allocation platform can automatically classify each event stream to be assigned, divide each event stream to be assigned into the corresponding event stream type, and thereby determine the first-level priority of each event stream to be assigned. It should be noted that in order to avoid classification errors, supervisors can conduct manual review before classifying the event stream to be assigned into the corresponding event stream type.

[0039] A2. Obtain the event stream size of the above-mentioned target event stream to be allocated and / or the status of the specified flag bit in the above-mentioned target event stream to be allocated, and determine the secondary priority of the above-mentioned target event stream to be allocated under the above-mentioned primary priority according to the event stream size of the above-mentioned target event stream to be allocated and / or the status of the specified flag bit in the above-mentioned target event stream to be allocated.

[0040] In the embodiment of the present application, the secondary priority of the target event stream to be allocated may be determined according to the event stream size of the target event stream to be allocated and / or the state of a specified flag bit in the target event stream to be allocated.

[0041] In one application scenario, a unit / institution can pre-set several event flow size intervals, each interval corresponding to an event flow size score; then, according to the event flow size interval into which the event flow size of the target event flow to be allocated falls, determine the event flow size score of the target event flow to be allocated. Among them, the event flow size of the target event flow to be allocated can be automatically evaluated in the following way: obtain the number of valid characters in the target event flow to be allocated; use the above number of valid characters as the event flow size of the target event flow to be allocated; or, it can also be evaluated in this way: extract the number of entity words in the target event flow to be allocated; use the above number of entity words as the event flow size of the target event flow to be allocated. Take the case division in the court as an example: if the more personnel entities, enterprise entities and amount entities are extracted from a case to be allocated, it is considered that the workload of the case to be allocated is greater (that is, the larger the event flow size); if the fewer personnel entities, enterprise entities and amount entities are extracted, the smaller the workload (that is, the larger the event flow size). Of course, there can also be other evaluation methods for event flow size and / or event flow size score, which are not limited here. It should be noted that after the automatic evaluation of the event stream size of the target event stream to be allocated is completed, it can also be manually reviewed by the supervisory user to avoid errors.

[0042] In another application scenario, the unit / institution can pre-specify one or more flags. When each event stream to be allocated is entered into the event stream allocation platform, the status of each event stream to be allocated on the specified flag can be set manually or intelligently according to the actual situation, wherein the status of each specified flag is 0 by default. Furthermore, in the embodiment of the present application, the concept of flag scoring can also be introduced to indicate the importance of the status represented by the flag, wherein when the status on the specified flag is 0, the flag score corresponding to the specified flag is 0; when the status on the specified flag is 1, the flag score corresponding to the specified flag is a preset non-zero value (for example, it can be 5, 10 or other values, which can be set specifically according to the importance of the flag). Based on this, the flag score of the target event stream to be allocated can be determined according to the status of each specified flag of the target event stream to be allocated. Take the case assignment in the court as an example: cases approved by the court leaders correspond to the first flag, major cases correspond to the second flag, and difficult cases correspond to the third flag. For a target case to be assigned that has been approved by the leader and is a major case, the first flag and the second flag are automatically assigned a value of 1, and the flag score of the target case to be assigned is 5 (flag score of the first flag) + 10 (flag score of the second flag) = 15.

[0043] Furthermore, the secondary priority of the target event stream to be allocated can be determined according to the secondary priority score of the target event stream to be allocated, which is specifically manifested as the higher the secondary priority score of the target event stream to be allocated, the higher the secondary priority corresponding to the target event stream to be allocated. In practical applications, if only the impact of the event stream size on the secondary priority is considered, the event stream size score of the target event stream to be allocated can be directly used as the secondary priority score of the target event stream to be allocated; if only the impact of the specified flag bit on the secondary priority is considered, the flag bit score of the target event stream to be allocated can be directly used as the secondary priority score of the target event stream to be allocated; if both the event stream size and the specified flag bit are considered on the secondary priority, the event stream size score and the flag bit score of the target event stream to be allocated can be summed, and the summed result can be used as the secondary priority score of the target event stream to be allocated, wherein the above sum can be a weighted sum, and the weights corresponding to the event stream size score and the flag bit score can be set according to the needs of the unit / institution, which is not limited here.

[0044] Optionally, in order to more accurately divide the priorities of the event flows to be allocated and avoid the situation where the priorities of multiple cases are the same and it is difficult to determine the allocation order, after the above step A2, the following is further included:

[0045] A3. Detect whether there are two or more event flows to be allocated that have the same first-level priority and the same second-level priority;

[0046] A4. If there are two or more event flows to be allocated that have the same first-level priority and the same second-level priority, then obtain the creation time of each event flow to be allocated in the target event flow set, wherein the target event flow set is a set consisting of two or more event flows to be allocated that have the same first-level priority and the same second-level priority;

[0047] A5 determines the three-level priority of each event flow to be allocated in the target event flow set according to the creation time of each event flow to be allocated in the target event flow set.

[0048] In the embodiment of the present application, under the second-level priority, a third-level priority can be extended to further distinguish the priorities of each event stream to be allocated in the target event stream set (that is, multiple event streams to be allocated belonging to the same first-level priority and the same second-level priority). The above three-level priorities are distinguished by creation time, which is specifically manifested as follows: in a target event stream set, the earlier the creation time of the event stream to be allocated, the higher the third-level priority, and the later the creation time of the event stream to be allocated, the lower the third-level priority. It should be noted that there can be multiple target event stream sets mentioned above. For example, assuming that there are event streams A, B and C to be assigned, and their first-level priorities are all level 3 and their second-level priorities are all level 1, then the event streams A, B and C to be assigned can constitute a target event stream set S1; assuming that there are event streams D and E to be assigned, and their first-level priorities are all level 2 and their second-level priorities are all level 2, then the event streams D and E to be assigned can constitute a target event stream set S2; for the target event stream set S1, the three-level priorities of the event streams A, B and C to be assigned are determined according to the creation time of the event streams A, B and C to be assigned respectively; for the target event stream set S2, the three-level priorities of the event streams D and E to be assigned are determined according to the creation time of the event streams D and E to be assigned respectively.

[0049] Step 103, respectively obtain the event stream queue of each user;

[0050] In an embodiment of the present application, the above-mentioned event stream queue is used to indicate the event stream that the user is currently processing, that is, to indicate the event stream to which the user is currently assigned. It should be noted that the event stream that the user has completed will not appear in the above-mentioned event stream queue. Optionally, the information contained in the user's event stream queue includes but is not limited to one or more of the following: the name of the event stream, the number of event streams, the creation time of the event stream, and the allocation time of the event stream.

[0051] Step 104, filtering users corresponding to each event stream queue based on a preset filtering condition to obtain a user queue;

[0052] In the embodiment of the present application, users can be screened based on preset screening conditions, specifically by detecting whether the user's event stream queue meets the preset screening conditions, and the retained users are added to the user queue. For example, the event stream to-be-processed volume of each user is first determined based on the event stream queue of each user, and users whose event stream to-be-processed volume is less than the event stream to-be-processed volume threshold are retained and added to the user queue, wherein the event stream to-be-processed volume is the number of event streams represented by the user's event stream queue.

[0053] Optionally, each user may correspond to a distribution coefficient, which can be set by the user himself and can be used to represent the user's ability to undertake event flows. Normally, the distribution coefficient of all users defaults to 1; when the user believes that his own ability is limited, the processing time is tight, or there are other limiting factors, the above distribution coefficient can be set to a value slightly less than 1, such as 0.8; when the user believes that the processing of events is sufficient and hopes to have more opportunities for additional training, the above distribution coefficient can be set to a value slightly greater than 1, such as 1.2. Therefore, the value range of the above distribution coefficient can be between (0, x), where x is a preset value greater than 1, for example, x can be 1.5, etc., which is not limited here. It should be noted that the adjustment of the above distribution coefficient can be adjusted by the user within the value range of the above distribution coefficient, and no specific limitation is made here for the case distribution coefficient of each user. Based on this, the above step 104 can include:

[0054] B1. Obtain the allocation coefficient of each user;

[0055] B2. Determine the user whose allocation coefficient is the default value as the first user and classify the user into the first user set, and determine the user whose allocation coefficient is not the default value as the second user and classify the user into the second user set;

[0056] B3. Calculate the first result corresponding to the first user set according to a preset first formula, and determine the first result corresponding to the first user set as the first result of each first user;

[0057] In the embodiment of the present application, the users included in the first user set are all first users, that is, users whose allocation coefficient is set to 1 by default; the users included in the second user set are all second users, that is, users whose allocation coefficient is not set to 1 by default. The above-mentioned preset first formula is specifically:

[0058]

[0059] The above SUP is the first result, which is used to indicate the maximum number of event streams that each first user can theoretically process; the above U i is the amount of event streams to be processed by the second user i, that is, the number of event streams currently being processed by the second user i, which can be obtained from the event stream queue of the second user i; the above C i is the allocation coefficient of the second user i; if U i / C i If the value of is a decimal, then For U i / C i Round down the result; if the value of Up / c is an integer, then The result is U i / Ci itself, wherein i=1, 2, ..., p, and p is the number of second users; max is used to indicate the maximum value, that is, the values ​​corresponding to p users are obtained. After the result of The maximum value of the results is taken as the first result SUP. For example, if there are three second users, among which the event stream to be processed of second user 1 is 5, and the allocation coefficient is 0.8, the corresponding result is The value is 6; the event stream to be processed by the second user 2 is 8, and the allocation coefficient is 0.9, corresponding to The value is 8; the event stream to be processed by the second user 3 is 7, and the allocation coefficient is 1.1, corresponding to The value is 6; then the obtained The maximum value 8 is determined as the first result SUP. It should be noted that since the first user is a user with a default allocation coefficient, all first users have basically the same ability to handle event streams, and the first result calculated is the first result corresponding to the first user set, that is, the maximum number of event streams that all first users can theoretically process is the above first result.

[0060] B4. Calculate the second result of each second user in the second user set according to a preset second formula;

[0061] In the embodiment of the present application, the above-mentioned preset second formula is specifically:

[0062]

[0063] Among them, the above INF i is the second result corresponding to the second user i, which is used to indicate the maximum number of event streams that the second user i can theoretically process; the above q is the number of first users; the above U q-mean is the average value of the event streams to be processed of q first users, which can be calculated based on the event stream queues of q first users; i is the allocation coefficient of the second user i, wherein i=1, 2, ..., p, and p is the number of second users; if U q-mean *C i If the value of is a decimal, then For U q-mean *C i The result is rounded down; if U q-mean *C i If the value of is an integer, then The result is U q-mean *C iFor example, if there are four first users, the average amount of event streams to be processed by these four first users is 6, that is, U q-mean is 6; there are three second users, among which the allocation coefficient of second user 1 is 0.8, then the second result INF1 corresponding to second user 1 is 4; the allocation coefficient of second user 2 is 0.9, then the second result INF1 corresponding to second user 1 is 5; the allocation coefficient of second user 3 is 1.1, then the second result INF1 corresponding to second user 1 is 6. It should be noted that since the second user is a user whose allocation coefficient is not the default value, for each second user, its ability to undertake event streams needs to be calculated according to its corresponding allocation coefficient, that is, the maximum number of event streams INF that each second user can theoretically process needs to be calculated separately through the above formula. Considering that the situations of different second users are different, for a second user, there is no maximum number of event streams that it can actually process.

[0064] B5. Based on the preset work log, determine the maximum number of event streams that the first user can actually process;

[0065] In the embodiment of the present application, the above-mentioned work log records the changes in the number of event streams processed by each user at a historical moment. Therefore, the peak value of the amount of event streams to be processed can be determined by querying the preset work log, that is, the maximum number of event streams that the first user can actually process. For example, assuming that there are three first users 1, 2, and 3, if it is found from the work log that the number of event streams processed by the first user 1 at a historical moment is at most 12; and the number of event streams processed by the first user 2 at a historical moment is at most 10; and the number of event streams processed by the first user 3 at a historical moment is at most 15, it can be determined that the maximum number of event streams that the above-mentioned first user can actually process is 15. Optionally, in order to achieve fair distribution, in this step, it is also possible to directly obtain the maximum number of event streams that all users (including the first user and the second user) can actually process, that is, the historical data of each second user is also taken into account to achieve an overall evaluation of all users.

[0066] B6. Detect whether the first result is less than or equal to the maximum number of event streams that the first user can actually process;

[0067] In the embodiment of the present application, the maximum number of event streams that the first user can actually process can be recorded as MAX, and different screening strategies can be selected to perform screening operations according to the quantitative relationship between the SUP and the MAX.

[0068] B7. If the first result is greater than or equal to the maximum number of event streams that the first user can actually process, users corresponding to each event stream queue are screened based on a preset first screening condition;

[0069] In the embodiment of the present application, if SUP≥MAX, the users corresponding to each event stream queue can be screened based on the preset first screening condition, wherein the first screening condition is related to the second result of each second user and the maximum number of event streams that the first user can actually process, and the first screening condition is specifically manifested as adding the users corresponding to the event stream queues that meet the following conditions to the user queue:

[0070]

[0071] In the above conditions, j is used to represent the first user; U j is the amount of event streams to be processed by the first user j, which can be determined based on the event stream queue of the first user j. j <MAX, that is, if the amount of event streams to be processed by the first user j is less than the maximum number of event streams that the first user can actually process, the first user j is retained and can be added to the user queue; correspondingly, if U j ≥MAX, that is, if the amount of event streams to be processed by the first user j is greater than or equal to the maximum number of event streams that the first user can actually process MAX, the first user j will be eliminated, where j=1, 2…, q, and the above q is the number of first users.

[0072] In the above conditions, i is used to represent the second user; U i is the amount of event streams to be processed by the second user i, which can be determined based on the event stream queue of the second user i. i <INF i , that is, if the event stream to be processed by the second user i is less than the second result INF of the second user i i , then the second user i is retained and can join the user team; correspondingly, if U i ≥INF i , that is, if the amount of event stream to be processed by the second user i is greater than or equal to the second result INF of the second user i i , then the second user i is eliminated, where i=1, 2…, p, and the above p is the number of second users.

[0073] B8. If the first result is smaller than the maximum number of event streams that the first user can actually process, users corresponding to each event stream queue are filtered based on a preset second filtering condition.

[0074] In the embodiment of the present application, if SUP<MAX, the users corresponding to each event stream queue can be filtered based on the preset second filtering condition, and the second filtering condition is related to the second result of each second user and the first result. The second filtering condition is specifically manifested as adding the users corresponding to the event stream queues that meet the following conditions to the user queue:

[0075]

[0076] In the above conditions, j is used to represent the first user; U j is the amount of event streams to be processed by the first user j, which can be determined based on the event stream queue of the first user j. j <SUP, that is, if the event stream to be processed of the first user j is less than the first result SUP, the first user j is retained and can be added to the user queue; correspondingly, if U j ≥SUP, that is, if the amount of event stream to be processed of the first user j is greater than or equal to the first result SUP, the first user j is eliminated, where j=1, 2…, q, and the above q is the number of first users.

[0077] In the above conditions, i is used to represent the second user; U i is the amount of event streams to be processed by the second user i, which can be determined based on the event stream queue of the second user i. i <INF i , that is, if the event stream to be processed by the second user i is less than the second result INF of the second user i i , then the second user i is retained and can join the user team; correspondingly, if U i ≥INF i , that is, if the amount of event stream to be processed by the second user i is greater than or equal to the second result INF of the second user i i , then the second user i is eliminated, where i=1, 2…, p, and the above p is the number of second users.

[0078] Optionally, when the first result is greater than or equal to the maximum number of event streams that the first user can actually process (SUP≥MAX), if the user queue cannot be filtered out according to the first screening condition (that is, the user queue filtered out according to the first screening condition is empty at this time), the second screening condition is used for filtering, that is, at this time, U j The condition of <MAX is relaxed to U j <SUP.

[0079] Optionally, when the first result is less than the maximum number of event streams that the first user can actually process (SUP<MAX), if the user queue cannot be screened out according to the second screening condition (that is, the user queue screened out according to the second screening condition is empty at this time), the first screening condition is used for screening again, that is, U j <SUP conditions are relaxed to U j <MAX.

[0080] Optionally, in some embodiments, certain specific types of event streams to be assigned need to be processed by corresponding specific types of users. For these specific types of event streams to be assigned, it is possible to first preliminarily screen out users who can process the specific types of event streams to be assigned, and then execute the above step 104 to perform a secondary screening on these users who can process the specific types of event streams to be assigned based on preset screening conditions.

[0081] Optionally, in some embodiments, if the user queue filtered according to the above filtering conditions is empty, that is, if there is no user corresponding to the event stream queue that meets the preset filtering conditions (including the above first filtering conditions and the above second filtering conditions), all users are directly added to the above user queue to avoid allocation failure of the event stream to be allocated.

[0082] Step 105, according to the priority of each event flow to be allocated in the event flow set, in descending order, the event flow to be allocated is allocated to the users in the user queue, and after this round of allocation is completed, the event flow set is updated;

[0083] In the embodiment of the present application, after the user queue is obtained, the current round of allocation can be started. During this round of allocation, the event streams to be allocated can be allocated to the users in the above user queue in the event stream set according to the priority of each event stream to be allocated from high to low. It should be noted that any event stream to be allocated is only allocated once, and one user in the above user queue is allocated at most one event stream during this round of allocation. Among them, the order in which users are allocated can be determined according to the order in which users are arranged in the above user queue, that is, in this round of allocation, users who are ranked higher in the user queue can be allocated to the event stream earlier, and users who are ranked lower in the user queue can be allocated to the event stream later. Specifically, the arrangement order of the users in the user queue may be random; or, it may be arranged in a preset manner, for example, based on the event stream queue of each user in the user queue, the event stream to-be-processed amount of each user in the user queue may be determined, wherein the event stream to-be-processed amount is the number of event streams represented by the event stream queue of the user, and then the users in the user queue are sorted in order from small to large according to the event stream to-be-processed amount. In this sorting method, users with fewer event streams to-be-processed are ranked higher in the user queue and can be assigned to event streams earlier.

[0084] Optionally, after sorting the users in the user queue based on the amount of event streams to be processed of each user, it is also possible to detect whether there are two or more users with the same amount of event streams to be processed in the above user queue. At this time, if there are two or more users with the same amount of event streams to be processed, the new amount of event streams of each user in the target user set is obtained, wherein the above target user set is a set consisting of two or more users with the same amount of event streams to be processed, and the above new amount of event streams is the number of event streams assigned to the user within the preset time period, and the users in the above target user set are sorted again according to the order of the above new amount of event streams from small to large. It should be noted that the event streams assigned to the user within the preset time period include the event streams assigned to the user and processed within the preset time period. For example, if user 1 is assigned 10 event streams within five days, and 2 of the 10 event streams have been processed, then the new amount of event streams for this user within five days is still 10, not 8.

[0085] Take the case distribution in the court as an example: in the user queue, the number of cases to be processed (that is, the number of event streams to be processed) of users 1, 2, and 3 is 5, the number of cases to be processed of user 4 is 8, and the number of cases to be processed of user 5 is 4. Since user 5 has the smallest number of cases to be processed, user 5 is assigned cases first. Subsequently, for users 1, 2, and 3, since their case volumes are the same, it is necessary to further obtain their new case volumes (that is, the new event stream volumes, for example, the number of cases assigned within 5 days). Assuming that the number of new cases of user 1 is 0, the number of new cases of user 2 is 1, and the number of new cases of user 3 is 1, it can be seen that the number of new cases of user 1 is the smallest, and user 1 is assigned cases first. Then, since the number of new cases of user 2 and user 3 is the same, the two are randomly sorted, either user 2 first and then user 3, or user 3 first and then user 2. Finally, user 4 has the largest number of cases to be processed. That is, the order of users 1, 2, 3, 4 and 5 in the user queue can be: user 5-user 1-user 2-user 3-user 4; or, it can also be user 5-user 1-user 3-user 2-user 4. At this time, the case allocation result can be given in the form of a "case-user" relationship pair according to the user order in the user queue. In this way, in the above example, user 5 will be allocated an event flow to be allocated first, and user 4 will be allocated an event flow to be allocated at the latest, and the allocation order of each event flow to be allocated is determined based on the priority of the event flow; that is, the priority of the event flow allocated to user 5 is higher than the priority of the event flow allocated to users 1, 2, 3, 4, and the priority of the event flow allocated to user 1 is higher than the priority of the event flow allocated to users 2, 3, 4, and so on, which will not be repeated here.

[0086] It should be noted that once an event stream to be allocated is allocated to a user, the event stream to be allocated has been allocated, and the allocated event stream needs to be removed from the above event stream set to update the above event stream set.

[0087] Step 106: If the updated event stream set is not empty, return to execute the step of obtaining the event stream queue of each user and subsequent steps, until the event stream set is empty.

[0088] In the embodiment of the present application, after the current round of allocation is completed and the event stream set has been updated, it is again detected whether the number of event streams to be allocated in the above event stream set is 0, that is, it is detected whether the above event stream set is empty; if it is not empty, it indicates that the event streams to be allocated received by the event stream allocation platform have not been fully allocated. At this time, it is necessary to return to execute step 103 and subsequent steps, that is, to execute the operation of obtaining the event stream queue of each user respectively (because there are users who have been allocated cases in this allocation process, the event stream queues of these users will be changed) and subsequent operations again, that is, to perform the next round of allocation until the above event stream set is empty and stop, which means that the event stream allocation platform has completed the allocation of the event streams to be allocated received this time. After the event stream allocation is completed, each user can log in to their corresponding user account through their respective clients to view their allocated event streams.

[0089] In fact, when allocating the event stream to be allocated, there may be the following application scenarios:

[0090] The first application scenario is: before the current round of allocation begins, the number of users in the user queue is greater than the number of event streams to be allocated in the event stream set. At this time, due to the insufficient number of event streams to be allocated in the event stream set, some users in the user queue will not be allocated event streams. In this case, after the current round of allocation is completed, the event stream set will be empty, and this allocation is completed;

[0091] The second application scenario is: before the current round of allocation begins, the number of users in the user queue is equal to the number of event streams to be allocated in the event stream set. At this time, the event streams to be allocated in the event stream set just form a one-to-one correspondence with the users in the user queue. Each user will be allocated an event stream, and there will be no redundant event streams to be allocated. In this case, after the current round of allocation is completed, the event stream set will also be empty, and this allocation is completed;

[0092] The third application scenario is: before the current round of allocation begins, the number of users in the user queue is less than the number of event streams to be allocated in the event stream set. At this time, due to the insufficient number of users in the user queue, after each user in the user queue is allocated to an event stream, there will still be event streams to be allocated that have not been allocated. In this case, after the current round of allocation is completed, the event stream set will not be empty. At this time, it is necessary to return to execute step 103 and subsequent steps to perform the next round of allocation operations until the event stream set is empty and the current allocation is completed.

[0093] As can be seen from the above, in the embodiment of the present application, on the one hand, the priority of each event stream to be allocated is determined by the attributes of each event stream to be allocated, so that high-priority (i.e., more important) event streams to be allocated can be allocated earlier, thereby improving allocation efficiency; on the other hand, during allocation, users will be screened based on the event stream queues of each user and preset screening conditions to avoid the situation where the number of event streams allocated to users is too large or too small, thereby ensuring fair allocation. Furthermore, users can also set their own allocation coefficients, which are used to represent their own ability to undertake event streams, and based on the allocation coefficients of each user, flexible screening of users who can undertake event streams is achieved. Through the scheme of the present application, intelligent and flexible allocation of event streams is achieved.

[0094] It should be emphasized that the above-disclosed event streams can come from events stored on the blockchain. The blockchain referred to in the present invention is a new application model of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. The blockchain can include the blockchain underlying platform, the platform product service layer, and the application service layer.

[0095] Embodiment 2

[0096] Embodiment 2 of the present application provides an event stream distribution device, which can be integrated into an electronic device, such as Figure 2 As shown, the event stream distribution device 200 in the embodiment of the present application includes:

[0097] An event stream set acquisition unit 201 is used to acquire an event stream set, wherein the event stream set includes more than one event stream to be allocated to a user;

[0098] The event flow priority calculation unit 202 is used to calculate the priority of each event flow to be allocated according to the attribute information of each event flow to be allocated in the above event flow set;

[0099] The event stream queue acquisition unit 203 is used to respectively acquire the event stream queue of each user, wherein the event stream queue is used to represent the event stream that the user is currently processing;

[0100] A user screening unit 204, configured to screen users corresponding to each event stream queue based on a preset screening condition to obtain a user queue;

[0101] The event stream allocation unit 205 is used to allocate the event streams to be allocated to the users in the user queue in descending order according to the priorities of the event streams to be allocated in the event stream set, wherein any event stream to be allocated is allocated only once, and one user in the user queue is allocated at most one event stream in this round of allocation, and the event stream set is updated after this round of allocation is completed;

[0102] After the event stream allocation unit 205 is executed, if the updated event stream set is not empty, the event stream queue acquisition unit 203 and subsequent units are triggered to execute until the event stream set is empty.

[0103] Optionally, the event stream priority calculation unit 202 includes:

[0104] A first-level priority determination subunit is used to obtain the event flow type to which the target event flow to be allocated belongs, and determine the first-level priority of the target event flow to be allocated according to the event flow type to which the target event flow to be allocated belongs, wherein the target event flow to be allocated is any event flow to be allocated in the event flow set;

[0105] The secondary priority determination subunit is used to obtain the event stream size of the above-mentioned target event stream to be allocated and / or the status of the specified flag bit in the above-mentioned target event stream to be allocated, and determine the secondary priority of the above-mentioned target event stream to be allocated under the above-mentioned first-level priority according to the event stream size of the above-mentioned target event stream to be allocated and / or the status of the specified flag bit in the above-mentioned target event stream to be allocated.

[0106] Optionally, the event stream priority calculation unit 202 further includes:

[0107] The same priority detection subunit is used to detect whether there are two or more event flows to be allocated that belong to the same first-level priority and the same second-level priority;

[0108] A creation time acquisition subunit is used to acquire the creation time of each event stream to be allocated in the target event stream set if there are more than two event streams to be allocated that belong to the same first-level priority and the same second-level priority, wherein the above target event stream set is a set consisting of more than two event streams to be allocated that belong to the same first-level priority and the same second-level priority;

[0109] The three-level priority determination subunit is used to determine the three-level priority of each event flow to be allocated in the above target event flow set according to the creation time of each event flow to be allocated in the above target event flow set.

[0110] Optionally, the user screening unit 204 includes:

[0111] The allocation coefficient acquisition subunit is used to obtain the allocation coefficient of each user;

[0112] A user set division subunit, configured to determine users whose allocation coefficients are default values ​​as first users and divide them into a first user set, and determine users whose allocation coefficients are not default values ​​as second users and divide them into a second user set;

[0113] A first result calculation subunit is used to calculate the first result corresponding to the first user set according to a preset first formula, and determine the first result corresponding to the first user set as the first result of each first user, wherein the first result is used to represent the maximum number of event streams that the first user can theoretically process;

[0114] A second result calculation subunit, used to calculate the second result of each second user in the second user set according to a preset second formula, wherein the second result is used to represent the maximum number of event streams that the associated second user can theoretically process;

[0115] An actual value determination subunit, used to determine the maximum number of event streams that the first user can actually process based on a preset work log;

[0116] A numerical relationship detection subunit, used to detect whether the first result is greater than or equal to the maximum number of event streams that the first user can actually process;

[0117] A first screening subunit is configured to screen users corresponding to each event stream queue based on the first screening condition if the first result is greater than or equal to the maximum number of event streams that the first user can actually process;

[0118] The second screening subunit is used to screen users corresponding to each event stream queue based on the second screening condition if the first result is less than the maximum number of event streams that the first user can actually process.

[0119] Optionally, the event stream distribution device 200 further includes:

[0120] An event stream to-be-processed amount determining unit, configured to determine the event stream to-be-processed amount of each user in the user queue based on the event stream queue of each user in the user queue, wherein the event stream to-be-processed amount is the number of event streams indicated by the event stream queue of the user;

[0121] The user sorting unit is used to sort the users in the above user queue according to the order of the amount of the above event stream to be processed from small to large.

[0122] Optionally, the event stream distribution device 200 further includes:

[0123] A user detection unit is used to detect whether there are two or more users with the same amount of event streams to be processed in the user queue;

[0124] An event stream new amount acquisition unit is used to acquire the event stream new amount of each user in a target user set if there are two or more users with the same event stream to be processed amount, wherein the target user set is a set consisting of two or more users with the same event stream to be processed amount, and the event stream new amount is the number of event streams that have been allocated to the user within a preset time period;

[0125] The user secondary sorting unit is used to perform secondary sorting on the users in the user target user set according to the order of the new addition amount of the event stream from small to large.

[0126] Optionally, the user screening unit 204 is further configured to, after screening users corresponding to each event stream queue based on preset screening conditions, add all users to the user queue if there is no user corresponding to the event stream queue that meets the preset screening conditions.

[0127] As can be seen from the above, in the embodiment of the present application, on the one hand, the priority of each event stream to be allocated is determined by the attributes of each event stream to be allocated, so that high-priority (i.e., more important) event streams to be allocated can be allocated earlier, thereby improving allocation efficiency; on the other hand, during allocation, users will be screened based on the event stream queues of each user and preset screening conditions to avoid the situation where the number of event streams allocated to users is too large or too small, thereby ensuring fair allocation. Furthermore, users can also set their own allocation coefficients, which are used to represent their own ability to undertake event streams, and based on the allocation coefficients of each user, flexible screening of users who can undertake event streams is achieved. Through the scheme of the present application, intelligent and flexible allocation of event streams is achieved.

[0128] Embodiment 3

[0129] Embodiment 3 of the present application provides an electronic device. Figure 3 The electronic device 3 in the embodiment of the present application includes: a memory 301, one or more processors 302 ( Figure 3Only one is shown in the figure) and a computer program stored in the memory 301 and executable on the processor. Among them: the memory 301 is used to store software programs and modules, and the processor 302 executes various functional applications and data processing by running the software programs and units stored in the memory 301 to obtain the resources corresponding to the above-mentioned preset events. Specifically, the processor 302 implements the following steps when running the above-mentioned computer program stored in the memory 301:

[0130] Acquire an event stream set, wherein the event stream set includes more than one event stream to be assigned to the user;

[0131] Calculating the priority of each event flow to be allocated according to the attribute information of each event flow to be allocated in the above event flow set;

[0132] Obtaining the event stream queue of each user respectively, wherein the event stream queue is used to represent the event stream that the user is currently processing;

[0133] Filter the users corresponding to each event stream queue based on the preset filtering conditions to obtain a user queue;

[0134] According to the priority of each event flow to be allocated in the event flow set, the event flow to be allocated is allocated to the users in the user queue in descending order, wherein any event flow to be allocated is allocated only once, and one user in the user queue is allocated at most one event flow in this round of allocation, and the event flow set is updated after this round of allocation is completed;

[0135] If the updated event stream set is not empty, return to execute the above step of obtaining the event stream queue of each user and subsequent steps until the event stream set is empty.

[0136] Assuming that the above is the first possible implementation mode, in a second possible implementation mode provided on the basis of the first possible implementation mode, the above-mentioned calculation of the priority of each event flow to be allocated according to the attribute information of each event flow to be allocated in the above-mentioned event flow set includes:

[0137] Obtaining the event flow type to which the target event flow to be allocated belongs, and determining the first-level priority of the target event flow to be allocated according to the event flow type to which the target event flow to be allocated belongs, wherein the target event flow to be allocated is any event flow to be allocated in the event flow set;

[0138] Obtain the event stream size of the above-mentioned target event stream to be allocated and / or the status of the specified flag bit in the above-mentioned target event stream to be allocated, and determine the secondary priority of the above-mentioned target event stream to be allocated under the above-mentioned first-level priority according to the event stream size of the above-mentioned target event stream to be allocated and / or the status of the specified flag bit in the above-mentioned target event stream to be allocated.

[0139] In a third possible implementation manner provided on the basis of the second possible implementation manner, the step of calculating the priority of each event flow to be allocated according to the attribute information of each event flow to be allocated in the event flow set further includes:

[0140] Detect whether there are two or more event flows to be allocated that belong to the same first-level priority and the same second-level priority;

[0141] If there are more than two event flows to be allocated that have the same first-level priority and the same second-level priority, then the creation time of each event flow to be allocated in the target event flow set is obtained, wherein the target event flow set is a set consisting of more than two event flows to be allocated that have the same first-level priority and the same second-level priority;

[0142] According to the creation time of each event stream to be allocated in the target event stream set, the three-level priority of each event stream to be allocated in the target event stream set is determined.

[0143] In a fourth possible implementation provided based on the above possible implementation, the above preset filtering condition includes a first filtering condition and a second filtering condition, and the above-mentioned filtering of users corresponding to each event stream queue based on the preset filtering condition to obtain a user queue includes:

[0144] Get the allocation coefficient of each user;

[0145] Determine a user whose allocation coefficient is a default value as a first user and divide the user into a first user set;

[0146] According to a preset first formula, the first result corresponding to the first user set is calculated, and the first result corresponding to the first user set is determined as the first result of each first user, wherein the first result is used to represent the maximum number of event streams that the first user can theoretically process;

[0147] Based on the preset work log, determine the maximum number of event streams that the first user can actually process;

[0148] Detecting whether the first result is greater than or equal to the maximum number of event streams that the first user can actually process;

[0149] If the first result is greater than or equal to the maximum number of event streams that the first user can actually process, users corresponding to each event stream queue are screened based on a preset first screening condition;

[0150] If the first result is less than the maximum number of event streams that the first user can actually process, users corresponding to each event stream queue are filtered based on a preset second filtering condition.

[0151] In a fifth possible implementation provided on the basis of the first possible implementation, or the second possible implementation, or the third possible implementation, or the fourth possible implementation, before allocating the event streams to be allocated to the users in the user queue in descending order according to the priorities of the event streams to be allocated in the event stream set, the processor 302 further implements the following steps when running the computer program stored in the memory 301:

[0152] Based on the event stream queue of each user in the user queue, determine the event stream to-be-processed amount of each user in the user queue, wherein the event stream to-be-processed amount is the number of event streams indicated by the event stream queue of the user;

[0153] The users in the user queue are sorted according to the order of the amount of event stream to be processed from small to large.

[0154] In a sixth possible implementation provided on the basis of the fifth possible implementation, after sorting the users in the user queue according to the order of the amount of event stream to be processed from small to large, the processor 302 further implements the following steps when running the computer program stored in the memory 301:

[0155] Detect whether there are two or more users in the user queue with the same amount of event streams to be processed;

[0156] If there are two or more users with the same amount of event streams to be processed, then the newly added amount of event streams of each user in the target user set is obtained, wherein the target user set is a set consisting of two or more users with the same amount of event streams to be processed, and the newly added amount of event streams is the number of event streams that have been allocated to the user within a preset time period;

[0157] According to the order of the new amount of the event stream from small to large, the users in the user target user set are sorted again.

[0158] In a seventh possible implementation provided on the basis of the first possible implementation, or the second possible implementation, or the third possible implementation, or the fourth possible implementation, after filtering the users corresponding to each event stream queue based on the preset filtering condition to obtain the user queue, the processor 302 further implements the following steps when running the computer program stored in the memory 301:

[0159] If there is no user corresponding to the event stream queue that meets the preset filtering conditions, all users are added to the above user queue.

[0160] It should be understood that in the embodiment of the present application, the processor 302 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0161] The memory 301 may include a read-only memory and a random access memory, and provide instructions and data to the processor 302. A part or all of the memory 301 may also include a non-volatile random access memory. For example, the memory 301 may also store information of a device category.

[0162] As can be seen from the above, in the embodiment of the present application, on the one hand, the priority of each event stream to be allocated is determined by the attributes of each event stream to be allocated, so that high-priority (i.e., more important) event streams to be allocated can be allocated earlier, thereby improving allocation efficiency; on the other hand, during allocation, users will be screened based on the event stream queues of each user and preset screening conditions to avoid the situation where the number of event streams allocated to users is too large or too small, thereby ensuring fair allocation. Furthermore, users can also set their own allocation coefficients, which are used to represent their own ability to undertake event streams, and based on the allocation coefficients of each user, flexible screening of users who can undertake event streams is achieved. Through the scheme of the present application, intelligent and flexible allocation of event streams is achieved.

[0163] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the above-mentioned device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0164] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0165] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of external device software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0166] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the system embodiments described above are merely schematic. For example, the division of the above modules or units is only a logical function division. There may be other division methods 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 interfaces, devices or units, which can be electrical, mechanical or other forms.

[0167] The units described above 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.

[0168] If the above-mentioned integrated unit 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 present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the associated hardware through a computer program. The above-mentioned computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the above-mentioned computer program includes computer program code, and the above-mentioned computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The above-mentioned computer-readable storage medium may include: any entity or device capable of carrying the above-mentioned computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer-readable memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the above-mentioned computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable storage media does not include electrical carrier signals and telecommunication signals.

[0169] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. An event stream distribution method, characterized in that: include: Acquire an event stream set, wherein the event stream set includes more than one event stream to be allocated to the user; Calculating the priority of each event flow to be allocated according to the attribute information of each event flow to be allocated in the event flow set; Obtaining the event stream queue of each user respectively, wherein the event stream queue is used to represent the event stream that the user is currently processing; Filter the users corresponding to each event stream queue based on the preset filtering conditions to obtain a user queue; According to the priorities of the event flows to be allocated in the event flow set, the event flows to be allocated are allocated to the users in the user queue in descending order, wherein any event flow to be allocated is allocated only once, and one user in the user queue is allocated at most one event flow in this round of allocation, and the event flow set is updated after this round of allocation is completed; If the updated event stream set is not empty, returning to execute the step of respectively obtaining the event stream queue of each user and subsequent steps until the event stream set is empty; The preset filtering condition includes a first filtering condition and a second filtering condition, and filtering the users corresponding to each event stream queue based on the preset filtering condition to obtain a user queue includes: Get the allocation coefficient of each user; Determine a user whose allocation coefficient is a default value as a first user and divide the user into a first user set; According to a preset first formula, a first result corresponding to the first user set is calculated, and the first result corresponding to the first user set is determined as a first result of each first user, wherein the first result is used to represent a maximum number of event streams that the first user can theoretically process; Based on the preset work log, determine the maximum number of event streams that the first user can actually process; Detecting whether the first result is greater than or equal to a maximum number of event streams that the first user can actually process; If the first result is greater than or equal to the maximum number of event streams that the first user can actually process, filtering users corresponding to each event stream queue based on the first filtering condition; If the first result is less than the maximum number of event streams that the first user can actually process, users corresponding to each event stream queue are filtered based on the second filtering condition.

2. The event stream distribution method according to claim 1, characterized in that: The calculating the priority of each event flow to be allocated according to the attribute information of each event flow to be allocated in the event flow set includes: Acquire the event flow type to which the target event flow to be allocated belongs, and determine the first-level priority of the target event flow to be allocated according to the event flow type to which the target event flow to be allocated belongs, wherein the target event flow to be allocated is any event flow to be allocated in the event flow set; Obtain the event stream size of the target event stream to be allocated and / or the status of a specified flag bit in the target event stream to be allocated, and determine the secondary priority of the target event stream to be allocated under the primary priority based on the event stream size of the target event stream to be allocated and / or the status of a specified flag bit in the target event stream to be allocated.

3. The event stream distribution method according to claim 2, characterized in that: The step of calculating the priority of each event flow to be allocated according to the attribute information of each event flow to be allocated in the event flow set further includes: Detect whether there are two or more event flows to be allocated that belong to the same first-level priority and the same second-level priority; If there are more than two event flows to be allocated that have the same first-level priority and the same second-level priority, then the creation time of each event flow to be allocated in the target event flow set is obtained, wherein the target event flow set is a set consisting of more than two event flows to be allocated that have the same first-level priority and the same second-level priority; According to the creation time of each event stream to be allocated in the target event stream set, the three-level priority of each event stream to be allocated in the target event stream set is determined.

4. The event stream distribution method according to any one of claims 1 to 3, characterized in that: Before allocating the event streams to be allocated to the users in the user queue in descending order according to the priorities of the event streams to be allocated in the event stream set, the event stream allocation method further includes: Based on the event stream queue of each user in the user queue, determine the event stream to-be-processed amount of each user in the user queue, wherein the event stream to-be-processed amount is the number of event streams represented by the event stream queue of the user; According to the amount of event streams to be processed of each user in the user queue, the users in the user queue are sorted in order from least to most.

5. The event stream distribution method according to claim 4, characterized in that: After sorting the users in the user queue in order from least to most according to the amount of event streams to be processed of each user in the user queue, the event stream allocation method further includes: Detecting whether there are two or more users in the user queue with the same amount of event streams to be processed; If there are two or more users with the same amount of event streams to be processed, then the newly added amount of event streams of each user in the target user set is obtained, wherein the target user set is a set consisting of two or more users with the same amount of event streams to be processed, and the newly added amount of event streams is the number of event streams allocated to the user within a preset time period; According to the newly added amount of event streams of each user in the target user set, the users in the target user set are sorted twice in order from least to most.

6. The event stream distribution method according to any one of claims 1 to 3, characterized in that: After filtering the users corresponding to each event stream queue based on the preset filtering condition to obtain the user queue, the event stream allocation method further includes: If there is no user corresponding to the event stream queue that meets the preset screening condition, all users are added to the user queue.

7. An event stream distribution device, characterized in that: include: An event stream set acquisition unit, used to acquire an event stream set, wherein the event stream set includes more than one event stream to be allocated to a user; An event flow priority calculation unit, used to calculate the priority of each event flow to be allocated according to the attribute information of each event flow to be allocated in the event flow set; An event stream queue acquisition unit, used to respectively acquire the event stream queue of each user, wherein the event stream queue is used to represent the event stream currently being processed by the user; A user screening unit, used to screen users corresponding to each event stream queue based on a preset screening condition to obtain a user queue; An event stream allocation unit, configured to allocate the event streams to be allocated to the users in the user queue in descending order according to the priorities of the event streams to be allocated in the event stream set, wherein any event stream to be allocated is allocated only once, and one user in the user queue is allocated at most one event stream in this round of allocation, and the event stream set is updated after this round of allocation is completed; Wherein, after the event stream allocation unit is run, if the updated event stream set is not empty, the event stream queue acquisition unit and subsequent units are triggered to run until the event stream set is empty; Wherein, the user screening unit includes: The allocation coefficient acquisition subunit is used to obtain the allocation coefficient of each user; A user set division subunit, configured to determine users whose allocation coefficients are default values ​​as first users and divide them into a first user set, and determine users whose allocation coefficients are not default values ​​as second users and divide them into a second user set; A first result calculation subunit is used to calculate the first result corresponding to the first user set according to a preset first formula, and determine the first result corresponding to the first user set as the first result of each first user, wherein the first result is used to represent the maximum number of event streams that the first user can theoretically process; A second result calculation subunit, used to calculate the second result of each second user in the second user set according to a preset second formula, wherein the second result is used to represent the maximum number of event streams that the associated second user can theoretically process; An actual value determination subunit, used to determine the maximum number of event streams that the first user can actually process based on a preset work log; a numerical relationship detection subunit, configured to detect whether the first result is greater than or equal to a maximum number of event streams that the first user can actually process; A first screening subunit is configured to screen users corresponding to each event stream queue based on a first screening condition if the first result is greater than or equal to a maximum number of event streams that the first user can actually process; The second screening subunit is used to screen users corresponding to each event stream queue based on a second screening condition if the first result is less than the maximum number of event streams that the first user can actually process.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.