CN112306691A - User level determination method, system, computer device and storage medium - Google Patents
User level determination method, system, computer device and storage medium Download PDFInfo
- Publication number
- CN112306691A CN112306691A CN202011221153.0A CN202011221153A CN112306691A CN 112306691 A CN112306691 A CN 112306691A CN 202011221153 A CN202011221153 A CN 202011221153A CN 112306691 A CN112306691 A CN 112306691A
- Authority
- CN
- China
- Prior art keywords
- task
- user
- target
- user set
- controlled
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 57
- 230000006399 behavior Effects 0.000 claims description 19
- 238000004590 computer program Methods 0.000 claims description 12
- 230000036541 health Effects 0.000 claims description 11
- 230000002159 abnormal effect Effects 0.000 claims description 10
- 238000004364 calculation method Methods 0.000 abstract description 13
- 230000008859 change Effects 0.000 abstract description 11
- 230000008569 process Effects 0.000 description 20
- 238000010586 diagram Methods 0.000 description 5
- 230000004044 response Effects 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 230000001960 triggered effect Effects 0.000 description 2
- 230000005856 abnormality Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q30/00—Commerce
- G06Q30/02—Marketing; Price estimation or determination; Fundraising
- G06Q30/0207—Discounts or incentives, e.g. coupons or rebates
- G06Q30/0239—Online discounts or incentives
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Business, Economics & Management (AREA)
- Development Economics (AREA)
- Finance (AREA)
- Strategic Management (AREA)
- Physics & Mathematics (AREA)
- Accounting & Taxation (AREA)
- Software Systems (AREA)
- General Physics & Mathematics (AREA)
- Entrepreneurship & Innovation (AREA)
- Game Theory and Decision Science (AREA)
- General Engineering & Computer Science (AREA)
- Economics (AREA)
- Marketing (AREA)
- General Business, Economics & Management (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The application discloses a user grade determining method, a user grade determining system, computer equipment and a storage medium, and relates to the technical field of internet. The user level determining method is used in a user level determining system, the user level determining system comprises a control node and a plurality of controlled nodes, and the method comprises the following steps: the control node distributes a plurality of shop tasks to a plurality of controlled nodes; the first controlled node receives a target shop task distributed by the control node; the first controlled node sequentially executes a plurality of target user set tasks included in the target store tasks, wherein different target user set tasks correspond to different user sets, each user set includes a plurality of users in the target store, and the target user set tasks are tasks for determining the grades of the users in the corresponding user sets. The technical scheme provided by the embodiment t of the application can reduce the calculation time delay determined by the user grade and ensure that the grade of the user can change in time.
Description
Technical Field
The present application relates to the field of internet technologies, and in particular, to a method, a system, a computer device, and a storage medium for determining a user level.
Background
In the internet e-commerce field, many stores assign different grades to users in the stores according to the consumption conditions of the users, wherein the users at high grade can enjoy higher rights, while the users at low grade can generally enjoy lower rights, and the term "rights" can refer to discount and other benefits. Generally, the user's level may vary, for example, when the user's consumption meets the level upgrade condition, the user's level may be raised, and thus, the level of each user in the store needs to be periodically determined by the computer device so that the user can enjoy the right matching with the latest consumption thereof in time.
However, currently, a large number of e-commerce platforms exist, a large number of stores exist in the e-commerce platforms, and each store can configure its own grade raising and lowering condition, which causes the problem that the grade determination of the user is large in data amount and long in calculation delay, and further causes the problem that the grade of the user cannot be changed in time.
Currently, how to reduce the calculation delay determined by the user level and ensure that the user level can change in time becomes a problem to be solved urgently.
Disclosure of Invention
Based on this, the embodiment of the application provides a user grade determination method, a user grade determination system, a computer device and a storage medium, which can reduce the calculation delay of user grade determination and ensure that the grade of a user can change in time.
In a first aspect, a user level determining method is provided, which is used in a user level determining system, where the user level determining system includes a control node and a plurality of controlled nodes, and the method includes:
the control node distributes a plurality of shop tasks to the controlled nodes, wherein each shop task corresponds to different shops with different user levels to be determined; a first controlled node receives a target shop task distributed by the control node, wherein the first controlled node is any one of the controlled nodes, and the target shop task corresponds to a target shop; the first controlled node sequentially executes a plurality of target user set tasks included in the target store task, wherein different target user set tasks correspond to different user sets, each user set includes a plurality of users in the target store, and the target user set task is a task for determining the level of each user in the corresponding user set.
In one embodiment, the first controlled node sequentially performs a plurality of target user set tasks included in the target store task, including: before the first controlled node executes the nth target user set task, acquiring the execution duration of the (n-1) th target user set task, wherein n is a positive integer greater than 1; the first controlled node determines the locking time length of the nth target user set task according to the execution time length; and the first controlled node adds a task lock to the nth target user set task according to the lock duration and executes the nth target user set task.
In one embodiment, the determining, by the first controlled node, the lock duration of the nth target user set task according to the execution duration includes: and the first controlled node takes the product of the execution time length and a preset parameter as the lock time length of the nth target user set task, wherein the preset parameter is a positive integer which is greater than 1 and smaller than a preset parameter threshold value.
In one embodiment, the performing the nth target user set task includes: and for each user in the user set corresponding to the nth target user set task, acquiring the behavior parameter information of the user according to the identification information of the user, and determining the grade of the user according to the behavior parameter information and the grade lifting condition of the target shop.
In one embodiment, the control node detects the working state of the first controlled node; if the working state of the first controlled node is an abnormal state, the control node redistributes the target shop task to a second controlled node, and the second controlled node is a controlled node except the first controlled node in the plurality of controlled nodes; the second controlled node sequentially executes a plurality of target user set tasks included in the target store task.
In one embodiment, the second controlled node sequentially performs a plurality of target user set tasks included in the target store task, including: the second controlled node determines a candidate user set task which is not completed by the first controlled node from a plurality of target user set tasks included in the target shop task; if the task lock is added to the candidate user set task by the first controlled node, the second controlled node executes other tasks except the candidate user set task and executes the candidate user set task after the other tasks are executed; and if the candidate user set task is not added with the task lock by the first controlled node, the second controlled node executes the candidate user set task.
In one embodiment, before the controlling node distributes the plurality of store tasks to the plurality of controlled nodes, the method further comprises: each controlled node in a normal state sends health information to the control node; correspondingly, the control node distributes a plurality of store tasks to the plurality of controlled nodes, including: the control node distributes the plurality of shop tasks to the controlled nodes in the normal state according to the received health information.
In a second aspect, a user level determination system is provided, the user level determination system comprising a control node and a plurality of controlled nodes;
the control node is used for distributing a plurality of shop tasks to the controlled nodes, wherein each shop task corresponds to different shops with different user levels to be determined;
the first controlled node is used for receiving a target shop task distributed by the control node, wherein the first controlled node is any one of the controlled nodes, and the target shop task corresponds to a target shop;
the first controlled node is configured to sequentially execute a plurality of target user set tasks included in the target store task, where different target user set tasks correspond to different user sets, each user set includes a plurality of users in the target store, and the target user set task is a task for determining a level of each user in the corresponding user set.
In one embodiment, the first controlled node is specifically configured to: before executing the nth target user set task, acquiring the execution duration of the (n-1) th target user set task, wherein n is a positive integer greater than 1; determining the locking time length of the nth target user set task according to the execution time length; and adding a task lock for the nth target user set task according to the lock duration, and executing the nth target user set task.
In one embodiment, the first controlled node is specifically configured to: and taking the product of the execution time length and a preset parameter as the lock time length of the nth target user set task, wherein the preset parameter is a positive integer which is greater than 1 and smaller than a preset parameter threshold value.
In one embodiment, the first controlled node is specifically configured to: and for each user in the user set corresponding to the nth target user set task, acquiring the behavior parameter information of the user according to the identification information of the user, and determining the grade of the user according to the behavior parameter information and the grade lifting condition of the target shop.
In one embodiment, the control node is further configured to detect a working state of the first controlled node, and if the working state of the first controlled node is an abnormal state, redistribute the target store task to a second controlled node, where the second controlled node is a controlled node other than the first controlled node in the plurality of controlled nodes; the second controlled node is used for sequentially executing a plurality of target user set tasks included in the target shop task.
In one embodiment, the second controlled node is specifically configured to: determining candidate user set tasks that are not completed by the first controlled node from a plurality of target user set tasks included in the target store task; if the task lock is added to the candidate user set task by the first controlled node, executing other tasks except the candidate user set task, and executing the candidate user set task after the other tasks are executed; and if the candidate user set task is not added with the task lock by the first controlled node, executing the candidate user set task.
In one embodiment, each controlled node in the normal state is further configured to send health information to the control node; the control node is specifically configured to distribute the plurality of shop tasks to the controlled nodes in the normal state according to the received health information.
In a third aspect, there is provided a computer device comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, performs the steps of the method according to any one of the first aspect.
In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the method according to any one of the above first aspects.
The beneficial effects brought by the technical scheme provided by the embodiment of the application at least comprise:
the technical scheme provided by the embodiment of the application is applied to a user level determining system, the user level determining system comprises a control node and a plurality of controlled nodes, the control node distributes a plurality of shop tasks to the plurality of controlled nodes, wherein each shop task corresponds to different shops to be subjected to user level determination, a first controlled node receives a target shop task distributed by the control node, the first controlled node is any one of the plurality of controlled nodes, the target shop task corresponds to a target shop, the first controlled node sequentially executes a plurality of target user set tasks included in the target shop task, different target user set tasks correspond to different user sets, each user set includes a plurality of users in the target shop, the target user set task is a task for determining the level of each user in the corresponding user set, thus, on one hand, a large number of stores to be subjected to user level determination can be assigned to a plurality of controlled nodes in the form of tasks, so that the plurality of controlled nodes can perform user level determination on the large number of stores in parallel, and the calculation delay of the user level determination can be greatly reduced by parallel execution, so that the level of a user can be guaranteed to change in time, on the other hand, for a first controlled node, the execution of target store tasks can be realized by sequentially executing a plurality of target user set tasks, because each target user set task corresponds to one user set, the execution of the target store tasks is realized in the form of the target user set tasks, so that the first controlled node can determine the levels of the users in batches in the form of the user sets, compared with the mode of determining the user levels one by one, the calculation time delay determined by the user grade can be greatly reduced, and the grade of the user can be ensured to change in time.
Drawings
FIG. 1 is a schematic illustration of an implementation environment in which embodiments of the present application are related;
fig. 2 is a flowchart of a user level determination method according to an embodiment of the present application;
fig. 3 is a flowchart of a technical process in which a first controlled node sequentially executes a plurality of target user set tasks included in a target store task according to an embodiment of the present application;
fig. 4 is a flowchart of another user level determination method provided in the embodiment of the present application;
fig. 5 is a flowchart of a technical process in which a second controlled node sequentially executes a plurality of target user set tasks included in a target store task according to an embodiment of the present application;
fig. 6 is a block diagram of a user level determination system according to an embodiment of the present application;
fig. 7 is a block diagram of a computer device according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
Currently, in the internet e-commerce field, many stores assign different levels to users in the store according to the consumption situation of the users, wherein the users in different levels enjoy different rights and interests. For example, in store a, the user with the highest single-stroke consumption amount of one ten thousand dollars is the primary user, the primary user can enjoy the right of 7 discounts for shopping, the user with the highest single-stroke consumption amount of one thousand dollars is the secondary user, and the secondary user can enjoy the right of 9 discounts for shopping. By assigning different grades to different users and enabling the users with different grades to enjoy different rights and interests, the desire of the users to improve the grades can be stimulated, and the purchasing power of the users is improved.
In practical applications, the level of the user may be changed, for example, in store a, if user 1 is a secondary user, and completes one consumption on day 30, and the amount of the consumption is twenty ten thousand yuan, user 1 may upgrade from the secondary user to a primary user on day 30.
In order to change the user's level in time and to allow the user to enjoy the right corresponding to the changed level in time, the computer device usually needs to periodically calculate the current level of each user. For example, in one possible implementation, the computer device may calculate the current rating for each user after 3 am each day, thereby enabling the user rating to be varied in time of day.
However, currently, there are a large number of e-commerce platforms, and a large number of stores exist in different e-commerce platforms, and each store can configure its own grade raising and lowering condition, which causes problems of huge data amount and long calculation time delay in calculating the user grade, and these problems all cause that the grade of the user cannot be changed in time.
In view of this, the embodiment of the present application provides a user level determining method, which can reduce the computation delay of a user level, thereby ensuring that the user level can change in time. The user level determining method provided by the embodiment of the application is applied to a user level determining system, the user level determining system comprises a control node and a plurality of controlled nodes, the control node distributes a plurality of shop tasks to the controlled nodes, wherein each shop task corresponds to different shops to be subjected to user level determination, a first controlled node receives a target shop task distributed by the control node, the first controlled node is any one of the controlled nodes, the target shop task corresponds to a target shop, the first controlled node sequentially executes a plurality of target user set tasks included in the target shop task, wherein different target user set tasks correspond to different user sets, each user set includes a plurality of users in the target shop, and the target user set task is a task for determining the level of each user in the corresponding user set, thus, on one hand, a large number of stores to be subjected to user level determination can be assigned to a plurality of controlled nodes in the form of tasks, so that the plurality of controlled nodes can perform user level determination on the large number of stores in parallel, and the calculation delay of the user level determination can be greatly reduced by parallel execution, so that the level of a user can be guaranteed to change in time, on the other hand, for a first controlled node, the execution of target store tasks can be realized by sequentially executing a plurality of target user set tasks, because each target user set task corresponds to one user set, the execution of the target store tasks is realized in the form of the target user set tasks, so that the first controlled node can determine the levels of the users in batches in the form of the user sets, compared with the mode of determining the user levels one by one, the calculation time delay determined by the user grade can be greatly reduced, and the grade of the user can be ensured to change in time.
Next, a brief description will be given of an implementation environment related to the user level determination method provided in the embodiment of the present application.
As shown in fig. 1, the implementation environment may be a user level determination system, which may include a control node 101 and a plurality of controlled nodes 102 (only 3 controlled nodes 102 are exemplarily shown in fig. 1), where each controlled node 102 establishes a communication connection with the control node 101, and each of the control node 101 and the controlled nodes 102 may be a server, a server cluster, or other electronic devices or electronic device clusters with computing and processing functions.
The control node 101 is configured to assign tasks of calculating user classes to the plurality of controlled nodes 102, and the controlled nodes 102 are configured to execute the tasks assigned by the control node 101, that is, the controlled nodes 102 are configured to specifically calculate the user classes.
Referring to fig. 2, a flowchart of a user level determination method provided by an embodiment of the present application is shown, where the user level determination method is applied in the implementation environment shown in fig. 1, and as shown in fig. 2, the user level determination method may include the following steps:
Similarly to the above, in the embodiment of the present application, the user level determining system needs to periodically calculate the current level of the user, so that the level of the user can be changed in time, and the user can enjoy the rights and interests corresponding to the changed level in time. That is, in the embodiment of the present application, the technical process of step 201 and the subsequent steps may be performed periodically.
For convenience of explanation, the technical process in which the user rank is calculated only once will be described hereinafter.
In an optional embodiment of the application, in the process of calculating the user level, the control node may first obtain a plurality of stores to be subjected to user level determination, and optionally, the control node may use all stores in each e-commerce platform as stores to be subjected to user level determination.
After a plurality of stores to be subjected to user level determination are acquired, the control node may generate, for each acquired store, a store task corresponding to the store, and optionally, the store task generated by the control node at least includes an identifier of the corresponding store, and the store task generated by the control node is a task for performing level calculation on a user in the store corresponding to the store task. The control node may then distribute the generated plurality of store tasks to a plurality of controlled nodes.
For example, assuming that the control node acquires 1000 stores to be subjected to user level determination and 10 controlled nodes, the control node may generate 1000 store tasks corresponding one-to-one to the 1000 stores and distribute to 100 store tasks per controlled node.
In an optional embodiment of the present application, the control node may perform hash modulo processing on the obtained identifiers of the multiple stores to be subjected to user level determination, and distribute the generated multiple store tasks to the multiple controlled nodes according to a result of the hash modulo processing.
In an optional embodiment of the present application, before calculating the user level, each controlled node in a normal state in the user level determination system may send health information to the control node, so as to report to the control node that the task of calculating the user level can be normally executed by itself. Optionally, each controlled node may be provided with a timing task, and after a predetermined time (generally, a time at which user level calculation is started) is reached, the timing task may be triggered, and if the controlled node is in a normal state, the controlled node may send the health information to the control node after the timing task is triggered.
In the process of calculating the user level, the control node can distribute a plurality of shop tasks to each controlled node in a normal state according to the received health information, so that the shop tasks can be prevented from being distributed to the controlled nodes in an abnormal state, the shop tasks can be prevented from being unable to be executed, and the situation that the level of users in certain shops cannot be changed in time to influence the enjoyment rights and interests of the users can be avoided.
The first controlled node is any one of the plurality of controlled nodes included in the user level determination system, and optionally, the first controlled node may be any one of the plurality of controlled nodes in a normal state included in the user level determination system. In other words, each controlled node in the user level determination system, or each controlled node in a normal state, may perform the technical process performed by the first controlled node in the embodiment of the present application.
The target store task refers to a store task distributed to the first controlled node, the target store task corresponding to the target store. In the embodiment of the present application, the number of target store tasks may be one or more, and this is not particularly limited in the embodiment of the present application.
And step 203, the first controlled node sequentially executes a plurality of target user set tasks included in the target shop task.
In an optional embodiment of the present application, each store task may include a plurality of user set tasks, where different user set tasks correspond to different user sets, a user set corresponding to a certain user set task includes a plurality of users in a store corresponding to the store task to which the user set task belongs, and the user set task is a task for determining a level of each user in the corresponding user set.
For example, a store task R corresponds to a store a, and the store task R includes 3 user set tasks, each of which corresponds to a user set composed of 1000 users in the store a, and each of which is a task for determining a rank of each user in the corresponding user set.
In an optional embodiment of the present application, the number of users in the user set corresponding to the user set task may be a preset value, for example, the preset value may be 1000.
In step 203, after receiving the target store task distributed by the control node, the first controlled node may sequentially execute a plurality of target user set tasks included in the target store task, where a user set corresponding to the target user set task includes a plurality of users in the target store.
In general, in calculating the ranks of users in a certain store, the computer device calculates the ranks of users in the store one by one.
For example, if a certain store contains 10 users, the computer device may first calculate the rank of the 1 st user, then the computer device may calculate the rank of the 2 nd user, and so on, and after the computer device calculates the rank of the 10 th user, the calculation of the ranks of all the users in the store may be completed.
Practice proves that the mode of calculating the user grades one by one has larger time delay.
In view of this, in the embodiment of the present application, the user level may be calculated in a form of executing a user set task, so that the controlled node may determine the user level in batch in a user set form, and compared with a single mode of determining the user level one by one, the method may greatly reduce the calculation delay for determining the user level, and ensure that the user level may change in time.
In this embodiment of the present application, the first controlled node sequentially executing a plurality of target user set tasks means: the first controlled node executes the 1 st target user set task, then executes the 2 nd target user set task, then executes the 3 rd target user set task, and so on until the last target user set task is executed.
For convenience of description, the following description will be given by taking as an example only a technical process in which the first controlled node performs the nth target user set task, where n is a positive integer greater than 1, and please refer to fig. 3, where the technical process includes the following steps:
The execution time length of the (n-1) th target user set task refers to the time length from the time of starting to execute the (n-1) th target user set task to the time of completing the (n-1) th target user set task.
And step 302, the first controlled node determines the lock time length of the nth target user set task according to the execution time length.
In an optional embodiment of the present application, the first controlled node may use a product of the execution duration and a preset parameter as the lock duration of the nth target user set task, where the preset parameter is a positive integer greater than 1 and smaller than a preset parameter threshold.
And step 303, the first controlled node adds a task lock to the nth target user set task according to the lock duration, and executes the nth target user set task.
In the embodiment of the application, the first controlled node adds the task lock to the nth target user set task, so that only the first controlled node can execute the nth target user set task before the task lock is not released, and thus, errors caused by the fact that the nth target user set task is executed by a plurality of controlled nodes at the same time can be avoided.
In practical application, the locking duration of the task lock is very important, if the locking duration is set to be too short, the task lock is likely to be released before the nth target user set task is not executed by the first controlled node, which brings a hidden danger that the nth target user set task may be executed by two controlled nodes at the same time, if the locking duration is set to be too long, the first controlled node fails, and after the locking duration is in an abnormal state, the task lock may not be released later, so that the nth target user set task cannot be executed by other controlled nodes in time, and even the nth target user set task dies.
In view of the above, in the embodiment of the present application, the lock duration of the nth target user set task may be determined according to the execution duration of the (n-1) th target user set task, and optionally, a product of the execution duration of the (n-1) th target user set task and a preset parameter may be used as the lock duration of the nth target user set task, since the preset parameter is greater than 1, it may be ensured that the lock duration of the nth target user set task is greater than the execution duration of the (n-1) th target user set task, which may avoid setting the lock duration too short, which may cause the task lock to be released before the nth target user set task is not completely executed by the first controlled node, and in addition, since the preset parameter is less than the preset parameter threshold, it may be avoided that the lock duration is set too long, which may cause the first controlled node to fail to be in an abnormal state, the task lock is not released later.
In an optional embodiment of the present application, before executing the 1 st target user set task, the first controlled node may add a task lock to the 1 st target user set task based on a preset lock duration, for example, the preset lock duration may be 10 minutes, and the size of the preset lock duration is not limited in this embodiment of the present application.
In the following, an optional technical process for the first controlled node to execute the nth target user set task will be described in this embodiment of the application, where the technical process may include the following steps a to C:
and step A, the first controlled node queries the identification information of each user in the user set corresponding to the nth target user set task in batch in a user identification database.
And step B, for each user in the user set corresponding to the nth target user set task, the first controlled node acquires the behavior parameter information of the user according to the identification information of the user.
Optionally, for each user in the user set corresponding to the nth target user set task, the first controlled node may query the behavior parameter database according to the identification information of the user to obtain behavior parameter information of the user, where the behavior parameter information is used to represent at least one of a shopping behavior, a browsing behavior, and the like of the user in the target store, and for example, the behavior parameter information may be a total amount of money consumed by the user in the target store within a preset time period, a maximum amount of money consumed by the user in the target store within the preset time period, a number of times of browsing the target store by the user within the preset time period, and the like.
And step C, for each user in the user set corresponding to the nth target user set task, the first controlled node determines the grade of the user according to the behavior parameter information of the user and the grade lifting condition of the target shop.
In an optional embodiment of the present application, after receiving a target store task distributed by a control node, a first controlled node may query a level-up/down condition of a target store according to identification information of the target store, where the level-up/down condition may include at least one of a behavior parameter condition that a user needs to meet to increase a level and a behavior parameter condition that the user needs to meet to decrease the level.
Alternatively, if the first controlled node cannot inquire the level-up-down condition of the target store, it indicates that the target store is likely not configured with the level-up-down condition, in which case, the first controlled node may discard the target store task.
In an optional embodiment of the application, the first controlled node may determine whether the behavior parameter information of the user satisfies a level elevation condition of the target store, if so, the first controlled node may determine the level of the user according to an elevation level indicated by the satisfied level elevation condition, and if not, the first controlled node may use an original level of the user as the determined level of the user.
It should be noted that, in this embodiment of the present application, a technical process of the first controlled node executing the 1 st target user set task is the same as a technical process of the first controlled node executing the nth target user set task, and details of this embodiment of the present application are not described herein again.
It should also be noted that, in an alternative embodiment of the present application, the first controlled node may trigger the task submission process after executing each target user set task, and after the task is submitted, the control node may change the last update time of the submitted target user set task to the task submission time.
Correspondingly to the mode, the control node can inquire the last updating time of the user set task contained in the shop task before distributing the shop task to each controlled node, if the time length between the last updating time of the user set task contained in the shop task and the current time is less than the preset time length threshold value, the shop task is executed in the current user level determination period, in this case, the control node may not distribute the shop task to the controlled node, otherwise, if the time length between the last update time of the user set task included in the shop task and the current time is greater than the preset time length threshold, it indicates that the shop task is not executed in the current user level determination period, in this case, the control node may distribute the store task into the controlled nodes to be executed by the assigned controlled nodes.
In an optional embodiment of the present application, if the first controlled node is abnormal and cannot execute the task normally, the control node may reassign the target store task assigned to the first controlled node to the controlled node without the abnormality, so as to avoid that the target store task cannot be executed normally and the level of the user in the target store cannot be changed in time. Referring to fig. 4, in order to achieve the above purpose, the embodiments of the present application may further perform the following steps:
In an alternative embodiment of the present application, the control node may send the heartbeat packet to the first controlled node at intervals, for example, the control node may send the heartbeat packet to the first controlled node in a ping manner every 5 s.
If the working state of the first controlled node is a normal state, the first controlled node returns a response heartbeat packet to the control node after receiving the heartbeat packet sent by the control node.
If the control node receives a response heartbeat packet sent by the first controlled node, the control node may determine that the working state of the first controlled node is a normal state, otherwise, if the control node does not receive the response heartbeat packet sent by the first controlled node for a plurality of consecutive times (for example, for 3 consecutive times), the control node may determine that the working state of the first controlled node is an abnormal state.
And step 402, if the working state of the first controlled node is an abnormal state, the control node redistributes the target shop task to the second controlled node.
The second controlled node is a controlled node other than the first controlled node in the plurality of controlled nodes included in the user level determination system, and further, the working state of the second controlled node is a normal state.
In an alternative embodiment of the present application, if the number of targeted store tasks is multiple, the controlling node may redistribute the multiple targeted store tasks to one or more second controlled nodes.
Optionally, if the number of the target store tasks is multiple, the control node may perform hash modulo processing on the identifiers of the target stores corresponding to the multiple target store tasks, respectively, and redistribute the multiple target store tasks to multiple second controlled nodes according to the result of the hash modulo processing.
And step 403, the second controlled node sequentially executes a plurality of target user set tasks included in the target shop task.
The technical process that the second controlled node sequentially executes the plurality of target user set tasks included in the target store task is the same as the technical process that the first controlled node sequentially executes the plurality of target user set tasks included in the target store task, and the embodiment of the present application is not described herein again.
Referring to fig. 5, the second controlled node may sequentially execute a plurality of target user set tasks included in the target store task according to the technical process shown in fig. 5, wherein the technical process may include the following steps:
In an optional embodiment of the present application, if the task lock of the candidate user set task is not released after the other tasks are completely executed in step 502, the second controlled node may continue to execute another other tasks, and detect whether the task lock of the candidate user set task is released after the other tasks that continue to be executed are completely executed, if the task lock is released, the second controlled node executes the candidate user set task, and if the task lock is not released, the second controlled node continues to execute other tasks. And after all other tasks required to be executed by the second controlled node are executed and completed, if the task lock of the candidate user set task is not released, the second controlled node discards the candidate user set task.
Referring to fig. 6, a block diagram of a user level determination system 600 provided by an embodiment of the present application is shown, where the user level determination system 600 may include a control node 601 and a plurality of controlled nodes 602.
The control node 601 is configured to distribute a plurality of store tasks to the controlled nodes 602, where each store task corresponds to a different store to be subjected to user level determination.
A first controlled node 602, configured to receive a target store task distributed by the control node 601, where the first controlled node is any one of the controlled nodes, and the target store task corresponds to a target store.
The first controlled node 602 is configured to sequentially execute a plurality of target user set tasks included in the target store task, where different target user set tasks correspond to different user sets, each user set includes a plurality of users in the target store, and the target user set task is a task for determining a rank of each user in the corresponding user set.
In an optional embodiment of the present application, the first controlled node 602 is specifically configured to: before executing the nth target user set task, acquiring the execution duration of the (n-1) th target user set task, wherein n is a positive integer greater than 1; determining the locking time length of the nth target user set task according to the execution time length; and adding a task lock for the nth target user set task according to the lock duration, and executing the nth target user set task.
In an optional embodiment of the present application, the first controlled node 602 is specifically configured to: and taking the product of the execution time length and a preset parameter as the lock time length of the nth target user set task, wherein the preset parameter is a positive integer which is greater than 1 and smaller than a preset parameter threshold value.
In an optional embodiment of the present application, the first controlled node 602 is specifically configured to: and for each user in the user set corresponding to the nth target user set task, acquiring the behavior parameter information of the user according to the identification information of the user, and determining the grade of the user according to the behavior parameter information and the grade lifting condition of the target shop.
In an optional embodiment of the present application, the control node 601 is further configured to detect an operating status of the first controlled node 602, and if the operating status of the first controlled node 602 is an abnormal status, redistribute the target store task to a second controlled node 602, where the second controlled node 602 is a controlled node other than the first controlled node in the plurality of controlled nodes.
A second controlled node 602 for sequentially performing a plurality of target user set tasks included in the target store task.
In an optional embodiment of the present application, the second controlled node 602 is specifically configured to: determining candidate user set tasks that are not completed by the first controlled node from a plurality of target user set tasks included in the target store task; if the task lock is added to the candidate user set task by the first controlled node, executing other tasks except the candidate user set task, and executing the candidate user set task after the other tasks are executed; and if the candidate user set task is not added with the task lock by the first controlled node, executing the candidate user set task.
In an optional embodiment of the present application, each controlled node 602 in the normal state is further configured to send health information to the controlling node 601.
The control node 601 is specifically configured to distribute the plurality of store tasks to the controlled nodes in the normal state according to the received health information.
For the specific definition of the user level determination system, reference may be made to the above definition of the user level determination method, which is not described herein again.
In one embodiment of the present application, a computer device is provided, and the computer device may be a control node or a controlled node, and its internal structure diagram may be as shown in fig. 7. The computer device includes a processor and a memory connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The computer program is executed by a processor to implement the steps performed by the control node or the controlled node in the user level determination method described above.
Those skilled in the art will appreciate that the architecture shown in fig. 7 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the user level determination method as described above.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the claims. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.
Claims (10)
1. A user level determination method, for use in a user level determination system comprising a control node and a plurality of controlled nodes, the method comprising:
the control node distributes a plurality of shop tasks to the controlled nodes, wherein each shop task corresponds to a different shop to be subjected to user level determination;
a first controlled node receives a target shop task distributed by the control node, wherein the first controlled node is any one of the controlled nodes, and the target shop task corresponds to a target shop;
the first controlled node sequentially executes a plurality of target user set tasks included in the target store task, wherein different target user set tasks correspond to different user sets, each user set includes a plurality of users in the target store, and the target user set task is a task for determining the grade of each user in the corresponding user set.
2. The method of claim 1, wherein the first controlled node sequentially performs a plurality of targeted user set tasks comprised by the targeted store task, comprising:
before the first controlled node executes the nth target user set task, acquiring the execution duration of the (n-1) th target user set task, wherein n is a positive integer greater than 1;
the first controlled node determines the locking time length of the nth target user set task according to the execution time length;
and the first controlled node adds a task lock to the nth target user set task according to the lock duration and executes the nth target user set task.
3. The method of claim 2, wherein determining, by the first controlled node, the lock duration for the nth target user set task based on the execution duration comprises:
and the first controlled node takes the product of the execution time length and a preset parameter as the lock time length of the nth target user set task, wherein the preset parameter is a positive integer which is greater than 1 and smaller than a preset parameter threshold value.
4. The method of claim 2, wherein said performing the nth of the target user set tasks comprises:
and for each user in a user set corresponding to the nth target user set task, acquiring behavior parameter information of the user according to the identification information of the user, and determining the grade of the user according to the behavior parameter information and the grade lifting condition of the target shop.
5. The method of claim 1, further comprising:
the control node detects the working state of the first controlled node;
if the working state of the first controlled node is an abnormal state, the control node redistributes the target shop task to a second controlled node, and the second controlled node is a controlled node except the first controlled node in the controlled nodes;
and the second controlled node sequentially executes a plurality of target user set tasks included in the target shop task.
6. The method of claim 5, wherein the second controlled node sequentially performs a plurality of targeted user set tasks comprised by the targeted store task, comprising:
the second controlled node determines a candidate user set task which is not completed by the first controlled node from a plurality of target user set tasks included in the target shop task;
if the task lock is added to the candidate user set task by the first controlled node, the second controlled node executes other tasks except the candidate user set task, and executes the candidate user set task after the other tasks are executed;
and if the candidate user set task is not added with a task lock by the first controlled node, the second controlled node executes the candidate user set task.
7. The method of claim 1, wherein prior to the controlling node distributing a plurality of store tasks to the plurality of controlled nodes, the method further comprises:
each controlled node in a normal state sends health information to the control node;
correspondingly, the control node distributes a plurality of store tasks to the plurality of controlled nodes, including:
and the control node distributes the plurality of shop tasks to each controlled node in the normal state according to the received health information.
8. A user level determination system, characterized in that the user level determination system comprises a control node and a plurality of controlled nodes;
the control node is used for distributing a plurality of shop tasks to the controlled nodes, wherein each shop task corresponds to different shops with different user levels to be determined;
a first controlled node, configured to receive a target store task distributed by the control node, where the first controlled node is any one of the multiple controlled nodes, and the target store task corresponds to a target store;
the first controlled node is configured to sequentially execute a plurality of target user set tasks included in the target store task, where different target user set tasks correspond to different user sets, each user set includes a plurality of users in the target store, and the target user set task is a task for determining a level of each user in the corresponding user set.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011221153.0A CN112306691B (en) | 2020-11-05 | 2020-11-05 | User grade determining method, system, computer device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011221153.0A CN112306691B (en) | 2020-11-05 | 2020-11-05 | User grade determining method, system, computer device and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112306691A true CN112306691A (en) | 2021-02-02 |
CN112306691B CN112306691B (en) | 2024-02-13 |
Family
ID=74326164
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011221153.0A Active CN112306691B (en) | 2020-11-05 | 2020-11-05 | User grade determining method, system, computer device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112306691B (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103309738A (en) * | 2013-05-31 | 2013-09-18 | 中国联合网络通信集团有限公司 | User job scheduling method and device |
CN105814595A (en) * | 2013-10-28 | 2016-07-27 | 电子湾有限公司 | System and method for identifying purchase intent |
CN107516230A (en) * | 2016-06-17 | 2017-12-26 | 长沙海商网络技术有限公司 | A kind of multi-platform internet marketing mall system by all kinds of means of multi-mode |
CN110711379A (en) * | 2018-07-12 | 2020-01-21 | 移动装置公司 | System and method for intelligently rewarding completion of tasks |
CN111192084A (en) * | 2019-12-27 | 2020-05-22 | 深圳市云积分科技有限公司 | Member identity evaluation management method and device |
CN111309457A (en) * | 2019-07-10 | 2020-06-19 | 浙江商安信息科技有限公司 | Method, terminal, collection node and system for collecting meal ordering shop information |
CN111630547A (en) * | 2018-01-29 | 2020-09-04 | 瑞可利有限公司 | Management support system, management support method, and recording medium having management support program recorded thereon |
CN111861571A (en) * | 2020-07-24 | 2020-10-30 | 海南中金德航科技股份有限公司 | Member management system |
-
2020
- 2020-11-05 CN CN202011221153.0A patent/CN112306691B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103309738A (en) * | 2013-05-31 | 2013-09-18 | 中国联合网络通信集团有限公司 | User job scheduling method and device |
CN105814595A (en) * | 2013-10-28 | 2016-07-27 | 电子湾有限公司 | System and method for identifying purchase intent |
CN107516230A (en) * | 2016-06-17 | 2017-12-26 | 长沙海商网络技术有限公司 | A kind of multi-platform internet marketing mall system by all kinds of means of multi-mode |
CN111630547A (en) * | 2018-01-29 | 2020-09-04 | 瑞可利有限公司 | Management support system, management support method, and recording medium having management support program recorded thereon |
CN110711379A (en) * | 2018-07-12 | 2020-01-21 | 移动装置公司 | System and method for intelligently rewarding completion of tasks |
CN111309457A (en) * | 2019-07-10 | 2020-06-19 | 浙江商安信息科技有限公司 | Method, terminal, collection node and system for collecting meal ordering shop information |
CN111192084A (en) * | 2019-12-27 | 2020-05-22 | 深圳市云积分科技有限公司 | Member identity evaluation management method and device |
CN111861571A (en) * | 2020-07-24 | 2020-10-30 | 海南中金德航科技股份有限公司 | Member management system |
Also Published As
Publication number | Publication date |
---|---|
CN112306691B (en) | 2024-02-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110750278A (en) | Gray scale distribution method and device, routing equipment and storage medium | |
US11729007B2 (en) | Methods and apparatus to manage timing in a blockchain network | |
US10225145B2 (en) | Method and device for updating client | |
US20220407726A1 (en) | Consensus method for blockchain, consensus node, electronic device, and storage medium | |
CN109587220B (en) | Load balancing method and device, computer equipment and storage medium | |
CN110933178B (en) | Method for adjusting node configuration in cluster system and server | |
EP3331218B1 (en) | Method and device for leveling load of distributed database | |
CN111708586A (en) | Application starting configuration item loading method and device, computer equipment and storage medium | |
CN111209336B (en) | Data distribution method and device based on block chain and server | |
US20220012233A1 (en) | Creation of a Blockchain with Blocks Comprising an Adjustable Number of Transaction Blocks and Multiple Intermediate Blocks | |
CN113515322B (en) | Application program loading method and device, computer equipment and readable storage medium | |
US10698623B2 (en) | Data processing method and apparatus and storage medium | |
CN111459676A (en) | Node resource management method, device and storage medium | |
CN114492849B (en) | Model updating method and device based on federal learning | |
CN108389124B (en) | Data processing method, data processing device, computer equipment and storage medium | |
CN112306691A (en) | User level determination method, system, computer device and storage medium | |
CN113656163A (en) | Service resource scheduling method, device, computer equipment and storage medium | |
CN112989147A (en) | Data information pushing method and device, computer equipment and storage medium | |
CN111709216A (en) | Distributed unique identification code generation method, device, computer equipment and medium | |
CN110888892A (en) | Block synchronization method, device and storage medium | |
CN116303343A (en) | Data slicing method, device, electronic equipment and storage medium | |
CN110647336A (en) | Gray scale distribution method and device, computer equipment and storage medium | |
CN111191982B (en) | Order grouping method and device, computer equipment and storage medium | |
TWI584667B (en) | Method for request scheduling and scheduling device | |
CN113190554A (en) | Method for generating primary key and distributed system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |