Task pushing method and device and processor

By verifying and deduplicating the push tasks, sorting them by time and executing them in batches, and combining this with a task locking mechanism, the problems of incorrect and missed pushes caused by system congestion were solved, thus achieving the accuracy and stability of task push.

CN121078112APending Publication Date: 2025-12-05BANK OF NINGBO
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511400456.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-28
Publication Date
2025-12-05

AI Technical Summary

Technical Problem

As business scales up, the system is prone to congestion under high concurrency requests, leading to incorrect and missed pushes, which affects the real-time performance, accuracy and stability of push notifications.

Method used

By acquiring and verifying the tasks to be pushed, configuring task locks, deduplicating tags, sorting them by push time and dividing them into multiple task batches, and executing the task batches sequentially in conjunction with the task lock mechanism, we can ensure that each task item is pushed in an orderly manner according to time.

Benefits of technology

It effectively avoids system overload and resource contention, reduces erroneous push notifications and omissions, and improves the accuracy of push notifications and system stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121078112A_ABST
    Figure CN121078112A_ABST
Patent Text Reader

Abstract

The invention discloses a task pushing method and device and a processor, and the method comprises the steps: firstly obtaining a to-be-pushed task comprising a plurality of task items, and verifying the to-be-pushed task, the task items comprising a pushing content, a task title, a task link, a task title, a task pushing time, a task state and a pushing target marked with at least one affiliated customer group label; and configuring a task lock for the task item after the verification is passed, performing label duplication removal on the push target marked with a plurality of customer group labels, and generating the task item only containing a single customer group label so as to avoid repeated push. Then the single-label task items are sorted according to the pushing time sequence of the single-label task items, the sorted task items are divided into a plurality of task batches according to division conditions, and each batch is endowed with a unique task number determined based on the earliest task pushing time in the batch. And then, in combination with a task lock mechanism, sequentially executing single-label task items in each task batch according to a task numbering sequence, and ensuring that the pushing process is orderly and conflict-free.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computers, in particular to a task pushing method and device and a processor. BACKGROUND

[0002] Customized task notifications can achieve targeted information pushing by combining personalized preferences of users and actual business scenarios. Such differentiated content delivery not only includes exclusive offers and customized services, but also accurately matches user interests, thereby significantly improving user satisfaction and participation, and effectively promoting user retention and conversion rate.

[0003] However, as the business scale continues to expand, the pushing volume of inventory notifications increases exponentially, and the pressure on the system also increases. High concurrency requests can easily cause system congestion, thereby causing the risk of incorrect pushing (pushing messages to irrelevant users) and missed pushing (users who should be pushed do not receive messages).

[0004] Therefore, how to reduce system congestion and pushing errors (incorrect pushing and missed pushing) and ensure the real-time, accuracy and stability of pushing is a technical problem that needs to be solved by those skilled in the art. SUMMARY

[0005] Therefore, the embodiments of the present application provide a task pushing method, device and processor to provide an automated task pushing method, thereby reducing system congestion and pushing errors (incorrect pushing and missed pushing) and ensuring the real-time, accuracy and stability of pushing.

[0006] To solve the above problems, the technical solutions provided by the embodiments of the present application are as follows:

[0007] A task pushing method, the method comprising:

[0008] obtaining a task to be pushed, and performing task verification on the task to be pushed; the task to be pushed comprises a plurality of task items, each task item comprising pushing content, a task title, a task link, a task title, a task pushing time, a task state and a pushing target; the pushing target is marked with at least one belonging customer group label;

[0009] if the task verification is passed, configuring a task lock for the task to be pushed, and performing label deduplication on the pushing target marked with a plurality of belonging customer group labels in each task item to obtain a single-label task item, so that the pushing target has only one belonging customer group label; the task lock is implemented by performing a conditional atomic UPDATE operation, so as to ensure that only one task item can acquire a lock at the same time in the task to be pushed, and only the task that acquires the task lock can perform task pushing;

[0010] The single-label task items are sorted based on the time sequence of the task pushing time of each single-label task item, and the sorted single-label task items are divided into task batches and numbered according to a division condition to obtain a plurality of task batches; each task batch is marked with a corresponding task number, and the task number is determined based on the task pushing time of the first single-label task item in each task batch;

[0011] The single-label task items in each task batch are executed in turn according to the task number corresponding to each task batch and in combination with the task lock.

[0012] When a task item is not executed, the task state of the task item is not executed; when the task item is executed, the task state of the task item is updated to be executed.

[0013] In a possible implementation, the single-label task items in each task batch are executed in turn according to the task number corresponding to each task batch and in combination with the task lock, including:

[0014] According to the numbering order of the task number, each task batch is sequentially taken as a current processing batch;

[0015] A current executable task item in the current processing batch is identified, and the task lock is configured to the current executable task item; the current executable task item is a single-label task item with the earliest task pushing time and the task state of not executed in the current processing batch;

[0016] A user list of a guest group label to which the current executable task item belongs is pulled as a pushing user list;

[0017] The current executable task item configured with the task lock is executed to push a message to each pushing user in the pushing user list;

[0018] The steps of current executable task item identification, pushing user list determination, and current executable task item execution are repeated until the task state of each task item in each task batch is executed.

[0019] The task lock is released after the current executable task item.

[0020] In a possible implementation, the task verification on the task to be pushed includes:

[0021] checking whether the push content, the task title, the sum of character lengths of the task title, and the task link are greater than a length threshold, checking whether a time format of the task push time is correct, checking whether a difference between the task push time and a current time is greater than a difference threshold, checking whether the task state is unexecuted, checking whether the task title of each task item is unique, and checking whether a number of users covered by each belonging customer group tag of each push target is less than a person number threshold.

[0022] In a possible implementation, the method further includes:

[0023] based on the task lock information list, counting a total number of task locks and a number of available locks; the task lock information list includes a unique identifier and a use state of each task lock; the use state is idle or occupied;

[0024] if the number of available locks + 1 is less than or equal to the total number of task locks, selecting a task lock with an idle use state from the task lock information list, assigning the task lock to the task to be pushed, and updating the use state of the task lock to occupied; otherwise, rejecting the assignment of the task lock;

[0025] In the process of counting the number of available locks, the task lock with the idle use state is counted as the available lock.

[0026] In a possible implementation, the method further includes:

[0027] starting a timer from the beginning of the execution of the current processing batch, and after a preset time elapses, performing a state check on each task item in the current processing batch to obtain a check result;

[0028] if the check result indicates that there is a task item with an unexecuted state in the current processing batch, discarding the task item with the unexecuted state in the current processing batch, and sequentially taking a next task batch as a current processing batch according to the numbering order to perform the identification of the current executable task item in the current processing batch and the subsequent steps.

[0029] In a possible implementation, after the execution of the current executable task item configured with the task lock, the method further includes:

[0030] calculating an execution time consumption of the current executable task item;

[0031] if the execution time consumption is less than a time consumption threshold, performing task dormancy; the task dormancy is a difference between the time consumption threshold and the execution time consumption.

[0032] The task continues to perform the steps of current executable task item identification, push user list determination and current executable task item execution after the task hibernation until the task state of each task item in each task batch is execution complete.

[0033] In a possible implementation, the task item further includes a fusion fixed parameter and a push user key-value pair, and the fusion fixed parameter includes a task identification Taskkey and an organization to which the task belongs.

[0034] The primary key of the push user key-value pair is the Taskkey of the task item, and the value is a user identification of a push user corresponding to the task item; when the task item has not been pushed, the value in the push user key-value pair is empty.

[0035] In a possible implementation, the method further includes:

[0036] identifying a periodic push amount of the organization to which the task belongs; the periodic push amount is a monthly cumulative push amount, a weekly cumulative push amount or a daily cumulative push amount;

[0037] If the periodic push amount of the organization to which the task belongs is greater than or equal to a corresponding push quantity threshold, the task push of the organization is suspended.

[0038] A task push device, the device includes:

[0039] An acquisition unit configured to acquire a task to be pushed;

[0040] A verification unit configured to perform task verification on the task to be pushed; the task to be pushed includes a plurality of task items, each task item includes push content, a task title, a task link, a task title, a task push time, a task state and a push target; the push target is marked with at least one belonging customer group label;

[0041] A task lock configuration unit configured to configure a task lock for the task to be pushed if the task verification is passed; the task lock is implemented by performing a conditional atomic UPDATE operation to ensure that only one task item can acquire a lock at the same time in the task to be pushed, and only the task that acquires the task lock can perform task push;

[0042] A label deduplication unit configured to perform label deduplication on the push target marked with a plurality of belonging customer group labels in each task item to obtain a single-label task item, so that the push target has only one belonging customer group label;

[0043] The sorting and dividing unit is configured to sort each single-label task item according to the time sequence of the task pushing time of each single-label task item, and divide each sorted single-label task item according to a division condition to obtain a plurality of task batches according to task division and task numbering;

[0044] The task execution unit is configured to execute the single-label task items in each task batch in sequence according to the task number corresponding to each task batch and in combination with the task lock.

[0045] When a task item is not executed, the task state of the task item is not executed; and when the task item is executed, the task state of the task item is updated to be executed.

[0046] A processor configured to run a computer program, wherein the program is configured to execute the task pushing method according to any one of claims 1-8.

[0047] Therefore, the embodiments of the present application have the following beneficial effects:

[0048] The embodiments of the present application first acquire the to-be-pushed task and perform verification to confirm that the information of each task item is complete and valid, including the pushing content, title, link, pushing time, state and at least one belonging customer group label. After the verification passes, the task is configured with a task lock, and an atomic UPDATE operation with a condition is used to ensure that only one task item can obtain the pushing permission at the same time, and the pushing target labeled with multiple customer group labels is de-duplicated to generate a task item containing only a single customer group label to avoid repeated pushing. Then, the single-label task items are sorted according to the pushing time, and are divided into a plurality of ordered task batches according to the division condition, and each batch is labeled with a unique task number determined based on the earliest pushing time. Then, in combination with the task lock mechanism, the task items in each batch are executed in sequence according to the task number order to ensure that the pushing process is orderly and conflict-free. The present application sorts the single-label task items according to the pushing time, and divides them into a plurality of task batches according to the division condition, and executes the task batches in order, which effectively avoids the system overload caused by one-time large-scale pushing, and further reduces the phenomenon of system jamming, thereby reducing the error pushing or omission caused by resource competition. At the same time, the task lock is realized by using the atomic UPDATE operation with a condition to ensure that only one task item obtains the pushing permission at the same time, thereby preventing the repeated pushing (wrong pushing) or the task not being executed (missing pushing) caused by concurrent conflicts, and improving the accuracy of pushing and the stability of the system. BRIEF DESCRIPTION OF DRAWINGS

[0049] Figure 1 An implementation flowchart of a task pushing method provided by the embodiments of the present application;

[0050] Figure 2 An implementation flowchart of another task pushing method provided for an embodiment of the present application;

[0051] Figure 3 A structural schematic diagram of a task pushing device provided for an embodiment of the present application. DETAILED DESCRIPTION

[0052] In order to make the above objectives, characteristics and advantages of the present application more apparent, comprehensible and easier to understand, the embodiments of the present application are further described in detail below with reference to the drawings and specific embodiments.

[0053] The custom task notification can accurately push differentiated content such as exclusive offers and customized services according to the personalized preferences of the user and the specific business needs, effectively improving the user satisfaction and participation, thereby promoting the improvement of user retention and conversion rate.

[0054] However, with the rapid expansion of the business scale, the amount of notification pushing increases dramatically, and the system carrying pressure also increases continuously. In the case of high concurrency, system congestion is prone to occur, thereby causing the problems of wrong pushing (pushing to non-target users) and missing pushing (target users not receiving the pushing), and further affecting the pushing effect and user experience.

[0055] Based on this, the embodiment of the application provides a task pushing method, device and processor, which first acquires a to-be-pushed task and verifies the task. The to-be-pushed task contains multiple task items, each task item includes pushing content, a task title, a task link, a task pushing time, a task state and a pushing target labeled with at least one belonging customer group tag. If the task verification is passed, a task lock is configured for the to-be-pushed task, and label deduplication is performed on the pushing target labeled with multiple belonging customer group tags in each task item to obtain a single-tag task item, so as to ensure that each pushing target has only one belonging customer group tag. The task lock is implemented by performing a conditional atomic UPDATE operation, so as to ensure that only one task item can acquire the lock at the same time, and only the task that acquires the task lock can perform task pushing. Then, the task items are sorted based on the time sequence of the task pushing time of the single-tag task item, and the sorted task items are divided and numbered according to the division condition to obtain multiple task batches, each task batch is labeled with a task number, and the task number is determined based on the task pushing time of the earliest task item in each task batch. Finally, the single-tag task items in each task batch are executed in turn according to the task number corresponding to the task batch and in combination with the task lock, wherein the state of the task item is not executed when the task item is not executed, and the state is updated to execution completed after the execution is completed. The application sorts the task items according to the pushing time and processes the task items in batches, and executes each batch of tasks in order, which effectively avoids errors or missed pushing caused by system overload and resource competition. At the same time, the task lock is implemented by using a conditional atomic update operation, so as to ensure that only one task item can be pushed at the same time, thereby preventing repeated pushing or task omission caused by concurrent conflicts, and improving the pushing accuracy and system stability.

[0056] In order for those skilled in the art to better understand the scheme of the present application, the technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0057] In order to facilitate understanding of the present application, a task pushing method provided by the embodiments of the present application will be described below in conjunction with the drawings.

[0058] Referring to Figure 1 illustrated, Figure 1 An implementation manner flowchart of the task pushing method provided by the embodiments of the present application is shown in Figure 1 illustrated, the method can include S101-S104:

[0059] S101: acquiring a to-be-pushed task, and performing task verification on the to-be-pushed task.

[0060] To ensure the accuracy and effectiveness of the push task, the system first needs to obtain the to-be-pushed task and perform strict task verification. The to-be-pushed task is composed of multiple task items, each of which contains detailed information such as push content, task title, task link, task push time, task status, and push target. Among them, the push target must be marked with at least one belonging customer group tag to achieve accurate positioning.

[0061] For example, in an e-commerce promotion activity, a to-be-pushed task may contain several task items, each providing exclusive coupons for different products. The push content includes discount details, the task title is "Limited-time purchase", the task link points to the specific product page, the push time is set to one hour before the activity starts, the task status is initially unexecuted, and the push target corresponds to the "young fashion customer group" or "high-consumption user" belonging customer group tags. Through these tags, the system can accurately identify target users and achieve personalized push, thereby improving user response rate and conversion effect.

[0062] In one possible implementation, the task push time is generally set between 8 am and 11 pm to avoid sending messages during user rest time or late at night, thereby reducing interference with user life and sleep and improving message opening rate and response rate. At the same time, this time period conforms to the daily activity habits of most users, which is conducive to improving push effect and user experience.

[0063] In one possible implementation, the to-be-pushed task can be a newly created new task (i.e., a new task) or an updated version after modification of an existing to-be-pushed task (i.e., a modified task). Whether it is a new task or a modified task, the system needs to perform corresponding verification and processing to ensure the integrity and effectiveness of the task content, push time, and target tag information, thereby ensuring accurate execution of the subsequent push process. For example, an operator may create a new promotion push task or adjust the push time or modify the push content of an existing push task. Both of these cases fall within the scope of to-be-pushed tasks, and the system will manage and dispatch them equally.

[0064] During execution, the initial state of each task item is "unexecuted", and when the push operation is successfully completed, the system will immediately update the state of the task item to "execution completed" to accurately reflect the task execution progress and support subsequent management.

[0065] It should be noted that if there is a task item in the change task that has been executed, the initial state of the task item should be "execution completed". Since task retrieval is usually performed on task items with a state of "not executed", when the state of a task item is "execution completed", the task item cannot pass the task check, so that the task check of the task to be pushed is not passed.

[0066] It should also be noted that when the task check is not passed, the system does not enter step S102 to configure a task lock for the task to be pushed, but directly generates a feedback of the check error to the front end. In this way, the front end can timely know the specific check problem and maintain and correct the related task item, thereby ensuring the accuracy and integrity of the key information such as the task content, the pushing time, and the pushing target, avoiding errors in the subsequent pushing process due to abnormal data, and improving the reliability and user experience of the overall task pushing.

[0067] S102: If the task check is passed, a task lock is configured for the task to be pushed, and label deduplication is performed on the pushing target marked with multiple belonging customer group labels in each task item to obtain a single-label task item.

[0068] In order to ensure the orderliness of the task pushing process and avoid resource conflicts, when the task to be pushed passes the check, the system will configure a task lock for the task, implement exclusive control of the task by performing a conditional atomic UPDATE operation, ensure that only one task item can successfully acquire the lock at the same time, thereby preventing data competition and pushing confusion caused by simultaneous execution of multiple task items. At the same time, for the pushing target marked with multiple belonging customer group labels in the task item, the system will perform label deduplication, that is, randomly retain one belonging customer group label to generate a single-label task item, and ensure that the pushing target of each task item contains only a unique customer group label. In this way, not only is the same user avoided from being repeatedly pushed due to multiple labels, but also the accuracy and efficiency of the pushing are improved.

[0069] For example, assuming that a task item in a certain promotion task has a pushing target containing both "high-value customers" and "active users" labels, after label deduplication, the task item will randomly select one of the labels (such as "high-value customers") as the belonging customer group label of the pushing target, and the task lock mechanism ensures that the task items are executed in sequence, thereby realizing a safe and efficient pushing process.

[0070] S103: The single-label task items are sorted based on the time sequence of the task pushing time of each single-label task item, and the sorted single-label task items are divided into multiple task batches according to the division condition.

[0071] In order to reasonably arrange the execution order of tasks and improve the pushing efficiency, the system can sort all task items in the order of task pushing time of each single-label task item, to ensure that the tasks can be pushed in turn according to the predetermined time sequence. Then, the system divides the sorted task items into multiple task batches according to the division condition (for example, dividing by including X task items in each batch, X being a positive integer), and each batch contains several continuous single-label task items. In order to facilitate management and scheduling, each task batch is assigned a unique task number, such as 1, 2, 3, etc., which is determined based on the pushing time of the single-label task item at the front of the batch, reflecting the execution priority of the batch task.

[0072] For example, assuming that there are 9 single-label task items with different pushing times from 9 am to 5 pm, the system sorts them by time and divides them into 3 batches with 3 task items in each batch. The first batch is numbered 1 based on the pushing time of the first task item at 9 am; the second batch is numbered 2 based on the pushing time of the fourth task item at 11:30 am; and the third batch is numbered 3 based on the pushing time of the seventh task item at 2 pm. In this way, the task batches are not only in order, but also efficiently support subsequent task scheduling and execution control.

[0073] It should be noted that if the number of remaining tasks after division is insufficient to meet the preset division condition, the system will usually form a smaller task batch with the insufficient number of tasks, and the batch will also be assigned a corresponding task number to ensure that all tasks can be managed in batches and executed in order. This not only avoids task omission, but also ensures the integrity and continuity of the pushing process. For example, assuming that the division condition is "divide by including 3 task items in each batch", the system has divided the first three batches of 11 task items, but only 2 tasks remain unassigned. At this time, the system will merge the 2 tasks into the fourth batch, assign the number 4, and continue to schedule and execute in time sequence, to ensure that all tasks are effectively processed and do not affect the overall pushing rhythm.

[0074] S104: Execute the single-label task items in each task batch in turn according to the task number corresponding to each task batch and in combination with the task lock.

[0075] In order to ensure the orderliness of task pushing and avoid resource conflicts, the system executes the single-label task items in each task batch in turn according to the task number corresponding to each task batch and in combination with the task lock mechanism. Specifically, the system processes the tasks batch by batch in the order of task number, and only the task of the current batch can start execution after obtaining the task lock, so as to ensure that only one batch of tasks is running at the same time, preventing data competition or chaos caused by concurrent pushing.

[0076] Exemplarily, assuming that the system has three batches of tasks numbered 1, 2 and 3, the system first acquires a task lock to execute the batch of tasks numbered 1, releases the lock after completing all task items and updating the state, and then continues to execute the batch of tasks numbered 2, and so on, to ensure that the entire pushing process is connected and orderly.

[0077] Based on the description of S101-S104, the embodiment of the application first acquires the to-be-pushed task and performs verification. The to-be-pushed task contains multiple task items, each of which contains pushing content, a task title, a task link, a task pushing time, a task state and a pushing target, and the pushing target is marked with at least one guest group label. After verification, the to-be-pushed task is configured with a task lock and the labels of the pushing target are de-duplicated to obtain single-label task items, ensuring that each pushing target has only one label. The task lock is implemented through a conditional atomic UPDATE operation, ensuring that only one task item can acquire the lock and push at the same time. Then, the task items are sorted according to the task pushing time, the task batches are divided according to the conditions, and the task batches are numbered. Finally, the single-label task items in the task batches are executed in turn according to the task numbers and the task locks. When the task is not executed, the state is not executed, and after the execution is completed, the state is updated to execution completed. By sorting and executing the tasks in batches according to the time, the application can effectively avoid system overload and pushing errors. At the same time, the use of the task lock ensures that only one task is executed at the same time, preventing repeated or missed pushing and improving the accuracy and stability of the pushing.

[0078] Referring to Figure 2 , Figure 2 Another implementation process flow of the task pushing method provided by the embodiment of the application is provided, and correspondingly, the step S104 of executing the single-label task items in each task batch in turn according to the task numbers corresponding to each task batch and in combination with the task lock can be implemented through steps S201-S205:

[0079] S201: According to the numbering order of the task numbers, each task batch is sequentially taken as a current processing batch.

[0080] In order to ensure the sequence of task pushing and the stability of system running, the system will take each task batch as the current processing batch in turn according to the numbering order of the task numbers corresponding to each task batch. In this way, it can be ensured that the task batches with higher priority or earlier pushing time determined in advance are executed first, avoiding confusion and resource conflicts in task execution.

[0081] Exemplarily, it is assumed that there are three batches of tasks numbered 1, 2, and 3 in the system, the batch numbered 1 contains task items to be executed starting at 9:00 am, the batch numbered 2 contains task items at 11:00 am, and the batch numbered 3 contains task items at 2:00 pm. The system will first set the batch numbered 1 as the current processing batch, and after all the task items in the batch are completed, it will switch to the batches numbered 2 and 3 in turn for processing, thereby realizing an orderly and efficient task pushing process.

[0082] S202: Identify the current executable task item in the current processing batch, and configure the task lock to the current executable task item.

[0083] In the task pushing process, the system can identify the "current executable task item" in the currently processed task batch, which needs to meet two conditions: one is that its task pushing time is the earliest among all unexecuted task items in the batch, and the other is that the task state is "unexecuted". Only the task item meeting the two conditions can be selected as the current executable object, thereby ensuring that the tasks are pushed in turn according to the predetermined time sequence, avoiding jumping execution or repeated pushing. After identifying the task item, the system will configure the task lock to it, ensuring that the task item has exclusive right during execution, preventing interference from other concurrent tasks.

[0084] Exemplarily, it is assumed that a task batch contains three single-label task items, with pushing times of 9:00 am, 9:30 am, and 10:00 am, respectively, and the states of the first three task items are all "unexecuted". The system will preferentially select the task item at 9:00 am as the current executable task item, and configure the task lock for it, starting to execute the task, and after the execution is completed, the subsequent task items are processed in turn. This mechanism effectively guarantees the orderliness and safety of task execution.

[0085] S203: Pull the user list of the customer group tag to which the current executable task item belongs as the pushing user list.

[0086] In the task pushing process, after determining the current executable task item, the system can accurately pull the user list matching the tag from the user database or the tag management system according to the customer group tag to which the task item corresponds, as the target user group for this pushing. This ensures the pertinence and effectiveness of message pushing, avoids interference from irrelevant users, and improves the conversion rate of pushing.

[0087] Exemplarily, it is assumed that the customer group tag to which a task item belongs is "high-value customers", and the system will query and filter out all users marked as "high-value customers", and form a pushing user list with these users, and then send corresponding promotional information to each user in the list. This step is a key link to realize accurate marketing and improve user experience.

[0088] S204: Perform the current executable task item configured with the task lock to push messages to each push user in the push user list.

[0089] In the task execution phase, the system can send the agreed message content to each user in the push user list corresponding to the current executable task item that has successfully configured the task lock. The existence of the task lock ensures that the task item has exclusive access during execution, preventing resource conflicts or data inconsistencies caused by simultaneous operations of other tasks. By sequentially initiating message pushing to users in the push user list, the system completes precise coverage and communication of the target customer group.

[0090] For example, assume that the current executable task item of a certain promotion activity is associated with a batch of "high-value customer" users. After obtaining the task lock, the system sends promotional SMS or APP notifications to these customers one by one, ensuring that the messages accurately reach the target users, thereby improving activity effectiveness and user response rate.

[0091] S205: Repeat steps S202-S204 until the task status of each task item in each task batch is "execution completed".

[0092] When performing task pushing, the system repeatedly executes steps S202 to S204, i.e., continuously identifies the single-label task item in the current batch that has not been executed and has the earliest pushing time, configures the task lock, pulls the corresponding user list, and completes message pushing. After completing the pushing of each task item, the system promptly releases the task lock held by the task item, ensuring that subsequent task items can successfully acquire the lock and continue execution. This process continues until the status of all task items in the current task batch is updated to "execution completed", indicating that all tasks in the batch have been successfully pushed.

[0093] For example, assume that a certain task batch contains 5 task items. The system first identifies and executes the first task item, releases the task lock after completing the pushing, and then processes the second, third, and fifth task items in turn until all five task items are executed. At this point, the status of all task items in the batch is "execution completed", and the system enters the next task batch or terminates the pushing process, thereby ensuring the orderliness and integrity of task pushing.

[0094] In one possible implementation, the task verification of the to-be-pushed tasks in step S101 specifically includes the following aspects:

[0095] (1) Character length and verification: The system will accumulate the character lengths of the push content, task title, and task link, and determine whether the total exceeds the preset length threshold. If it does, it is considered unqualified, avoiding display abnormalities or transmission failures due to excessive information. For example, if the length threshold is set to 500 characters, and a task has a push content of 300 characters, a task title of 150 characters, and a task link of 50 characters, the total is 500 characters, which meets the requirements; if the total length is 510 characters, the verification fails.

[0096] (2) Time format verification: The system verifies whether the task push time conforms to the standard time format (such as "YYYY-MM-DD HH:mm:ss"), ensuring that the scheduling system can correctly parse and execute the task. Any format error will cause the task to be rejected.

[0097] (3) Time difference verification: The difference between the task push time and the current time must be greater than the set minimum difference threshold (e.g., 10 minutes) to prevent scheduling conflicts or delays caused by tasks scheduled to be executed in a very short time.

[0098] (4) Task status verification: Confirm that the status of the task must be "not executed" to avoid repeated pushing or operating on completed / cancelled tasks.

[0099] (5) Task title uniqueness verification: Ensure that the titles of all task items within the same task are unique to prevent task management confusion and execution conflicts.

[0100] (6) Customer group tag coverage number verification: Check whether the number of users covered by the customer group tag to which each push target belongs is within a reasonable range, i.e., below the number threshold, to ensure that the push range is neither too large nor too small, improving the effectiveness of the push.

[0101] It should be noted that the above 6 verification items must all pass for the system to determine that the task verification passes; if any of the 6 verification items fails, the task verification is determined to fail. Only when the verification passes can the task enter the subsequent push process, ensuring the legality of the task and the reliability of the execution.

[0102] In one possible implementation, the task verification of the task to be pushed in step S101 can also include further verification of the task push time to verify whether the push time is within a reasonable push time range (e.g., between 8 am and 11 pm). This verification ensures that the push task is arranged within a reasonable time window, avoiding sending messages during user rest or inactive periods, thereby improving message reception rate and user experience. For example, if the push time of a task is set to 2 am, the verification will determine that it fails, prompting to adjust the push time to the allowed range to ensure that the push behavior conforms to the expected time strategy.

[0103] In a possible implementation, the step S102 of configuring a task lock for the to-be-pushed task comprises:

[0104] Based on the task lock information list, the total number of task locks and the number of available locks are counted, wherein the task lock information list comprises the unique identifier and the usage state of each task lock; the usage state is idle or occupied. If the number of available locks + 1 is less than or equal to the total number of task locks, a task lock with an idle usage state is selected from the task lock information list, and the task lock is allocated to the to-be-pushed task, and the usage state of the task lock is updated to occupied; otherwise, the allocation of the task lock is refused. When counting the number of available locks, the task lock with an idle usage state is counted as an available lock.

[0105] Specifically, first, the system counts the total number of task locks and the number of available idle locks based on the task lock information list. The task lock information list records the unique identifier and the current usage state of each task lock in detail, and the usage state is divided into two types: idle and occupied. When counting, all task locks with an idle state are counted as available locks.

[0106] Then, the system judges whether the number of available locks + 1 is less than or equal to the total number of task locks. If yes, it means that there are enough task lock resources for allocation, and a task lock with an idle state is selected from the task lock information list and allocated to the current to-be-pushed task. The usage state of the task lock is updated to occupied to prevent being repeatedly used by other tasks. If not, the allocation request of the task lock is refused to avoid resource overload.

[0107] For example, it is assumed that the system maintains 10 task locks in total, 7 of which are in an idle state and 3 of which are occupied. When a new to-be-pushed task needs to be configured with a task lock, the system calculates that 7 (idle) + 1 = 8 is less than 10, and the total number meets the condition. Therefore, one of the 7 idle locks is selected, its state is changed to occupied, and the task lock is allocated to the task. If there are only 2 idle locks, 2 + 1 = 3 is still less than or equal to 10, and the allocation can still be performed. When the number of idle locks is insufficient and the number of available locks + 1 is greater than the total number, the system refuses to allocate the task lock and prompts that the resource is insufficient and needs to wait for the release of the lock before attempting again. Through this mechanism, the system effectively manages the task lock resources and guarantees the safety and stability of task pushing.

[0108] In a possible implementation, the method further comprises:

[0109] The timer is started from the beginning of the execution of the current processing batch, and after a preset time interval, a state check is performed on each task item in the current processing batch to obtain a check result. If the check result indicates that there is a task item with a task state of "not executed" in the current processing batch, the task item with the task state of "not executed" in the current processing batch is discarded, and the next task batch is sequentially set as the current processing batch according to the numbering order to perform step S202 and subsequent steps.

[0110] Specifically, the timer is started from the beginning of the execution of the current processing batch, and after a preset time interval, a state check is performed on all task items in the batch to obtain a check result. If the check result shows that there is still a task item with a task state of "not executed" in the current processing batch, it is considered that part of the tasks in the batch fail to complete the push within the specified time, and the system will discard these unexecuted task items to avoid affecting the advancement of the overall process. Subsequently, the system sequentially sets the next task batch as the current processing batch according to the numbering order of the tasks, and continues to perform step S202 and subsequent steps, thereby ensuring the continuity and timeliness of the task push process and preventing delays or stalls of the entire batch caused by individual tasks.

[0111] For example, assuming that the system sets a preset detection time of 1 minute after a task batch starts to execute; after 1 minute, the state check finds that there are still 2 task items in the "not executed" state in the batch, and the system will discard these two task items and directly switch to the next task batch in the numbering order to continue the subsequent task identification and push operation, ensuring that the overall push progress is not hindered.

[0112] In one possible implementation, after step S204 performs the current executable task item configured with the task lock, the method further includes:

[0113] The execution time consumption of the current executable task item is calculated. If the execution time consumption is less than a time consumption threshold, task dormancy is performed; the task dormancy is the difference between the time consumption threshold and the execution time consumption. After the task dormancy, the steps of current executable task item identification, push user list determination, and current executable task item execution are continued until the task state of each task item in each task batch is "execution complete".

[0114] Specifically, first, the system calculates the actual execution time consumption of the current executable task item. If the execution time consumption is less than a preset time consumption threshold, the system triggers task dormancy, and the dormancy time is the difference between the time consumption threshold and the actual execution time consumption. By introducing the task dormancy mechanism, it is possible to avoid the situation that the system resources are strained or the service pressure is too large due to too fast and continuous execution of tasks, thereby achieving smooth control of the push rhythm.

[0115] After the dormancy ends, the system continues to follow the established process to identify the next executable task item, pull the user list, and perform the task execution step, and the cycle continues until all task items in all batches have their status updated to "execution complete", ensuring that the task pushing process is orderly and efficient.

[0116] For example, assume that the time threshold is set to 1 second, and the actual execution time of a task item is 0.7 seconds. The system will enter a 0.3-second dormancy period. After the dormancy ends, the system will again find the next executable task item in the current batch and continue to perform the pushing operation, ensuring that the task pushing interval is reasonable and avoiding resource instantaneous peaks.

[0117] In one possible implementation, the task item further includes a fusion fixed parameter and a push user key-value pair, where the fusion fixed parameter contains a task key (Taskkey) and information about the institution to which the task belongs.

[0118] The push user key-value pair takes the Taskkey of the task item as the primary key, and the corresponding value is a list of user identifiers of the users to be pushed under the task item. When a task item has not yet started pushing, the value in the corresponding push user key-value pair is empty, indicating that there is currently no specific user assigned or pushed. As the task execution progresses, the key-value pair is dynamically updated to reflect the actual target users that need to be pushed, thereby effectively associating and managing the task and user pushing data.

[0119] In one possible implementation, the method further includes:

[0120] identifying the periodic pushing amount of the institution to which the task belongs; the periodic pushing amount is a monthly cumulative pushing amount, a weekly cumulative pushing amount, or a daily cumulative pushing amount. If the periodic pushing amount of the institution to which the task belongs is greater than or equal to the corresponding pushing quantity threshold, the system suspends the task pushing of the institution.

[0121] Specifically, first, the system identifies the periodic pushing amount of the institution to which the task belongs, which can be the cumulative number of pushed messages in a month, a week, or a day. For example, frequency control (frequency control) is implemented for the institution of the push task creator, such as the A department can only send 1 million push messages in a month. The system will real-time statistics the total amount of messages sent by the institution in the current period.

[0122] When it is detected that the periodic pushing amount of the institution reaches or exceeds the preset pushing quantity threshold, the system will automatically suspend the execution of all pending tasks of the institution to prevent excessive pushing from causing a decline in user experience or compliance risks. Only when the period is reset or the pushing amount falls below the threshold, the task pushing is allowed to continue.

[0123] Exemplarily, assuming that an institution A has a monthly push limit of 100 million, the current statistics show that 980,000 have been sent, and when the new task push volume is expected to exceed 100 million, the system will suspend subsequent tasks to ensure that the limit is not exceeded. Through this periodic push volume control mechanism, the platform can effectively manage the push rhythm and ensure reasonable use of resources and business compliance.

[0124] Based on the task push method provided in the above method embodiment, the embodiment of the present application further provides a task push device, which will be described below in conjunction with the drawings.

[0125] Referring to Figure 3 As shown in the figure, it is a structural schematic diagram of a task push device provided by an embodiment of the present application. As Figure 3 As shown in the figure, the task push device comprises:

[0126] The acquisition unit 301 is configured to acquire a to-be-pushed task.

[0127] The verification unit 302 is configured to perform task verification on the to-be-pushed task. The to-be-pushed task comprises a plurality of task items, each task item comprising push content, a task title, a task link, a task title, a task push time, a task state and a push target. The push target is marked with at least one belonging customer group label.

[0128] The task lock configuration unit 303 is configured to configure a task lock for the to-be-pushed task if the task verification is passed. The task lock is implemented by executing a conditional atomic UPDATE operation to ensure that only one task item can acquire a lock at the same time in the to-be-pushed task, and only the task that has acquired the task lock can perform task push.

[0129] The label deduplication unit 304 is configured to perform label deduplication on the push target marked with a plurality of belonging customer group labels in each task item to obtain a single-label task item, so that the push target has only one belonging customer group label.

[0130] The sorting and dividing unit 305 is configured to sort each single-label task item based on the time sequence of the task push time of each single-label task item, and perform task division and task numbering on each single-label task item after sorting to obtain a plurality of task batches according to the division condition. Each task batch is marked with a corresponding task number, and the task number is determined based on the task push time of the first single-label task item in each task batch.

[0131] The task execution unit 306 is configured to execute the single-label task items in each task batch in turn according to the task number corresponding to each task batch and in combination with the task lock.

[0132] When the task item is not executed, the task state of the task item is not executed; when the task item is executed, the task state of the task item is updated to be executed.

[0133] In a possible implementation, the task execution unit 306 is specifically configured to:

[0134] According to the numbering order of the task numbers, sequentially take each task batch as a current processing batch;

[0135] Identify a current executable task item in the current processing batch, and configure the task lock to the current executable task item; the current executable task item is a single-label task item with the earliest task pushing time and the task state of not executed in the current processing batch;

[0136] Pull a user list of the guest group label to which the current executable task item belongs as a pushing user list;

[0137] Execute the current executable task item configured with the task lock to push a message to each pushing user in the pushing user list;

[0138] Repeat the steps of current executable task item identification, pushing user list determination and current executable task item execution until the task state of each task item in each task batch is executed.

[0139] Wherein, the task lock is released after the current executable task item.

[0140] In a possible implementation, the verification unit 302 is specifically configured to:

[0141] Verify whether the sum of the pushing content, the task title, the task link and the character length of the task title is greater than a length threshold, verify whether the time format of the task pushing time is correct, verify whether the difference between the task pushing time and the current time is greater than a difference threshold, verify whether the task state is not executed, verify whether the task title of each task item is unique, and verify whether the number of users covered by each guest group label of each pushing target is less than a number threshold.

[0142] In a possible implementation, the task lock configuration unit 303 is specifically configured to:

[0143] Based on the task lock information list, count the total number of task locks and the number of available locks; the task lock information list includes the unique identifier and the use state of each task lock; the use state is idle or occupied;

[0144] If the number of available locks + 1 is less than or equal to the total number of task locks, a task lock with an idle state is selected from the task lock information list, and is assigned to the to-be-pushed task, and the state of the task lock is updated to occupied; otherwise, the task lock is rejected.

[0145] In the process of counting the number of available locks, the task lock with the idle state is counted as an available lock.

[0146] In a possible implementation, the apparatus further includes:

[0147] The state checking unit is configured to start timing from the beginning of execution of the current processing batch, and perform state checking on each task item in the current processing batch to obtain a checking result after a preset time elapses.

[0148] The processing unit is configured to discard the task item with the unexecuted state in the current processing batch if the checking result indicates that there is a task item with the unexecuted state in the current processing batch, and sequentially take the next task batch as the current processing batch according to the numbering order, so as to trigger the task execution unit 306 to execute the steps of identifying the current executable task item in the current processing batch and the subsequent steps.

[0149] In a possible implementation, the apparatus further includes:

[0150] The calculation unit is configured to calculate an execution time consumption of the current executable task item.

[0151] The hibernation unit is configured to perform task hibernation if the execution time consumption is less than a time consumption threshold, and the task hibernation is a difference between the time consumption threshold and the execution time consumption.

[0152] The steps of identifying the current executable task item, determining the push user list, and executing the current executable task item are continued after the task hibernation until the state of each task item in each task batch is execution completed.

[0153] In a possible implementation, the task item further includes a fusion fixed parameter and a push user key-value pair, and the fusion fixed parameter includes a Taskkey and an institution to which the task belongs.

[0154] The primary key of the push user key-value pair is the Taskkey of the task item, and the value is a user identifier of a push user corresponding to the task item; when the task item has not been pushed, the value in the push user key-value pair is empty.

[0155] In a possible implementation, the apparatus further includes:

[0156] The push amount identification unit is configured to identify a periodic push amount of the organization to which the task belongs; the periodic push amount is a monthly cumulative push amount, a weekly cumulative push amount, or a daily cumulative push amount.

[0157] The push suspension unit is configured to suspend the task push of the organization if the periodic push amount of the organization to which the task belongs is greater than or equal to a corresponding push amount threshold.

[0158] In addition, the embodiments of the present application further provide a processor for running a computer program, and the program performs the task push method as described above when running.

[0159] The present application sorts single-label task items according to push time, divides them into multiple ordered task batches in combination with division conditions, and executes the batches of tasks in sequence, thereby effectively avoiding the system overload problem caused by one-time large-scale push, reducing push errors and omissions caused by resource competition. At the same time, the atomic UPDATE operation with conditions is used to implement the task lock mechanism, ensuring that only one task item can obtain the push permission within the same time period, preventing repeated push or missed push caused by concurrent conflicts, and significantly improving the accuracy of push and the stability of the system.

[0160] It should be noted that the embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts of each embodiment can be referred to each other. For the system or device disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and the related parts can be referred to the method part.

[0161] It should be understood that in the present application, "at least one" refers to one or more, and "multiple" refers to two or more. "And / or" is used to describe the association between the associated objects, which means that there can be three kinds of relationships, for example, "A and / or B" can represent three cases: only A, only B, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the front and rear associated objects. "At least one of the following" or similar expressions means any combination of these items, including any combination of single item or multiple items. For example, at least one of a, b or c, can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0162] It is also to be noted that, as used in this specification and the appended claims, the singular forms "a," "an," and "the" include plural referents unless the context clearly dictates otherwise. Thus, for example, reference to "a component" can include a combination of two or more components, and the term "an element" can include comparable reference to a plurality of elements. Additionally, the term "or" as used herein in the context of a list of items prefaced by "at least one of' means any single one of the items in the list and any combination of two or more of the items in the list. Further, the term "comprises" or "comprising" as used herein is intended to have a broad meaning in its conventional sense, specifically to mean that the item or items listed after the term are included, but not to the exclusion of any additional item or items. Additionally, the term "comprises" or "comprising" as used herein is intended to have a broad meaning in its conventional sense, specifically to mean that the item or items listed after the term are included, but not to the exclusion of any additional item or items. Additionally, the term "comprises" or "comprising" as used herein is intended to have a broad meaning in its conventional sense, specifically to mean that the item or items listed after the term are included, but not to the exclusion of any additional item or items. Additionally, the term "comprises" or "comprising" as used herein is intended to have a broad meaning in its conventional sense, specifically to mean that the item or items listed after the term are included, but not to the exclusion of any additional item or items.

[0163] The foregoing description of the disclosed embodiments enables a person skilled in the art to implement or use the application. Numerous modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein can be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A task pushing method characterized by comprising: The method comprises: obtaining a to-be-pushed task, and performing task verification on the to-be-pushed task; the to-be-pushed task comprises a plurality of task items, each task item comprises push content, a task title, a task link, a task title, a task push time, a task state, and a push target; the push target is marked with at least one belonging customer group label; if the task verification is passed, configuring a task lock for the to-be-pushed task, and performing label deduplication on the push target marked with a plurality of belonging customer group labels in each task item to obtain a single-label task item, so that the push target has only one belonging customer group label; the task lock is implemented by performing a conditional atomic UPDATE operation to ensure that only one task item can acquire a lock at the same time in the to-be-pushed task, and only the task that acquires the task lock can perform task pushing; sorting each single-label task item based on the time sequence of the task push time of each single-label task item, and performing task division and task numbering on each sorted single-label task item according to a division condition to obtain a plurality of task batches; each task batch is marked with a corresponding task number, and the task number is determined based on the task push time of the first single-label task item in each task batch; executing the single-label task items in each task batch in turn according to the task number corresponding to each task batch and in combination with the task lock; wherein, when a task item is not executed, the task state of the task item is not executed; when the task item is executed, the task state of the task item is updated to execution completed.

2. The method of claim 1, wherein, The step of executing the single-label task items in each task batch in turn according to the task number corresponding to each task batch and in combination with the task lock comprises: according to the numbering order of the task number, sequentially taking each task batch as a current processing batch; identifying a current executable task item in the current processing batch, and configuring the task lock to the current executable task item; the current executable task item is a single-label task item with the earliest task push time and the not executed task state in the current processing batch; pulling a user list of the belonging customer group label of the current executable task item as a push user list; executing the current executable task item configured with the task lock to perform message pushing to each push user in the push user list; repeating the steps of current executable task item identification, push user list determination, and current executable task item execution until the task state of each task item in each task batch is execution completed; wherein, the task lock is released after the current executable task item.

3. The method of claim 1, wherein, The task verification on the to-be-pushed task comprises: checking whether the push content, the task title, the sum of character lengths of the task title, and the task link are greater than a length threshold, checking whether a time format of the task push time is correct, checking whether a difference between the task push time and a current time is greater than a difference threshold, checking whether the task state is unexecuted, checking whether the task title of each task item is unique, and checking whether a number of users covered by each belonging customer group tag of each push target is less than a number threshold.

4. The method of claim 1, wherein, The method further comprises: based on a task lock information list, counting a total number of task locks and a number of available locks; the task lock information list comprises a unique identifier and a use state of each task lock; the use state is idle or occupied; if the number of available locks + 1 is less than or equal to the total number of task locks, selecting a task lock with an idle use state in the task lock information list, assigning it to the task to be pushed, and updating the use state of the task lock to occupied; otherwise, refusing to assign a task lock; wherein, during the counting of the number of available locks, the task lock with an idle use state is counted as an available lock.

5. The method of claim 2, wherein, The method further comprises: starting a timer from the beginning of the current processing batch, and after a preset time, performing state checking on each task item in the current processing batch to obtain a checking result; if the checking result indicates that there is a task item with an unexecuted state in the current processing batch, discarding the task item with an unexecuted state in the current processing batch, and sequentially taking the next task batch as the current processing batch according to the numbering order to perform the steps of identifying the current executable task item in the current processing batch and the subsequent steps.

6. The method of claim 2, wherein, After executing the current executable task item configured with the task lock, the method further comprises: calculating the execution time consumption of the current executable task item; if the execution time consumption is less than a time consumption threshold, performing task dormancy; the task dormancy is the difference between the time consumption threshold and the execution time consumption; wherein, after the task dormancy, the steps of identifying the current executable task item, determining the push user list, and executing the current executable task item are continued until the task state of each task item in each task batch is execution completed.

7. The method of claim 1, wherein, The task item further comprises a fusion fixed parameter and a push user key-value pair, and the fusion fixed parameter comprises a task identifier Taskkey and a task belonging organization. Wherein, the primary key of the push user key-value pair is the Taskkey of the task item, and the value is the user identifier of the push user corresponding to the task item; when the task item has not been pushed, the value in the push user key-value pair is empty.

8. The method of claim 7, wherein, The method further comprises: identifying the periodic push amount of the task belonging organization; the periodic push amount is monthly cumulative push amount, weekly cumulative push amount, or daily cumulative push amount; if the periodic push amount of the task belonging organization is greater than or equal to the corresponding push quantity threshold, suspending the task push of the organization.

9. A task pushing apparatus characterized by comprising: The device comprises: an acquisition unit configured to acquire a task to be pushed; A checking unit is configured to perform task checking on the to-be-pushed task. The to-be-pushed task includes a plurality of task items, each of which includes push content, a task title, a task link, a task title, a task push time, a task state, and a push target. The push target is marked with at least one belonging customer group label. A task lock configuration unit is configured to configure a task lock for the to-be-pushed task if the task checking passes. The task lock is implemented by performing a conditional atomic UPDATE operation to ensure that only one task item can acquire a lock at the same time in the to-be-pushed task, and only the task that acquires the task lock can perform task pushing. A label deduplication unit is configured to perform label deduplication on the push target marked with a plurality of belonging customer group labels in each task item to obtain a single-label task item, so that the push target has only one belonging customer group label. An ordering and dividing unit is configured to sort each single-label task item based on the time sequence of the task push time of each single-label task item, and perform task division and task numbering on each single-label task item after sorting according to a division condition to obtain a plurality of task batches. Each task batch is marked with a corresponding task number, which is determined based on the task push time of the first single-label task item in each task batch. A task execution unit is configured to execute the single-label task items in each task batch in turn according to the task number corresponding to each task batch and in combination with the task lock. When a task item is not executed, the task state of the task item is not executed. When the task item is executed, the task state of the task item is updated to be executed.

10. A processor, comprising: A computer program is used to run the program, and the program performs the task pushing method according to any one of claims 1-8. A computer program is used to run the program, and the program performs the task pushing method according to any one of claims 1-8.