Online activity message processing method, system and device and storage medium

By adding dimension tags to online activity messages, pre-checking and forwarding them to the business logic service cluster for processing, the bottleneck of online activity message processing service performance is solved, and efficient and stable message processing is achieved.

CN119893217APending Publication Date: 2025-04-25GUANGZHOU BAIGUOYUAN NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510063051.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-15
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

When facing a large number of messages, increased online activity rules and complex business logic, online activity processing services are prone to performance bottlenecks, resulting in message backlog and server load that cannot be solved by simply extending processing partitions.

Method used

By adding dimension tags to online activity messages, pre-checking, and forwarding messages to the business logic service cluster for processing, splitting message consumption process services and business logic services, realizing horizontal expansion and load balancing.

Benefits of technology

It improves the efficiency of online activity message processing, avoids message backlog, improves the stability and reliability of the system, and can effectively handle surge online activity messages.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119893217A_ABST
    Figure CN119893217A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an online activity message processing method and system, equipment and a storage medium. According to the technical scheme provided by the embodiment of the invention, the online activity message is acquired, the dimension label is added in the online activity message according to the set message dimension to which the online activity message belongs, and the dimension label is used for identifying the service processing logic for processing the online activity message; performing prepositive verification on the online activity messages based on a set prepositive verification rule, and filtering the online activity messages which do not pass the prepositive verification; and under the condition that the pre-verification of the online activity message is passed, determining a user identifier of the online activity message, and forwarding the online activity message to a corresponding service node of the business logic service cluster based on the user identifier so as to indicate the corresponding service node to call a corresponding service processing logic to process the online activity message through the dimension label. By adopting the technical means, the online activity message processing efficiency can be improved, and the condition of online activity message backlog is avoided.
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 method, system, device and storage medium for processing online activity messages. Background Art

[0002] At present, in the live event scenario, different online activities will generate a large number of online activity messages. When processing online activity messages, the online activity configuration is traversed to determine whether the message meets the activity rules, and the corresponding business processing logic is executed. Taking the live broadcast message as an example, if N viewing messages are generated per second, the number of online activity rules is M, and the number of business processing logic is K, then the time complexity of message processing can be roughly estimated to be O(NMK). That is, the length of time required for message processing is related to the number of messages, the number of online activity rules, and the business processing logic. When the number of messages increases, the number of online activities increases, and the business logic becomes more complex, the processing time required will also be longer. For this reason, online activity message processing is usually performed through a distributed system, and corresponding servers are deployed according to the processing partitions assigned to the messages to process the above online activity messages through the servers.

[0003] However, with the gradual iteration of online activity services and the growing number of online activities, the number of online activity rules is also gradually increasing, resulting in performance bottlenecks in the processing service of online activity messages. For example, only 6 processing partitions are allocated to gift messages, and each processing partition will deploy a corresponding message processing server to process gift messages. When the number of online configured activities surges, the processing time of the consumption logic will also increase significantly, and the server load will also increase, which will lead to message backlogs, frequent triggering of full GC (garbage collection) and other problems. And because the processing partitions of online activity messages are fixedly allocated and there are multiple business downstreams, the processing partitions cannot be increased at will, and online activity messages cannot be processed by increasing the number of servers. Summary of the invention

[0004] The embodiments of the present application provide a method, system, device and storage medium for processing online activity messages, which can achieve horizontal expansion of online activity message processing services, improve online activity message processing efficiency, and solve the technical problem of online activity message backlog.

[0005] In a first aspect, an embodiment of the present application provides a method for processing an online activity message, comprising:

[0006] Obtaining an online activity message, and adding a dimension tag to the online activity message according to a set message dimension to which the online activity message belongs, wherein the dimension tag is used to identify a service processing logic for processing the online activity message;

[0007] Perform pre-verification on online activity messages based on the pre-verification rules set, and filter online activity messages that fail the pre-verification;

[0008] When the online activity message passes the pre-verification, the user identifier of the online activity message is determined, and the online activity message is forwarded to the corresponding service node of the business logic service cluster based on the user identifier, so as to instruct the corresponding service node to call the corresponding service processing logic to process the online activity message through the dimension label.

[0009] In a second aspect, an embodiment of the present application provides a system for processing online activity messages, including:

[0010] an acquisition module, configured to acquire an online activity message, and add a dimension tag to the online activity message according to a set message dimension to which the online activity message belongs, wherein the dimension tag is used to identify a service processing logic for processing the online activity message;

[0011] A verification module, configured to perform a pre-verification on the online activity message based on a set pre-verification rule, and filter the online activity message that fails the pre-verification;

[0012] The forwarding module is configured to determine the user identifier of the online activity message when the online activity message pre-verification passes, and forward the online activity message to the corresponding service node of the business logic service cluster based on the user identifier, so as to instruct the corresponding service node to call the corresponding service processing logic to process the online activity message through the dimension label.

[0013] In a third aspect, an embodiment of the present application provides a device for processing online activity messages, including:

[0014] memory and one or more processors;

[0015] The memory is configured to store one or more programs;

[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the method for processing online activity messages as described in the first aspect.

[0017] In a fourth aspect, an embodiment of the present application provides a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a computer processor, the computer-executable instructions are configured to execute the method for processing online activity messages as described in the first aspect.

[0018] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes instructions. When the instructions are executed on a computer or a processor, the computer or the processor executes the method for processing online activity messages as described in the first aspect.

[0019] The embodiment of the present application obtains online activity messages, adds dimension tags to the online activity messages according to the set message dimensions to which the online activity messages belong, and the dimension tags are used to identify the service processing logic for processing online activity messages; performs pre-verification on the online activity messages based on the set pre-verification rules, and filters the online activity messages that fail the pre-verification; when the online activity message passes the pre-verification, determines the user ID of the online activity message, and forwards the online activity message to the corresponding service node of the business logic service cluster based on the user ID, so as to instruct the corresponding service node to call the corresponding service processing logic to process the online activity message through the dimension tag. By adopting the above technical means, by adding dimension tags to the online activity messages, performing pre-verification, and then forwarding them to the business logic service cluster for processing, the online activity message processing service can be split into a message consumption process service and a business logic service. While ensuring the normal pull and consumption of messages, the efficiency of online activity message processing is improved through message forwarding processing, the backlog of online activity messages is avoided, and the reliability and stability of online activity message processing are improved.

[0020] In addition, a pre-check is performed before forwarding the online activity message, so that the online activity message can be filtered, and the forwarding processing efficiency of the online activity message can be further improved through the identification of the service processing logic. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 It is a flowchart of a method for processing online activity messages provided by an embodiment of the present application;

[0022] Figure 2 It is a schematic diagram of the flow of online activity messages in an embodiment of the present application;

[0023] Figure 3 is a flowchart of online activity message processing in an embodiment of the present application;

[0024] Figure 4 This is a flow chart of the online activity message volume processing in an embodiment of the present application;

[0025] Figure 5 It is a structural diagram of a system for processing online activity messages provided in an embodiment of the present application;

[0026] Figure 6 It is a structural diagram of an online activity message processing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0027] In order to make the purpose, technical scheme and advantages of the present application clearer, the specific embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. It is understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for the convenience of description, only the part related to the present application but not all the contents are shown in the accompanying drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow chart describes each operation (or step) as a sequential process, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. The process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The process can correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.

[0028] The online activity message processor provided in this application is designed to add dimension tags to online activity messages, perform pre-verification, and then forward them to the business logic service cluster for processing. The online activity message processing service is split into a message consumption process service and a business logic service. While ensuring the normal pull and consumption of messages, the efficiency of online activity message processing is improved through message forwarding processing to avoid the backlog of online activity messages.

[0029] With the rapid development of Internet technology, for global live broadcast activities, different regional operations need to configure more personalized regional activities to meet the needs of users in different regions. Therefore, the product side needs an activity template service that can carry more online activities at the same time to empower regional operations so that activities can be quickly configured and launched. When processing online activity messages generated by various types of online activities, an activity template function for regional operation configuration activities is provided. Its core logic is to consume message data of various businesses for the server, determine whether the message meets the activity rules by traversing the online activity configuration, and execute the corresponding business logic. In the specific message consumption process, taking the live broadcast message as an example, if N viewing messages are generated per second, the number of online activity rules is M, and the number of business processing logic is K, then the time complexity of message processing can be roughly estimated to be O(NMK). It can be seen that the time required for message processing is related to the number of messages, the number of online activity rules, and the business processing logic. When the number of messages increases, the number of online activities increases, and the business logic becomes more complex, the processing time required will also be longer.

[0030] With the gradual iteration of online activity business and the growing number of online activities, the number of online activity rules is also gradually increasing, resulting in performance bottlenecks in the processing service of online activity messages. This is mainly due to the partition restrictions of the message queue. For example, only 6 processing partitions are allocated to gift messages, resulting in only 6 consumer Pods (message processing servers) being deployed to process these messages. When the number of online configured activities surges, the processing time of the consumer logic will also increase significantly, and the service load will increase accordingly, which will lead to message backlogs and frequent triggering of full gc (garbage collection) and other problems. Moreover, this backlog situation cannot be effectively solved by simply expanding the number of consumer service pods. Because the number of partitions configured by the upstream message producer is fixed, and it has multiple business downstreams, the number of partitions cannot be increased at will, and downstream consumers can only deploy consumer Pods according to the maximum number of partitions configured.

[0031] Based on this, a method for processing online activity messages in an embodiment of the present application is provided to solve the technical problem of backlog of online activity messages, so that the message consumption performance of the online activity message processing service is no longer limited by the number of partitions, and the throughput of the service is improved to handle the surge in online activity messages, thereby ensuring the stable operation of the system.

[0032] Example:

[0033] Figure 1 A flowchart of a method for processing online activity messages provided in an embodiment of the present application is provided. The method for processing online activity messages provided in this embodiment can be executed by an online activity message processing device, which can be implemented in software and / or hardware. The online activity message processing device can be composed of two or more physical entities, or can be composed of one physical entity. Generally speaking, the online activity message processing device can be a processing device such as a message consumption server.

[0034] The following description is made by taking the message consumption server as the main body of the method for processing online activity messages. Figure 1 , the online activity message processing method specifically includes:

[0035] S110: Acquire an online activity message, and add a dimension tag to the online activity message according to a set message dimension to which the online activity message belongs. The dimension tag is used to identify a service processing logic for processing the online activity message.

[0036] When processing online activity messages, this application considers the limitation of the number of message consumption service partitions and cannot increase the number of message consumption services. Therefore, in order to reduce the message processing time of message consumption services, a new business logic service is added to specifically handle the business logic of various online activity messages, and the message consumption service originally used for online activity message processing is used as a transit service to be responsible for the message forwarding service. Figure 2 After the message consumption service pulls the online activity message, it will be forwarded to the new business logic service for processing through rpcgw (remote interface) call after the service processing logic identification and pre-verification, and the original business logic of the message consumption service will be migrated to the new business logic service for implementation. In this way, message consumption and business logic processing are separated, so that the message processing time can be shortened through rpc forwarding without increasing the number of message consumption services.

[0037] Among them, the message consumption service pulls different online activity messages by accessing the system's message queue cluster. When online activity messages are generated, they will be written into the corresponding message queues of the message queue cluster according to the set message dimensions, so that the message consumption service can pull them in sequence. The set message dimensions are configured according to actual needs, and can include different dimensions such as gift giving, watching live broadcasts, broadcasting, recharging, and auctions. When an online activity message is pulled (for example, messages such as users watching live broadcasts and sending gifts), first add a dimension label to the message according to the type or characteristics of the message (that is, setting the message dimension). This dimension label is used to identify the service processing logic required for subsequent processing of the message. By adding dimension labels, it is easy for subsequent business logic services to quickly identify message types and provide clear guidance for subsequent processing processes. This helps to simplify the message processing process and improve message processing efficiency.

[0038] Specifically, since the message consumption service subscribes to multiple dimensions of upstream message queues at the same time, including gifting, watching live broadcasts, broadcasting, recharging, auctions, etc., it is necessary to collect different statistical feature dimensions to distinguish different message dimensions. After the subsequent message consumption service consumes an online activity message of a certain message dimension, it needs to forward the message according to the set message dimension to which the online activity message belongs, and the message dimension needs to be marked in the online activity message. When the subsequent business logic service starts the service, it needs to save the service processing logic HandleService of all set message dimensions to the local memory of the service when the service is initialized. After receiving the online activity message, the corresponding service processing logic HandleService can be obtained according to the dimension label mapping in the message request, and the online activity message can be delivered to the corresponding service processing logic HandleService for processing. As a service cluster, the business logic service can be configured with several service nodes, and each service node is configured with service processing logic of each type of set message dimension, so as to perform distributed processing on the online activity message.

[0039] For example, gifting messages are added with dimension tag 1, watching live broadcasts are added with dimension tag 2, broadcasting messages are added with dimension tag 3, recharge messages are added with dimension tag 4, and auction messages are added with dimension tag 5. In the above message processing process, online activity messages with dimension tag 4 in the message will be handed over to the corresponding recharge service processing logic RechargeHandleService for processing. This allows online activity messages of multiple message dimensions to be consumed separately in one business logic service without having to maintain a separate microservice for each message dimension. This can reduce the operation and maintenance costs of business services and improve service utilization.

[0040] S120: Perform a pre-verification on the online activity message based on the set pre-verification rule, and filter the online activity messages that fail the pre-verification.

[0041] Further, for the online activity messages pulled, refer to Figure 3 Before the message is further forwarded and processed, the message consumption service will verify the message according to the set pre-verification rules. The pre-verification rules are configured according to the actual message filtering requirements, and may include message format verification, timestamp validity check, etc. Only messages that pass the pre-verification will be processed further, and messages that fail will be filtered out. Optionally, for some online activity messages that require response time or are relatively simple to process, they can also be filtered through pre-verification rules and handed over to the business logic configured locally in the message consumption service for processing. This reduces the processing of invalid or error messages, further reduces the system's message load, and improves the stability and processing efficiency of the entire message processing system.

[0042] For example, for broadcast duration messages, the service has a minimum broadcast duration of 5 minutes to take effect. In this case, you can pre-check and filter out messages with a broadcast duration of less than 5 minutes to avoid forwarding invalid messages to the business logic service, thereby improving the processing performance of the business logic service and saving resources.

[0043] S130. When the online activity message passes the pre-verification, determine the user identifier of the online activity message, and forward the online activity message to the corresponding service node of the business logic service cluster based on the user identifier, so as to instruct the corresponding service node to call the corresponding service processing logic to process the online activity message through the dimension tag.

[0044] Finally, for online activity messages that pass the pre-verification, the message consumption service parses the user ID in the message. Then, based on the user ID and the dimension tag of the message, the message is forwarded to the corresponding service node in the business logic service cluster. The corresponding service node in the business logic service cluster calls the corresponding service processing logic according to the dimension tag to process the online activity message. The service node can be fixedly assigned to process the online activity message of the corresponding user ID, or it can send the online activity message to the service node that has previously processed the message with the same user ID according to the user ID. In addition, different service nodes can also be responsible for message processing of corresponding dimensions only. Through the combination of user ID and dimension tag, the message can be accurately forwarded to the service node responsible for this type of message, thereby achieving accurate message processing and service load balancing.

[0045] Optionally, before forwarding the online activity message to a corresponding service node of the business logic service cluster based on the user identifier, the method further includes:

[0046] The set message dimension of the active message to be forwarded and processed is determined as the target message dimension, and the service processing logic corresponding to the target message dimension is sent to each service node of the business logic service cluster.

[0047] According to the actual processing requirements of online activity messages, the message consumption service adaptively selects the set message dimensions that need to be forwarded to the business logic service cluster for processing, which are defined as the target message dimensions. After determining the target message dimension, the message consumption service sends the service processing logic corresponding to the dimension to each service node of the business logic service cluster to ensure that each service node has the service processing logic required to process this type of message. By sending the service processing logic, the message consumption service can flexibly adjust and process messages of different dimensions. Different online activity messages are dispatched to the business logic service cluster for processing according to actual needs. For some online activity messages that can be directly processed by the local machine, the message consumption service can directly process them based on the local service processing logic. When a new activity or message type appears, you only need to update the corresponding service processing logic and send it to the service node of the business logic service.

[0048] Optionally, refer to Figure 4 , after sending the service processing logic corresponding to the target message dimension to each service node of the business logic service cluster, it also includes:

[0049] S1301, forwarding online activity messages of the target message dimension to each service node of the business logic service cluster for processing according to a set ratio, and retaining the remaining ratio of online activity messages of the target message dimension locally for processing;

[0050] S1302: Obtain message processing results corresponding to the target message dimension of each service node of the business logic service cluster, and adjust the set ratio according to the message processing results until the set ratio is 1.

[0051] Specifically, each consumer process on the message consumption service adds a configuration switch according to the service processing logic that needs to be migrated. When it is detected that the online activity message belongs to the target message dimension that needs to be migrated to the business logic service processing cluster for processing, a gradual forwarding method is adopted to forward part of the target message dimension to each service node of the business logic service cluster according to the set ratio, and the rest is retained in the local processing of the message consumption service. For example, 10% of the gift-giving messages are forwarded to each service node of the business logic service cluster for processing. Part of the messages that are released are forwarded and processed according to the new business logic, and the remaining proportion continues to be retained locally for processing according to the original business logic. Then, by collecting the message processing results of the target message dimension corresponding to each service node of the business logic service cluster, and observing for a period of time that there is no problem with the reconciliation of the message processing results, the release ratio can be increased until the release is completed.

[0052] Optionally, forwarding the online activity message to a corresponding service node of the business logic service cluster includes:

[0053] Aggregate online activity messages of the same service node of the corresponding business logic service cluster into a data set, and send the data set to the corresponding service node of the business logic service cluster at a regular interval.

[0054] After the message consumption service pulls the online activity message, the present application can also aggregate the message and forward it in batches according to business needs, thereby reducing the number of rpc calls and saving computing resources. Before the message is forwarded to the corresponding service node of the business logic service cluster, the online activity messages belonging to the same service node are aggregated. The aggregation operation can be performed based on a time window (such as per second, per minute, etc.) or a message quantity threshold. The aggregated messages are organized into data sets, each of which contains multiple messages belonging to the same service node. The message consumption service sets a timer to periodically send the aggregated data set to the corresponding service node of the business logic service cluster, thereby reducing the number of rpc calls and reducing the overhead of network transmission.

[0055] Optionally, forwarding the online activity message to a corresponding service node of the business logic service cluster based on the user identifier includes:

[0056] forwarding the online activity message to the corresponding service node of the business logic service cluster when the corresponding service node of the business logic service cluster has processed the historical activity message of the corresponding user identifier;

[0057] In the case that the service node of the business logic service cluster has not processed the historical activity message of the corresponding user identifier, the online activity message will be forwarded to the corresponding service node of the business logic service cluster based on the load balancing algorithm.

[0058] When sending an online activity message based on a user ID, this application will check whether there is a service node in the business logic service cluster that has processed the historical activity message of the user ID. If a service node that has processed the user's historical activity message is found, the online activity message will be forwarded to the service node first. This maintains the continuity of user messages and helps improve user experience and system processing efficiency (for example, avoiding repeated user identity authentication, preference settings, etc.). If no service node that has processed the user's historical activity message is found, then for load balancing considerations, to avoid overloading a single service node, the message consumption service will select a suitable service node based on the load balancing algorithm for message forwarding. The load balancing algorithm can be a simple polling, random selection, or service node selection can be performed by consistent hashing, minimum number of active requests, etc., to ensure the overall performance and stability of message processing.

[0059] It is understandable that for different online activity messages, the same uid (user ID) request needs to be processed on one service node. Therefore, rpcgw needs to be configured to route according to the uid hash load balancing algorithm so that message processing requests with the same uid are routed to the same node. This not only ensures the relative order of message processing with the same uid, but also helps to hit the local cache of the service node, thereby improving cache utilization and hit rate.

[0060] Optionally, after forwarding the online activity message to a corresponding service node of the business logic service cluster based on the user identifier, the method further includes:

[0061] In the case of failure in forwarding the online activity message, the retransmission logic of the set number of times is executed on the online activity message, and in the case of failure in retransmission of the online activity message, the online activity message is written into the message acquisition queue to reacquire the online activity message.

[0062] Reference Figure 3 When forwarding online activity messages to the corresponding service nodes of the business logic service cluster, forwarding failure may occur due to network failure, unavailability of service nodes, or other reasons. Therefore, the message consumption service needs to detect this failure event. After detecting the failure of message forwarding, the retransmission logic is started immediately. By setting an upper limit on the number of retransmissions, it is ensured that the message will not be retried indefinitely when it cannot be successfully forwarded. If the message still cannot be successfully forwarded after reaching the set upper limit on the number of retransmissions, it is considered that the message cannot be processed in the current state. At this time, the online activity message will be written to the message acquisition queue. The message acquisition queue can be the same queue as the above-mentioned online activity message acquisition, and the online activity message that failed to be retransmitted is inserted at the end of the queue. The message acquisition queue can also be a new message retransmission queue, and the message retransmission processing is performed according to the set delay.

[0063] For example, in the case of ConnectException (connection exception), SocketTimeoutException (timeout exception) and NoRouteToHostException (route exception), the message consumption service will retry the forwarding. If it fails after three retries, it will be written into the message queue for re-consumption to ensure that the message is not lost.

[0064] In addition, before forwarding the online activity message to the corresponding service node of the business logic service cluster based on the user identifier, the method further includes:

[0065] A post-verification rule is issued to each service node of the business logic service cluster to instruct each service node of the business logic service cluster to perform message filtering of online activity messages based on the post-verification rule.

[0066] For the business logic service cluster, you can also configure a post-check rule to perform post-check on the received business messages, and appropriately filter out some messages that do not comply with the rules. For example, some frequently changing business-related check rules can be uniformly delegated to the business logic service cluster for implementation. For example, the check of the business blacklist can filter out some online activity messages of blacklisted users by configuring the blacklist. In this way, the check rules that may change can be uniformly placed in the business logic service. For subsequent business iterations and upgrades, only one service needs to be modified and upgraded, thereby reducing the cost of human operation and maintenance.

[0067] Based on the above-mentioned online activity message processing method, by splitting the online activity message processing service into the message consumption process service and the business logic service and setting clear service boundaries, the complexity of the message consumption service can be effectively reduced, making the business process clearer and more concise. The message consumption service is no longer limited by the huge number of online activity rules, and its original service processing logic is transferred to the business logic service cluster for processing. The business logic service cluster can cope with the growing number of activity rules by expanding the number of service nodes, thereby achieving the purpose of improving consumption throughput. After the online activity message processing service is split, the time consumption of rpc forwarding can be ignored due to the small time consumption. The time complexity of the message consumption service processing message can be roughly regarded as O(N). Compared with the original processing time consumption O(NMK), the consumption capacity of the message consumption service can be effectively improved.

[0068] For example, for a message consumption service, the message consumption process service of each dimension pulls the messages of the corresponding message dimension in batches each time. Then, the message is filtered through the pre-check and the dimension label of the message is marked. Then, the message is forwarded according to the uid hash based on rpcgw.

[0069] At one end of the corresponding business logic service cluster, after receiving the online activity message, the message is delivered to the service processing logic HandleService of the corresponding service node for processing according to the dimension tag carried in the message.

[0070] Take the gift-giving message as an example. After the above process, the message reaches the gift-giving service processing logic CoreGiftHandleService for processing. First, the post-check blacklist and other methods are used to prevent blacklist users from cheating. The gift-giving message contains dimension information such as diamond gifting, gold bean gifting, package gifting, and gift-giving number. Each dimension needs to execute the corresponding logic. Specifically for each dimension, the online activity rule set act_rule_list can be obtained according to the activity id and dimension, and then the act_rule_list is traversed to filter the rules. If the rule exists, the activity rule time, the gift-giving bonus dimension (gift giver bonus or recipient bonus, etc.), and the room type (single room or multi-person room, etc.) are determined to obtain specific RuleDetailData (rule detailed information data), that is, S points can be obtained for every N gifts sent, and the upper limit of points that can be obtained per day. Finally, the scoring logic is executed to determine whether the daily maximum value is reached. If the bonus exceeds the upper limit, the maximum upper limit is taken. If it does not exceed the upper limit, the bonus is directly added. Record the specific bonus flow, and publish the bonus message to the database after the bonus is successfully added for subsequent processes to subscribe.

[0071] In the above, by obtaining the online activity message, a dimension tag is added to the online activity message according to the set message dimension to which the online activity message belongs, and the dimension tag is used to identify the service processing logic for processing the online activity message; the online activity message is pre-checked based on the set pre-check rule, and the online activity message that fails the pre-check is filtered; when the online activity message passes the pre-check, the user ID of the online activity message is determined, and the online activity message is forwarded to the corresponding service node of the business logic service cluster based on the user ID, so as to instruct the corresponding service node to call the corresponding service processing logic to process the online activity message through the dimension tag. By adopting the above technical means, by adding dimension tags to the online activity message, pre-checking it, and then forwarding it to the business logic service cluster for processing, the online activity message processing service can be split into the message consumption process service and the business logic service, while ensuring the normal pull and consumption of the message, the efficiency of the online activity message processing is improved through the message forwarding processing, the backlog of online activity messages is avoided, and the reliability and stability of the online activity message processing are improved.

[0072] In addition, a pre-check is performed before forwarding the online activity message, so that the online activity message can be filtered, and the forwarding processing efficiency of the online activity message can be further improved through the identification of the service processing logic.

[0073] Based on the above embodiments, Figure 5 This is a schematic diagram of the structure of a system for processing online activity messages provided by this application. Figure 5The online activity message processing system provided in this embodiment specifically includes: an acquisition module 31, a verification module 32 and a forwarding module 33.

[0074] The acquisition module 31 is configured to acquire online activity messages, and add dimension tags to the online activity messages according to the set message dimensions to which the online activity messages belong, wherein the dimension tags are used to identify the service processing logic for processing the online activity messages;

[0075] The verification module 32 is configured to perform a pre-verification on the online activity message based on a set pre-verification rule, and filter the online activity message that fails the pre-verification;

[0076] The forwarding module 33 is configured to determine the user identifier of the online activity message when the online activity message pre-verification passes, and forward the online activity message to the corresponding service node of the business logic service cluster based on the user identifier, so as to instruct the corresponding service node to call the corresponding service processing logic to process the online activity message through the dimension label.

[0077] Specifically, before forwarding the online activity message to the corresponding service node of the business logic service cluster based on the user identifier, the method further includes:

[0078] The set message dimension of the active message to be forwarded and processed is determined as the target message dimension, and the service processing logic corresponding to the target message dimension is sent to each service node of the business logic service cluster.

[0079] After the service processing logic corresponding to the target message dimension is sent to each service node of the business logic service cluster, it also includes:

[0080] Forward online activity messages of the target message dimension to each service node of the business logic service cluster for processing according to the set ratio, and retain the remaining ratio of online activity messages of the target message dimension locally for processing;

[0081] Obtain the message processing results of each service node of the business logic service cluster corresponding to the target message dimension, and adjust the set ratio according to the message processing results until the set ratio is 1.

[0082] The method of forwarding the online activity message to the corresponding service node of the business logic service cluster based on the user identifier includes:

[0083] forwarding the online activity message to the corresponding service node of the business logic service cluster when the corresponding service node of the business logic service cluster has processed the historical activity message of the corresponding user identifier;

[0084] In the case that the service node of the business logic service cluster has not processed the historical activity message of the corresponding user identifier, the online activity message will be forwarded to the corresponding service node of the business logic service cluster based on the load balancing algorithm.

[0085] Specifically, forwarding the online activity message to the corresponding service node of the business logic service cluster includes:

[0086] Aggregate online activity messages of the same service node of the corresponding business logic service cluster into a data set, and send the data set to the corresponding service node of the business logic service cluster at a regular interval.

[0087] Before forwarding the online activity message to the corresponding service node of the business logic service cluster based on the user identifier, the method further includes:

[0088] A post-verification rule is issued to each service node of the business logic service cluster to instruct each service node of the business logic service cluster to perform message filtering of online activity messages based on the post-verification rule.

[0089] After forwarding the online activity message to the corresponding service node of the business logic service cluster based on the user identifier, the method further includes:

[0090] In the case of failure in forwarding the online activity message, the retransmission logic of the set number of times is executed on the online activity message, and in the case of failure in retransmission of the online activity message, the online activity message is written into the message acquisition queue to reacquire the online activity message.

[0091] In the above, by obtaining the online activity message, a dimension tag is added to the online activity message according to the set message dimension to which the online activity message belongs, and the dimension tag is used to identify the service processing logic for processing the online activity message; the online activity message is pre-checked based on the set pre-check rule, and the online activity message that fails the pre-check is filtered; when the online activity message passes the pre-check, the user ID of the online activity message is determined, and the online activity message is forwarded to the corresponding service node of the business logic service cluster based on the user ID, so as to instruct the corresponding service node to call the corresponding service processing logic to process the online activity message through the dimension tag. By adopting the above technical means, by adding dimension tags to the online activity message, pre-checking it, and then forwarding it to the business logic service cluster for processing, the online activity message processing service can be split into the message consumption process service and the business logic service, while ensuring the normal pull and consumption of the message, the efficiency of the online activity message processing is improved through the message forwarding processing, the backlog of online activity messages is avoided, and the reliability and stability of the online activity message processing are improved.

[0092] In addition, a pre-check is performed before forwarding the online activity message, so that the online activity message can be filtered, and the forwarding processing efficiency of the online activity message can be further improved through the identification of the service processing logic.

[0093] The online activity message processing system provided in the embodiment of the present application can be configured to execute the online activity message processing method provided in the above embodiment, and has corresponding functions and beneficial effects.

[0094] Based on the above practical example, the present application embodiment also provides a device for processing online activity messages, referring to Figure 6 , the online activity message processing device includes: a processor 31, a memory 32, a communication module 33, an input device 34 and an output device 35. The memory, as a computer-readable storage medium, can be configured to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the online activity message processing method described in any embodiment of the present application (for example, an acquisition module, a verification module and a forwarding module in the online activity message processing system). The communication module is configured to perform data transmission. The processor executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory, that is, realizes the above-mentioned online activity message processing method. The input device can be configured to receive input digital or character information, and generate key signal input related to the user settings and function control of the device. The output device may include a display device such as a display screen. The above-mentioned online activity message processing device can be configured to execute the online activity message processing method provided in the above-mentioned embodiment, and has corresponding functions and beneficial effects.

[0095] On the basis of the above embodiments, the embodiments of the present application further provide a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores computer-executable instructions, wherein the computer-executable instructions are configured to execute a method for processing online activity messages when executed by a computer processor, and the storage medium may be any of various types of memory devices or storage devices. Of course, the non-volatile computer-readable storage medium provided in the embodiments of the present application, whose computer-executable instructions are not limited to the method for processing online activity messages as described above, may also execute related operations in the method for processing online activity messages provided in any embodiment of the present application.

[0096] On the basis of the above embodiments, the embodiments of the present application further provide a computer program product. The technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer program product is stored in a storage medium, and includes a number of instructions for enabling a computer device, a mobile terminal or a processor therein to execute all or part of the steps of the method for processing online activity messages described in each embodiment of the present application.

Claims

1. A method for processing online activity messages, characterized in that: include: Acquire an online activity message, and add a dimension tag to the online activity message according to a set message dimension to which the online activity message belongs, wherein the dimension tag is used to identify a service processing logic for processing the online activity message; Performing a pre-verification on the online activity message based on a set pre-verification rule, and filtering the online activity message that fails the pre-verification; When the online activity message passes the pre-verification, the user identifier of the online activity message is determined, and the online activity message is forwarded to the corresponding service node of the business logic service cluster based on the user identifier, so as to instruct the corresponding service node to call the corresponding service processing logic to process the online activity message through the dimension tag.

2. The method for processing online activity messages according to claim 1, characterized in that: The forwarding of the online activity message to a corresponding service node of a business logic service cluster based on the user identifier includes: forwarding the online activity message to the corresponding service node of the business logic service cluster when the corresponding service node of the business logic service cluster has processed the historical activity message corresponding to the user identifier; In the case that the service node of the business logic service cluster has not processed the historical activity message corresponding to the user identifier, the online activity message will be forwarded to the corresponding service node of the business logic service cluster based on the load balancing algorithm.

3. The method for processing online activity messages according to claim 2, characterized in that: The forwarding the online activity message to the corresponding service node of the business logic service cluster includes: The online activity messages of the same service node of the corresponding business logic service cluster are aggregated into a data set, and the data set is sent to the corresponding service node of the business logic service cluster at a regular interval.

4. The method for processing online activity messages according to claim 1, characterized in that: Before forwarding the online activity message to a corresponding service node of a business logic service cluster based on the user identifier, the method further includes: Determine the set message dimension of the active message to be forwarded and processed as the target message dimension, and send the service processing logic corresponding to the target message dimension to each service node of the business logic service cluster.

5. The method for processing online activity messages according to claim 4, characterized in that: After the service processing logic corresponding to the target message dimension is sent to each service node of the business logic service cluster, the method further includes: Forwarding the online activity messages of the target message dimension to each service node of the business logic service cluster for processing according to a set ratio, and retaining the remaining ratio of the online activity messages of the target message dimension locally for processing; The message processing results of each service node of the business logic service cluster corresponding to the target message dimension are obtained, and the set ratio is adjusted according to the message processing results until the set ratio is 1.

6. The method for processing online activity messages according to any one of claims 1 to 5, characterized in that: Before forwarding the online activity message to a corresponding service node of a business logic service cluster based on the user identifier, the method further includes: A post-verification rule is issued to each service node of the business logic service cluster to instruct each service node of the business logic service cluster to perform message filtering of the online activity message based on the post-verification rule.

7. The method for processing online activity messages according to any one of claims 1 to 5, characterized in that: After forwarding the online activity message to a corresponding service node of a business logic service cluster based on the user identifier, the method further includes: In the case that the online activity message fails to be forwarded, a set number of retransmission logic is executed on the online activity message, and in the case that the online activity message fails to be retransmitted, the online activity message is written into a message acquisition queue to reacquire the online activity message.

8. A system for processing online activity messages, characterized in that: include: an acquisition module, configured to acquire an online activity message, and add a dimension tag to the online activity message according to a set message dimension to which the online activity message belongs, wherein the dimension tag is used to identify a service processing logic for processing the online activity message; A verification module, configured to perform a pre-verification on the online activity message based on a set pre-verification rule, and filter the online activity message that fails the pre-verification; The forwarding module is configured to determine the user identifier of the online activity message if the pre-verification of the online activity message passes, and forward the online activity message to the corresponding service node of the business logic service cluster based on the user identifier, so as to instruct the corresponding service node to call the corresponding service processing logic to process the online activity message through the dimension tag.

9. A device for processing online activity messages, characterized in that: include: memory and one or more processors; The memory is configured to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method for processing online activity messages according to any one of claims 1 to 7.

10. A non-volatile computer-readable storage medium, characterized in that: The non-volatile computer-readable storage medium stores computer-executable instructions, which are configured to execute the online activity message processing method according to any one of claims 1 to 7 when executed by a computer processor.

11. A computer program product, characterized in that The computer program product includes instructions, and when the instructions are executed on a computer or a processor, the computer or the processor executes the method for processing online activity messages according to any one of claims 1 to 7.