Data processing method and device

By configuring a multi-level queue mechanism on the server side and allocating and classifying messages according to their types, the problem of message processing delay in high-traffic and high-concurrency scenarios is solved, thereby improving user experience and system efficiency.

CN120704909APending Publication Date: 2025-09-26SHANGHAI BILIBILI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510686384.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-26
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

In high-traffic, high-concurrency Internet business scenarios, the mixed processing of different types of messages in the system leads to mutual interference, increases message processing latency, and affects user experience.

Method used

Configure multiple first-level queues and multiple second-level queues on the server side, allocate and classify messages according to their business and non-business types, write messages to the cache database for page refresh through a multi-level queue mechanism, and perform downstream processing through the target second-level queue. Use the retry queue to handle failed tasks, perform data verification, and synchronize status.

Benefits of technology

It reduces message processing latency, improves user experience, ensures that different types of messages do not interfere with each other, and improves system efficiency through parallel and asynchronous operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120704909A_ABST
    Figure CN120704909A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data processing method. The data processing method is used for a server, the server is configured with a plurality of first-level queues and a plurality of second-level queues, and one first-level queue corresponds to the plurality of second-level queues; the method comprises the steps of determining a to-be-issued target message in response to a client request; based on the service type of the target message, adding the target message into a target first-level queue of a plurality of first-level queues; reading a target message in the target first-level queue to write the read target message into a cache database; reading a target message in the target primary queue, and transmitting the read target message through the target secondary queue for downstream processing; wherein the target secondary queue is one of the plurality of secondary queues and is determined according to the non-service type of the target message. According to the technical scheme provided by the embodiment of the invention, mutual interference among different types of messages can be avoided as much as possible, so that the processing delay of each message is reduced, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technology, and in particular, to a data processing method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art

[0002] In today's internet business, with the rapid growth of user scale and interaction frequency, systems face the severe challenges of high traffic and high concurrency. In such scenarios, messages flowing through the system often exhibit multi-type characteristics. The mixed processing of different types of messages can easily lead to mutual interference, thereby increasing message processing latency and affecting the user experience.

[0003] It should be noted that the above content is not necessarily prior art, nor is it intended to limit the scope of patent protection of this application. Summary of the Invention

[0004] The embodiments of the present application provide a data processing method, apparatus, computer device, computer-readable storage medium, and computer program product to solve or alleviate one or more of the technical problems raised above.

[0005] One aspect of an embodiment of the present application provides a data processing method for a server, wherein the server is configured with multiple primary queues and multiple secondary queues, wherein one primary queue corresponds to multiple secondary queues; the method includes: In response to a client request, determining a target message to be sent, wherein the target message is configured with a business type and a non-business type; Based on the service type of the target message, the target message is added to a target primary queue of the multiple primary queues; Reading the target message in the target primary queue, and writing the read target message into the cache database for page refresh; The target message in the target primary queue is read, and the read target message is delivered through the target secondary queue for downstream processing; wherein the target secondary queue is one of the multiple secondary queues and is determined according to the non-business type of the target message.

[0006] Optionally, writing the target message into the cache database and the target secondary queue is a parallel operation.

[0007] Optionally, each of the secondary queues corresponds to a retry queue; and the method further includes: Read the target message in the target secondary queue, and execute the target distribution task according to the read target message; If the target distribution task is successful, the read target message is written into a storage database; In the case that the target issuance task fails, the target issuance task is added to a target retry queue to retry the target issuance task; wherein the target retry queue corresponds to the target secondary queue.

[0008] Optionally, based on the data stream requested by the client, performing data verification on the cache database; Performing data verification on the cache database based on the log data of the storage database; The offline data of the storage database and the offline data of the third-party database are acquired to perform data verification on the cache database and the third-party database.

[0009] Optionally, the target message is used to instruct the distribution of an item; and the method further includes: In response to writing the read target message into the cache database, setting the item to a being issued state; In response to writing the read target message into the storage database, setting the item to a received status; Based on the log data of the storage database, the items in the cache database are synchronized to a received status.

[0010] Optionally, the method further includes: In response to a client requesting a reward list, refreshing a reward list page according to data in the cache server.

[0011] Another aspect of an embodiment of the present application provides a data processing device, the device comprising: A determination module, configured to determine a target message to be sent in response to a client request, wherein the target message is configured with a business type and a non-business type; an adding module, configured to add the target message to a target primary queue of the plurality of primary queues based on a service type of the target message; A first reading module reads a target message in the target first-level queue, and writes the read target message into a cache database for page refresh; The second reading module reads the target message in the target primary queue and transmits the read target message through the target secondary queue for downstream processing; wherein, the target secondary queue is one of the multiple secondary queues and is determined according to the non-business type of the target message.

[0012] Another aspect of an embodiment of the present application provides a computer device, including: at least one processor; and a memory communicatively coupled to the at least one processor; Wherein: the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described above.

[0013] Another aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the method described above is implemented.

[0014] Another aspect of an embodiment of the present application provides a computer program product, including a computer program, which implements the above-mentioned method when executed by a processor.

[0015] The embodiment of the present application adopts the above-mentioned technical solution, which may include the following advantages: multiple first-level queues and multiple second-level queues are configured on the server side. The target message is assigned to the corresponding target first-level queue according to the business type, and then the target message read in the target first-level queue is written into the cache database for page refresh, and the target message read from the target first-level queue is secondary classified based on the non-business type, and is placed in the corresponding target second-level queue for downstream processing. This multi-level queue mechanism enables messages of different business types to have independent first-level queues, and at the same time, for different non-business type messages under the same business type, there are further subdivided independent second-level queues. In this way, in scenarios with high traffic and high concurrency, the multi-level queue mechanism can avoid mutual interference between different types of messages as much as possible, thereby reducing the processing delay of the message and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The accompanying drawings illustrate exemplary embodiments and constitute a part of the specification. Together with the description of the specification, they serve to explain exemplary implementation of the embodiments. The illustrated embodiments are for illustrative purposes only and do not limit the scope of the claims. Throughout the drawings, the same reference numerals designate similar, but not necessarily identical, elements.

[0017] Figure 1 The following schematically shows an operating environment diagram of the data processing method according to the first embodiment of the present application; Figure 2 The following schematically shows a flow chart of a data processing method according to the first embodiment of the present application; Figure 3 Schematically shows a newly added flow chart of the data processing method according to the first embodiment of the present application; Figure 4 Schematically shows a newly added flow chart of the data processing method according to the first embodiment of the present application; Figure 5 Schematically shows a newly added flow chart of the data processing method according to the first embodiment of the present application; Figure 6 Schematically shows an exemplary application diagram of the data processing method according to the first embodiment of the present application; Figure 7 A block diagram schematically shows a data processing device according to the second embodiment of the present application; and Figure 8 The following schematically shows a hardware architecture diagram of a computer device according to the third embodiment of the present application. DETAILED DESCRIPTION

[0018] In order to make the purpose, technical solutions and advantages of this application more clear, the present application is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0019] It should be noted that the descriptions of "first", "second", etc. in the embodiments of the present application are for descriptive purposes only and should not be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" or "second" may explicitly or implicitly include at least one of such features. In addition, the technical solutions between the various embodiments can be combined with each other, but this must be based on the fact that they can be implemented by ordinary technicians in this field. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by this application.

[0020] In the description of this application, it should be understood that the numerical labels before the steps do not indicate the order in which the steps are executed. They are only used to facilitate the description of this application and to distinguish each step. Therefore, they cannot be understood as limitations on this application.

[0021] Provide explanations of terms involved in this application: Queue: A linear data structure that follows the FIFO (First In First Out) principle.

[0022] The present application provides a data processing technology solution that minimizes interference between different types of messages, thereby reducing the processing delay of each message and improving the user experience. See below for details.

[0023] Finally, for ease of understanding, an exemplary operating environment is provided below.

[0024] Figure 1 The following schematically shows an environmental application diagram according to an embodiment of the present application.

[0025] The environment diagram may include a server 2 , one or more clients 4 , and a network 6 .

[0026] The server 2 and one or more clients 4 can be coupled via a network 6 to implement information transmission interaction.

[0027] The server 2, client 4, and network 6 are described in detail below.

[0028] The server 2 can be comprised of a single or multiple computing devices. The one or more computing devices may include virtualized computing instances. Virtualized computing instances may include virtual machines, such as emulations of computer systems, operating systems, servers, and the like. The computing device may load a virtual machine based on a virtual image and / or other data defining the specific software (e.g., operating system, specialized application, server) used for the emulation. As the demand for different types of processing services changes, different virtual machines may be loaded and / or terminated on one or more computing devices. A hypervisor may be implemented to manage the use of different virtual machines on the same computing device. The server 2 may run one or more services or software applications that enable execution of the methods described herein. The server 2 may also provide other services or software applications, which may include both non-virtualized and virtualized environments. In some embodiments, these services may be provided as web-based or cloud services, for example, provided to users of the client 4 under a software-as-a-service (SaaS) model.

[0029] The server 2 may include one or more components that implement the functions performed by the server 2. These components may include software components, hardware components, or a combination thereof that can be executed by one or more processors. In some embodiments, the server 2 may provide services such as storage, reading, writing, querying, and deletion, such as providing a read service to the client. In other embodiments, users operating the client 4 may sequentially utilize one or more client applications to interact with the service platform 2 to utilize the services provided by these components.

[0030] Clients 4 may include various types of computer devices, such as portable handheld devices, general-purpose computers (such as personal computers and laptops), workstation computers, wearable devices, smart screen devices, self-service kiosks, service robots, gaming systems, thin clients, various messaging devices, sensors, or other electronic devices. These computer devices may run various types and versions of software applications and operating systems, such as Microsoft Windows, Apple iOS, UNIX-like operating systems, Linux, or Linux-like operating systems (such as Google ChromeOS); or various mobile operating systems, such as Microsoft Windows, Mobile OS, iOS, Windows Phone, and Android. Portable handheld devices may include cellular phones, smartphones, tablets, personal digital assistants, etc. Wearable devices may include head-mounted displays (such as smart glasses), etc. Gaming systems may include various handheld gaming devices and internet-enabled gaming devices. Client devices are capable of executing a variety of different applications, such as various internet-related applications, communication applications (such as email applications), and short message service (SMS) applications, and may utilize various communication protocols.

[0031] Based on the operating system described above, the client 4 may also be installed with one or more application programs, such as a video playback application program.

[0032] Client 4 may include an input / output interface. The input interface may include a touchpad, touch screen, mouse, keyboard, or other sensor elements. The input interface may be configured to receive user instructions, which may cause Client 4 to perform various operations, such as obtaining rewards. The output interface is used to output information to the user, such as display information.

[0033] A network 6 may be used as a transmission medium between the service platform 2 and the client 4. The network 6 includes various network devices, such as routers, switches, multiplexers, hubs, modems, bridges, repeaters, firewalls, proxy devices, and / or the like. The network may include physical links, such as coaxial cable links, twisted-pair cable links, optical fiber links, or combinations thereof, or wireless links, such as cellular links, satellite links, and Wi-Fi links.

[0034] It should be noted that the above devices are exemplary, and the number and type of devices can be adjusted in different scenarios or according to different needs.

[0035] The following describes the technical solution of the present application through multiple embodiments, taking the server 2 as the execution subject. It should be noted that these embodiments can be implemented in many different forms and should not be interpreted as being limited to the embodiments described here.

[0036] Example 1 Figure 2 The flowchart of the data processing method according to the first embodiment of the present application is schematically shown.

[0037] The data processing method is used on a server side, wherein the server side is configured with multiple primary queues and multiple secondary queues, wherein one primary queue corresponds to multiple secondary queues. Figure 2 As shown, the data processing method may include steps S200 to S206, wherein: Step S200: In response to a client request, a target message to be sent is determined, where the target message is configured with a business type and a non-business type.

[0038] Step S202: Based on the service type of the target message, the target message is added to a target primary queue of the multiple primary queues.

[0039] Step S204: read the target message in the target first-level queue, and write the read target message into the cache database for page refresh.

[0040] Step S206, read the target message in the target primary queue, and pass the read target message through the target secondary queue for downstream processing; wherein, the target secondary queue is one of the multiple secondary queues and is determined according to the non-business type of the target message.

[0041] The data processing method provided by this embodiment configures multiple first-level queues and multiple second-level queues on the server side. The target message is assigned to the corresponding target first-level queue according to the business type, and then the target message read in the target first-level queue is written to the cache database for page refresh, and the target message read from the target first-level queue is secondary classified based on the non-business type, and is placed in the corresponding target second-level queue for downstream processing. This multi-level queue mechanism enables messages of different business types to have independent first-level queues, and at the same time, for different non-business type messages under the same business type, there are further subdivided independent second-level queues. In this way, in scenarios with high traffic and high concurrency, the multi-level queue mechanism can avoid mutual interference between different types of messages as much as possible, thereby reducing the processing delay of the message and improving the user experience.

[0042] The following combination Figure 2 , each step in steps S200~S206 and other optional steps are described in detail.

[0043] Step S200 In response to a client request, a target message to be sent is determined, where the target message is configured with a business type and a non-business type.

[0044] A message is a data structure that represents a unit of information that can be transmitted, queued, and processed. Business types can be used to categorize and label different tasks. For example, business types can correspond to probability-triggered tasks (such as lottery tasks) or quiz-triggered tasks (such as quiz-sharing tasks). Non-business types can be reward types or other sub-categories. Reward types categorize and label the rewards generated by tasks. For example, non-business types can correspond to item rewards. For example, if a user participates in a quiz task and obtains the corresponding reward by answering the question, the client will send a reward acquisition request to the server. The server will determine the target message to be sent based on the reward acquisition request and then send the reward through the target message.

[0045] Step S202 , based on the business type of the target message, adding the target message to the target first-level queue of the multiple first-level queues.

[0046] The target first-level queue is a first-level queue that matches the business type of the target message. Each first-level queue corresponds to a business type and processes messages of the corresponding business type. In some embodiments, the first-level queue configuration can have a business identifier, and the business type of the target message is matched with the business identifier of the first-level queue to determine the target first-level queue. In some embodiments, multiple first-level queues can be dynamically adjusted according to the actual traffic of each first-level queue (i.e., the number of messages in the queue). For example, if the traffic of a first-level queue is too large, the matching relationship between the first-level queue and the business type can be adjusted, and the business type can be matched with another queue to migrate the messages of the business type. In some embodiments, the first-level queue can be a message queue. A message queue is a message passing mechanism used for asynchronous communication and decoupling system modules. After a system or business sends a message, it is temporarily stored in a queue, and another system or business processes the message at an appropriate time.

[0047] Step S204 , read the target message in the target first-level queue to write the read target message into the cache database for page refresh.

[0048] Because cache databases offer high read and write performance and speed, they can quickly respond to client requests for data updates (such as the writing of target messages) after data in the cache database is updated, enabling faster page refreshes. For example, if a user participates in a quiz task and receives a reward for answering the quiz, the server will prioritize writing the target message to the cache database, allowing for faster page refreshes.

[0049] The above describes how to write the target message into the cache database. The following describes how to refresh the page through the cache database.

[0050] In an optional embodiment, the method further includes: in response to the client requesting the reward list, refreshing the reward list page according to the data in the cache server.

[0051] In high-concurrency, high-traffic scenarios, the reward list page experience significant update delays, severely impacting the user experience. To effectively address this issue, the reward list page can be refreshed more quickly based on data stored in the cache server. For example, when users earn rewards by answering questions, the reward list page needs to be refreshed promptly so that users can view their reward information immediately after winning. It should be noted that the reward list page only displays reward information, allowing users to check their winning status promptly. However, actual rewards may still be in the process of being issued; rewards in the process of being issued may display a "issuing" status.

[0052] In this embodiment, the reward list page can be refreshed based on the data in the cache server, shortening the time users wait for rewards to be displayed, thereby achieving a "zero" delay perception experience for user-side reward issuance.

[0053] Step S206 , read the target message in the target first-level queue, and pass the read target message through the target second-level queue for downstream processing; wherein, the target second-level queue is one of the multiple second-level queues and is determined according to the non-business type of the target message.

[0054] Multiple secondary queues are subdivided according to non-business types. Then, based on the target primary queue, the target message is secondary classified by non-business type and added to the target secondary queue. In some embodiments, the secondary queue can also be a message queue, and the secondary queue can be configured with a business identifier and a non-business identifier. Through the business identifier of the secondary queue and the business identifier of the primary queue, the secondary queue corresponding to the primary queue can be determined, and then the target secondary queue can be determined based on the non-business identifier of the target message. The target message can be delivered through the target secondary queue, and the target message can be processed through other services and then the reward corresponding to the target message can be issued to the user. For example, the target secondary queue delivers the target message to the reward center, and the reward center issues the reward based on the target message.

[0055] In an optional embodiment, writing the target message into the cache database and the target secondary queue is a parallel operation.

[0056] The target message is written to the cache database and synchronously added to the target secondary queue. The cache database allows for rapid page refreshes. Simultaneously, the target message is asynchronously processed through the target secondary queue to execute other complex logic (such as reward distribution). For example, writing the target message to the cache database allows for the rapid display of "Reward Obtained" on the page, synchronously adding the target message to the target secondary queue, and asynchronously transmitting the target message through the target secondary queue for reward distribution, thereby updating the page to display "Reward Issued." In this embodiment, this parallel operation enables rapid response to page refreshes while also enabling asynchronous processing of subsequent business logic.

[0057] The following will provide further exemplary descriptions of how to transmit the read target message through the target secondary queue for downstream processing through more embodiments.

[0058] In an optional embodiment, each of the secondary queues corresponds to a retry queue. Figure 3 As shown, the method further includes: Step S300: read the target message in the target secondary queue, and execute the target distribution task according to the read target message.

[0059] Step S302: When the target distribution task is successful, the read target message is written into a storage database.

[0060] Step S304: When the target issuance task fails, the target issuance task is added to a target retry queue to retry the target issuance task; wherein the target retry queue corresponds to the target secondary queue.

[0061] A target delivery task can be used to deliver the reward corresponding to a target message. If the target delivery task succeeds, the reward corresponding to the target message has been successfully delivered, and the target message can then be written to a storage database for persistent storage. If the target delivery task fails, the reward delivery corresponding to the target message has failed, and the target delivery task is added to a target retry queue for re-delivery. In some embodiments, the reward corresponding to the target message can be delivered via a downstream service, the party responsible for handling the target delivery task. The retry queue can alleviate the need for a large number of retries immediately when a problem occurs in the downstream service, thereby reducing the burden on the downstream service and maintaining its stability. Based on actual needs, specific retry policies can be set, such as adjusting the number of retries for a single task, the maximum retry time for a single task, and the retry wait time. In some embodiments, the retry queue can also be a delay queue, a special type of message queue whose primary function is to deliver messages to downstream consumers (the party that receives and processes the message) after a specified delay.

[0062] In this embodiment, the storage server is used to persistently store successfully issued tasks to facilitate subsequent data backtracking and data verification, etc. The retry queue is used to retry failed tasks, thus avoiding a large number of retries immediately, thereby reducing the system burden.

[0063] The above describes how to process target messages through a multi-level queue mechanism. The following describes the state synchronization between the cache database and the storage database.

[0064] In an optional embodiment, the target message is used to indicate the distribution of an item. Figure 4 As shown, the method further includes: Step S400: In response to writing the read target message into the cache database, the item is set to be in the issuing state.

[0065] Step S402: In response to writing the read target message into the storage database, the item is set to a received status.

[0066] Step S404: Based on the log data of the storage database, the items in the cache database are synchronized to a received status.

[0067] Items can be physical or virtual. Virtual items can include virtual props, digital content, and so on. If the target delivery task hasn't yet been completed when the target message is written to the cache database, meaning the item corresponding to the target message hasn't been delivered yet, the item can be set to the delivery-in-progress state in the cache database. If the target delivery task has already been completed when the target message is written to the storage database, meaning the item corresponding to the target message has already been delivered, the item can be set to the received state in the storage database. If the item has already been received, the item in the cache database can be synchronized to the received state based on the log data in the storage database.

[0068] In this embodiment, the cache database is kept synchronized with the log data of the storage database so that the item distribution status seen by the user on the reward list page is consistent with the actual distribution status.

[0069] In order to ensure data consistency during target message processing, multiple layers of data verification can be performed.

[0070] In an optional embodiment, if Figure 5 As shown, the method further includes: Step S500: performing data verification on the cache database based on the data stream requested by the client.

[0071] Step S502: performing data verification on the cache database based on the log data of the storage database.

[0072] Step S504: Obtain offline data of the storage database and offline data of the third-party database to perform data verification on the cache database and the third-party database.

[0073] Data verification can be divided into three layers: real-time verification, asynchronous verification, and offline verification. Real-time verification: Using the client's request data stream, messages in the primary queue are verified against messages in the cache database. For example, this verification involves verifying reward item information and the reward item's distribution status to ensure data consistency between the real-time data stream and the cache database. Asynchronous verification: Data in the cache database is verified against the storage database's log data to ensure data consistency between the two databases. In some embodiments, the storage database can be a relational database, and the log data can be binary log messages. Binary logs can be used to record all modification operations performed on the database, stored in binary format. During the reward distribution process, depending on the type of reward item, a third-party service is required to distribute the reward, thus involving a third-party database. Offline verification: Data in the storage database's offline data is verified against offline data in the third-party database to ensure data consistency between the storage database and the third-party database. In some embodiments, data verification can be performed on the storage database and the third-party database using offline tables in the data warehouse. The above three layers of verification can improve system data reliability.

[0074] In order to make this application easier to understand, the following Figure 6 An exemplary application is provided.

[0075] Taking the example of a user participating in a quiz task and obtaining a reward item, the operation process is as follows: Step S1: In response to a reward acquisition request initiated by a client (ie, a client request), a target message to be sent is determined.

[0076] Specifically, the target message is used to indicate the issuance of reward items, and the target message includes a question-answering task type (ie, a business type) and a physical item reward type (ie, a non-business type).

[0077] Step S2: Add the target message to the first-level queue corresponding to the question-answering task type (i.e., add the target message to the target first-level queue).

[0078] Step S3 and step S4 are performed in parallel through the double write operation.

[0079] Synchronous priority path: Step S3, read the target message in the target first-level queue, and write the read target message into the cache database.

[0080] At this point, the reward item indicated in the target message has not yet been distributed, so the status of the reward item in the cache database is "issuing." Based on the data in the cache server, the reward list page can be refreshed to instantly display the reward item information and status. This synchronization priority path allows the information and status of reward items to be displayed instantly even if the reward item has not yet been distributed.

[0081] Asynchronous compensation path: Step S4, read the target message in the target primary queue, and add the read target message to the secondary queue corresponding to the physical item reward type (that is, transmit the read target message through the target secondary queue).

[0082] This asynchronous compensation path allows for more complex reward distribution processes to be handled asynchronously.

[0083] Step S5: Read the target message in the target secondary queue, and distribute the reward items according to the read target message (ie, execute the target distribution task).

[0084] Step S6: Determine whether the reward item is issued successfully.

[0085] If yes, go to step S7; If not, go to step S8.

[0086] Step S7: Write the read target message into the storage database.

[0087] At this time, the reward item indicated by the target message has been distributed, so the status of the reward item in the storage database is "Received".

[0088] The cache database can be checked for data consistency and synchronized by storing the log data of the database, that is, the reward item status in the synchronized cache database is received.

[0089] Step S8: Re-issue the reward item through the target retry queue corresponding to the target secondary queue (ie, add the target issuance task to the target retry queue to retry the target issuance task).

[0090] Reward items can be re-issued with a delay via a retry queue to minimize the need for a large number of retries at once.

[0091] In this exemplary application, in high-traffic, high-concurrency scenarios, the multi-level queue mechanism can minimize interference between different types of messages, thereby reducing message processing delays and improving user experience.

[0092] Example 2 Figure 7The block diagram of the data processing device according to the second embodiment of the present application is schematically shown. The device can be divided into one or more program modules, one or more program modules are stored in a storage medium, and are executed by one or more processors to complete the embodiment of the present application. The program module referred to in the embodiment of the present application refers to a series of computer program instruction segments that can complete specific functions. The following description will specifically introduce the functions of each program module in this embodiment. The data processing device is used for the server side, and the server side is configured with multiple first-level queues and multiple second-level queues, where one of the first-level queues corresponds to multiple second-level queues. Figure 7 As shown, the apparatus 700 may include: a determination module 710, an adding module 720, a first reading module 730 and a second reading module 740, wherein: A determination module 710 is configured to determine a target message to be sent in response to a client request, wherein the target message is configured with a business type and a non-business type; an adding module 720, configured to add the target message to a target primary queue of the plurality of primary queues based on a service type of the target message; A first reading module 730 reads a target message in the target primary queue, and writes the read target message into a cache database for page refresh; The second reading module 740 reads the target message in the target primary queue and transmits the read target message through the target secondary queue for downstream processing; wherein, the target secondary queue is one of the multiple secondary queues and is determined according to the non-business type of the target message.

[0093] As an optional embodiment, writing the target message into the cache database and the target secondary queue is a parallel operation.

[0094] As an optional embodiment, each of the secondary queues corresponds to a retry queue; the second reading module 740 is further configured to: Read the target message in the target secondary queue, and execute the target distribution task according to the read target message; If the target distribution task is successful, the read target message is written into a storage database; In the case that the target issuance task fails, the target issuance task is added to a target retry queue to retry the target issuance task; wherein the target retry queue corresponds to the target secondary queue.

[0095] As an optional embodiment, the apparatus 700 further includes a verification module, wherein the verification module is configured to: Performing data verification on the cache database based on the data stream requested by the client; Performing data verification on the cache database based on the log data of the storage database; The offline data of the storage database and the offline data of the third-party database are acquired to perform data verification on the cache database and the third-party database.

[0096] As an optional embodiment, the target message is used to instruct the distribution of an item; the apparatus 700 further includes a synchronization module, the synchronization module being configured to: In response to writing the read target message into the cache database, setting the item to a being issued state; In response to writing the read target message into the storage database, setting the item to a received status; Based on the log data of the storage database, the items in the cache database are synchronized to a received status.

[0097] As an optional embodiment, the apparatus 700 further includes a refresh module, wherein the refresh module is configured to: In response to a client requesting a reward list, refreshing a reward list page according to data in the cache server.

[0098] Example 3 Figure 8 The following schematically shows a hardware architecture diagram of a computer device 10000 suitable for implementing a data processing method according to the third embodiment of the present application. In some embodiments, the computer device 10000 may be a terminal device such as a smart phone, a wearable device, a tablet computer, a personal computer, a vehicle-mounted terminal, a game console, a virtual device, a workbench, a digital assistant, a set-top box, a robot, etc. In other embodiments, the computer device 10000 may be a rack server, a blade server, a tower server, or a cabinet server (including an independent server or a server cluster composed of multiple servers), etc. Figure 8 As shown, the computer device 10000 includes but is not limited to: a memory 10010, a processor 10020, and a network interface 10030 that can communicate with each other via a system bus. Memory 10010 includes at least one type of computer-readable storage medium, including flash memory, a hard disk, a multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic storage, a magnetic disk, an optical disk, and the like. In some embodiments, memory 10010 may be an internal storage module of computer device 10000, such as a hard disk or memory of computer device 10000. In other embodiments, memory 10010 may also be an external storage device of computer device 10000, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash memory card, and the like equipped on computer device 10000. Of course, memory 10010 may also include both internal storage modules and external storage devices of computer device 10000. In this embodiment, the memory 10010 is generally used to store an operating system and various application software installed on the computer device 10000, such as program codes of data processing methods, etc. In addition, the memory 10010 can also be used to temporarily store various data that has been output or is to be output.

[0099] In some embodiments, processor 10020 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other chips. Processor 10020 is typically used to control the overall operation of computer device 10000, such as performing control and processing related to data exchange or communication with computer device 10000. In this embodiment, processor 10020 is used to execute program code stored in memory 10010 or process data.

[0100] Network interface 10030 may include a wireless network interface or a wired network interface. Network interface 10030 is typically used to establish a communication link between computer device 10000 and other computer devices. For example, network interface 10030 is used to connect computer device 10000 to an external terminal via a network, establishing a data transmission channel and a communication link between computer device 10000 and the external terminal. The network may be a wireless or wired network such as an intranet, the Internet, the Global System of Mobile Communications (GSM), Wideband Code Division Multiple Access (WCDMA), a 4G network, a 5G network, Bluetooth, or Wi-Fi.

[0101] It should be pointed out that Figure 8 Only a computer device having components 10010 - 10030 is shown, but it should be understood that implementing all of the shown components is not a requirement, and more or fewer components may alternatively be implemented.

[0102] In this embodiment, the data processing method stored in the memory 10010 can also be divided into one or more program modules and executed by one or more processors (such as processor 10020) to complete the embodiment of the present application.

[0103] Example 4 An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the data processing method in the embodiment when executed by a processor.

[0104] In this embodiment, computer-readable storage media include flash memory, hard disks, multimedia cards, card-type memories (e.g., SD or DX memories), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic storage, magnetic disks, optical disks, and the like. In some embodiments, the computer-readable storage medium may be an internal storage unit of a computer device, such as the computer device's hard disk or memory. In other embodiments, the computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash memory card, and the like. Of course, the computer-readable storage medium may also include both the internal storage unit and external storage devices of the computer device. In this embodiment, the computer-readable storage medium is typically used to store the operating system and various application software installed on the computer device, such as the program code of the data processing method described in the embodiments. In addition, the computer-readable storage medium may also be used to temporarily store various types of data that has been output or is about to be output.

[0105] Example 5 An embodiment of the present application further provides a computer program product, including a computer program, which implements the method in the above embodiment when executed by a processor.

[0106] Obviously, those skilled in the art should understand that the modules or steps of the above-mentioned embodiments of the present application can be implemented using general-purpose computer devices. They can be concentrated on a single computer device or distributed on a network composed of multiple computer devices. Alternatively, they can be implemented using program codes executable by the computer device, so that they can be stored in a storage device and executed by the computer device. In some cases, the steps shown or described can be performed in a different order than herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the embodiments of the present application are not limited to any specific combination of hardware and software.

[0107] It should be noted that the above are only preferred embodiments of the present application and do not limit the scope of patent protection of the present application. Any equivalent structure or equivalent process transformation made using the contents of the description and drawings of this application, or directly or indirectly applied in other related technical fields, are also included in the scope of patent protection of the present application.

Claims

1. A data processing method, characterized in that: For a server, the server is configured with multiple primary queues and multiple secondary queues, where one primary queue corresponds to multiple secondary queues; the method includes: In response to a client request, determining a target message to be sent, wherein the target message is configured with a business type and a non-business type; Based on the service type of the target message, the target message is added to a target primary queue of the multiple primary queues; Reading the target message in the target primary queue, and writing the read target message into the cache database for page refresh; The target message in the target primary queue is read, and the read target message is delivered through the target secondary queue for downstream processing; wherein the target secondary queue is one of the multiple secondary queues and is determined according to the non-business type of the target message.

2. The method according to claim 1, characterized in that Writing the target message into the cache database and the target secondary queue is a parallel operation.

3. The method according to claim 1, characterized in that Each of the secondary queues corresponds to a retry queue; the method further includes: Read the target message in the target secondary queue, and execute the target distribution task according to the read target message; If the target distribution task is successful, the read target message is written into a storage database; In the case that the target issuance task fails, the target issuance task is added to a target retry queue to retry the target issuance task; wherein the target retry queue corresponds to the target secondary queue.

4. The method according to claim 3, characterized in that The method further comprises: Performing data verification on the cache database based on the data stream requested by the client; Performing data verification on the cache database based on the log data of the storage database; The offline data of the storage database and the offline data of the third-party database are acquired to perform data verification on the cache database and the third-party database.

5. The method according to claim 1, wherein The target message is used to instruct the distribution of an item; the method further includes: In response to writing the read target message into the cache database, setting the item to a being issued state; In response to writing the read target message into the storage database, setting the item to a received status; Based on the log data of the storage database, the items in the cache database are synchronized to a received status.

6. The method according to claim 1, wherein The method further comprises: In response to a client requesting a reward list, refreshing a reward list page according to data in the cache server.

7. A data processing device, characterized in that: Used for a server, the server is configured with multiple primary queues and multiple secondary queues, where one primary queue corresponds to multiple secondary queues; the device comprises: A determination module, configured to determine a target message to be sent in response to a client request, wherein the target message is configured with a business type and a non-business type; an adding module, configured to add the target message to a target primary queue of the plurality of primary queues based on a service type of the target message; A first reading module reads a target message in the target first-level queue, and writes the read target message into a cache database for page refresh; The second reading module reads the target message in the target primary queue and transmits the read target message through the target secondary queue for downstream processing; wherein, the target secondary queue is one of the multiple secondary queues and is determined according to the non-business type of the target message.

8. A computer device, characterized in that: include: at least one processor; and a memory communicatively coupled to the at least one processor; wherein: The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, which, when executed by a processor, implement the method according to any one of claims 1 to 6.

10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to claims 1 to 6 are implemented.