Method, device, electronic device and storage medium for processing activity events

Describe the marketing activity process through a limited state machine, realize the automatic launch of the activity, solve the problem of long development time and low resource utilization efficiency in existing technologies, and improve the efficiency of activities and user satisfaction.

CN112068810BActive Publication Date: 2025-01-28BEIJING 58 INFORMATION TTECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010881514.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-27
Publication Date
2025-01-28
Estimated Expiration
2040-08-27

AI Technical Summary

Technical Problem

The fixed setting process of existing marketing activities results in long development time, low resource utilization efficiency, and difficulty in responding to the best marketing activities time in a timely manner.

Method used

The activity process is described by a limited state machine (FSM). When detecting the user trigger event, it automatically determines the effective activity of the user's current participation based on the event information, and the state transfer and action trigger are performed to realize the automatic launch of the activity.

Benefits of technology

It saves the needs of developers to write code, improves the utilization rate of resources, shorten the development time of the event, and improves the efficiency of activities and user satisfaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112068810B_ABST
    Figure CN112068810B_ABST
Patent Text Reader

Abstract

The embodiments of the present invention provide a method, device, electronic device and storage medium for processing activity events, the method comprising: obtaining event information of the event when a user triggers an event; determining the valid activity that the user is currently participating in based on the event information; if the start state of the valid activity corresponding to the event is the initial state of the finite state machine, transferring the initial state of the finite state machine to the next adjacent state, and triggering the action in the end state corresponding to the event; updating the user's state in the activity into a state database; repeating the above steps until the activity ends. In the present invention, the flow of the activity is described by a finite state machine, and when a user triggers an event, the activity state is automatically transferred and the action is triggered according to the event, thereby automatically completing the delivery of the activity, which not only improves the utilization of resources, but also improves the delivery efficiency of the activity and user satisfaction through automated delivery.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method, device, electronic device and storage medium for processing an activity event. Background Art

[0002] Marketing activities are a very popular means of public relations communication and market promotion at home and abroad in recent years. They integrate news effects, advertising effects, public relations, image communication, and customer relations, and create opportunities for new product introductions and brand displays, establish brand recognition and brand positioning, and form a marketing method to quickly enhance brand awareness and reputation.

[0003] In the related technology, for each marketing activity, the operation personnel need to set up the marketing plan in advance, for example, set up the activity process, activity crowd, etc., and then the R&D personnel will develop the marketing plan (such as writing code, etc.). The code written for each activity needs to be deployed to the server separately in order to adapt to the operation of the marketing activity.

[0004] However, due to the fixed setting process of the above marketing plan, after each marketing campaign, the code deployed on the server is discarded, but it still occupies the resources on the server, thereby reducing the efficiency of resource utilization. In addition, the development time of existing marketing activities is long, and it is possible to miss the best marketing campaign time.

[0005] Therefore, how to improve the delivery of marketing activities and the utilization of R&D resources is a technical problem that needs to be solved. Summary of the invention

[0006] The technical problem to be solved by the embodiments of the present invention is to provide a method, device, electronic device and storage medium for processing activity events, so as to solve the technical problem in the prior art that the marketing activity setting process is fixed, the development time is long, and the resource utilization efficiency is low.

[0007] In order to solve the above problems, the present invention is achieved through the following technical solutions:

[0008] A first aspect provides a method for processing an activity event, the method comprising:

[0009] When a user triggers an event, obtaining event information of the event;

[0010] Determine, according to the event information, the valid activity currently participated by the user;

[0011] If the start state of the valid activity corresponding to the event is the initial state of the finite state machine, the initial state of the finite state machine is transferred to the next adjacent state of the initial state, and the action in the end state corresponding to the event is triggered;

[0012] updating the user's status in the activity into the status database;

[0013] Repeat the above steps until the activity is finished.

[0014] Optionally, determining, according to the event information, the valid activity currently participated by the user includes:

[0015] The valid activities currently participated by the user are retrieved from the activity database according to the event information.

[0016] Optionally, before transferring the initial state of the finite state machine to the next adjacent state of the initial state, the method further includes:

[0017] Determine whether the user who triggered the event belongs to a user in a preset active user group;

[0018] If yes, executing the step of transferring the initial state of the finite state machine to the next adjacent state of the initial state and triggering the action in the end state corresponding to the event;

[0019] If not, return to the step of acquiring event information of the event when an event triggered by a user is detected.

[0020] Optionally, after determining the valid activity currently participated by the user according to the event information, the method further includes:

[0021] Determine whether the start state of the valid activity corresponding to the event is the initial state of the finite state machine;

[0022] If the start state of the valid activity corresponding to the event is not the initial state of the finite state machine, searching the state database for whether there is a corresponding start state for the event;

[0023] If the event has a start state, then when the event satisfies the transition condition, the current state of the finite state machine is transferred to the next adjacent state of the current state, and the action in the end state corresponding to the event is triggered;

[0024] The status of the user in the activity is updated in the status database.

[0025] Optionally, the method further includes:

[0026] If the event does not have a corresponding start state when searching the state database, the step of acquiring event information of the event when a user triggers an event is executed.

[0027] Optionally, before obtaining the event information of the event, the method further includes:

[0028] Divide each activity into data on different actions performed by users under different conditions;

[0029] Describing the data through the states corresponding to the finite state machine, obtaining a finite number of states corresponding to each activity, and transitions and actions between the states, wherein each directed edge connecting two states is called an event;

[0030] The finite number of states corresponding to each described activity, as well as the transitions and actions between the states are stored in an activity database, wherein the data stored in the activity database includes at least: each directed edge of the finite state machine and the states connected by the directed edges, as well as the transition conditions corresponding to each directed edge and the actions that should be triggered when each state is reached.

[0031] A second aspect provides a device for processing an activity event, the device comprising:

[0032] An acquisition module, used for acquiring event information of the event when an event triggered by a user is detected;

[0033] A determination module, configured to determine, based on the event information, a valid activity currently participated in by the user;

[0034] A first state transfer module, configured to transfer the initial state of the finite state machine to a next adjacent state of the initial state when the start state of the valid activity determined by the determination module corresponding to the event is the initial state of the finite state machine;

[0035] A first triggering module, configured to trigger an action in an end state corresponding to the event when the first state transfer module transfers the initial state to a next adjacent state;

[0036] A first updating module, used for updating the status of the user in the activity into the status database;

[0037] A feedback execution module is used to repeatedly execute the functions of the acquisition module to the first update module after the first update module updates the status of the user in the activity into the status database until the activity ends.

[0038] Optionally, the determining module is specifically configured to retrieve valid activities currently participated by the user from an activity database according to the event information.

[0039] Optionally, the device further comprises:

[0040] A first judgment module, used for judging whether the user who triggers the event belongs to a user in a preset active user group before the first state transfer module transfers the initial state of the finite state machine to the next adjacent state of the initial state;

[0041] The first state transfer module is further configured to transfer the initial state of the finite state machine to a next adjacent state of the initial state when the first determination module determines that the user who triggers the event is a user in the pre-active user group;

[0042] The acquisition module is further configured to acquire event information of the event when a user triggering an event is detected, when the first judgment module determines that the user triggering the event is not a user in the pre-active user group.

[0043] Optionally, the device further comprises:

[0044] A second judgment module is used to judge whether the start state of the valid activity corresponding to the event is the initial state of the finite state machine after the determination module determines the valid activity currently participated by the user according to the event information;

[0045] a retrieval module, configured to search the state database for a corresponding start state of the event when the second judgment module determines that the start state of the valid activity corresponding to the event is not the initial state of the finite state machine;

[0046] The second state transfer module is further configured to transfer the current state of the finite state machine to the next adjacent state of the current state when the retrieval module retrieves that the event has a start state and the event satisfies a transfer condition;

[0047] The second triggering module is used to trigger an action in the end state corresponding to the event.

[0048] The second updating module is used to update the status of the user in the activity in the status database.

[0049] Optionally, the feedback execution module is further configured to obtain event information of the event when a user triggering event is detected, when the retrieval module retrieves the event from the state database and no corresponding start state exists.

[0050] Optionally, the device further comprises:

[0051] A division module, used for dividing each activity into data of different actions performed by users under different conditions before the acquisition module acquires the event information of the event;

[0052] A state description module is used to describe the data through the state corresponding to the finite state machine, and obtain a finite number of states corresponding to each activity, as well as the transitions and actions between the states, wherein each directed edge connecting two states is called an event;

[0053] A storage module is used to store the finite states corresponding to each described activity, as well as the transitions and actions between the states into an activity database. The data stored in the activity database includes: each directed edge of the finite state machine and the states connected by the directed edges, as well as the transition conditions corresponding to each directed edge and the actions that should be triggered when each state is reached.

[0054] A third aspect provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the method for processing activity events as described above when executed by the processor.

[0055] A fourth aspect provides a computer-readable storage medium having a computer program stored thereon, and the computer program, when executed by a processor, implements the activity event processing method as described above.

[0056] Compared with the prior art, the embodiments of the present invention have at least the following advantages:

[0057] In an embodiment of the present invention, when a user-triggered event is detected, the event information of the event is obtained; the valid activities that the user is currently participating in are determined based on the event information; if the start state of the valid activity corresponding to the event is the initial state of the finite state machine, the initial state of the finite state machine is transferred to the next adjacent state of the initial state, and the action in the end state corresponding to the event is triggered; the state of the user in the activity is updated to the state database; and the above steps are repeated until the activity ends. That is to say, in an embodiment of the present invention, the flow of the activity is described by a finite state machine, and when a user-triggered event is detected, the activity state is automatically transferred and the action is triggered according to the valid activity corresponding to the event, thereby automatically completing the delivery of the activity, which not only saves the need for developers to write code and saves space for storing code, improves resource utilization, but also improves the delivery efficiency of the activity and user satisfaction through automated delivery.

[0058] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1 is a flow chart of a method for processing an activity event provided by an embodiment of the present invention;

[0060] Figure 2 is another flow chart of a method for processing an activity event provided by an embodiment of the present invention;

[0061] Figure 3 A schematic diagram of describing a marketing activity through a finite state machine provided in an embodiment of the present invention;

[0062] Figure 4 It is a structural schematic diagram of an activity event processing device provided by an embodiment of the present invention;

[0063] Figure 5 is another structural schematic diagram of an activity event processing device provided by an embodiment of the present invention;

[0064] Figure 6 It is another structural schematic diagram of an activity event processing device provided by an embodiment of the present invention;

[0065] Figure 7 This is another structural diagram of a device for processing activity events provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0066] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0067] See also Figure 1 , is a flow chart of a method for processing an activity event provided by an embodiment of the present invention. In this embodiment, for each event in the activity, the following steps are executed until the activity ends. The method may specifically include the following steps:

[0068] Step 101: when an event triggered by a user is detected, obtaining event information of the event;

[0069] Step 102: Determine the valid activities currently participated by the user according to the event information:

[0070] Step 103: If the start state of the valid activity corresponding to the event is the initial state of the finite state machine, the initial state of the finite state machine is transferred to the next adjacent state of the initial state, and the action in the end state corresponding to the event is triggered;

[0071] Step 104: updating the user's status in the activity into the status database;

[0072] Step 105: Repeat the above steps 101 to 104 until the activity ends.

[0073] The method for processing activity events provided in the embodiment of the present invention can be applied to a mobile terminal, a server, a client, a backend or a system, or to an automation engine, etc., without limitation herein. The implementation device can be a smart phone, a laptop computer, a tablet computer or other electronic device, without limitation herein.

[0074] Combine the following Figure 1 , the specific implementation steps of a method for processing an activity event provided by an embodiment of the present invention are described in detail.

[0075] First, step 101 is executed to obtain event information of the event when an event triggered by a user is detected.

[0076] In this step, the event refers to a directed graph or directed edge between two states of multiple finite states in which the process of a marketing activity (or other activities, etc.) is expressed or described by a finite state machine (FSM). The specific description process is detailed below and will not be repeated here. In this embodiment, switching from one state to another is called a state transition, and the event that causes it is called a trigger event. It should be noted that in actual applications, for state transitions, the transition is not performed as long as a trigger event is detected, but the state transition can only be initiated when the value of the detector (Guards) is true (TRUE).

[0077] In this step, the detector can detect the event corresponding to the directed edge (or directed graph) through the message queue, and obtain the event information detected in the event, where the event information includes the user identifier (userId) that triggers the event, and can also include other specific information related to the event. That is to say, the user identifier is used to query which user triggered the event.

[0078] Next, step 102 is executed to determine the valid activities currently participated by the user according to the event information.

[0079] In this step, the valid activities currently participated by the user are retrieved from the activity database according to the event information. That is, the user can currently participate in one activity or multiple activities, and the activities currently participated in are all valid activities.

[0080] It should be noted that the pre-stored data in the activity database includes at least: each directed edge of the finite state machine and the state connected by the directed edge, as well as the transfer condition corresponding to each directed edge and the action that should be triggered when each state is reached. Of course, other data may also be included according to actual conditions, and this embodiment does not limit this.

[0081] Again, execute step 103. If the start state of the valid activity corresponding to the event is the initial state of the finite state machine, transfer the initial state of the finite state machine to the next adjacent state of the initial state, and trigger the action in the end state corresponding to the event.

[0082] In this step, it is necessary to first determine whether the start state of the valid activity corresponding to the event is the initial state of the finite state machine; an event is a directed edge (or directed graph) between two states after being described by the finite state machine. Each event includes two states, namely, a start state and an end state.

[0083] That is to say, first determine whether the starting state of the directed edge is the initial state of the entire FMS. If so, transfer the initial state of the finite state machine to the next adjacent state of the initial state, and trigger the action in the end state corresponding to the event. For example, when a user logs in to an activity page on a terminal, that is, when the automation engine detects a user-triggered event (i.e., logging in to the activity page), first obtain the event information of the event (user identification and specific content of the activity). Since the user has just logged in to the activity page, his state is the initial state. Therefore, after logging in, the state of the event needs to be transferred from the starting state to the state of pushing the activity page (such as state ID equals 1), etc. The present invention sets the state with ID equal to 1 as the next adjacent state of the initial state. Of course, it can also be modified to other settings as needed, and this embodiment is not limited.

[0084] Then, step 104 is executed to update the status of the user in the activity into the status database.

[0085] After the status is transferred, the status of the user participating in the activity needs to be updated in real time to the status database to facilitate subsequent search and continued update of the user's status.

[0086] Finally, step 105 is executed to repeat the above steps until the activity ends.

[0087] In this step, since each activity includes a finite number of states, the directed connection between each two states is called an event. One end of the event represents the start state of the event, and the other end represents the end state of the event. State transfer is required from the start state of the event to the end state.

[0088] In this step, from step 101 to step 104, only an event triggered by the user is processed, that is, after executing step 104, step 101 needs to be re-executed until all events in the activity are completed.

[0089] In an embodiment of the present invention, when a user-triggered event is detected, the event information of the event is obtained; the valid activities that the user is currently participating in are determined based on the event information; if the start state of the valid activity corresponding to the event is the initial state of the finite state machine, the initial state of the finite state machine is transferred to the next adjacent state of the initial state, and the action in the end state corresponding to the event is triggered; the state of the user in the activity is updated to the state database; and the above steps are repeated until the activity ends. That is to say, in an embodiment of the present invention, the flow of the activity is described by a finite state machine, and when a user-triggered event is detected, the activity state is automatically transferred and the action is triggered according to the valid activity corresponding to the event, thereby automatically completing the delivery of the activity, which not only saves the need for developers to write code and saves space for storing code, improves resource utilization, but also improves the delivery efficiency of the activity and user satisfaction through automated delivery.

[0090] See also Figure 2 , is another flow chart of a method for processing an activity event provided by an embodiment of the present invention. The method can be applied to an automation engine, such as a marketing automation engine, etc. Of course, it can also be applied to other engines. This embodiment is not limited. The method includes:

[0091] Step 201: when a user triggering event is detected, obtaining event information of the event;

[0092] Step 202: Determine the valid activities currently participated by the user according to the event information;

[0093] In this embodiment, step 201 and step 202 are the same as step 101 and step 102, and the specific implementation process is detailed above and will not be repeated here.

[0094] Step 203: Determine whether the start state of the valid activity corresponding to the event is the initial state of the finite state machine; if yes, execute step 204; otherwise, execute step 206;

[0095] In this step, it is determined whether the start state of the event (ie, the directed edge) is the initial state of the entire finite state machine FMS. If it is the initial state, step 204 is executed; otherwise, step 207 is executed.

[0096] It should be noted that the event in this embodiment is a directed edge (or directed graph) between two states after being described by a finite state machine. Each event includes two states, namely, a start state and an end state.

[0097] Step 204: determine whether the user who triggered the event belongs to a user in a preset active user group; if yes, execute step 205; otherwise, return to step 201;

[0098] In this embodiment, since each activity process can be expressed using a finite state machine (FSM) after abstraction, each finite state machine FSM is bound to an activity user group, which includes all users who can participate in the activity. In this step, in order to further verify the identity of the user and whether the triggering event of the user is legal, it is necessary to further determine whether the user who triggered the event belongs to the user in the preset activity user group.

[0099] Step 205: transferring the initial state of the finite state machine to the next adjacent state of the initial state, and triggering an action in the end state corresponding to the event;

[0100] Step 206: updating the user's status in the activity into the status database; then, returning to step 201;

[0101] Step 205 and step 206 are the same as step 103 and step 104, and their implementation process is detailed above and will not be repeated here.

[0102] Step 207: Search the state database to see if the event has a corresponding start state; if so, execute step 208; otherwise, return to step 201;

[0103] In this step, if the start state of the valid activity corresponding to the event is not the initial state of the finite state machine, it means that the state corresponding to the event may be an intermediate state of the finite state machine, that is, the next state after the initial state, or the next state after the initial state, etc. Therefore, it is necessary to search the state database to see whether there is a corresponding start state for the event; the specific process of the query is already well known to those skilled in the art and will not be described in detail here.

[0104] In other words, by retrieving the start state of the event, we can determine the state in the finite state machine that the event corresponds to.

[0105] Step 208: When the event satisfies the transfer condition, the current state of the finite state machine is transferred to the next adjacent state of the current state, and the action in the end state corresponding to the event is triggered;

[0106] In this step, when it is found that the event has a corresponding start state, it is further determined whether the event satisfies the transition condition. If the transition condition is satisfied, the state transition is performed.

[0107] Among them, the transfer condition is the specific information of the event. For example, the state transfer can only be performed after detecting that the user clicks the lottery button. For example, the state transfer can only be performed when it is detected that the user uses a coupon. For example, the state transfer can only be performed after detecting that the user pays a preset amount, etc.

[0108] It should be noted that when the state transition is performed, the action in the end state corresponding to the event is triggered, thereby completing the action of switching to the next state.

[0109] Step 209: Update the status of the user in the activity in the status database, and then return to step 201.

[0110] In this step, after the state switching is completed, the state database needs to update the state of the user in the corresponding activity, and then return to step 201 to continue the step of obtaining event information of the event when an event triggered by the user is detected until the activity ends.

[0111] In an embodiment of the present invention, when a user-triggered event is detected, event information of the event is obtained; the valid activity currently participated by the user is determined based on the event information; then, it is determined whether the start state of the valid activity corresponding to the event is the initial state of the finite state machine; if it is the initial state of the finite state machine, it is further determined whether the user who triggered the event belongs to a user in a preset active user group; if it is a user in the preset active user group, the initial state of the finite state machine is transferred to the next adjacent state of the initial state, and the action in the end state corresponding to the event is triggered; the state of the user in the activity is updated to the state database; if it is not the initial state of the finite state machine, the state database is searched to see whether there is a corresponding start state for the event; if there is a corresponding start state, when the event meets the transfer condition, the current state of the finite state machine is transferred to the next adjacent state of the current state, and the action in the end state corresponding to the event is triggered; otherwise, the step of obtaining the event information of the event when the user-triggered event is detected is fed back, and the above steps are repeated until the activity ends. That is to say, in the embodiment of the present invention, the process of the activity is described by a finite state machine, and when a user-triggered event is detected, it is further determined whether the start state of the valid activity corresponding to the event is the initial state of the finite state machine, and when the start state of the event is the initial state of the finite state machine, it is further determined whether the user who triggered the event belongs to a user in a preset activity user group. If the user belongs to a user in the preset activity user group, the activity state is automatically transferred and the action is triggered according to the valid activity corresponding to the event, thereby automatically completing the delivery of the activity, which not only saves the need for developers to write code and saves space for storing code, improves resource utilization, but also improves the delivery efficiency of the activity and user satisfaction through automated delivery.

[0112] Optionally, in another embodiment, based on the above embodiment, before acquiring the event information of the event, the method may further include:

[0113] First, each activity is divided into data of different actions performed by users under different conditions; then, the data is described by the corresponding states of a finite state machine to obtain a finite number of states corresponding to each activity, as well as transitions and actions between the states, wherein each directed edge connecting two states is called an event; finally, the finite number of states corresponding to each described activity, as well as transitions and actions between the states are stored in an activity database, wherein the data stored in the activity database includes at least: each directed edge of the finite state machine and the states connected by the directed edges, as well as the transition conditions corresponding to each directed edge and the actions that should be triggered when each state is reached.

[0114] That is to say, in the embodiment of the present invention, all marketing activities can be decomposed into certain actions (issuing coupons, sending SMS messages, etc.) for a certain user under certain conditions. The marketing activity process is abstracted and expressed using a finite state machine (FSM). It should be noted that each FSM is bound to a preset activity user group, which includes: all users who can participate in the activity, which are expressed or described by a finite state machine as follows: Figure 3 As shown, Figure 3 A schematic diagram of describing a marketing activity through a finite state machine provided in an embodiment of the present invention.

[0115] It should be noted that the finite state machine (FSM), also known as the finite state automaton, or state machine for short, is a mathematical model that represents a finite number of states and the transitions and actions between these states. Switching from one state to another is called a state transition, and the event that causes the state transition is called a trigger event. However, not all events trigger state transitions. State transitions can only be initiated when the value of the detector (Guards) is TRUE.

[0116] in, Figure 3 Take the process of a marketing activity expressed by a finite state machine as an example. Figure 3 As shown in the figure, the expressed finite state machine includes five nodes. Except for the start node, which indicates the initial state of the entire finite state machine, the other four nodes include the state ID and its corresponding action. When the state ID = 1, the corresponding action is to push the activity page, when the state ID = 2, the corresponding action is to issue coupons, when the state ID = 3, the corresponding action is to send marketing SMS, and when the state ID = 4, the corresponding action is to conduct cross-marketing. The directed graph or directed edge connecting each two nodes is called an event, and each event includes the start state and end state of the event.

[0117] The marketing automation engine detects an event: when a user logs in to the terminal device, it transfers from the start (initial state) to state ID=1, and sends or displays the action corresponding to ID=1 to the user, that is, displays the push page to the user. Afterwards, if the user does not click the lottery button in the push page, that is, when the event that the user does not click the lottery button is detected, the state is transferred to state ID=3, and the action corresponding to state ID=3 is to send a marketing SMS; if the user clicks the lottery button in the push page, that is, when the event that the user clicks the lottery button is detected, the state is transferred to state ID=2, and the action corresponding to state ID=2 is to issue a coupon and send the coupon to the user, and when the event that the user uses the issued discount is detected, the state is transferred to state ID=4, and the action corresponding to state ID=4 is to conduct cross-marketing, that is, to realize the automatic delivery of marketing activities, and the user can automatically realize the delivery of marketing activities and trigger the user to participate in marketing activities according to the state and corresponding actions of the finite state machine.

[0118] In the embodiment of the present invention, the process of the marketing activity can be abstracted and expressed using a finite state machine, which not only improves the delivery efficiency of the marketing activity, but also improves the satisfaction of users participating in the marketing activity.

[0119] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0120] See also Figure 4 , is a structural diagram of an activity event processing device provided by an embodiment of the present invention, which may specifically include the following modules: an acquisition module 401, a determination module 402, a first state transfer module 403, a first trigger module 404, a first update module 405 and a feedback execution module 406, wherein,

[0121] The acquisition module 401 is used to acquire event information of the event when an event triggered by a user is detected;

[0122] The determination module 402 is used to determine the valid activity currently participated by the user according to the event information;

[0123] The first state transfer module 403 is used to transfer the initial state of the finite state machine to the next adjacent state of the initial state when the start state of the valid activity determined by the determination module corresponding to the event is the initial state of the finite state machine;

[0124] The first trigger module 404 is used to trigger an action in the end state corresponding to the event when the first state transfer module 403 transfers the initial state to the next adjacent state;

[0125] The first updating module 405 is used to update the status of the user in the activity into the status database;

[0126] The feedback execution module 406 is used to repeatedly execute the functions of the acquisition module to the first update module after the first update module 405 updates the status of the user in the activity into the status database until the activity ends.

[0127] Optionally, in another embodiment, based on the above embodiment, the determination module 402 is specifically configured to retrieve valid activities currently participated by the user from an activity database according to the event information.

[0128] Optionally, in another embodiment, based on the above embodiment, the device may further include: a first judgment module 501, whose structural diagram is shown in FIG. Figure 5 As shown,

[0129] A first judgment module 501 is used to judge whether the user who triggers the event belongs to a user in a preset active user group before the first state transfer module 403 transfers the initial state of the finite state machine to the next adjacent state of the initial state;

[0130] The first state transfer module 403 is further configured to transfer the initial state of the finite state machine to the next adjacent state of the initial state when the first determination module 501 determines that the user who triggers the event is a user in the pre-active user group;

[0131] The acquisition module 401 is further configured to acquire event information of the event when a user triggering an event is detected when the first determination module 501 determines that the user triggering the event is not a user in the pre-active user group.

[0132] Optionally, in another embodiment, based on the above embodiment, the device may further include: a second judgment module 601, a search module 602, a second state transfer module 603, a second trigger module 604 and a second update module 605, and its structural diagram is shown in FIG. Figure 6 As shown,

[0133] The second judgment module 601 is used to judge whether the start state of the valid activity corresponding to the event is the initial state of the finite state machine after the determination module 402 determines the valid activity currently participated by the user according to the event information;

[0134] The retrieval module 602 is used to search in the state database whether there is a corresponding start state for the event when the second judgment module 601 determines that the start state of the valid activity corresponding to the event is not the initial state of the finite state machine;

[0135] The second state transfer module 603 is further configured to transfer the current state of the finite state machine to the next adjacent state of the current state when the retrieval module 602 retrieves that the event has a start state and the event satisfies a transfer condition;

[0136] The second triggering module 604 is used to trigger an action in the end state corresponding to the event.

[0137] The second updating module 605 is used to update the status of the user in the activity in the status database.

[0138] Optionally, in another embodiment, based on the above embodiment, the feedback execution module 406 is also used to obtain event information of the event when the retrieval module 602 retrieves the event from the state database and there is no corresponding start state, when a user triggers an event.

[0139] Optionally, in another embodiment, based on the above embodiment, the device may further include: a division module 701, a state description module 702 and a storage module 703, the structural diagram of which is shown in FIG. Figure 7 As shown,

[0140] The division module 701 is used to divide each activity into data of different actions performed by users under different conditions before the acquisition module 401 acquires the event information of the event;

[0141] The state description module 702 is used to describe the data through the state corresponding to the finite state machine, and obtain a finite number of states corresponding to each activity, as well as the transitions and actions between the states, wherein each directed edge connecting two states is called an event;

[0142] The storage module 703 is used to store the finite states corresponding to each described activity, as well as the transitions and actions between the states into an activity database. The data stored in the activity database includes: each directed edge of the finite state machine and the states connected by the directed edges, as well as the transition conditions corresponding to each directed edge and the actions that should be triggered when each state is reached.

[0143] Optionally, an embodiment of the present invention further provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the various processes of the embodiment of the method for processing activity events as described above are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0144] Optionally, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above-mentioned activity event processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0145] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0146] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0147] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0148] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminals (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0149] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0150] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0151] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0152] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0153] The above is a detailed introduction to the method for processing an activity event, the device electronic device and the storage medium provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A method for processing an activity event, characterized in that: The method comprises: Step 101, when a user triggers an event, event information of the event is obtained; the event is a directed graph or directed edge between any two states among a plurality of finite states expressed or described by a finite state machine; Step 102, retrieving valid activities currently participated by the user from an activity database according to the event information; Step 103: if the start state of the valid activity corresponding to the event is the initial state of the finite state machine, the initial state of the finite state machine is transferred to the next adjacent state of the initial state, and the action in the end state corresponding to the event is triggered; updating the user's status in the activity into a status database; If the start state of the valid activity corresponding to the event is not the initial state of the finite state machine, searching the state database for whether there is a corresponding start state for the event; If the event has a start state, then when the event satisfies the transition condition, the current state of the finite state machine is transferred to the next adjacent state of the current state, and the action in the end state corresponding to the event is triggered; Updating the user's status in the activity in the status database; If the event does not have a corresponding start state in the state database, then return to step 101; Step 105, repeating steps 101 to 103 until the activity ends.

2. The method according to claim 1, characterized in that: Before transferring the initial state of the finite state machine to the next adjacent state of the initial state, the method further includes: Determine whether the user who triggered the event belongs to a user in a preset active user group; If yes, executing the step of transferring the initial state of the finite state machine to the next adjacent state of the initial state and triggering the action in the end state corresponding to the event; If not, return to the step of acquiring event information of the event when an event triggered by a user is detected.

3. The method according to any one of claims 1 to 2, characterized in that: Before obtaining the event information of the event, the method further includes: Divide each activity into data on different actions performed by users under different conditions; Describing the data through the states corresponding to the finite state machine, obtaining a finite number of states corresponding to each activity, and transitions and actions between the states, wherein each directed edge connecting two states is called an event; The finite number of states corresponding to each described activity, as well as the transitions and actions between the states are stored in an activity database, wherein the data stored in the activity database includes at least: each directed edge of the finite state machine and the states connected by the directed edges, as well as the transition conditions corresponding to each directed edge and the actions that should be triggered when each state is reached.

4. A device for processing activity events, characterized in that: include: An acquisition module, used for acquiring event information of the event when an event triggered by a user is detected; The event is a directed graph or directed edge between any two states among the plurality of finite states obtained by expressing or describing the process of the activity through a finite state machine; A determination module, configured to retrieve valid activities currently participated by the user from an activity database according to the event information; A first state transfer module, configured to transfer the initial state of the finite state machine to a next adjacent state of the initial state when the start state of the valid activity determined by the determination module corresponding to the event is the initial state of the finite state machine; A first triggering module, configured to trigger an action in an end state corresponding to the event when the first state transfer module transfers the initial state to a next adjacent state; A first updating module, used for updating the status of the user in the activity into a status database; A second judgment module is used to judge whether the start state of the valid activity corresponding to the event is the initial state of the finite state machine after the determination module determines the valid activity currently participated by the user according to the event information; a retrieval module, configured to search the state database for a corresponding start state of the event when the second judgment module determines that the start state of the valid activity corresponding to the event is not the initial state of the finite state machine; The second state transfer module is further configured to transfer the current state of the finite state machine to the next adjacent state of the current state when the retrieval module retrieves that the event has a start state and the event satisfies a transfer condition; A second triggering module, used to trigger an action in an end state corresponding to the event; A second updating module, configured to update the status of the user in the activity in the status database; A feedback execution module is used to re-execute the acquisition module when the retrieval module retrieves the event from the status database and there is no corresponding start state; it is also used to re-execute the acquisition module after the first update module or the second update module updates the user's status in the activity into the status database.

5. The device according to claim 4, characterized in that The device also includes: A first judgment module, used for judging whether the user who triggers the event belongs to a user in a preset active user group before the first state transfer module transfers the initial state of the finite state machine to the next adjacent state of the initial state; The first state transfer module is further configured to transfer the initial state of the finite state machine to a next adjacent state of the initial state when the first determination module determines that the user who triggers the event is a user in the pre-active user group; The acquisition module is further configured to acquire event information of the event when a user triggering an event is detected, when the first judgment module determines that the user triggering the event is not a user in the pre-active user group.

6. The device according to any one of claims 4 to 5, characterized in that The device also includes: A division module, used for dividing each activity into data of different actions performed by users under different conditions before the acquisition module acquires the event information of the event; A state description module is used to describe the data through the state corresponding to the finite state machine, and obtain a finite number of states corresponding to each activity, as well as the transitions and actions between the states, wherein each directed edge connecting two states is called an event; A storage module is used to store the finite states corresponding to each described activity, as well as the transitions and actions between the states into an activity database. The data stored in the activity database includes: each directed edge of the finite state machine and the states connected by the directed edges, as well as the transition conditions corresponding to each directed edge and the actions that should be triggered when each state is reached.

7. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the method for processing an activity event according to any one of claims 1 to 3 when executed by the processor.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for processing an activity event according to any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

  • Transaction processing method, apparatus, equipment and storage medium

    CN110990182A

  • State management persistence

    CN111095207A