A method, apparatus, device and medium for transmitting an EDA event
Patent Information
- Application Number
- CN202411931307.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2044-12-26
AI Technical Summary
[0004]本申请实施例提供一种EDA事件的传递方法、装置、设备及介质,用于解决EDA事件的传递过程是不同的订阅方的发送方式是相同的时可能会导致发布方的资源消耗比较大的问题
Smart Images

Figure CN119862049B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and specifically to a method, apparatus, device, and medium for transmitting EDA events. Background Technology
[0002] Event-Driven Architecture (EDA) is an integrated model for the real-time publishing, capturing, processing, and responding to events across distributed systems. When an application experiences an event, the event generated by EDA is simply called an EDA event. This EDA event is automatically sent to other applications so that all applications that need to be aware of the event can take appropriate action.
[0003] Currently, EDA event transmission typically uses a publish / subscribe mechanism. The transmission process for EDA events is the same for different subscribers, but some subscribers need to subscribe to more events than others. As a result, a large number of EDA events need to be sent to the subscribers, which leads to significant resource consumption because each transmission requires a separate transmission process. Summary of the Invention
[0004] This application provides a method, apparatus, device, and medium for transmitting EDA events, which addresses the problem that the transmission process of EDA events may lead to high resource consumption for the publisher when different subscribers use the same sending method.
[0005] Firstly, this application provides a method for transmitting EDA events, comprising:
[0006] Get the EDA events to be delivered;
[0007] If the subscription sending mode of the EDA event to be transmitted is the first preset mode, then when the subscriber corresponding to the EDA event to be transmitted includes non-target subscribers, the EDA event to be transmitted will be sent directly to each non-target subscriber.
[0008] When the subscriber corresponding to the EDA event to be delivered includes the target subscriber, for each target subscriber, if the subscription information of the EDA event to be delivered meets the triggering condition corresponding to the target subscriber, the EDA event to be delivered is added to the set corresponding to the target subscriber. When the EDA events in the set corresponding to the target subscriber meet the first preset condition, the EDA events in the set corresponding to the target subscriber are packaged together and sent to the target subscriber.
[0009] The above method can directly send the EDA event to the non-target subscribers when the subscribers of the EDA event to be delivered include both target and non-target subscribers. Furthermore, if the subscription information of the EDA event to be delivered meets the triggering conditions of the target subscriber, the EDA event to be delivered is added to the set corresponding to the target subscriber. When the EDA events in the set corresponding to the target subscriber meet preset conditions, they are packaged together and sent to the target subscriber. This ensures that non-target subscribers can receive EDA events in a timely manner, reduces the number of sending processes, and alleviates the problem of resource waste for the publisher.
[0010] In one possible embodiment, before directly sending the EDA event to be delivered to each non-target subscriber, the method further includes:
[0011] If the number of subscribers corresponding to the EDA event to be delivered is greater than 1, then the number of EDA events to be delivered is copied to be the same as the number of subscribers corresponding to the EDA event to be delivered.
[0012] In one possible embodiment, after acquiring the EDA event to be transmitted, the method further includes:
[0013] If the subscription sending mode of the EDA event to be transmitted is the second preset mode, then the sending of the EDA event to be transmitted to the subscriber corresponding to the EDA event to be transmitted will be stopped.
[0014] In one possible embodiment, the subscription transmission mode of the EDA event to be transmitted is determined by the following method:
[0015] Based on the event type of the EDA event to be transmitted, select one preset mode from multiple preset modes, and use the selected preset mode as the subscription transmission mode for the EDA event to be transmitted; or
[0016] When the second preset condition is met, a selection interface is displayed; wherein the content of the selection interface includes multiple preset modes; and in response to the user's selection instruction, the preset mode selected in the selection instruction is used as the subscription sending mode of the EDA event to be transmitted.
[0017] In one possible implementation, the triggering conditions corresponding to the target subscriber are determined in the following way:
[0018] When the third preset condition is met, the event configuration table and the event subscription table are displayed; wherein, the event configuration table includes multiple content types of the target subscriber; the event subscription table contains a threshold corresponding to each content type of the target subscriber;
[0019] In response to the user's input command, the triggering condition corresponding to the target subscriber is determined based on the content type input in the input command and the threshold corresponding to the input content type.
[0020] In one possible embodiment, the first preset condition includes some or all of the following:
[0021] The cumulative number of EDA events in the set corresponding to the target subscriber has reached a preset number;
[0022] The cumulative size of EDA events in the set corresponding to the target subscriber exceeds the preset size;
[0023] The content of the EDA event to be transmitted in the set corresponding to the target subscriber includes preset content;
[0024] The time it takes for the set corresponding to the target subscribers to be formed exceeds a preset time;
[0025] The memory capacity is greater than the preset capacity.
[0026] Secondly, this application provides an EDA event transmission device, comprising:
[0027] The acquisition module is used to acquire EDA events to be transmitted;
[0028] The first processing module is configured to, if the subscription sending mode of the EDA event to be transmitted is a first preset mode, then when the subscriber corresponding to the EDA event to be transmitted includes a non-target subscriber, send the EDA event to be transmitted directly to the non-target subscriber for each non-target subscriber.
[0029] The second processing module is configured to, when the subscriber corresponding to the EDA event to be transmitted includes the target subscriber, add the EDA event to be transmitted to the set corresponding to the target subscriber if the subscription information of the EDA event to be transmitted meets the triggering condition corresponding to the target subscriber for each target subscriber, and when the EDA events in the set corresponding to the target subscriber meet the first preset condition, package the EDA events in the set corresponding to the target subscriber together and send them to the target subscriber.
[0030] In one possible embodiment, the first processing module is specifically configured to, if the number of subscribers corresponding to the EDA event to be transmitted is greater than 1, copy the number of EDA events to be transmitted to the same number of subscribers corresponding to the EDA event to be transmitted.
[0031] In one possible embodiment, the device further includes a third processing module;
[0032] The third processing module is used to stop sending the EDA event to be transmitted to the subscriber corresponding to the EDA event if the subscription sending mode of the EDA event to be transmitted is the second preset mode.
[0033] In one possible embodiment, the determining module is specifically configured to select a preset mode from multiple preset modes based on the event type of the EDA event to be transmitted, and use the selected preset mode as the subscription transmission mode of the EDA event to be transmitted; or
[0034] When the second preset condition is met, a selection interface is displayed; wherein the content of the selection interface includes multiple preset modes; and in response to the user's selection instruction, the preset mode selected in the selection instruction is used as the subscription sending mode of the EDA event to be transmitted.
[0035] In one possible embodiment, the second processing module is further configured to:
[0036] When the third preset condition is met, the event configuration table and the event subscription table are displayed; wherein, the event configuration table includes multiple content types of the target subscriber; the event subscription table contains a threshold corresponding to each content type of the target subscriber;
[0037] In response to the user's input command, the triggering condition corresponding to the target subscriber is determined based on the content type input in the input command and the threshold corresponding to the input content type.
[0038] In one possible embodiment, the first preset condition includes some or all of the following:
[0039] The cumulative number of EDA events in the set corresponding to the target subscriber has reached a preset number;
[0040] The cumulative size of EDA events in the set corresponding to the target subscriber exceeds the preset size;
[0041] The content of the EDA event to be transmitted in the set corresponding to the target subscriber includes preset content;
[0042] The time it takes for the set corresponding to the target subscribers to be formed exceeds a preset time;
[0043] The memory capacity is greater than the preset capacity.
[0044] Thirdly, this application provides an electronic device, comprising:
[0045] Memory, used to store program instructions;
[0046] A processor is configured to invoke program instructions stored in the memory and execute the steps of the method described in any one of the first aspects according to the obtained program instructions.
[0047] Fourthly, this application provides a computer-readable storage medium storing a computer program, the computer program including program instructions, which, when executed by a computer, cause the computer to perform the method described in any one of the first aspects.
[0048] Fifthly, this application provides a computer program product comprising: computer program code, which, when run on a computer, causes the computer to perform the method described in any one of the first aspects. Attached Figure Description
[0049] Figure 1 A flowchart illustrating an EDA event transmission method provided in an embodiment of this application;
[0050] Figure 2 A schematic diagram illustrating the selection of a system and subscriber type provided in this application embodiment;
[0051] Figure 3 A schematic diagram illustrating a subscription transmission mode for selecting an EDA event to be transmitted, provided as an embodiment of this application;
[0052] Figure 4 A flowchart illustrating a method for determining triggering conditions corresponding to a target subscriber, provided in an embodiment of this application;
[0053] Figure 5 This is a schematic diagram illustrating how to determine the triggering conditions corresponding to a target subscriber, as provided in an embodiment of this application.
[0054] Figure 6 A schematic diagram of an EDA event transmission system provided in an embodiment of this application;
[0055] Figure 7 A structural diagram of an EDA event transmission device provided in an embodiment of this application;
[0056] Figure 8 This is a structural diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0057] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. Unless otherwise specified, the embodiments and features in the embodiments of this application can be arbitrarily combined with each other. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown here.
[0058] The terms "first" and "second" in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the term "comprising" and any variations thereof are intended to cover non-exclusive protection. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices. The term "multiple" in this application can mean at least two, for example, two, three, or more, and the embodiments of this application do not impose limitations.
[0059] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of this application, including various details to aid understanding. These embodiments should be considered merely exemplary. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of this application. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description. It should be noted that in the embodiments of this application, certain existing industry solutions such as software, components, and models may be mentioned. These should be considered exemplary, intended only to illustrate the feasibility of implementing the technical solutions of this application, and do not imply that the applicant has already used or necessarily used such solutions.
[0060] The acquisition, dissemination, storage, and use of data in this application all comply with relevant national laws and regulations.
[0061] Before introducing the EDA event transmission method provided in the embodiments of this application, the technical background of the embodiments of this application will be described in detail below for ease of understanding.
[0062] EDA events are generally used in online transactions within the financial trading field. Online transactions refer to transactions directly provided by the system to external parties, characterized by transactionality, real-time processing, and concurrency. Online transactions include withdrawal transactions, balance inquiries and updates, generation of transaction logs, generation of account usage records, generation of accounting vouchers, and registration of deposit and cash account general ledger entries.
[0063] Currently, the transmission process of EDA events is the same for different subscribers. However, some subscribers need to subscribe to more events, while others need to subscribe to fewer events. Taking the transaction recording system as an example, withdrawal transactions, balance updates, etc., all need to be sent to the transaction recording system. The volume of withdrawal transactions is relatively large, so a large number of EDA events generated need to be sent to this system. Since each sending requires a sending process, it leads to a large consumption of resources.
[0064] For example, in the withdrawal system, the balance in a user's account needs to be subtracted to obtain the remaining balance. If there is an SMS notification service for balance changes, the system executing this service needs to be notified, as does the system recording the user's account changes. Therefore, after the EDA event is published by the publisher, the system executing this service is the first subscriber, and the system recording the user's account changes is the second subscriber. The EDA event needs to be sent to these two subscribers. The publisher will establish two sending processes: one sending process to the first subscriber and one sending process to the second subscriber.
[0065] However, when another user also makes a withdrawal but doesn't receive SMS notifications for balance changes, their subscriber is merely a system recording user account changes. The publisher creates a sending process, which is then sent to the second subscriber. This process continues, and when a large number of users make withdrawals, the publisher creates the same number of sending processes for each subscriber corresponding to a large number of EDA events, leading to excessive resource consumption.
[0066] To address the aforementioned technical problems, this application proposes the following technical concept: distinguishing subscribers and providing different EDA event delivery processes for different subscribers.
[0067] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0068] Combination Figure 1 As shown in the figure, this application embodiment provides a method for transmitting EDA events, including:
[0069] S100: Obtain the EDA event to be transmitted;
[0070] The EDA event to be transmitted can be based on business operations, such as online transactions and bulk transactions.
[0071] S101: If the subscription sending mode of the EDA event to be transmitted is the first preset mode, then when the subscriber corresponding to the EDA event to be transmitted includes non-target subscribers, the EDA event to be transmitted will be sent directly to each non-target subscriber.
[0072] The first preset mode allows the publisher to send an EDA event to a few specific subscribers after receiving it. For example, if all subscribers are subscribers 1 to 100, the first preset mode allows the publisher to send an EDA event to subscribers 20 to 30 after receiving it.
[0073] In some embodiments, on the publisher side, the subscribers corresponding to the event type of each EDA event to be transmitted are stored. For example: when the event type is a withdrawal transaction, the subscribers corresponding to the withdrawal transaction include subscriber 1 and subscriber 2; when the event type is balance query and update, the subscribers corresponding to the balance query and update include subscriber 1; when the event type is the generation of transaction records, the subscribers corresponding to the generation of transaction records include subscribers 1 to 3; when the event type is the generation of account usage records, the subscribers corresponding to the generation of transaction records include subscribers 1 to 3; when the event type is the generation of accounting vouchers, the subscribers corresponding to the generation of transaction records include subscribers 1 to 3; when the event type is the registration of the general ledger of deposit and cash accounts, the subscribers corresponding to the generation of transaction records include subscribers 1 to 3. When an EDA event to be transmitted is obtained, the event type of the EDA event to be transmitted is determined, and the subscribers corresponding to that event type are used as the subscribers corresponding to the EDA event to be transmitted.
[0074] It should be noted that the subscribers for each event type can be set by the individual based on experience, and this invention does not impose any specific restrictions on this.
[0075] In some embodiments, on the publisher side, each EDA event directly corresponds to its own subscriber, which can be set by the publisher.
[0076] Among them, the non-target subscribers and the target subscribers described in step 102 can be pre-set, for example, the pre-set method can be pre-set by the user.
[0077] For example, in combination Figure 2As shown, users can enter their username and password on the login screen. After verifying that the username and password are correct, the main page is displayed. The main page includes multiple options, such as Option 1, Option 2, and Option 3. For example, Option 1 sets target subscribers and non-target subscribers. After the user clicks Option 1, the settings interface is displayed. Clicking the "+" area displays the systems and parameters. The settings interface includes all the systems in the bank, from System 1 to System 10. The user selects one by one and clicks the "OK" button, generating a correspondence between systems and parameters. Similarly, if the user selects Systems 1 to 5 as target subscribers and Systems 6 to 10 as non-target subscribers, the parameters of the subscribers in Systems 1 to 10 are saved. The saving method can be as shown in Table 1.
[0078] Table 1
[0079]
[0080] When the parameter is 1, it indicates that the system is the target subscriber; when the parameter is 0, it indicates that the system is not the target subscriber.
[0081] S102: When the subscriber corresponding to the EDA event to be transmitted includes the target subscriber, for each target subscriber, if the subscription information of the EDA event to be transmitted meets the triggering condition corresponding to the target subscriber, the EDA event to be transmitted is added to the set corresponding to the target subscriber. When the EDA events in the set corresponding to the target subscriber meet the first preset condition, the EDA events in the set corresponding to the target subscriber are packaged together and sent to the target subscriber.
[0082] For example, upon receiving an EDA event to be delivered, Table 1 is consulted to determine whether the subscriber corresponding to the EDA event is a target subscriber or a non-target subscriber. For instance, if the subscribers corresponding to the EDA event to be delivered include subscribers 1 through 3 and subscribers 7 through 8, then the subscribers corresponding to the EDA event to be delivered include both non-target subscribers and target subscribers. For non-target subscribers, namely subscribers 7 and 8, the EDA event to be delivered can be directly sent to subscribers 7 and 8 without special processing.
[0083] For Subscriber 1, if the subscription information of the EDA event to be transmitted meets the triggering condition corresponding to Subscriber 1, then the EDA event to be transmitted is added to the set corresponding to Subscriber 1. When the set corresponding to Subscriber 1 meets the first preset condition, the EDA events in the set corresponding to Subscriber 1 are packaged together and sent to Subscriber 1. For Subscriber 2, if the subscription information of the EDA event to be transmitted meets the triggering condition corresponding to Subscriber 2, then the EDA event to be transmitted is added to the set corresponding to Subscriber 2. When the set corresponding to Subscriber 2 meets the first preset condition, the EDA events in the set corresponding to Subscriber 2 are packaged together and sent to Subscriber 2. For Subscriber 3, if the subscription information of the EDA event to be transmitted meets the triggering condition corresponding to Subscriber 3, then the EDA event to be transmitted is added to the set corresponding to Subscriber 3. When the set corresponding to Subscriber 3 meets the first preset condition, the EDA events in the set corresponding to Subscriber 3 are packaged together and sent to Subscriber 3.
[0084] In summary, in this embodiment of the invention, if there are non-target subscribers among the subscribers corresponding to an EDA event, the EDA event can be directly sent to the non-target subscribers, thus ensuring that the non-target subscribers can receive the EDA event in a timely manner. If there are target subscribers for the same EDA event, the EDA event can be added to the set corresponding to the target subscriber, and the EDA event sent to the target subscriber can be sent to the target subscriber together. This can reduce the number of sending processes and alleviate the problem of high resource consumption by the publisher.
[0085] In some embodiments, before directly sending the EDA event to be delivered to each non-target subscriber, the method further includes:
[0086] If the number of subscribers corresponding to the EDA event to be delivered is greater than 1, then the number of EDA events to be delivered is copied to be the same as the number of subscribers corresponding to the EDA event to be delivered.
[0087] In the example mentioned in step 102, the subscribers corresponding to the EDA events to be transmitted include subscribers 1 to 3 and subscribers 7 to 8, a total of 5 subscribers. Then, the number of EDA events to be transmitted is copied to 5.
[0088] In some embodiments, after obtaining the EDA event to be transmitted, the method further includes:
[0089] If the subscription sending mode of the EDA event to be transmitted is the second preset mode, then the sending of the EDA event to be transmitted to the corresponding subscriber will be stopped.
[0090] In detail, since the publisher receives invalid data for all subscribers when it receives the EDA event to be delivered, the subscription sending mode of the EDA event to be delivered can be set to the second preset mode. This will stop the EDA event to be delivered from being sent to the subscribers corresponding to the EDA event, thereby avoiding sending invalid data to the subscribers and reducing the situation of handling invalid data.
[0091] In some embodiments, this invention provides an implementation method for determining the subscription transmission mode of an EDA event to be transmitted:
[0092] Method 1: Based on the event type of the EDA event to be transmitted, select one preset mode from multiple preset modes, and use the selected preset mode as the contracted sending mode for the EDA event to be transmitted.
[0093] For example, the preset modes include a first preset mode and a second preset mode. When the event type is invalid data, it can be set to the second preset mode. When the event type of the EDA event to be transmitted is invalid data, the subscription sending mode of the EDA event to be transmitted is the second preset mode. When the event type is valid data, but only needs to be sent to some specific subscribers, it is set to the first preset mode. When the event type of the EDA event to be transmitted is valid data, but only needs to be sent to some specific subscribers, the subscription sending mode of the EDA event to be transmitted is the first preset mode.
[0094] Method 2: When the second preset condition is met, a selection interface is displayed; the selection interface includes multiple preset modes; and in response to the user's selection command, the preset mode selected in the selection command is used as the contract sending mode for the EDA event to be transmitted.
[0095] The second preset condition can be that after the user successfully logs in, combined with... Figure 2 As shown, the main page is displayed. The user selects option 2 on the main page, and the selection interface is displayed, combined with... Figure 3 As shown, the selection interface includes a first preset mode and a second preset mode. When the user clicks the circle of the signature in the first preset mode, the outer circle turns black, indicating that it is selected. The first preset mode is the contracted sending mode for the EDA event to be transmitted. When the user clicks the circle of the signature in the second preset mode, the second preset mode is the contracted sending mode for the EDA event to be transmitted.
[0096] In some embodiments, combined with Figure 4 As shown, the triggering conditions for the target subscriber are determined in the following way:
[0097] S400: When the third preset condition is met, display the event configuration table and the event subscription table; wherein, the event configuration table includes multiple content types of the target subscriber; the event subscription table contains the threshold corresponding to each content type of the target subscriber;
[0098] S401: Respond to the user's input command and determine the triggering condition corresponding to the target subscriber based on the content type and the threshold corresponding to the input content type.
[0099] For example, in combination Figure 2 As shown, after logging in, users will be presented with a main page containing multiple options. Users can click on configuration options and combine them with... Figure 5 The image shows the event configuration table and the event signing table. The event configuration table includes multiple content types for the target subscriber, such as account, card number, transaction amount, post-transaction balance, currency, currency verification, customer number, sub-account, and contract number. When a user selects account / card number + transaction amount + currency + currency verification, it indicates that account / card number, transaction amount, currency, and currency verification are the target subscriber's content types. After the user clicks submit, clicking the event signing table displays the thresholds required for each of these four content types. For example, if the user enters account / card number: 3106666666666666666, transaction amount: 500, currency: 156-RMB, currency verification: 1, then the threshold for account / card number is 310666666666666666, the threshold for transaction amount is 500, the threshold for currency is RMB, and the threshold for currency verification is 1. Based on the above content types and corresponding thresholds, the trigger conditions for generating the target subscriber are: account / card number is 310666666666666666, transaction amount is greater than 500, currency is 156-RMB, and currency / remittance identification is 1.
[0100] Of course, the content types that can be selected for trigger conditions include, but are not limited to: account / card number mode, account / card number + transaction amount mode, account / card number + post-transaction balance mode, account / card number + transaction amount + currency + cash / foreign exchange verification mode, account / card number + post-transaction balance + currency + cash / foreign exchange verification mode, customer number mode, sub-account mode, contract number mode, etc. Different subscribers can use different trigger condition modes to subscribe to the same event.
[0101] When executing online or batch transactions, the trigger conditions corresponding to the subscribers of EDA events are obtained from the event configuration table. Then, the event subscription table is accessed to retrieve the subscription records. The system then determines whether to push an event to the subscriber based on the fields involved in the trigger condition mode of each subscriber.
[0102] In some embodiments, the first preset condition includes some or all of the following:
[0103] The cumulative number of EDA events in the collection corresponding to the target subscriber has reached the preset number;
[0104] The cumulative size of EDA events in the collection corresponding to the target subscriber exceeds the preset size;
[0105] The content of the EDA events to be transmitted in the set corresponding to the target subscriber includes preset content;
[0106] The time it took for the set corresponding to the target subscriber to be formed exceeded the preset time;
[0107] The memory capacity is greater than the preset capacity.
[0108] In detail, when the cumulative number of EDA events in the collection corresponding to the target subscriber reaches a preset number, the EDA events in the collection corresponding to the target subscriber can be packaged together and sent to the target subscriber. When the cumulative size of the EDA events in the collection corresponding to the target subscriber exceeds a preset size, it means that the size of the data packet containing the EDA events in the collection corresponding to the target subscriber exceeds the preset size, so it is packaged and sent to the target subscriber.
[0109] When the EDA event to be delivered is an urgent event, but also meets the triggering conditions for the EDA event to be delivered, it can be added to the set corresponding to the target subscriber and immediately sent to the target subscriber. For example, when no EDA event to be delivered is received, the set corresponding to the target subscriber is EDA event 1 and EDA event 2. When an EDA event to be delivered is received, if the content of the EDA event contains preset content, then EDA event 1, EDA event 2, and the EDA event to be delivered are packaged together and sent to the target subscriber. The preset content of the EDA event to be delivered can be a parameter or identifier in the EDA event. When the EDA event to be delivered is detected to contain this parameter or identifier, it is determined that the content of the EDA event to be delivered contains the preset content.
[0110] To maintain the real-time nature of events, a preset time can be set. When the time for the set corresponding to the target subscriber to be formed exceeds the preset time, the EDA events in the set corresponding to the target subscriber will be packaged together and sent to the target subscriber.
[0111] When the publisher's memory capacity is low, it can cause device lag. To avoid this, this embodiment of the invention proposes that when the memory capacity is greater than a preset capacity, the EDA events in the set corresponding to the target subscriber are packaged together and sent to the target subscriber.
[0112] Of course, the preset conditions provided in the embodiments of the present invention can be used in combination or individually, and the present invention does not impose specific limitations on this.
[0113] Based on the technical solutions provided by the above embodiments of the present invention, combined with Figure 6 As shown, this embodiment of the invention provides an EDA event transmission system, including publisher 600, event route 601, subscriber 1, subscriber 2, ... subscriber N.
[0114] Publisher 600 is used to obtain EDA events to be delivered. If the subscription sending mode of the EDA event to be delivered is the first preset mode, and the number of subscribers corresponding to the EDA event to be delivered is greater than 1, then the number of EDA events to be delivered is copied to the same number as the number of subscribers corresponding to the EDA event to be delivered. When the subscribers corresponding to the EDA event to be delivered include non-target subscribers, for each non-target subscriber, the EDA event to be delivered is directly sent to event route 601. When the subscribers corresponding to the EDA event to be delivered include target subscribers, for each target subscriber, if the subscription information of the EDA event to be delivered meets the triggering condition corresponding to the target subscriber, then the EDA event to be delivered is added to the set corresponding to the target subscriber. When the EDA events in the set corresponding to the target subscriber meet the first preset condition, the EDA events in the set corresponding to the target subscriber are packaged together and sent to event route 601.
[0115] For example, the non-target subscribers corresponding to the EDA event to be transmitted are subscriber 1 and subscriber 2; the target subscriber corresponding to the EDA event to be transmitted is subscriber N.
[0116] Event route 601 is used to send the EDA events to be delivered to subscriber 1 and subscriber 2; and to send the EDA events packaged in the collection corresponding to the target subscriber to subscriber N.
[0117] The list of subscribers to whom the EDA events to be delivered is synchronized by the publisher to the event route, so that the event route can send the EDA events to be delivered to different subscribers based on the subscriber list.
[0118] Among them, the publisher 600 can also configure events and sign up for events, and generate trigger conditions corresponding to the target subscribers based on the event configuration table and the event signing table.
[0119] Based on the same inventive concept, embodiments of this application provide an EDA event transmission device, please refer to... Figure 7 As shown, the device includes:
[0120] Module 700 is used to acquire EDA events to be transmitted;
[0121] The first processing module 701 is configured to, if the subscription sending mode of the EDA event to be transmitted is a first preset mode, then when the subscriber corresponding to the EDA event to be transmitted includes a non-target subscriber, send the EDA event to be transmitted directly to the non-target subscriber for each non-target subscriber.
[0122] The second processing module 702 is configured to, when the subscriber corresponding to the EDA event to be transmitted includes a target subscriber, add the EDA event to be transmitted to the set corresponding to the target subscriber if the subscription information of the EDA event to be transmitted meets the triggering condition corresponding to the target subscriber for each target subscriber, and when the EDA events in the set corresponding to the target subscriber meet the first preset condition, package and send the EDA events in the set corresponding to the target subscriber together to the target subscriber.
[0123] Optionally, the first processing module 701 is specifically used to copy the number of EDA events to be transmitted to the same number of subscribers if the number of subscribers corresponding to the EDA events to be transmitted is greater than 1.
[0124] Optionally, the device further includes a third processing module;
[0125] The third processing module is used to stop sending the EDA event to be transmitted to the subscriber corresponding to the EDA event if the subscription sending mode of the EDA event to be transmitted is the second preset mode.
[0126] Optionally, the determining module is specifically configured to select a preset mode from multiple preset modes based on the event type of the EDA event to be transmitted, and use the selected preset mode as the subscription transmission mode of the EDA event to be transmitted; or
[0127] When the second preset condition is met, a selection interface is displayed; wherein the content of the selection interface includes multiple preset modes; and in response to the user's selection instruction, the preset mode selected in the selection instruction is used as the subscription sending mode of the EDA event to be transmitted.
[0128] Optionally, the second processing module is further configured to:
[0129] When the third preset condition is met, the event configuration table and the event subscription table are displayed; wherein, the event configuration table includes multiple content types of the target subscriber; the event subscription table contains a threshold corresponding to each content type of the target subscriber;
[0130] In response to the user's input command, the triggering condition corresponding to the target subscriber is determined based on the content type input in the input command and the threshold corresponding to the input content type.
[0131] Optionally, the first preset condition includes some or all of the following:
[0132] The cumulative number of EDA events in the set corresponding to the target subscriber has reached a preset number;
[0133] The cumulative size of EDA events in the set corresponding to the target subscriber exceeds the preset size;
[0134] The content of the EDA event to be transmitted in the set corresponding to the target subscriber includes preset content;
[0135] The time it takes for the set corresponding to the target subscribers to be formed exceeds a preset time;
[0136] The memory capacity is greater than the preset capacity.
[0137] It should be noted that the division of the various modules in the above device is merely a logical functional division. In actual implementation, they can be fully or partially integrated into a single physical entity, or they can be physically separated. Furthermore, these modules can be implemented entirely in software through processing element calls; they can be implemented entirely in hardware; or some modules can be implemented through processing element calls in software, while others are implemented in hardware. The processing element here can be an integrated circuit with signal processing capabilities. During implementation, each step of the above method or each of the above modules can be completed through the integrated logic circuits in the hardware of the processor element or through software instructions.
[0138] Based on the same inventive concept, embodiments of this application provide an electronic device. Figure 8 The diagram illustrates a schematic representation of an electronic device structure provided in some embodiments, such as... Figure 8 As shown, the electronic device includes: a processor 810, a memory 820, a communication interface 830, and a communication bus 840, wherein the processor 810, the communication interface 830, and the memory 820 communicate with each other through the communication bus 840.
[0139] The memory 820 stores a computer program that, when executed by the processor 810, causes the processor 810 to perform the data analysis report construction method as described in any one of the claims.
[0140] The processor 810 mentioned above can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0141] The memory 820 is connected to the processor 810 via the system bus 840 and completes communication between them. The memory 820 is used to store computer program instructions.
[0142] The system bus 840 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The system bus 840 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the diagram, but this does not indicate that there is only one bus or one type of bus. The transceiver is used to enable communication between the database access device and other computers (e.g., clients, read-write libraries, and read-only libraries). Memory may include random access memory (RAM) and may also include non-volatile memory.
[0143] Based on the same inventive concept, embodiments of this application provide a computer-readable storage medium, the computer program product including: computer program code, which, when run on a computer, causes the computer to execute the EDA event transmission method as described in any one of the claims.
[0144] Based on the same inventive concept, this application also provides a computer program product, which includes computer program code that, when executed on a computer, causes the computer to perform any of the EDA event transmission methods discussed above. Since the principle by which the above computer program product solves the problem is similar to the data analysis report construction method, the implementation of the above computer program product can refer to the implementation of the method; repeated details will not be elaborated further.
[0145] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0146] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0147] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0148] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of user-operated steps to be executed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0149] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A method for transmitting EDA events, characterized in that, include: Get the EDA events to be delivered; Determine the subscribers corresponding to the EDA event to be delivered; wherein, determining the subscribers corresponding to the EDA event to be delivered specifically includes: storing the subscribers corresponding to the event type of each EDA event to be delivered on the publisher side; when an EDA event to be delivered is obtained, determining the event type of the EDA event to be delivered, and taking the subscribers corresponding to the event type as the subscribers corresponding to the EDA event to be delivered; The subscription sending mode of the EDA event to be transmitted is determined; wherein, the subscription sending mode includes a first preset mode and a second preset mode; the first preset mode is to send the EDA event to be transmitted to a specific subscriber; the second preset mode is for events whose event type is invalid data; If the subscription sending mode of the EDA event to be transmitted is the second preset mode, then stop sending the EDA event to be transmitted to the subscriber corresponding to the EDA event to be transmitted; If the subscription sending mode of the EDA event to be transmitted is the first preset mode, then the following steps are performed: Determine the target subscriber and non-target subscriber among the subscribers corresponding to the EDA event to be transmitted; wherein the target subscriber and the non-target subscriber are preset, and the preset includes: displaying a setting interface containing all systems, responding to the user's selection command, setting the system selected by the user as the target subscriber or non-target subscriber, and saving the correspondence between the system and the parameter; For each non-target subscriber, the EDA event to be delivered is sent directly to the non-target subscriber; For each target subscriber, if the subscription information of the EDA event to be transmitted meets the triggering condition corresponding to the target subscriber, the EDA event to be transmitted is added to the set corresponding to the target subscriber. When the EDA events in the set corresponding to the target subscriber meet the first preset condition, the EDA events in the set corresponding to the target subscriber are packaged together and sent to the target subscriber.
2. The method for transmitting EDA events according to claim 1, characterized in that, Before directly sending the EDA event to be delivered to each non-target subscriber, the method further includes: If the number of subscribers corresponding to the EDA event to be delivered is greater than 1, then the number of EDA events to be delivered is copied to be the same as the number of subscribers corresponding to the EDA event to be delivered.
3. The method for transmitting EDA events according to claim 1, characterized in that, The subscription transmission mode of the EDA event to be transmitted is determined by the following method: Based on the event type of the EDA event to be transmitted, select one preset mode from multiple preset modes, and use the selected preset mode as the subscription sending mode of the EDA event to be transmitted; or When the second preset condition is met, a selection interface is displayed; wherein the content of the selection interface includes multiple preset modes; and in response to the user's selection instruction, the preset mode selected in the selection instruction is used as the subscription sending mode of the EDA event to be transmitted.
4. The method for transmitting EDA events according to claim 1, characterized in that, The trigger conditions for the target subscriber can be determined in the following ways: When the third preset condition is met, the event configuration table and the event subscription table are displayed; wherein, the event configuration table includes multiple content types of the target subscriber; the event subscription table contains a threshold corresponding to each content type of the target subscriber; In response to the user's input command, the triggering condition corresponding to the target subscriber is determined based on the content type input in the input command and the threshold corresponding to the input content type.
5. A device for transmitting EDA events, characterized in that, include: The acquisition module is used to acquire EDA events to be transmitted. The first processing module is used to determine the subscriber corresponding to the EDA event to be delivered; wherein, determining the subscriber corresponding to the EDA event to be delivered specifically includes: storing the subscriber corresponding to the event type of each EDA event to be delivered on the publisher side; when an EDA event to be delivered is obtained, determining the event type of the EDA event to be delivered, and taking the subscriber corresponding to the event type as the subscriber corresponding to the EDA event to be delivered; The subscription sending mode of the EDA event to be transmitted is determined; wherein, the subscription sending mode includes a first preset mode and a second preset mode; the first preset mode is to send the EDA event to be transmitted to a specific subscriber; the second preset mode is for events whose event type is invalid data; If the subscription sending mode of the EDA event to be transmitted is the second preset mode, then stop sending the EDA event to be transmitted to the subscriber corresponding to the EDA event to be transmitted; If the subscription sending mode of the EDA event to be transmitted is the first preset mode, then the following steps are performed: The system identifies the target subscriber and non-target subscribers among the subscribers corresponding to the EDA event to be transmitted. The target subscriber and non-target subscriber are pre-defined, and this pre-definition includes: displaying a settings interface containing all systems; responding to user selection instructions; setting the user-selected system as a target subscriber or a non-target subscriber; and saving the correspondence between systems and parameters. For each non-target subscriber, the system directly sends the EDA event to be transmitted to that non-target subscriber. The second processing module is used to add the EDA event to be transmitted to the set corresponding to the target subscriber if the subscription information of the EDA event to be transmitted meets the triggering condition corresponding to the target subscriber. When the EDA events in the set corresponding to the target subscriber meet the first preset condition, the EDA events in the set corresponding to the target subscriber are packaged together and sent to the target subscriber.
6. The EDA event transmission device as described in claim 5, characterized in that, The first processing module is specifically used to copy the number of EDA events to be transmitted to the same number of subscribers if the number of subscribers corresponding to the EDA event to be transmitted is greater than 1.
7. The EDA event transmission device as described in claim 5, characterized in that, The determining module is specifically used to select a preset mode from multiple preset modes according to the event type of the EDA event to be transmitted, and to use the selected preset mode as the subscription sending mode of the EDA event to be transmitted. or When the second preset condition is met, a selection interface is displayed; wherein the content of the selection interface includes multiple preset modes; and in response to the user's selection instruction, the preset mode selected in the selection instruction is used as the subscription sending mode of the EDA event to be transmitted.
8. The EDA event transmission device as described in claim 5, characterized in that, The second processing module is further configured to: When the third preset condition is met, the event configuration table and the event subscription table are displayed; wherein, the event configuration table includes multiple content types of the target subscriber; the event subscription table contains a threshold corresponding to each content type of the target subscriber; In response to the user's input command, the triggering condition corresponding to the target subscriber is determined based on the content type input in the input command and the threshold corresponding to the input content type.
9. An electronic device, characterized in that, include: Memory, used to store program instructions; A processor is configured to invoke program instructions stored in the memory and execute the steps of the method according to any one of claims 1-4.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program including program instructions that, when executed by a computer, cause the computer to perform the method as described in any one of claims 1-4.
11. A computer program product, characterized in that, The computer program product includes: computer program code, which, when run on a computer, causes the computer to perform the method described in any one of claims 1-4.
Citation Information
Patent Citations
Method and device for IBM host to realize event-driven architecture
CN108965431A
Event processing method and device, electronic equipment and storage medium
CN115408173A