Synchronization event notification method and device, equipment, storage medium and program product
By introducing data source-free transaction processing units into social networks, merging similar synchronization events and reducing the number of redundant synchronizations, the problem of system performance bottlenecks under large data volumes is solved, and system processing efficiency and user experience are improved.
Patent Information
- Application Number
- CN202510482345.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-17
- Publication Date
- 2025-08-01
AI Technical Summary
In social networks, data synchronization events are frequent and the amount of data is large, resulting in excessive pressure on system logic processing, performance bottlenecks, and client and server request congestion and response delay problems.
Through the data source-free transaction processing unit, similar events are merged and converted into target event streams based on the event type and action factors of the synchronization event, reducing the number of redundant synchronization events and improving system performance.
It effectively reduces the resource consumption of data synchronization, improves the processing efficiency and performance of the system, and improves the user experience.
Smart Images

Figure CN120407231A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular, to a method, apparatus, computer device, computer-readable storage medium, and computer program product for notifying synchronization events. Background Art
[0002] In current social network services, there are various scenarios that require data synchronization. For example, multiple devices held by a user need to timely synchronize and update data from the platform to ensure that the user can obtain the latest information and data on the platform on any device, such as user information synchronization, user dynamic synchronization, etc. Large social scenarios usually have the characteristics of large data volume and frequent changes. With the increase in the number of social members and interactions, the number of data synchronization events and content will increase exponentially, which is likely to cause excessive processing pressure on the business logic at both ends and reach the performance bottleneck. Among them, the client may experience problems such as unresponsive and stuck UI (User Interface) due to too large single synchronization content, too long processing time, and repeated synchronization events. The server may encounter performance bottleneck problems such as request congestion and long requests due to too many synchronization requests and too large synchronization content. Summary of the Invention
[0003] Based on this, in view of the above technical problems, it is necessary to provide a method, apparatus, computer device, computer-readable storage medium, and computer program product for notifying synchronization events, which can reduce the number of redundant data synchronization events and synchronization content, effectively reduce the resource consumption caused by data synchronization, and thus improve the system performance.
[0004] In a first aspect, this application provides a method for notifying synchronization events. The method is applied to a data source-free transaction processing unit and includes:
[0005] For a data source-free transaction to be submitted, determine at least one group of similar events according to the event type and action factors of each synchronization event in the data source-free transaction;
[0006] Perform a merging process on the synchronization events included in each group of similar events to obtain a processed target event stream;
[0007] Submit the target event stream to an event distribution module.
[0008] In one embodiment, after performing a merging process on the synchronization events included in each group of similar events to obtain a processed target event stream, the method further includes:
[0009] Determine multiple target synchronization events corresponding to the same event type;
[0010] In the case where the change degree of the multiple target synchronization events exceeds a preset threshold, convert the multiple target synchronization events into full-scale synchronization events.
[0011] In one embodiment, the synchronous events included in each group of like events are merged to obtain a processed target event stream, including:
[0012] The synchronous events included in each group of like events are de-duplicated and merged to obtain a processed target event stream.
[0013] In one embodiment, the data source-free transaction processing unit includes a synchronous event buffer, and the method further includes:
[0014] For a data source-free transaction to be committed, each synchronous event in the data source-free transaction is obtained from the synchronous event buffer;
[0015] The processed target event stream is stored in the synchronous event buffer;
[0016] When committing the transaction, the target event stream stored in the synchronous event buffer is submitted to the event distribution module.
[0017] In one embodiment, the method further includes:
[0018] When the transaction rollback state is monitored, the synchronous event buffer is cleared.
[0019] In one embodiment, the method further includes:
[0020] When the transaction completion state is monitored, the data related to the data source-free transaction in the synchronous event buffer is cleared.
[0021] In a second aspect, the present application further provides a synchronous event notification device, which is applied to a data source-free transaction processing unit and includes:
[0022] A determination module, configured to determine at least one group of like events according to the event type and action factor of each synchronous event in the data source-free transaction to be committed;
[0023] A merging module, configured to perform a merging process on the synchronous events included in each group of like events to obtain a processed target event stream;
[0024] A submission module, configured to submit the target event stream to the event distribution module.
[0025] In a third aspect, the present application further provides a computer device, including a memory and a processor, where the memory stores a computer program, and when the processor executes the computer program, the steps of the method described in the first aspect above are implemented.
[0026] Fourthly, the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method described in the first aspect above are implemented.
[0027] Fifthly, the present application further provides a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect above are implemented.
[0028] For the above notification method, device, computer device, computer-readable storage medium and computer program product of synchronization events, the data source-free transaction processing unit determines at least one set of similar events for the data source-free transaction to be submitted according to the event types and action factors of the synchronization events in the data source-free transaction; performs merging processing on the synchronization events included in each set of similar events to obtain a processed target event stream; and submits the target event stream to the event distribution module. Through the above method, a data source-free transaction is introduced. Since the data source-free transaction is executed in memory and the data is stored in memory instead of persistent storage, the processing efficiency of the transaction can be improved. By merging similar events, the number of redundant data synchronization events and synchronization content can be reduced, effectively reducing the resource consumption caused by data synchronization, and thus improving the system performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings required for the description of the embodiments of the present application or related technologies. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other related drawings can be obtained without creative efforts based on these drawings.
[0030] Figure 1 It is an application environment diagram of the notification method of synchronization events in an embodiment;
[0031] Figure 2 It is a flowchart of the notification method of synchronization events in an embodiment;
[0032] Figure 3 It is a flowchart of the processing of traditional synchronization events;
[0033] Figure 4 It is a flowchart of the processing of improved synchronization events;
[0034] Figure 5 It is a structural block diagram of the notification device of synchronization events in an embodiment;
[0035] Figure 6 It is an internal structure diagram of a computer device in an embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0036] In order to make the objectives, technical solutions and advantages of the present application clearer and more understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0037] To facilitate the understanding of the embodiments provided by the present application, some terms that appear in the specific description process will be introduced below:
[0038] Non-Data Source Transactions are a special type of transaction. The operations involved do not depend on traditional persistent storage (such as databases, file systems, etc.). They are usually used in scenarios where consistency and reliability need to be ensured but persistent data is not involved. Application scenarios of such transactions include data processing in memory, distributed systems, message passing systems, etc.
[0039] Event-Driven Architecture is a common software architecture pattern. Its basic idea is to introduce events as a basic interaction method in a software system to replace the traditional imperative and call-based interaction methods. In an event-driven framework, the generation and processing of events are usually asynchronous, which means that the generation and processing of events can be carried out in parallel, improving the concurrency and scalability of the system. In practical applications, message queues are often used as the transmission medium for events.
[0040] The notification method for synchronous events provided by the embodiments of the present application can be applied to, for example Figure 1In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or can be placed in the cloud or other network servers. The server 104 manages a social network platform, and the corresponding client of the social network platform is logged in on the terminal 102. The terminal 102 interacts with the server 104 based on this client. The server 104 processes the data source-free transactions in the interaction process by using the notification method for synchronizing events provided in the embodiments of the present application. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptop computers, smart phones, tablet computers, Internet of Things devices, and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, projection devices, etc. The portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The head-mounted device can be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc. The server 104 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0041] In an exemplary embodiment, as Figure 2 shown, a notification method for synchronizing events is provided. This method is applied to a data source-free transaction processing unit, and the data source-free transaction processing unit can be set in the server 104 as Figure 1 shown. The method includes:
[0042] Step 202, for the data source-free transaction to be submitted, determine at least one group of similar events according to the event types and action factors of the synchronization events in the data source-free transaction.
[0043] Among them, in this embodiment, based on the event-driven framework, a data source-free transaction is introduced. Since the data source-free transaction is executed in memory and the data is stored in memory rather than in persistent storage, the operation speed is fast, which can improve the processing efficiency of transactions. It can be understood that the life cycle (start, commit, rollback, etc.) of the data source-free transaction is managed by the application program or the middleware layer, rather than relying on the database management system (DBMS).
[0044] In social network services, the event types of synchronization events are, for example, user dynamics, friend relationships, messages, group operations, comments and replies, user profiles, likes and collections, etc. A data source-free transaction includes multiple synchronization events generated within a short period of time. For example, the data source-free transaction includes synchronization events such as a user adding, modifying remarks, and deleting group members in a group.
[0045] The action factor can be understood as CRUD actions, namely create, update, and delete actions. Exemplarily, under the event type of user dynamics, the action factors can include a user posting a new dynamic (Create), a user editing the content of a published dynamic (Update), and a user deleting a dynamic (Delete); under the event type of friend relationship, the action factors can include a user sending a friend request (Create), accepting or rejecting a friend request (Update), and deleting a friend relationship (Delete).
[0046] For the data source-free transaction to be committed, the non-data-source transaction processing unit classifies multiple synchronous events corresponding to the same event type and the same action factor into a group of similar events. For example, under the event type of user dynamics, multiple synchronous events of users deleting dynamics are classified into a group of similar events.
[0047] Step 204: Perform a merging process on the synchronous events included in each group of similar events to obtain a processed target event stream.
[0048] Among them, for the event stream of the data source-free transaction, multiple synchronous events in each group of similar events are merged into one synchronous event to obtain a processed target event stream.
[0049] Step 206: Submit the target event stream to the event distribution module.
[0050] It can be understood that referring to Figure 3 , in the current common synchronous event scheme of social network platforms, a relatively complex business logic process often needs to call sub-business logic modules (such as Figure 3 Module A therein) and other associated business logic modules (such as Figure 3 Module B, Module C, and Module D therein) to form a complete business process. In addition to the main process generating synchronous events, the modules in the called link may also generate synchronous events. Without processing, this process may generate a large number of scattered and duplicate business synchronous events. For example, in the business of 50 people batch joining a group chat, the main logic is implemented by calling the single-person joining the group chat 50 times in a loop, that is, it may generate 50*1 group chat information update events and 50*1 group member update events. Therefore, the synchronous data interface of the client and the event distribution module of the server are affected by processing redundant and duplicate content, which affects the system performance and user experience. A, B, C, and D are synchronous transactions, and A(x) is the synchronous content of x, for example, it can be user_id, that is, the user identifier. Referring to Figure 3 , assuming that module B corresponds to m similar scattered events, module C corresponds to n similar scattered events, module D corresponds to duplicate events A(1) and time D(1), and the number of synchronous times is m + n + 3 times.
[0051] Referring to Figure 4, in this embodiment, a data source - less transaction is introduced. The life cycle of the transaction (start, commit, rollback, etc.) is managed by the application or middleware layer, rather than relying on the database management system (DBMS). Its atomicity and consistency characteristics are realized, that is, all synchronous events in the same transaction are either all notified or all not notified. The data source - less transaction processing unit analyzes and merges similar events according to the event type and the action factors of addition, deletion, and modification in the same transaction, reducing the number of data synchronization times. The merged synchronous events are all submitted to the event distribution module. It can effectively achieve efficient, fast, and reliable synchronous event notification. For example, in the business of 50 people batch - joining a group chat, the main logic is implemented as calling the single - person joining the group chat 50 times in a loop, that is, it may generate 50 * 1 group chat information update events and 50 * 1 group member update events. After being processed by the data source - less transaction processing unit for event merging, only 1 group chat information update event and 1 group member update event need to be distributed, reducing 2 * 49 notification events compared with before, which can greatly reduce the pressure on the event distribution module. Refer to Figure 4 , after being processed by the data source - less transaction processing unit for merging, the number of synchronization times is 4 times, which is greatly reduced compared with m + n + 3 times.
[0052] In the above - mentioned method for notifying synchronous events, for the data source - less transaction to be submitted, the data source - less transaction processing unit determines at least one group of similar events according to the event type and action factors of each synchronous event in the data source - less transaction; performs merging processing on the synchronous events included in each group of similar events to obtain the processed target event stream; and submits the target event stream to the event distribution module. By the above method, a data source - less transaction is introduced. Since the data source - less transaction is executed in memory and the data is stored in memory rather than in persistent storage, the processing efficiency of the transaction can be improved. By merging similar events, the number of redundant data synchronization events and synchronization content can be reduced, effectively reducing the resource consumption caused by data synchronization, and thus improving the system performance.
[0053] In an exemplary embodiment, after step 204, the method further includes: determining multiple target synchronous events corresponding to the same event type; and in the case where the change degree of the multiple target synchronous events exceeds a preset threshold, converting the multiple target synchronous events into full - volume synchronous events.
[0054] Among them, if the change degree or complexity of the multiple target synchronous events corresponding to the same event type exceeds the preset threshold after merging, the multiple target synchronous events of the same event type are converted into one full - volume synchronous event of the same type to minimize the number of data synchronization times, effectively reducing the resource consumption caused by data synchronization, and thus improving the system performance.
[0055] The preset threshold is a parameter set in advance according to actual requirements, and the specific value thereof is not limited in this embodiment. Optionally, the change degree is determined according to the structural change degree and information redundancy degree before and after merging. The structural change degree can be determined according to the total number of events before and after merging, and the information redundancy degree can be determined according to the data volume before and after merging. Based on the weight information corresponding to the structural change degree and information redundancy degree, the scores of the structural change degree and the information redundancy degree are weighted and summed to obtain the change degree of multiple target synchronization events. If the gap between the total number of events before and after merging is large and the gap between the data volumes is large, multiple target synchronization events of the same event type are converted into full-volume synchronization events.
[0056] In an exemplary embodiment, step 204 includes: de-duplicating and merging the synchronization events included in each group of similar events to obtain a processed target event stream.
[0057] Among them, the data source-free transaction processing unit includes a synchronization event processing module, and the synchronization event processing module mainly processes the logic of merging and de-duplicating the synchronization event stream after submitting a transaction. 1) Merge the contents of synchronization events of the same type but different contents. For example, there are three A-type synchronization events A(1), A(2), and A(3), and after merging, it becomes one synchronization event A(1,2,3). When the change degree or complexity exceeds a certain threshold after merging events of the same type, it is converted into a full-volume synchronization event A(x) of the same type. 2) De-duplicate synchronization events of the same type and the same content. For example, two B-type synchronization events B(1) and B(1) are de-duplicated into one synchronization event B(1) after processing.
[0058] In an exemplary embodiment, the data source-free transaction processing unit includes a synchronization event buffer, and the method further includes: for a data source-free transaction to be submitted, obtaining each synchronization event in the data source-free transaction from the synchronization event buffer; storing the processed target event stream in the synchronization event buffer; when submitting a transaction, submitting the target event stream stored in the synchronization event buffer to the event distribution module.
[0059] Among them, the data source-free transaction processing unit includes a synchronization event buffer, which is mainly used to temporarily record each synchronization event record generated during this transaction process. When submitting a data source-free transaction, the synchronization event buffer will submit the event stream to the synchronization event processing module for processing. After the synchronization event processing module completes merging and de-duplicating, the processed target event stream is stored in the synchronization event buffer. After processing the same data source-free transaction, the synchronization event processing module submits the target event stream stored in the synchronization event buffer to the event distribution module.
[0060] In an exemplary embodiment, the method further includes: emptying the synchronization event buffer when a transaction rollback state is monitored.
[0061] It can be understood that the data source - less transaction processing unit further includes a transaction manager, which mainly includes transaction status maintenance, transaction synchronization listener management, and transaction operation event notification. 1) Transaction status maintenance: Determine whether a new transaction or transaction nesting occurs, start a transaction, determine whether to handle exceptions and roll back, commit a transaction, and complete a transaction. 2) Transaction synchronization listener management: Handle the registration and cancellation of transaction synchronization listeners and maintain the listener set. 3) Transaction operation event notification: Distribute transaction events (beforeCommit, beforeCompletion, afterCommit, afterCompletion) and transaction status (completed, rolled back) through transaction synchronization listeners.
[0062] When the transaction manager commits a transaction, the synchronous event buffer submits the synchronous event stream in the event buffer to the event processing module for processing. When the transaction manager rolls back a transaction (detects the transaction roll - back state), it clears the synchronous event records in the synchronous event buffer to achieve the atomicity of the transaction, either all succeed or all fail.
[0063] In an exemplary embodiment, the method further includes: when detecting the transaction completion state, clearing the data related to the data source - less transaction in the synchronous event buffer.
[0064] Optionally, after the event distribution module stores the target event stream in the event distribution queue, it returns a response message to the data source - less transaction processing unit. The transaction manager determines the transaction completion (detects the transaction completion state) based on this response message, clears the data related to the data source - less transaction in the synchronous event buffer, and provides storage resources for subsequent transaction processing processes. Optionally, the event distribution module stores the target event stream in the event distribution queue. After delivering each synchronous event in the event distribution queue to the corresponding user device, it returns a response message to the data source - less transaction processing unit. The transaction manager determines the transaction completion (detects the transaction completion state) based on this response message, and clears the data related to the data source - less transaction in the synchronous event buffer.
[0065] In an alternative implementation, the transaction manager, synchronous event buffer, and synchronous event processing module are pre - written, different business data update event names and event notification contents are formulated, and event tracing points and incremental synchronization interfaces are added to the data update logic corresponding to the business service. In a specific implementation, the business process triggers the event notification processing logic. The event processing module analyzes and merges similar events according to the same transaction, event type, and add - delete - modify action factors, and the event distribution module delivers each synchronous event in the event distribution queue to the corresponding user device according to the event object.
[0066] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are sequentially shown in the direction of the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or steps or stages in other steps.
[0067] Based on the same inventive concept, an embodiment of the present application further provides a notification device for synchronous events for implementing the above-mentioned notification method for synchronous events. The solution provided by this device to solve the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the notification device for synchronous events provided below can refer to the limitations on the notification method for synchronous events in the foregoing, and will not be repeated here.
[0068] In an exemplary embodiment, as Figure 5 shown, a notification device for synchronous events is provided. The device is applied to a data source-free transaction processing unit and includes:
[0069] A determination module 502, configured to determine at least one set of similar events according to the event types and action factors of the synchronous events in the data source-free transaction for the data source-free transaction to be submitted.
[0070] A merging module 504, configured to perform a merging process on the synchronous events included in each set of similar events to obtain a processed target event stream.
[0071] A submission module 506, configured to submit the target event stream to an event distribution module.
[0072] In the above-mentioned notification device for synchronous events, the data source-free transaction processing unit determines at least one set of similar events according to the event types and action factors of the synchronous events in the data source-free transaction for the data source-free transaction to be submitted; performs a merging process on the synchronous events included in each set of similar events to obtain a processed target event stream; and submits the target event stream to the event distribution module. By the above method, a data source-free transaction is introduced. Since the data source-free transaction is executed in memory and the data is stored in memory instead of being persistently stored, the processing efficiency of the transaction can be improved. By merging similar events, the number of redundant data synchronization events and the synchronization content can be reduced, effectively reducing the resource consumption caused by data synchronization, and thus improving the system performance.
[0073] In an exemplary embodiment, the merging module 504 is further configured to determine multiple target synchronization events corresponding to the same event type; and in the case where the change degree of the multiple target synchronization events exceeds a preset threshold, convert the multiple target synchronization events into full - volume synchronization events.
[0074] In an exemplary embodiment, the merging module 504 is further configured to deduplicate and merge the synchronization events included in each group of similar events to obtain a processed target event stream.
[0075] In an exemplary embodiment, the data - source - free transaction processing unit includes a synchronization event buffer. The determination module 502 is further configured to, for a data - source - free transaction to be committed, obtain each synchronization event in the data - source - free transaction from the synchronization event buffer.
[0076] The merging module 504 is further configured to store the processed target event stream in the synchronization event buffer.
[0077] The submission module 506 is further configured to, when submitting a transaction, submit the target event stream stored in the synchronization event buffer to the event distribution module.
[0078] In an exemplary embodiment, the notification device for synchronization events further includes a rollback module, which is configured to empty the synchronization event buffer when a transaction rollback state is monitored.
[0079] In an exemplary embodiment, the notification device for synchronization events further includes a clearing module, which is configured to clear the data related to the data - source - free transaction in the synchronization event buffer when a transaction completion state is monitored.
[0080] Each module in the above - mentioned notification device for synchronization events can be implemented in whole or in part by software, hardware, and their combination. The above - mentioned modules can be embedded in the processor in the computer device in hardware form or be independent of it, or can be stored in the memory in the computer device in software form, so as to facilitate the processor to call and execute the operations corresponding to the above - mentioned modules.
[0081] In an exemplary embodiment, a computer device is provided. The computer device can be a server, and its internal structure diagram can be as Figure 6As shown in the figure. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), and a communication interface. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it implements a method for notifying synchronous events.
[0082] Those skilled in the art can understand that Figure 6 the structure shown in the figure is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different component layout.
[0083] In an exemplary embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory. When the processor executes the computer program, the following steps are implemented: for a data source-free transaction to be submitted, determine at least one group of similar events according to the event type and action factors of each synchronous event in the data source-free transaction; perform a merging process on the synchronous events included in each group of similar events to obtain a processed target event stream; submit the target event stream to an event distribution module.
[0084] In an embodiment, when the processor executes the computer program, the following steps are further implemented: determine multiple target synchronous events corresponding to the same event type; in the case where the change degree of the multiple target synchronous events exceeds a preset threshold, convert the multiple target synchronous events into full-volume synchronous events.
[0085] In an embodiment, when the processor executes the computer program, the following steps are further implemented: perform deduplication and merging on the synchronous events included in each group of similar events to obtain a processed target event stream.
[0086] In an embodiment, when the processor executes the computer program, the following steps are further implemented: for a data source-free transaction to be submitted, obtain each synchronous event in the data source-free transaction from a synchronous event buffer; store the processed target event stream in the synchronous event buffer; when submitting a transaction, submit the target event stream stored in the synchronous event buffer to an event distribution module.
[0087] In one embodiment, when the processor executes the computer program, the following steps are further implemented: when it monitors the transaction rollback state, clear the synchronization event buffer.
[0088] In one embodiment, when the processor executes the computer program, the following steps are further implemented: when it monitors the transaction completion state, clear the data related to the data source - less transaction in the synchronization event buffer.
[0089] In one embodiment, a computer - readable storage medium is provided, on which a computer program is stored. When the computer program is executed by the processor, the following steps are implemented: for a data source - less transaction to be committed, determine at least one set of similar events according to the event types and action factors of the synchronization events in the data source - less transaction; perform a merging process on the synchronization events included in each set of similar events to obtain a processed target event stream; and submit the target event stream to the event distribution module.
[0090] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: determine multiple target synchronization events corresponding to the same event type; when the change degree of the multiple target synchronization events exceeds a preset threshold, convert the multiple target synchronization events into full - volume synchronization events.
[0091] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: perform deduplication and merging on the synchronization events included in each set of similar events to obtain a processed target event stream.
[0092] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: for a data source - less transaction to be committed, obtain the synchronization events in the data source - less transaction from the synchronization event buffer; store the processed target event stream in the synchronization event buffer; and when submitting the transaction, submit the target event stream stored in the synchronization event buffer to the event distribution module.
[0093] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: when it monitors the transaction rollback state, clear the synchronization event buffer.
[0094] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: when it monitors the transaction completion state, clear the data related to the data source - less transaction in the synchronization event buffer.
[0095] In one embodiment, a computer program product is provided, including a computer program which, when executed by a processor, implements the following steps: for a data source-free transaction to be submitted, determine at least one group of like events according to the event types and action factors of the synchronization events in the data source-free transaction; perform a merging process on the synchronization events included in each group of like events to obtain a processed target event stream; and submit the target event stream to an event distribution module.
[0096] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: determine multiple target synchronization events corresponding to the same event type; and when the change degree of the multiple target synchronization events exceeds a preset threshold, convert the multiple target synchronization events into full-volume synchronization events.
[0097] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: perform duplicate removal and merging on the synchronization events included in each group of like events to obtain a processed target event stream.
[0098] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: for a data source-free transaction to be submitted, obtain the synchronization events in the data source-free transaction from a synchronization event buffer; store the processed target event stream in the synchronization event buffer; and when submitting a transaction, submit the target event stream stored in the synchronization event buffer to an event distribution module.
[0099] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: when a transaction rollback state is monitored, clear the synchronization event buffer.
[0100] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: when a transaction completion state is monitored, clear the data related to the data source-free transaction in the synchronization event buffer.
[0101] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with relevant regulations.
[0102] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, the memories, databases, or other media mentioned in the various embodiments provided in the present application can all include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the various embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the various embodiments provided in the present application can be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, data processing logics based on quantum computing, artificial intelligence (AI) processors, etc., without limitation.
[0103] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered to be within the scope recorded in the present application.
[0104] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all fall within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.
Claims
1. A method for notifying synchronous events, characterized in that, The method is applied to a data source-free transaction processing unit, and the method includes: For a data source-free transaction to be committed, determine at least one set of similar events according to the event types and action factors of the synchronization events in the data source-free transaction; Perform merging processing on the synchronization events included in each set of similar events to obtain a processed target event stream; Submit the target event stream to an event distribution module.
2. The method according to claim 1, characterized in that, After performing merging processing on the synchronization events included in each set of similar events to obtain a processed target event stream, the method further includes: Determine multiple target synchronization events corresponding to the same event type; In the case where the change degree of the multiple target synchronization events exceeds a preset threshold, convert the multiple target synchronization events into full-volume synchronization events.
3. The method according to claim 1, characterized in that, The performing merging processing on the synchronization events included in each set of similar events to obtain a processed target event stream includes: Perform duplicate removal and merging on the synchronization events included in each set of similar events to obtain a processed target event stream.
4. The method according to claim 1, wherein The data source-free transaction processing unit includes a synchronization event buffer, and the method further includes: For a data source-free transaction to be committed, obtain the synchronization events in the data source-free transaction from the synchronization event buffer; Store the processed target event stream in the synchronization event buffer; When submitting a transaction, submit the target event stream stored in the synchronization event buffer to the event distribution module.
5. The method according to claim 4, characterized in that The method further includes: In the case where a transaction rollback state is monitored, clear the synchronization event buffer.
6. The method according to claim 4, wherein The method further includes: In the case where a transaction completion state is monitored, clear the data related to the data source-free transaction in the synchronization event buffer.
7. A notification device for synchronous events, characterized in that, The apparatus is applied to a data source-free transaction processing unit, and the apparatus includes: A determination module, configured to determine at least one set of similar events according to the event types and action factors of the synchronization events in a data source-free transaction to be committed; A merging module, configured to perform merging processing on the synchronization events included in each set of similar events to obtain a processed target event stream; A submission module, configured to submit the target event stream to an event distribution module.
8. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.