Movatterモバイル変換


[0]ホーム

URL:


CN112650748A - Business clue distribution method and device, electronic equipment and readable storage medium - Google Patents

Business clue distribution method and device, electronic equipment and readable storage medium
Download PDF

Info

Publication number
CN112650748A
CN112650748ACN201910954647.0ACN201910954647ACN112650748ACN 112650748 ACN112650748 ACN 112650748ACN 201910954647 ACN201910954647 ACN 201910954647ACN 112650748 ACN112650748 ACN 112650748A
Authority
CN
China
Prior art keywords
service
party
clue
executive
business
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910954647.0A
Other languages
Chinese (zh)
Inventor
高朝
兰毅宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Dasou Vehicle Software Technology Co Ltd
Original Assignee
Zhejiang Dasou Vehicle Software Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Dasou Vehicle Software Technology Co LtdfiledCriticalZhejiang Dasou Vehicle Software Technology Co Ltd
Priority to CN201910954647.0ApriorityCriticalpatent/CN112650748A/en
Publication of CN112650748ApublicationCriticalpatent/CN112650748A/en
Pendinglegal-statusCriticalCurrent

Links

Images

Classifications

Landscapes

Abstract

The application relates to a service clue distribution method, a device, electronic equipment and a readable storage medium, which are applied to a server side with a cache database; the cache database stores service clue distribution records corresponding to service execution parties; the service clue distribution record comprises the corresponding relation of the service clue category, the service executive party identification and the distributed service clue quantity; the method comprises the following steps: creating an allocable service executive set based on allocable service executive identifications corresponding to target service clue categories of the target service clue; creating an allocated service executive set based on the service executive identification corresponding to the target service clue category and inquired from the cache database; matching the assignable service executing party set with the assigned service executing party set to determine whether a target service executing party identifier which belongs to the assignable service executing party set and does not belong to the assigned service executing party set exists; and allocating the target business clues based on the matching results.

Description

Business clue distribution method and device, electronic equipment and readable storage medium
Technical Field
One or more embodiments of the present application relate to the field of computer application technologies, and in particular, to a method, an apparatus, an electronic device, and a readable storage medium for service thread allocation.
Background
The business clue can be regarded as a carrier of the intention of the user's demand, such as: the business clue may indicate the user's car buying intention or car repairing intention, etc. If the business clues can be reasonably utilized, a great economic value can be generated, and taking the user car purchasing intention clue as an example, each car seller wants to obtain the user car purchasing intention clues as much as possible, but the car sellers who have fewer customers and can provide the week-to-week service may tend to purchase the cars. Therefore, in practical applications, how to fairly distribute the service cues without disputes has become an urgent problem to be solved.
Disclosure of Invention
The application provides a business clue distribution method which is applied to a server side; a cache database is deployed on the server; the cache database stores service clue distribution records corresponding to service execution parties; the service clue distribution record comprises the corresponding relation of the service clue category, the service executive party identification and the distributed service clue quantity; the method comprises the following steps:
acquiring assignable service executing party identifiers corresponding to target service clue categories of target service clues to be assigned, and creating assignable service executing party sets based on the acquired assignable service executing party identifiers;
inquiring a service executive party identifier corresponding to the target service clue category from the cache database, and creating an allocated service executive party set based on the inquired service executive party identifier;
matching the service executive party identifications in the allocable service executive party set and the allocated service executive party set to determine whether a target service executive party identification which belongs to the allocable service executive party set and does not belong to the allocated service executive party set exists;
and distributing the target business clue based on the matching result of the service executive party identifications in the distributable business executive party set and the distributed business executive party set.
Optionally, the allocating the target service thread based on a matching result between the assignable service executor set and the service executor identifier in the assigned service executor set includes:
if the target service executive party identification exists, distributing the target service clue to a service executive party corresponding to the service executive party identification selected from the target service executive party identification; and if the target service executive party identification does not exist, distributing the target service clue to the service executive party corresponding to the service executive party identification with the minimum quantity of the distributed service clues in the distributable service executive party set.
If the target service executive party identification exists, distributing the target service clue to a service executive party corresponding to the service executive party identification selected from the target service executive party identification; and if the target service executive party identification does not exist, distributing the target service clue to the service executive party corresponding to the service executive party identification with the minimum quantity of the distributed service clues in the distributable service executive party set.
Optionally, the cache database is a Key-Value type database; the Key of the business clue distribution record comprises a business clue category; the Value of the business thread allocation record comprises the business executive identification and the number of the allocated business threads.
Optionally, the cache database is a Redis database; the service clue distribution record is organized into a Redis Hash structure and is stored in the cache database; the Key of the business clue distribution record comprises a business clue category; the Field of the business thread distribution record comprises a business executive party identifier; the Value of the business thread allocation record includes the number of allocated business threads.
Optionally, the Key of the service thread assignment record includes the service thread category and an administrative area identifier where an assignable service executing party is located;
the querying, from the cache database, the service executor identifier corresponding to the target service thread category includes:
acquiring an administrative region identifier of a user corresponding to the target service clue;
and inquiring corresponding service execution party identification from the cache database based on the target service clue category and the administrative region identification.
Optionally, the number of the allocated service threads is the number of the service threads allocated to the service executing party; or, the number of the allocated service threads is the number of users corresponding to the service threads allocated to the service executing party.
Optionally, the allocating the target service thread to the service executor corresponding to the service executor identifier selected from the target service executor identifiers includes:
and distributing the target service clue to the service executive party corresponding to the service executive party identifier arranged at the head according to the storage sequence of the target service executive party identifier in the distributable service executive party set.
Optionally, a service database is also deployed on the server; the service database is a relational database; the service database stores original distribution records corresponding to service clues, and the original distribution records comprise corresponding relations among service clue categories, user identifications and service execution party identifications;
the method further comprises the following steps:
determining whether a service execution party identifier corresponding to the target service clue category and the target user identifier is inquired in the service database or not based on the target service clue category and the target user identifier corresponding to the target service clue;
if the service executive party identification is inquired, the target service clue is distributed to the service executive party corresponding to the inquired service executive party identification;
if the service executive party identification is not inquired, the assignable service executive party identification corresponding to the target service clue category of the target service clue to be assigned is further obtained, and an assignable service executive party set is created based on the obtained assignable service executive party identification.
Optionally, the obtaining an assignable service executing party identifier corresponding to a target service thread category of a target service thread to be assigned, and creating an assignable service executing party set based on the obtained assignable service executing party identifier includes:
and inquiring the service executive party identification corresponding to the target service clue category from the service database, and creating an assignable service executive party identification based on the inquired service executive party identification.
Optionally, the service database is a mySQL database.
The application also provides a service clue distribution device which is applied to the server; a cache database is deployed on the server; the cache database stores service clue distribution records corresponding to service execution parties; the service clue distribution record comprises the corresponding relation of the service clue category, the service executive party identification and the distributed service clue quantity; the device comprises:
the acquisition module is used for acquiring an assignable service executing party identifier corresponding to a target service clue category of a target service clue to be assigned, and creating an assignable service executing party set based on the acquired assignable service executing party identifier;
the query module is used for querying the service executive party identifier corresponding to the target service clue category from the cache database and creating an allocated service executive party set based on the queried service executive party identifier;
a matching module, configured to match service executing party identifiers in the allocable service executing party set and the allocated service executing party set, so as to determine whether there is a target service executing party identifier that belongs to the allocable service executing party set and does not belong to the allocated service executing party set;
and the first distribution module is used for distributing the target service clue based on the matching result of the service executive party identifications in the distributable service executive party set and the distributed service executive party set.
The present application further proposes an electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor implements the steps of the above method by executing the executable instructions.
The present application also contemplates a computer-readable storage medium having stored thereon computer instructions which, when executed by a processor, implement the steps of the above-described method.
In the technical solution, for the service thread to be allocated, an allocable service executing party set may be created based on the acquired allocable service executing party identifier corresponding to the service thread category, and creates a set of allocated service executors based on the identifiers of the allocated service executors corresponding to the service clue categories and inquired from the cache database, and then matches the two sets, so that, when there is a service executor identity belonging to the set of allocable service executors and not belonging to the set of allocated service executors, the service thread is assigned to a corresponding service executor selected from such service executor identifications, and when no service executive party identifier exists, the service clue is allocated to the service executive party corresponding to the service executive party identifier with the least number of the allocated service clues in the allocable service executive party set. In this way, the service clue can be distributed evenly basically, that is, the service clue quantity distributed to each service executing party is ensured to be approximately equal.
Drawings
FIG. 1 is a schematic diagram of a business thread distribution system according to an exemplary embodiment of the present application;
FIG. 2 is a flow chart illustrating a method for business thread assignment according to an exemplary embodiment of the present application;
FIG. 3 is a flow chart illustrating another method of business thread assignment according to an exemplary embodiment of the present application;
fig. 4 is a hardware structure diagram of an electronic device where a service thread allocating apparatus is located according to an exemplary embodiment of the present application;
fig. 5 is a block diagram of a traffic thread assignment device according to an exemplary embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of one or more embodiments of the application, as detailed in the claims which follow.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
Referring to fig. 1, fig. 1 is a schematic diagram of a business thread distribution system according to an exemplary embodiment of the present application.
As shown in fig. 1, the business thread distribution system may include a server, and at least one user client and at least one business executive client accessing the server. The service end can run on the electronic equipment used by the service manager; the user client may be a client running on the electronic device used by the user, and the service execution side client may be a client running on the electronic device used by the service execution side; the electronic device may be a server, a computer, a mobile phone, a tablet device, a notebook computer, a handheld computer (pda), or the like, which is not limited in this application.
The service management party can collect the service clue from the user through the service terminal and distribute the collected service clue to the service execution party so as to execute the service initiated by the user by the service execution party. The business clue can be regarded as a carrier of the user's desire intention, such as: the business clue can be a clue about the intention of the user to purchase the vehicle, and the business executor can be a vehicle seller at the moment; alternatively, the service clue may be a clue about intention of the user to repair the vehicle, and the service executing party may be a vehicle repairing party at this time.
For example, on one hand, a user may fill a requirement intention form on a user client, and the user client may send the requirement intention form filled by the user to a server, so that the server sorts the requirement intention form to obtain a business clue corresponding to the user. On the other hand, the service end can distribute the service clue to the corresponding service executing party, that is, the service clue is sent to the corresponding service executing party client, so that the service executing party can look up the service clue and execute the corresponding service according to the service clue, that is, the user is provided with the corresponding service.
Referring to fig. 2, fig. 2 is a flowchart illustrating a business thread assignment method according to an exemplary embodiment of the present application. The service thread allocation method can be applied to the server shown in fig. 1; the service thread allocation method can comprise the following steps:
step 201, acquiring an assignable service executing party identifier corresponding to a target service clue category of a target service clue to be assigned, and creating an assignable service executing party set based on the acquired assignable service executing party identifier;
step 202, querying a service executive party identifier corresponding to the target service thread category from the cache database, and creating an allocated service executive party set based on the queried service executive party identifier;
step 203, matching the service executive party identifications in the allocable service executive party set and the allocated service executive party set to determine whether a target service executive party identification which belongs to the allocable service executive party set and does not belong to the allocated service executive party set exists;
and 204, distributing the target service clue based on the matching result of the service executive party identifiers in the distributable service executive party set and the distributed service executive party set.
In this embodiment, a cache database for storing a service thread allocation record corresponding to a service executing party may be deployed on the server.
Specifically, the service thread allocation record stored in the cache database may include a correspondence relationship between a service thread category, a service executor identifier, and an allocated service thread number.
For a business thread, the business thread category of the business thread may indicate the business related to the business thread (i.e., the user's desire intention corresponding to the business thread), such as: the user car-buying intention clues related to the car-buying service can be regarded as a first kind of service clues, and the user car-repairing intention clues related to the car-repairing service can be regarded as a second kind of service clues, etc.
In practical application, the service executing parties can be distinguished by service thread categories. The service executor identifier corresponding to the service thread category of the service thread is an identifier of a service executor capable of executing the service related to the service thread, and the example is continued as follows: the service execution party identifier corresponding to the first type of service thread may be an identifier of a seller of the vehicle, and the service execution party identifier corresponding to the second type of service thread may be an identifier of a maintenance party of the vehicle, and the like.
For a certain service executor identity, the service executor identity may indicate only one service executor. The service executing party identifier may specifically be an account name of a service account opened by the service executing party at the service managing party, or may also be a number or a code allocated by the service managing party to the service executing party, which is not limited in this application.
For the number of allocated service threads corresponding to a certain service executor identifier, the number of allocated service threads is an index for measuring the service volume currently carried by the service executor indicated by the service executor identifier, for example: the number of assigned business threads may be the number of business threads assigned to the business executive; alternatively, the number of assigned business threads may be the number of users corresponding to the business thread assigned to the business executive.
In one embodiment, the cache database may be a Key-Value type database. In this case, the Key of the service thread assignment record stored in the cache database may include the service thread category, and the Value of the service thread assignment record may include the service executor identifier and the number of assigned service threads.
Specifically, in one illustrated embodiment, the cache database may be a Redis database. In this case, the service thread allocation records stored in the cache database may be organized into a redishhash structure to be stored in the cache database; the Key of the business thread allocation record may include a business thread category, the Field of the business thread allocation record may include a business executor identifier, and the Value of the business thread allocation record may include the number of the allocated business threads.
For a certain service thread to be allocated (referred to as a target service thread), in order to determine to which service executor the target service thread is allocated, in this embodiment, on one hand, an allocable service executor identifier corresponding to a thread class (referred to as a target service thread class) of the target service thread may be obtained, and an allocable service executor set may be created based on the obtained allocable service executor identifier.
In practical application, technicians may mark the service executor identifiers corresponding to the assignable service executors in advance, and then may determine the marked service executor identifiers as assignable service executor identifiers, so that an assignable service executor set may be created based on the marked service executor identifiers.
On the other hand, the service executor identifier corresponding to the target service thread category may be queried from the cache database, and an assigned service executor set may be created based on the queried service executor identifier.
It should be noted that there is no explicit timing relationship betweensteps 201 and 202.
In order to further distinguish service execution parties, in an illustrated embodiment, the Key of the service thread allocation record stored in the cache database may include a service thread category and an administrative area identifier where the allocable service execution party is located. The administrative region identifier of the assignable service executing party may be a zip code or an area code of the administrative region of the assignable service executing party, and the like, which is not limited in the present application.
In this case, the administrative region identifier of the user corresponding to the target business thread may be obtained first, for example: when the user client sends the requirement intention form filled by the user to the server, the user can be positioned through the GPS function so as to determine the administrative region identifier of the user, and the administrative region identifier is sent to the server. And subsequently, inquiring a service execution party identifier corresponding to the target service clue category and the administrative region identifier where the user is located from the cache database, and creating an allocated service execution party set based on the inquired service execution party identifier.
After determining the assignable service executing party set and the assigned service executing party set, the service executing party id in the assignable service executing party set may be matched with the service executing party id in the assigned service executing party set to determine whether there is a target service executing party id belonging to the assignable service executing party set and not belonging to the assigned service executing party set.
Subsequently, the target business clue can be distributed based on the matching result of the business executive party identifiers in the distributable business executive party set and the distributed business executive party set.
For example, in practical applications, if the target service executor identifier exists, a service executor identifier may be selected from the determined target service executor identifiers, and the target service thread may be allocated to the service executor corresponding to the selected service executor identifier.
In an illustrated embodiment, the target service thread may be allocated to the service executor corresponding to the service executor identifier arranged at the head according to the storage order of the determined target service executor identifier in the assignable service executor set.
Correspondingly, if the target service executing party identifier does not exist, the service executing party identifier with the minimum number of the corresponding allocated service threads in the allocable service executing party set may be determined first, and then the target service thread may be allocated to the service executing party corresponding to the service executing party identifier.
In practical applications, after the target service thread is allocated to the service executing party corresponding to the service executing party identifier, the number of allocated service threads corresponding to the service executing party identifier needs to be updated in the cache database.
The above embodiments are exemplified below.
It is assumed that the service thread allocation records stored in the cache database are shown in table 1 below (the number of allocated service threads is specifically the number of service threads allocated to the service executing party):
Figure BDA0002226885370000091
Figure BDA0002226885370000101
TABLE 1
The service executor corresponding to the identifier Y1 is referred to as service executor 1, the service executor corresponding to the identifier Y2 is referred to as service executor 2, the service executor corresponding to the identifier Y3 is referred to as service executor 3, the service executor corresponding to the identifier Y4 is referred to as service executor 4, and the service executor corresponding to the identifier Y5 is referred to as service executor 5.
As shown in table 1 above, the service executing party 1, the service executing party 2, the service executing party 3 and the service executing party 4 may execute services corresponding to a first class of service threads, and the service executing party 5 may execute services corresponding to a second class of service threads; the administrative areas where the service executing part 1, the service executing part 2 and the service executing part 3 are located are the administrative areas 1 corresponding to the identifier X1, and the administrative areas where the service executing part 4 and the service executing part 5 are located are the administrative areas 2 corresponding to the identifier X2; at this time, the number of service threads allocated to the service executing part 1 is 2, the number of service threads allocated to the service executing part 2 is 1, the number of service threads allocated to the service executing part 3 is 1, the number of service threads allocated to the service executing part 4 is 2, and the number of service threads allocated to the service executing part 5 is 3.
Assuming that 4 business threads (business thread 1, business thread 2, business thread 3, and business thread 4) are generated by the user, the 4 business threads are all the first kind of business threads, and the user generating the 4 business threads is located in the administrative area 1, the server can respectively allocate the 4 business threads.
For the service thread 1 to be allocated, on one hand, the server may obtain an assignable service executor identifier corresponding to the thread class (i.e., the first class) and the administrative region identifier (i.e., the identifier X1) of the service thread 1, and create an assignable service executor set based on the obtained assignable service executor identifier, assuming that the created assignable service executor set includes an identifier Y1, an identifier Y2, an identifier Y3, an identifier Y6, and an identifier Y7.
On the other hand, the server may query the service executor identifier corresponding to the first class service thread category and the administrative region identifier X1 from the cache database, and create an allocated service executor set based on the queried service executor identifier, where the created allocated service executor set includes an identifier Y1, an identifier Y2, and an identifier Y3.
Subsequently, the service executor identifiers in the assignable service executor set may be matched with the service executor identifiers in the assigned service executor set, so that it may be determined that there is a target service executor identifier, i.e. identifier Y6 and identifier Y7, belonging to the assignable service executor set and not belonging to the assigned service executor set.
It is assumed that the identifier Y6 is stored before the identifier Y7 according to the storage order in the assignable service executor set, that is, when the service executor identifiers are read from the assignable service executor set according to the storage order, the identifier Y6 is read first, and then the identifier Y7 is read. In this case, business thread 1 may be assigned to the business executive (referred to as business executive 6) corresponding to identity Y6.
The service thread allocation record stored in the cache database may be updated as shown in table 2 below:
Figure BDA0002226885370000111
TABLE 2
Similarly, for the service thread 2 to be allocated, the set of allocable service executors created by the server includes identifier Y1, identifier Y2, identifier Y3, identifier Y6 and identifier Y7; the set of allocated service executors created by the server includes identity Y1, identity Y2, identity Y3 and identity Y6.
At this time, it may be determined that there is a target service executor identifier belonging to the set of assignable service executors and not belonging to the set of assigned service executors, that is, identifier Y7, so that the service thread 2 may be assigned to the service executor corresponding to identifier Y7 (referred to as service executor 7).
The service thread allocation record stored in the cache database may be updated as shown in table 3 below:
Figure BDA0002226885370000121
TABLE 3
Similarly, for the service thread 3 to be allocated, the set of allocable service executors created by the server includes identifier Y1, identifier Y2, identifier Y3, identifier Y6 and identifier Y7; the set of allocated service executors created by the server includes identity Y1, identity Y2, identity Y3, identity Y6 and identity Y7.
At this time, it may be determined that there is no target service executor identifier that belongs to the assignable service executor set and does not belong to the assigned service executor set, that is, the service executor identifiers in the assignable service executor set all belong to the assigned service executor set.
In this case, it may be further determined that the service executor identifier with the smallest number of corresponding allocated service threads in the set of allocable service executors includes an identifier Y2, an identifier Y3, an identifier Y6, and an identifier Y7. Since the identifier Y2 is arranged at the top in the storage order in the set of assignable service executors, the service thread 3 can be assigned to the service executor 2 corresponding to the identifier Y2.
The service thread allocation record stored in the cache database may be updated as shown in table 4 below:
Figure BDA0002226885370000131
TABLE 4
Similarly, for the service thread 4 to be allocated, the set of allocable service executors created by the server includes identifier Y1, identifier Y2, identifier Y3, identifier Y6 and identifier Y7; the set of allocated service executors created by the server includes identity Y1, identity Y2, identity Y3, identity Y6 and identity Y7.
At this time, it may be determined that there is no target service executor identifier that belongs to the assignable service executor set and does not belong to the assigned service executor set, that is, the service executor identifiers in the assignable service executor set all belong to the assigned service executor set.
In this case, it may be further determined that the service executor identifier with the smallest number of corresponding allocated service threads in the set of allocable service executors includes an identifier Y3, an identifier Y6, and an identifier Y7. Since the identifier Y3 is arranged at the top according to the storage order in the set of assignable service executors, the service thread 4 can be assigned to the service executor 3 corresponding to the identifier Y3.
The service thread allocation record stored in the cache database may be updated as shown in table 5 below:
Figure BDA0002226885370000132
Figure BDA0002226885370000141
TABLE 5
Analyzing the above embodiment, for the service thread to be allocated, a set of allocable service executors may be created based on the acquired allocable service executors identifier corresponding to the service thread category, and creates a set of allocated service executors based on the identifiers of the allocated service executors corresponding to the service clue categories and inquired from the cache database, and then matches the two sets, so that, when there is a service executor identity belonging to the set of allocable service executors and not belonging to the set of allocated service executors, the service thread is assigned to a corresponding service executor selected from such service executor identifications, and when no service executive party identifier exists, the service clue is allocated to the service executive party corresponding to the service executive party identifier with the least number of the allocated service clues in the allocable service executive party set. In this way, the service clue can be distributed evenly basically, that is, the service clue quantity distributed to each service executing party is ensured to be approximately equal.
Referring to fig. 3, fig. 3 is a flowchart illustrating another method for distributing service threads according to an exemplary embodiment of the present application. The service thread allocation method can be applied to the server shown in fig. 1; the service thread allocation method can comprise the following steps:
step 301, determining whether a service execution party identifier corresponding to the target service thread category and the target user identifier is queried from the service database based on the target service thread category and the target user identifier corresponding to the target service thread;
step 302, if the service executive party identifier is inquired, the target service thread is allocated to the service executive party corresponding to the inquired service executive party identifier;
step 303, if the service executing party identifier is not queried, further acquiring an assignable service executing party identifier corresponding to a target service thread category of a target service thread to be assigned, and creating an assignable service executing party set based on the acquired assignable service executing party identifier;
step 304, inquiring the service executive party identifier corresponding to the target service clue category from the cache database, and creating an allocated service executive party set based on the inquired service executive party identifier;
step 305, matching the service executive party identifications in the allocable service executive party set and the allocated service executive party set to determine whether a target service executive party identification which belongs to the allocable service executive party set and does not belong to the allocated service executive party set exists;
step 306, if the target service executive party identifier exists, allocating the target service thread to a service executive party corresponding to the service executive party identifier selected from the target service executive party identifier;
step 307, if the target service executing party identifier does not exist, allocating the target service thread to the service executing party corresponding to the service executing party identifier with the least number of allocated service threads in the allocable service executing party set.
In this embodiment, in addition to the cache database for storing the service thread allocation record corresponding to the service executing party, a service database for storing the original allocation record corresponding to the service thread may be deployed on the service; wherein the service database may be a relational database, such as: mySQL database, etc.
Specifically, the original distribution record stored in the service database may include a correspondence relationship between the service thread category, the user identifier, and the service executor identifier. In practical applications, the original allocation record may be a full amount of historical data including the business cue allocation, that is, the original allocation record may further include other data besides the business cue category, the user identifier and the business executive identifier, which is not limited in this specification.
For a certain user identification, the user identification may indicate only one user. The user identifier may specifically be an account name of a service account opened by the user at the service manager, or may also be physiological data such as a mobile phone number, a fingerprint, a face, or the like of the user, which is not limited in this application.
For a certain service thread to be allocated (referred to as a target service thread), in order to determine to which service executing party the target service thread is allocated, in this embodiment, it may first determine whether to query the service database for a service executing party identifier corresponding to the target service thread category and the target user identifier based on the thread category of the target service thread (referred to as a target service thread category) and the user identifier corresponding to the target service thread (i.e., the identifier of the user who generates the target service thread, referred to as a target user identifier).
If the service executive identification is inquired, the target service clue can be directly distributed to the service executive corresponding to the inquired service executive identification.
Accordingly, if the service executor identifier is not queried, an allocable service executor identifier corresponding to the target service thread category may be further obtained, and an allocable service executor set may be created based on the obtained allocable service executor identifier.
It should be noted that, in this embodiment, the service end may query, from the service database, the service executor identifier corresponding to the target service thread category, and create an assignable service executor identifier based on the queried service executor identifier.
In this embodiment, reference may be made to the embodiment shown in fig. 2 for specific implementation ofsteps 303 to 307, which is not described herein again.
Analyzing the above embodiment, for the service thread to be allocated, a set of allocable service executors may be created based on the acquired allocable service executors identifier corresponding to the service thread category, and creates a set of allocated service executors based on the identifiers of the allocated service executors corresponding to the service clue categories and inquired from the cache database, and then matches the two sets, so that, when there is a service executor identity belonging to the set of allocable service executors and not belonging to the set of allocated service executors, the service thread is assigned to a corresponding service executor selected from such service executor identifications, and when no service executive party identifier exists, the service clue is allocated to the service executive party corresponding to the service executive party identifier with the least number of the allocated service clues in the allocable service executive party set. In this way, the service clue can be distributed evenly basically, that is, the service clue quantity distributed to each service executing party is ensured to be approximately equal.
Corresponding to the foregoing embodiments of the service thread allocation method, the present application also provides embodiments of a service thread allocation apparatus.
The embodiment of the service thread distribution device can be applied to electronic equipment. The device embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. Taking a software implementation as an example, as a logical device, the device is formed by reading, by a processor of the electronic device where the device is located, a corresponding computer program instruction in the nonvolatile memory into the memory for operation. From a hardware aspect, as shown in fig. 4, a hardware structure diagram of an electronic device where the service thread allocation apparatus of the present application is located is shown, except for the processor, the memory, the network interface, and the nonvolatile memory shown in fig. 4, the electronic device where the apparatus is located in the embodiment may also include other hardware according to the actual function allocated by the service thread, which is not described again.
Referring to fig. 5, fig. 5 is a block diagram illustrating a service thread allocating apparatus according to an exemplary embodiment of the present application. Theapparatus 50 may be applied to the electronic device shown in fig. 4, and the electronic device may be used as a server; a cache database is deployed on the server; the cache database stores service clue distribution records corresponding to service execution parties; the service clue distribution record comprises the corresponding relation of the service clue category, the service executive party identification and the distributed service clue quantity; theapparatus 50 may include:
an obtainingmodule 501, configured to obtain an assignable service executing party identifier corresponding to a target service thread category of a target service thread to be assigned, and create an assignable service executing party set based on the obtained assignable service executing party identifier;
aquery module 502, configured to query, from the cache database, a service executor identifier corresponding to the target service thread category, and create an allocated service executor set based on the queried service executor identifier;
amatching module 503, configured to match service executing party identifiers in the allocable service executing party set and the allocated service executing party set, so as to determine whether there is a target service executing party identifier that belongs to the allocable service executing party set and does not belong to the allocated service executing party set;
a first allocatingmodule 504, configured to allocate the target service thread based on a matching result between the assignable service executor set and the service executor identifier in the assigned service executor set.
In an optional embodiment, the allocatingmodule 504 is specifically configured to:
if the target service executive party identification exists, distributing the target service clue to a service executive party corresponding to the service executive party identification selected from the target service executive party identification; and if the target service executive party identification does not exist, distributing the target service clue to the service executive party corresponding to the service executive party identification with the minimum quantity of the distributed service clues in the distributable service executive party set.
In an optional embodiment, the cache database is a Key-Value type database; the Key of the business clue distribution record comprises a business clue category; the Value of the business thread allocation record comprises the business executive identification and the number of the allocated business threads.
In an optional embodiment, the cache database is a Redis database; the service clue distribution record is organized into a Redis Hash structure and is stored in the cache database; the Key of the business clue distribution record comprises a business clue category; the Field of the business thread distribution record comprises a business executive party identifier; the Value of the business thread allocation record includes the number of allocated business threads.
In an optional embodiment, the Key of the service thread assignment record includes the service thread category and an administrative region identifier where an assignable service executing party is located;
thequery module 502 is specifically configured to:
acquiring an administrative region identifier of a user corresponding to the target service clue;
and inquiring corresponding service execution party identification from the cache database based on the target service clue category and the administrative region identification.
In an optional embodiment, the number of the allocated business threads is the number of the business threads allocated to the business executing party; or, the number of the allocated service threads is the number of users corresponding to the service threads allocated to the service executing party.
In an optional embodiment, the first allocatingmodule 504 is specifically configured to:
and distributing the target service clue to the service executive party corresponding to the service executive party identifier arranged at the head according to the storage sequence of the target service executive party identifier in the distributable service executive party set.
In an optional embodiment, a service database is also deployed on the server; the service database is a relational database; the service database stores original distribution records corresponding to service clues, and the original distribution records comprise corresponding relations among service clue categories, user identifications and service execution party identifications;
theapparatus 50 may further include:
a determiningmodule 505, configured to determine, based on the target business thread category and a target user identifier corresponding to the target business thread, whether a business executor identifier corresponding to the target business thread category and the target user identifier is queried in the business database;
a second allocatingmodule 506, configured to allocate the target service thread to the service executor corresponding to the queried service executor identifier when the service executor identifier is queried;
the obtainingmodule 501 is specifically configured to:
if the service executive party identification is not inquired, the assignable service executive party identification corresponding to the target service clue category of the target service clue to be assigned is further obtained, and an assignable service executive party set is created based on the obtained assignable service executive party identification.
In an optional embodiment, the obtainingmodule 501 is specifically configured to:
and inquiring the service executive party identification corresponding to the target service clue category from the service database, and creating an assignable service executive party identification based on the inquired service executive party identification.
In an alternative embodiment, the business database is a mySQL database.
The implementation process of the functions and actions of each module in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, wherein the modules described as separate parts may or may not be physically separate, and the parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
In a typical configuration, a computer includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic disk storage, quantum memory, graphene-based storage media or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing description of specific embodiments of the present application has been presented. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The terminology used in the description of the embodiment or embodiments herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the embodiment or embodiments herein. As used in one or more embodiments of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein in one or more embodiments to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of one or more embodiments of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
The above description is only for the purpose of illustrating the preferred embodiments of the present application and is not intended to limit the present application to the particular embodiments of the present application, and any modifications, equivalents, improvements and the like that are within the spirit and principle of the present application and are intended to be included within the scope of the present application.

Claims (13)

1. A business clue distribution method is applied to a server; a cache database is deployed on the server; the cache database stores service clue distribution records corresponding to service execution parties; the service clue distribution record comprises the corresponding relation of the service clue category, the service executive party identification and the distributed service clue quantity; the method comprises the following steps:
acquiring assignable service executing party identifiers corresponding to target service clue categories of target service clues to be assigned, and creating assignable service executing party sets based on the acquired assignable service executing party identifiers;
inquiring a service executive party identifier corresponding to the target service clue category from the cache database, and creating an allocated service executive party set based on the inquired service executive party identifier;
matching the service executive party identifications in the allocable service executive party set and the allocated service executive party set to determine whether a target service executive party identification which belongs to the allocable service executive party set and does not belong to the allocated service executive party set exists;
and distributing the target business clue based on the matching result of the service executive party identifications in the distributable business executive party set and the distributed business executive party set.
2. The method of claim 1, wherein the allocating the target business thread based on the matching result of the business executor identifiers in the allocable business executor set and the allocated business executor set comprises:
if the target service executive party identification exists, distributing the target service clue to a service executive party corresponding to the service executive party identification selected from the target service executive party identification; and if the target service executive party identification does not exist, distributing the target service clue to the service executive party corresponding to the service executive party identification with the minimum quantity of the distributed service clues in the distributable service executive party set.
3. The method of claim 1, the cache database is a Key-Value type database; the Key of the business clue distribution record comprises a business clue category; the Value of the business thread allocation record comprises the business executive identification and the number of the allocated business threads.
4. The method of claim 3, the cache database being a Redis database; the service clue distribution record is organized into a Redis Hash structure and is stored in the cache database; the Key of the business clue distribution record comprises a business clue category; the Field of the business thread distribution record comprises a business executive party identifier; the Value of the business thread allocation record includes the number of allocated business threads.
5. The method according to claim 3, the Key of the business thread assignment record includes the business thread category and the administrative region identifier where the assignable business executing party is located;
the querying, from the cache database, the service executor identifier corresponding to the target service thread category includes:
acquiring an administrative region identifier of a user corresponding to the target service clue;
and inquiring corresponding service execution party identification from the cache database based on the target service clue category and the administrative region identification.
6. The method according to any one of claims 1 to 5, wherein the number of assigned business threads is the number of business threads assigned to a business executive; or, the number of the allocated service threads is the number of users corresponding to the service threads allocated to the service executing party.
7. The method of claim 1, wherein said assigning the target business thread to a business executive corresponding to a business executive selected from the target business executive identifications, comprises:
and distributing the target service clue to the service executive party corresponding to the service executive party identifier arranged at the head according to the storage sequence of the target service executive party identifier in the distributable service executive party set.
8. The method of claim 1, wherein a service database is also deployed on the server; the service database is a relational database; the service database stores original distribution records corresponding to service clues, and the original distribution records comprise corresponding relations among service clue categories, user identifications and service execution party identifications;
the method further comprises the following steps:
determining whether a service execution party identifier corresponding to the target service clue category and the target user identifier is inquired in the service database or not based on the target service clue category and the target user identifier corresponding to the target service clue;
if the service executive party identification is inquired, the target service clue is distributed to the service executive party corresponding to the inquired service executive party identification;
if the service executive party identification is not inquired, the assignable service executive party identification corresponding to the target service clue category of the target service clue to be assigned is further obtained, and an assignable service executive party set is created based on the obtained assignable service executive party identification.
9. The method according to claim 8, wherein the obtaining allocable service executing party identifiers corresponding to the target service thread classes of the target service threads to be allocated, and creating an allocable service executing party set based on the obtained allocable service executing party identifiers comprises:
and inquiring the service executive party identification corresponding to the target service clue category from the service database, and creating an assignable service executive party identification based on the inquired service executive party identification.
10. The method of claim 8, the business database being a mySQL database.
11. A business clue distribution device is applied to a server; a cache database is deployed on the server; the cache database stores service clue distribution records corresponding to service execution parties; the service clue distribution record comprises the corresponding relation of the service clue category, the service executive party identification and the distributed service clue quantity; the device comprises:
the acquisition module is used for acquiring an assignable service executing party identifier corresponding to a target service clue category of a target service clue to be assigned, and creating an assignable service executing party set based on the acquired assignable service executing party identifier;
the query module is used for querying the service executive party identifier corresponding to the target service clue category from the cache database and creating an allocated service executive party set based on the queried service executive party identifier;
a matching module, configured to match service executing party identifiers in the allocable service executing party set and the allocated service executing party set, so as to determine whether there is a target service executing party identifier that belongs to the allocable service executing party set and does not belong to the allocated service executing party set;
and the first distribution module is used for distributing the target service clue based on the matching result of the service executive party identifications in the distributable service executive party set and the distributed service executive party set.
12. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor implements the method of any one of claims 1 to 10 by executing the executable instructions.
13. A computer readable storage medium having stored thereon computer instructions which, when executed by a processor, carry out the steps of the method according to any one of claims 1 to 10.
CN201910954647.0A2019-10-092019-10-09Business clue distribution method and device, electronic equipment and readable storage mediumPendingCN112650748A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201910954647.0ACN112650748A (en)2019-10-092019-10-09Business clue distribution method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201910954647.0ACN112650748A (en)2019-10-092019-10-09Business clue distribution method and device, electronic equipment and readable storage medium

Publications (1)

Publication NumberPublication Date
CN112650748Atrue CN112650748A (en)2021-04-13

Family

ID=75342514

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201910954647.0APendingCN112650748A (en)2019-10-092019-10-09Business clue distribution method and device, electronic equipment and readable storage medium

Country Status (1)

CountryLink
CN (1)CN112650748A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN113222359A (en)*2021-04-232021-08-06北京淇瑀信息科技有限公司Method and device for determining accepting line strategy based on electric marketing line conversion rate
CN113256070A (en)*2021-04-262021-08-13北京淇瑀信息科技有限公司Supporting line distribution method and device based on electricity-pin conversion rate and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN106101232A (en)*2016-06-162016-11-09北京思源置地科技有限公司Load-balancing method and device
CN108055340A (en)*2017-12-222018-05-18平安养老保险股份有限公司Customer resources distribution method, device, computer equipment and storage medium
CN109344336A (en)*2018-12-252019-02-15北京时光荏苒科技有限公司Searching method, search set creation method, device, medium, terminal and server
CN109784646A (en)*2018-12-142019-05-21深圳壹账通智能科技有限公司Method for allocating tasks, device, storage medium and server

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN106101232A (en)*2016-06-162016-11-09北京思源置地科技有限公司Load-balancing method and device
CN108055340A (en)*2017-12-222018-05-18平安养老保险股份有限公司Customer resources distribution method, device, computer equipment and storage medium
CN109784646A (en)*2018-12-142019-05-21深圳壹账通智能科技有限公司Method for allocating tasks, device, storage medium and server
CN109344336A (en)*2018-12-252019-02-15北京时光荏苒科技有限公司Searching method, search set creation method, device, medium, terminal and server

Cited By (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN113222359A (en)*2021-04-232021-08-06北京淇瑀信息科技有限公司Method and device for determining accepting line strategy based on electric marketing line conversion rate
CN113256070A (en)*2021-04-262021-08-13北京淇瑀信息科技有限公司Supporting line distribution method and device based on electricity-pin conversion rate and electronic equipment

Similar Documents

PublicationPublication DateTitle
US11604787B2 (en)Method of generating globally verifiable unique identifiers using a scalable interlinked blockchain structure
CN111738737B (en) Method, device and device for generating digital property right certificate
CN110020542B (en)Data reading and writing method and device and electronic equipment
CN110032598B (en)Method and device for updating field and electronic equipment
CN107015985B (en)Data storage and acquisition method and device
CN105095970A (en)Execution method and system of third-party application
CN106897335B (en)Service data storage method, record identifier generation method and device
CN105608087B (en)resource scheduling method and device
JP2020526856A5 (en)
CN111611560B (en)Service processing method and device
CN108399175A (en)A kind of storage of data, querying method and its device
CN113360548A (en)Data processing method, device, equipment and medium based on data asset analysis
CN109344173B (en)Data management method and device and data structure
CN111275481A (en)Virtual resource allocation method and device based on electronic certificate and electronic equipment
CN112650748A (en)Business clue distribution method and device, electronic equipment and readable storage medium
CN110874354A (en)Database migration method and device, electronic equipment and storage medium
CN110245177A (en)A kind of deriving method of million grades of data
CN111143546A (en)Method and device for obtaining recommendation language and electronic equipment
CN109472721A (en)A kind of estate resource management method and system
CN111177093A (en)Method, device and medium for sharing scientific and technological resources
CN115408396B (en)Method, device, computer equipment and storage medium for storing business data
CN114791915B (en)Data aggregation method and device, computer equipment and storage medium
US8620895B1 (en)Mapping organizational accounting codes to access business information
EP3418914A1 (en)Data management apparatuses, methods, and non-transitory tangible machine-readable media thereof
CN106874327B (en)Counting method and device for business data

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
RJ01Rejection of invention patent application after publication
RJ01Rejection of invention patent application after publication

Application publication date:20210413


[8]ページ先頭

©2009-2025 Movatter.jp