Notification response method and device, electronic equipment and computer readable storage medium
By receiving notification service requests and determining the target plug-in to perform notification tasks based on the request, the problems of strong intrusiveness and complex business code implementation in the prior art are solved, and convenient development and debugging of notification services are realized, reducing costs and complexity.
Patent Information
- Application Number
- CN202411560974.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-04
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-11-04
AI Technical Summary
In the prior art, due to the invasiveness and inconsistent technical language implementation of business code, the development and implementation cost is high, the function debugging is complex, and the business system needs to be restarted after the implementation is completed.
By receiving notification service requests, determining the target plug-in based on the request, and executing notification tasks through the target plug-in, thereby extracting notification services from the business system. Developers only need to pay attention to how to implement notification tasks through the plug-in.
It improves the convenience and versatility of notification service development and call, reduces the complexity and cost of development and debugging, and avoids the need for business system restart.
Smart Images

Figure CN119645679A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a notification response method, apparatus, electronic device, and computer-readable storage medium. Background Technology
[0002] Existing business systems all have the function of sending notifications to users. For example, in the field of intelligent operation and maintenance, when a system anomaly is detected, the system can send alarm notifications to users; or, business systems can send information notifications to users via telephone, SMS, email, instant messaging software, etc.
[0003] In related technologies, the above-mentioned notification functionality is typically achieved by either writing the notification logic code into the business logic code or by calling a script. However, these methods are highly intrusive and the technical languages used in implementing the business logic code are inconsistent, leading to high development and implementation costs, complex debugging, and the need to restart the business system after implementation. Summary of the Invention
[0004] In view of this, embodiments of this disclosure propose a notification response method, apparatus, electronic device, and computer-readable storage medium to solve problems in related technologies, such as high development and implementation costs, excessively complex debugging functions, and the need to restart the business system after implementation, due to the highly invasive nature of the technology and the inconsistency of the technical languages used in the implementation of business code.
[0005] According to a first aspect of this disclosure, a notification response method is provided, comprising: receiving a notification service request; determining a target plugin based on the notification service request; and executing a notification task corresponding to the notification service request through the target plugin.
[0006] According to a second aspect of this disclosure, a notification response apparatus is provided, comprising: a service invocation module for receiving a notification service request; a plugin determination module for determining a target plugin based on the notification service request; and a message notification module for executing a notification task corresponding to the notification service request through the target plugin.
[0007] According to a third aspect of this disclosure, an electronic device is provided, comprising: a processor; and a memory storing a program, wherein the program includes instructions that, when executed by the processor, cause the processor to perform the notification response method described above.
[0008] According to a fourth aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are used to cause the computer to perform the notification response method described above.
[0009] The exemplary embodiments disclosed herein may have some or all of the following beneficial effects:
[0010] In the notification response method provided in the exemplary embodiments of this disclosure, a notification service request is received; a target plugin is determined based on the notification service request; and the notification task corresponding to the notification service request is executed through the target plugin. The notification response method of this embodiment determines the target plugin based on the notification service request and executes the corresponding notification task based on the target plugin. By extracting the notification service from the business system through the target plugin, developers only need to focus on how to implement the notification task through the plugin, and do not need to focus on additional logic, thus improving the convenience and versatility of notification service development and invocation.
[0011] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0012] Further details, features, and advantages of this disclosure are disclosed in the following description of exemplary embodiments in conjunction with the accompanying drawings, in which:
[0013] Figure 1 A flowchart of a notification response method according to an exemplary embodiment of the present disclosure is shown;
[0014] Figure 2 A schematic diagram of a class for developing a notification plugin for a notification response method according to an exemplary embodiment of the present disclosure is shown.
[0015] Figure 3 A schematic diagram of a class for developing a callback plugin for a notification response method according to an exemplary embodiment of the present disclosure is shown;
[0016] Figure 4 A system architecture diagram of a notification service system for a notification response method according to an exemplary embodiment of the present disclosure is shown;
[0017] Figure 5 A schematic diagram of the notification flow of a notification response method according to an exemplary embodiment of the present disclosure is shown;
[0018] Figure 6 A schematic diagram of the callback flow of a notification response method according to an exemplary embodiment of the present disclosure is shown;
[0019] Figure 7 A schematic block diagram of a notification response device according to an exemplary embodiment of the present disclosure is shown;
[0020] Figure 8 A structural block diagram of an exemplary electronic device that can be used to implement embodiments of the present disclosure is shown. Detailed Implementation
[0021] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0022] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.
[0023] The term "comprising" and its variations as used herein are open-ended, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below. It should be noted that the concepts of "first", "second", etc., used in this disclosure are only used to distinguish different devices, modules, or units, and are not intended to limit the order of functions performed by these devices, modules, or units or their interdependencies.
[0024] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0025] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0026] This disclosure provides a notification response method, apparatus, electronic device, and computer-readable storage medium. The solutions described below are illustrated with reference to the accompanying drawings.
[0027] This disclosure first provides a notification response method. (See also...) Figure 1 As shown, the notification response method specifically includes the following steps:
[0028] S110: Receive notification service request;
[0029] S120: Determine the target plugin based on the notification service request;
[0030] S130: Execute the notification task corresponding to the notification business request through the target plugin.
[0031] In the notification response method provided in this embodiment, the target plugin is determined based on the notification business request, and the corresponding notification task is executed based on the target plugin. The notification service is extracted from the business system through the target plugin. Developers only need to focus on how to implement the notification task through the plugin, and do not need to focus on additional logic, which improves the convenience and versatility of notification service development and invocation.
[0032] The above steps will now be described in more detail in another embodiment.
[0033] In step S110, a notification service request is received.
[0034] The notification response method provided in this embodiment extracts the notification service from the business system and treats it as an independent system. This notification service system provides a unified business call interface to the outside world. The business system can obtain various notification services in the notification service system by calling the business call interface, thereby eliminating the need to integrate notification functions developed for different users into the business system and to restart and debug the system. This achieves more efficient, lower cost, less intrusive, and faster fulfillment of user functional scenarios.
[0035] In this embodiment of the disclosure, the notification service request is a request initiated by the request initiator to the notification service system, used to execute the corresponding notification service.
[0036] In this embodiment of the disclosure, the notification service request can be a notification sending request. For example, the notification sending request can be a request from a business system to send a notification to a user. The notification service request can also be a notification callback request. For example, the notification callback request can be a callback request initiated by a third-party system based on the callback address provided by the notification service system after the business system sends a notification to the third-party system. The notification service request can also be a notification query request. For example, a user can send the notification query request to the notification service system to query notification logs in the database of the notification service system.
[0037] In this embodiment of the disclosure, for example, the request initiator sends a request to the notification service system to execute the corresponding notification service by calling the business call interface of the notification service system. After receiving the notification service request, the notification service system can execute the corresponding notification service based on subsequent steps S120 and S130.
[0038] In step S120, the target plugin is determined based on the notification service request.
[0039] In this embodiment of the application, the target plugin is used to execute the notification service corresponding to the notification service request.
[0040] In the embodiments of this application, the target plugin can be a plugin that implements notification services or a plugin that implements notification callback services.
[0041] In this embodiment of the application, when the target plugin is a plugin that implements notification services, the development process of the target plugin can be implemented as follows: obtain the first general component dependency package corresponding to the notification service; inherit the target method in the first general component dependency package to obtain the notification plugin.
[0042] Specifically, the development process for the target plugin that implements the notification service can be achieved as follows:
[0043] like Figure 2 As shown, the notification response method provided in this application predefines a notification media service (NotificationMediaService) and two default implementations of abstract classes: AbstractNotificationService and its subclass implementation based on Hypertext Transfer Protocol (HTTP) (AbstractHttpNotificationService). NotificationMediaService is the top-level interface. The application scenarios become increasingly specific from NotificationMediaService to AbstractHttpNotificationService. For example, in an HTTP implementation scenario, when developing a target plugin, inheriting AbstractHttpNotificationService is sufficient; if the HTTP implementation scenario is not met, AbstractNotificationService can be directly inherited. The AbstractNotificationService is at a higher level than its subclass implementation based on Hypertext Transfer Protocol (AbstractHttpNotificationService). That is, AbstractHttpNotificationService is a subclass defined specifically for the HTTP scenario, while AbstractNotificationService has a wider range of applicable scenarios.
[0044] Specifically, the above development process can be implemented as follows: This application embodiment provides a general service component notification-core-xyz.jar dependency package. When developing plugins, it is only necessary to download this dependency package, rewrite the configuration (setConfig), create the request (createRequest), send the notification (sendNotification), and execute the (doExecuted) method.
[0045] In this embodiment of the application, when the notification service request is a notification sending request, the notification service request includes the requested notification type. For example, the notification type can be different types such as SMS notification, voice notification, or email notification.
[0046] In this embodiment, when the notification service request is a notification sending request, the above-mentioned determination of the target plugin based on the notification service request can, for example, be implemented as follows: parsing the notification sending request; determining the notification service type requested by the notification sending request based on the parsing result; and determining the target plugin from a pre-designed set of notification plugins based on the notification service type. That is, different notification types require loading different target plugins, and different plugin types can be loaded and used simultaneously to achieve the function of sending notifications.
[0047] In this embodiment of the application, when the target plugin is a plugin that implements a notification callback service, the development process of the target plugin can be implemented as follows: obtain the second general component dependency package corresponding to the notification callback service; inherit the target method in the second general component dependency package to obtain the notification callback plugin.
[0048] Specifically, taking the IT Service Management (ITSM) scenario as an example, the development process of the target plugin for implementing the notification callback business is explained in detail:
[0049] like Figure 3As shown, since ITSM notification callbacks are mostly asynchronous in real-world scenarios, the notification response method provided in this application predefines a callback service interface (CallbackService), an interface based on an ITSM single plugin (ItsmCallbackService), and an abstract class: ITSM-based callback service (AbstractItsmCallbackService). CallbackService is the top-level interface. In an ITSM scenario, when developing a target plugin, it is only necessary to inherit from AbstractItsmCallbackService. Specifically, this application provides a single-function service component, notification-core-xyz.jar, as a dependency package. When developing a plugin, it is only necessary to download this dependency package and inherit its methods.
[0050] In this embodiment of the application, when the notification service request is a notification callback request, the notification service request includes the callback service type of the request. For example, the callback service type can be an ITSM type.
[0051] In this embodiment of the application, when the notification service request is a notification callback request, the above-mentioned determination of the target plugin based on the notification service request can be exemplarily implemented as follows: parsing the notification sending request; parsing the notification callback request; determining the callback service type requested by the notification callback request based on the parsing result; and determining the target plugin from the pre-designed callback plugins based on the callback service type.
[0052] In step S130, the notification task corresponding to the notification service request is executed through the target plugin.
[0053] In this embodiment, after determining the target plugin through steps S110 and S120, the target plugin can be loaded to execute the notification task corresponding to the notification business request. Specifically, the plugin loading process can be implemented as follows: The development process of the target plugin is based on a microservice framework (Spring Boot), so the following command line can be added to the JVM startup parameters: -Dloader.path=lib,plugins. This command line indicates that when the plugin starts, the location of the loaded JAR package is the lib directory and plugins directory of the current directory. Among them, the lib directory stores the basic JAR package dependencies, and plugins / *.jar is used to store the dependency packages of the notification plugin to be developed (i.e., the target plugin); configure the plugin package parameters of the target plugin. For example, the plugin package parameters may include the plugin type, the fully qualified class name of the plugin, and other configuration parameters such as the required resend frequency and resend count of the plugin, and register the plugin dependency package as a Spring bean. The retransmission frequency refers to the time interval between retransmissions when a notification fails to be sent, and the retransmission count is the number of times a notification is retransmitted when a notification fails to be sent. When the number of retransmissions reaches this count, no further notifications will be sent to the user, even if the notification was not successfully sent. This application embodiment unifies the notification frequency, retry count, and retry interval limits by configuring the parameters of the target plugin.
[0054] In this embodiment of the application, when the notification service request is a notification sending request, the above-mentioned execution of the notification task corresponding to the notification service request through the target plugin can, for example, achieve the following: send the notification message corresponding to the notification sending request by calling the target plugin; if the notification message fails to be sent, resend the notification message based on the parameter settings of the target plugin.
[0055] Specifically, the aforementioned target plugin for sending notifications can be loaded, and the service notification can be sent to the user by calling the target plugin. For example, when the notification service type to be sent is determined to be SMS based on the notification sending request, the corresponding target plugin can be called to send the SMS notification to the user. Further, if the notification is successfully sent, the process ends; if the notification fails to send, the notification message is resent to the user based on the parameter settings of the target plugin. Taking the parameter settings of the target plugin, including a resend interval of 5 minutes and a resend count of 3, as an example, the process can be specifically implemented as follows: determine whether the time interval between the last sent notification message and the last sent notification message has reached 5 minutes. If so, further determine whether the current resend count has reached three. If it has not exceeded three, send the message notification to the user again and determine whether it is sent successfully. If it is sent successfully, the process ends; if it is not successful, repeat the above resend process until it is sent successfully, or the resend count reaches three.
[0056] In this embodiment of the application, when the notification service request is a notification callback request, the above-mentioned execution of the notification task corresponding to the notification service request through the target plugin can be executively implemented as follows: the callback content corresponding to the notification callback request is obtained by calling the target plugin, and the callback content is stored in the database.
[0057] Specifically, the aforementioned target plugin for implementing notification callbacks can be loaded. The callback party retrieves the callback notification by calling the target plugin. For example, when the notification service type to be callbackd is determined to be ITSM based on the notification callback request, the notification callback can be implemented by calling the target plugin corresponding to that callback service type. Furthermore, after receiving the callback notification, the notification service system can return the callback content to the callback party and store the callback content in the database for subsequent queries.
[0058] In this embodiment of the application, the aforementioned notification service request can also be a notification query request. For example, a user can obtain notification logs by sending this notification query request to the notification service system.
[0059] The notification response method of this disclosure determines the target plugin based on the notification business request and executes the corresponding notification task based on the target plugin. By extracting the notification service from the business system through the target plugin, developers only need to focus on how to implement the notification task through the plugin, without having to worry about additional logic, which improves the convenience and versatility of notification service development and invocation.
[0060] Below, in a specific embodiment, in conjunction with Figures 4 to 6 The above notification response methods are explained in detail below:
[0061] Figure 4 This is an architecture diagram for implementing the above notification response methods based on a notification service system. (See diagram below.) Figure 4 As shown, the notification service system described above includes a service layer, a business layer, and a query storage engine layer. Among them:
[0062] The service layer handles notification requests, notification callback requests, and requests to query notification logs, and distributes them to the corresponding business layers. In other words, the notification service system provides an interface for calling plugins through this service layer. Users can use this interface to send notification requests, notification callback requests, or requests to query notification logs to the notification service system. Upon receiving the request, the service layer distributes it to the appropriate business layer.
[0063] The business layer is used to implement notification and callback functions.
[0064] The specific implementation of the above notification service is as follows: It receives notification requests, parses the notification content, and calls the corresponding notification plugin based on the parsing result to implement the notification call. Here, it can call, for example... Figure 4 The services of the third-party system shown can also call the local third-party package to perform the sending task, and the call can be synchronous or asynchronous.
[0065] The callback functionality described above is implemented as follows: In asynchronous call scenarios (such as voice notifications and ITSM notifications), a system callback address needs to be provided to the third-party system. When the notification service initiates a callback request, if it's an asynchronous call scenario, the system provides the callback address. The business layer parses the parameters of the notification callback request, calls the corresponding callback plugin based on the parsing result to implement the notification callback, and stores the callback result in the database.
[0066] The query storage engine layer includes a query engine and a storage engine. The query engine provides the functionality to query notification logs; the storage engine stores notification-related content, results, and relevant process parameters in a database. For example, the database can be a distributed database, a relational database, etc. For example, after completing notification or callback operations, the business layer can generate notification logs based on the data generated during execution and store them in the database, allowing users to query the notification logs using the query engine.
[0067] In this embodiment, the notification plugin and callback plugin mentioned above correspond to the target plugin described above. The development and loading process of the plugins has been described in detail above, so it will not be repeated here.
[0068] In this embodiment of the application, the above-described notification sending process is as follows: Figure 5 As shown, the specific steps include:
[0069] S510: Receive notification request.
[0070] In this embodiment, the caller initiates a notification request by invoking the notification service through the service layer's API. Upon receiving the notification request, the service layer distributes it to the business layer.
[0071] S520: Parse notification requests.
[0072] In this embodiment of the application, the business layer parses the above notification request and identifies the type of the requested notification service based on the parsing result. For example, it determines whether the requested service type is SMS notification, email notification, or other notification.
[0073] S530: Invoke the corresponding notification plugin based on the request notification service type.
[0074] S540: Execute notifications via the notification plugin.
[0075] S550: Determine whether the notification was successful.
[0076] In this embodiment, it is determined whether the notification was successful. If the notification is successful, it is stored in the database and the process ends; if the notification is unsuccessful, step S560 is executed.
[0077] S560: Determines whether the number of retransmissions exceeds the set value.
[0078] In this embodiment, when a notification fails, it checks whether the current number of resends has exceeded the set value in the notification plugin parameter settings. If it has not exceeded the set value, step S570 continues. If it has exceeded the set value, the process ends.
[0079] S570: Resend notification.
[0080] S580: Determine whether the retransmission was successful.
[0081] In this embodiment, it is determined whether the retransmission was successful. If the retransmission is successful, the notification is stored in the database and the process ends. If the retransmission fails, the process returns to step S560.
[0082] S590: End process.
[0083] In this embodiment of the application, the above-described process for implementing the notification callback is as follows: Figure 6 As shown, the specific steps include:
[0084] S610: Receive notification callback requests.
[0085] In this embodiment, the callback party invokes the notification service through the service layer's API to initiate a notification callback request. Upon receiving the notification callback request, the service layer distributes it to the business layer.
[0086] S620: Parse notification callback requests.
[0087] In this embodiment, the business layer parses the notification callback request and identifies the callback service type based on the parsing result. For example, it identifies whether the callback notification is of type ITSM or another type.
[0088] S630: Invoke the corresponding callback plugin based on the callback service type.
[0089] S640: Execute callbacks via the callback plugin.
[0090] In this embodiment of the application, after the callback is executed, the callback content is stored in the database.
[0091] In the notification response method provided in this application embodiment, developers only need to focus on how various notification plugins or callback plugins are implemented, without needing to focus on the development language of the caller. It has the following advantages: (1) It provides a unified interface to provide services to the outside world, and business callers can easily call the notification service; (2) Developers only need to focus on how to implement the notification service function through plugins, without needing to focus on other logic; (3) Debugging is convenient after the plugin is developed; (4) It unifies the notification frequency, number of retries and retry interval limits; (5) It summarizes and statistically analyzes the notification history through the query storage engine layer and provides query function; (6) It supports synchronous and asynchronous calls.
[0092] The foregoing primarily describes the solutions provided by the embodiments of the present invention from a methodological perspective. To achieve the aforementioned functions, it includes corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, in conjunction with the units and algorithm steps of the various examples described in the embodiments disclosed herein, the present invention can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.
[0093] In this embodiment of the invention, the notification response device can be divided into functional modules according to the above method example. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing module. The integrated modules can be implemented in hardware or as software functional modules. It should be noted that the module division in this embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.
[0094] This disclosure provides a notification response device. (See also...) Figure 7 As shown, the notification response device 700 may include a service invocation module 710, a plug-in determination module 720, and a message notification module 730, wherein:
[0095] Service call module 710 is used to receive notification service requests;
[0096] The plugin determination module 720 is used to determine the target plugin based on the notification business request.
[0097] The message notification module 730 is used to execute the notification task corresponding to the notification business request through the target plugin.
[0098] In this embodiment of the application, the notification service request includes a notification sending request, and the plugin determination module is specifically used to: parse the notification sending request; determine the notification service type requested by the notification sending request based on the parsing result; and determine the target plugin from the pre-designed notification plugins based on the notification service type.
[0099] In this embodiment of the application, the notification service request includes a notification callback request, and the plugin determination module is specifically used to: parse the notification callback request; determine the callback service type requested by the notification callback request based on the parsing result; and determine the target plugin from the pre-designed callback plugins based on the callback service type.
[0100] In this embodiment, the message notification module is specifically used to: send a notification message corresponding to the notification sending request by calling the target plugin; if the notification message fails to be sent, resend the notification message based on the parameter settings of the target plugin. In this embodiment, the message notification module is specifically used to: obtain the callback content corresponding to the notification callback request by calling the target plugin, and store the callback content in the database.
[0101] In this embodiment of the application, the message notification module is specifically used to: query the notification log based on the notification query request.
[0102] In this embodiment, the notification response device further includes a plugin development module, which is specifically used to develop a notification plugin. Specifically, the development process can be implemented as follows: obtaining a general component dependency package; inheriting the target methods in the general component dependency package to obtain the notification plugin.
[0103] Furthermore, the specific implementation details of the aforementioned notification response device have been described in detail in the corresponding section of the notification response method, and therefore will not be repeated here.
[0104] Figure 8 This is a schematic diagram of the structure of an electronic device according to an embodiment of this disclosure. See below for details. Figure 8 It shows a schematic diagram of a structure suitable for implementing the electronic device 800 in the embodiments of this disclosure. Figure 8 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0105] like Figure 8As shown, the electronic device 800 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 into a random access memory (RAM) 803 to implement the notification response method as described in the embodiments of this disclosure. The RAM 803 also stores various programs and data required for the operation of the electronic device 800. The processing device 801, ROM 802, and RAM 803 are interconnected via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0106] Typically, the following devices can be connected to I / O interface 805: input devices 806 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 807 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 808 including, for example, magnetic tapes, hard disks, etc.; and communication devices 809. Communication device 809 allows electronic device 800 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 8 An electronic device 800 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0107] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts, thereby implementing the notification response method as described above. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 809, or installed from a storage device 808, or installed from a ROM 802. When the computer program is executed by the processing device 801, it performs the functions defined in the methods of embodiments of this disclosure.
[0108] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0109] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any currently known or future-developed networks.
[0110] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0111] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to:
[0112] Receive notification service requests;
[0113] The target plugin is determined based on the notification service request;
[0114] The notification task corresponding to the notification business request is executed through the target plugin.
[0115] Optionally, when one or more of the above-described procedures are executed by the electronic device, the electronic device may also perform other steps described in the above embodiments.
[0116] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0117] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0118] The units described in the embodiments of this disclosure can be implemented in software or hardware. The names of the units are not, in some cases, intended to limit the specific unit.
[0119] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0120] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0121] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
[0122] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
[0123] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.
Claims
1. A notification response method, characterized in that: include: Receive notification service request; Determining a target plug-in based on the notification service request; The notification task corresponding to the notification service request is executed through the target plug-in.
2. The notification response method according to claim 1, characterized in that: The notification service request includes a notification sending request; and determining a target plug-in based on the notification service request includes: Parsing the notification sending request; Determine the notification service type requested by the notification sending request based on the parsing result; The target plug-in is determined from pre-designed notification plug-ins based on the notification service type.
3. The notification response method according to claim 1, characterized in that: The notification service request includes a notification callback request; and determining a target plug-in based on the notification service request includes: Parsing the notification callback request; Determine the callback service type requested by the notification callback request based on the parsing result; The target plug-in is determined from pre-designed callback plug-ins based on the callback service type.
4. The notification response method according to claim 2, characterized in that: The executing the notification task corresponding to the notification service request by the target plug-in includes: Sending a notification message corresponding to the notification sending request by calling the target plug-in; If the notification message fails to be sent, the notification message is resent based on the parameter settings of the target plug-in.
5. The notification response method according to claim 2, characterized in that: The method further comprises: Developing the notification plugin; The developing of the notification plug-in comprises: Get common component dependency packages; The target method in the common component dependency package is inherited to obtain the notification plug-in.
6. The notification response method according to claim 3, characterized in that: The executing the notification task corresponding to the notification service request by the target plug-in includes: The callback content corresponding to the notification callback request is obtained by calling the target plug-in, and the callback content is stored in a database.
7. The notification response method according to claim 1, characterized in that: The notification service request includes a notification query request; the method further includes: A notification log is queried based on the notification query request.
8. A notification response device, characterized in that: include: A service calling module is used to receive notification service requests; A plug-in determination module, used to determine a target plug-in based on the notification service request; The message notification module is used to execute the notification task corresponding to the notification service request through the target plug-in.
9. An electronic device, comprising: processor; as well as Memory for storing programs, The program includes instructions, which, when executed by the processor, cause the processor to perform the method according to any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-7.
Citation Information
Patent Citations
Message notification method and device, electronic equipment and readable storage medium
CN111049938A
Task execution method and device in cloud native environment, equipment and storage medium
CN117389655A
Service message pushing method and device, electronic equipment and storage medium
CN117453428A
Method and apparatus for communicating data between computer devices
CN1939035A
Push notification middleware
US20150024793A1