Message request processing method and device, equipment, medium and product
By switching the service mode when detecting message queue service exceptions in the target application cluster and sending messages directly to the user terminal, the problem of insufficient exception handling capabilities within the application cluster is solved, and efficient message request processing and sending is achieved.
Patent Information
- Application Number
- CN202510666929.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-22
- Publication Date
- 2025-08-01
AI Technical Summary
In the distributed message processing system, the exception handling capability within the application cluster is insufficient, resulting in low efficiency in message request processing and poor transmission.
By setting request reception services and request processing services in the target application cluster, switching to request processing mode when detecting message queue service abnormality, directly calling the message sending platform to send messages to the user terminal; when the queue service is normal, the message request is posted to the queue service and processed by the processing service and sent.
It improves the exception handling capability within the application cluster, reduces the time-consuming message sending, and ensures the processing efficiency and smoothness of message requests.
Smart Images

Figure CN120416341A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a method, apparatus, device, medium and product for processing message requests. Background Art
[0002] In order to ensure the high availability of message processing, a message processing system is usually a distributed system. A distributed processing system usually includes multiple message processing nodes, each of which can be deployed in different geographical locations. Each message processing node can include one or more application clusters for processing message requests. The purpose of the distributed processing architecture is to ensure that the business processing system has redundant backup and fault tolerance capabilities at each business processing node, thereby improving the high availability of the business processing system.
[0003] Although the distributed processing architecture can ensure the high availability of the entire message processing system, the fault tolerance and fault recovery capabilities within each application cluster are insufficient. For example, when an exception occurs within one application cluster in a message processing node, the distributed processing system directly switches the message request to other application clusters in the message processing node or other message processing nodes within the distributed processing system for processing. Therefore, how to improve the exception handling ability within the application cluster has become an urgent problem to be solved. Summary of the Invention
[0004] The present invention provides a method, apparatus, device, medium and product for processing message requests to solve the problem of low exception handling ability within the application cluster. By switching the mode of the application service, it is beneficial to reduce the time consumed for message sending, improve the message request processing efficiency, and ensure smooth message sending.
[0005] According to one aspect of the present invention, there is provided a method for processing a message request, which is executed by a target application cluster. The target application cluster includes a request receiving service, a message queue service, and a request processing service. The method includes:
[0006] Receiving a message request sent by a business system through the request receiving service;
[0007] If it is detected that the message queue service is abnormal, switching the request receiving service to the request processing mode, and calling a message sending platform according to the message request to send a message to a user terminal;
[0008] If it is detected that the message queue service is normal, publishing the message request to the message queue service through the request receiving service, obtaining the message request from the message queue service through the request processing service, and calling a message sending platform according to the message request to send a message to a user terminal; the request processing service has a subscription relationship with the message queue.
[0009] According to another aspect of the present invention, there is provided a processing device for message requests. The device is configured in a target application cluster, and the target application cluster includes a request receiving service, a message queue service, and a request processing service. The device includes:
[0010] A message request receiving module, configured to receive a message request sent by a business system through the request receiving service;
[0011] A first message sending module, configured to, if it detects an abnormality in the message queue service, switch the request receiving service to a request processing mode, and call a message sending platform according to the message request to send a message to a user terminal;
[0012] A second message sending module, configured to, if it detects that the message queue service is normal, publish the message request to the message queue service through the request receiving service, obtain the message request from the message queue service through the request processing service, and call a message sending platform according to the message request to send a message to a user terminal; the request processing service has a subscription relationship with the message queue.
[0013] According to another aspect of the present invention, there is provided an electronic device, which includes:
[0014] At least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores a computer program executable by the at least one processor, and when the computer program is executed by the at least one processor, the at least one processor is enabled to execute the message request processing method according to any embodiment of the present invention.
[0015] According to another aspect of the present invention, there is provided a computer-readable storage medium, which stores computer instructions for enabling a processor to execute the message request processing method according to any embodiment of the present invention when executed.
[0016] According to another aspect of the present invention, there is provided a computer program product, including a computer program, which when executed by a processor, implements the message request processing method according to any embodiment of the present invention.
[0017] The technical solution of the embodiment of the present invention receives a message request sent by a service system through a request receiving service; if it detects that the message queue service is abnormal, it switches the request receiving service to a request processing mode, and calls a message sending platform according to the message request to send a message to a user terminal; if it detects that the message queue service is normal, it publishes the message request to the message queue service through the request receiving service, obtains the message request from the message queue service through a request processing service, and calls a message sending platform according to the message request to send a message to a user terminal; the request processing service has a subscription relationship with the message queue. This technical solution solves the problem of low abnormal handling ability inside the application cluster. Through the mode switching of the application service, it is beneficial to reduce the message sending time consumption, improve the message request processing efficiency, and ensure the smoothness of message sending.
[0018] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0020] Figure 1 It is a flowchart of a method for processing a message request according to Embodiment 1 of the present invention;
[0021] Figure 2 It is a flowchart of a method for processing a message request according to Embodiment 2 of the present invention;
[0022] Figure 3 It is a schematic structural diagram of a device for processing a message request according to Embodiment 3 of the present invention;
[0023] Figure 4 It is a schematic structural diagram of an electronic device for implementing the method for processing a message request of the embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0024] To enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0025] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices. The acquisition, storage, use, processing, etc. of the data in the technical solution of this application all comply with the relevant regulations of national laws and regulations.
[0026] Embodiment 1
[0027] Figure 1 A flowchart of a method for processing a message request is provided for Embodiment 1 of the present invention. This embodiment is applicable to the business processing scenario of a financial institution, especially the processing of message requests. This method can be executed by a message request processing device, which can be implemented in the form of hardware and / or software, and the device can be configured in an electronic device. As Figure 1 shown, the method includes:
[0028] S110. Receive a message request sent by a business system through a request receiving service.
[0029] This solution can be executed by a target application cluster, and the target application cluster can be one of the application clusters in the master node of the message processing system of a financial institution. Among them, the message processing system can be a message processing system based on a distributed architecture. The message processing system usually includes multiple message processing nodes, each of which can be deployed at different geographical locations, and each message processing node can include one or more application clusters for processing message requests.
[0030] For example, a distributed processing architecture of "two locations and three centers". "Two locations" refers to two geographical locations at a relatively long distance, and "three centers" refers to three data processing centers, namely the headquarters, the same-city center, and the disaster recovery center, which are three application clusters for processing message requests. Among them, the headquarters application cluster and the same-city application cluster are in the same geographical area and use the same hardware resources. The disaster recovery application cluster is located in another geographical area, uses another set of hardware resources, and keeps data synchronized with the other two application clusters. In the distributed processing architecture of "two locations and three centers", under normal operation, the headquarters application cluster and the same-city application cluster provide business services; if one of the headquarters application cluster or the same-city application cluster fails, the normal working application cluster provides business services; if both the headquarters application cluster and the same-city application cluster are unavailable, the disaster recovery application cluster is used to provide business services. The message processing system with a distributed architecture can ensure that each business processing node has redundant backup and fault tolerance capabilities. At the same time, the message processing system with a distributed architecture can automatically increase or decrease data processing resources to cope with load changes and achieve the dynamic elastic scaling of the message processing system.
[0031] Specifically, the target application cluster can be an application cluster composed of services such as a request receiving service, a message queue service, and a request processing service. The business system can send a message request to the target message processing node, and the message processing node can forward the message request to the target application cluster for response through a load balancing device. The request receiving service in the target application cluster can receive the message request and respond to the message request. Since the processing of the message request takes time, in order to cope with the service crash caused by the sudden increase in message traffic, the target application cluster can publish the message request received by the request receiving service to the message queue service for buffering. The request processing service can subscribe to the message queue service and pull a preset number of message requests from the message queue service each time, and process the message requests according to the processing capacity. Among them, the message request can include information such as a request identifier, a requestor, a request time, a message type, a notification channel, and a message content.
[0032] S120. Detect whether the message queue service is abnormal.
[0033] The target application cluster can detect whether each service in the target application cluster is abnormal according to a preset detection period. Specifically, the target application cluster can trace the life cycle of the message based on the log records of each service, and then judge whether there is an abnormality in the message queue service. The life cycle of the message can include links such as the sending, receiving, processing, and confirmation of the message. If it is detected that the message queue service is abnormal, S130 can be continued; if it is not detected that the message queue service is abnormal, S140 can be executed.
[0034] S130. Switch the request receiving service to the request processing mode, and call the message sending platform according to the message request to send a message to the user terminal.
[0035] If it is detected that the message queue service is abnormal, the target application service can switch the request receiving service to the request processing mode, call the message sending platform matching the message request, and send a message to the user terminal. It can be understood that the message sending platform can be a third-party message service, such as the message service of a telecommunications operator, which is used to send the message content to the user terminal to achieve the purpose of notifying the user.
[0036] S140. Publish the message request to the message queue service through the request receiving service, obtain the message request from the message queue service through the request processing service, call the message sending platform according to the message request, and send a message to the user terminal; the request processing service has a subscription relationship with the message queue.
[0037] If the message queue service is normal, the request receiving service can publish the message request to the message queue service, the request processing service can obtain the message request from the message queue service it subscribes to, and the request processing service calls the message sending platform matching the message request to send a message to the user terminal.
[0038] The technical solution of the embodiment of the present invention receives a message request sent by a business system through the request receiving service; if it is detected that the message queue service is abnormal, the request receiving service is switched to the request processing mode, and the message sending platform is called according to the message request to send a message to the user terminal; if it is detected that the message queue service is normal, the message request is published to the message queue service through the request receiving service, the message request is obtained from the message queue service through the request processing service, the message sending platform is called according to the message request, and a message is sent to the user terminal; the request processing service has a subscription relationship with the message queue. This technical solution solves the problem of low abnormal handling ability inside the application cluster. Through the mode switching of the application service, it is beneficial to reduce the message sending time-consuming, improve the message request processing efficiency, and ensure the smoothness of message sending.
[0039] Embodiment 2
[0040] Figure 2 It is a flowchart of a method for processing a message request provided by the second embodiment of the present invention. This embodiment is refined based on the above embodiment. As Figure 2 shown, the method includes:
[0041] S210. Receive a message request sent by a business system through the request receiving service.
[0042] S220. Determine the target topic according to the message type requested by the service receiving the request; the message type is determined based on the communication channel through which the message reaches the user terminal.
[0043] It is easy to understand that different messages may need to be notified to users through different communication channels. For example, account change messages are notified to users via text messages, and the requested account transaction records of users are notified to users via emails. For each communication channel, the target application cluster can set up a corresponding message queue service and determine the corresponding topic. Different communication channels can be isolated from each other. For different message types, the request receiving service can use different thread pools to publish message requests, and the request processing service can use different thread pools to subscribe to message requests. Different consumer groups consuming different topics can effectively prevent the communication link of a single topic from failing and affecting the consumption ability of other topics.
[0044] Therefore, in this solution, after the request receiving service receives the message request sent by the business system, the request receiving service can determine the target topic that the message request matches. Specifically, the message type can include types such as emails, text messages, in-site messages, and voice calls. Correspondingly, the topics of each message queue service can include topics such as emails, text messages, in-site messages, and voice calls. The request receiving service can match the message type in the message request with the topics of each message queue service to obtain the target topic corresponding to the message request.
[0045] S230. Detect whether the message queue service matching the target topic is abnormal.
[0046] It can be understood that each topic can correspond to one or more message queue services. The target application cluster can detect the message queue services of each subject according to a preset detection period to determine whether the message queue service matching the target topic is abnormal. The abnormality of the message queue service can be abnormal situations such as message loss, repeated message consumption, message order disorder, and message backlog.
[0047] S240. Switch the request receiving service to the request processing mode, and call the message sending platform according to the message request to send a message to the user terminal.
[0048] S250. Publish the message request to the message queue service matching the target topic through the thread pool matching the target topic in the request receiving service.
[0049] Each topic can correspond to a thread pool in the request receiving service, which is specifically used to publish the message requests of this topic to the message queue service corresponding to this topic. The thread pool in the request receiving service that matches the target topic can publish the message request to the message queue service that matches the target topic.
[0050] S260. Obtain the message request from the message queue service matched by the target topic through the thread pool matched by the target topic in the request processing service, and call the message sending platform according to the message request to send a message to the user terminal.
[0051] Correspondingly, each topic can correspond to a thread pool in the request processing service, which is specifically used to obtain the message requests of that topic and respond to the message requests of that topic. The thread pool matched by the target topic in the request processing service can obtain the message request from the message queue service matched by the target topic, and call the message sending platform of the message request to send a message to the user terminal.
[0052] This solution can ensure the smooth processing of message requests in case of exceptions by setting an exception handling mechanism for message queue failures, can achieve asynchronous decoupling of the consumer and the message service provider, and can smoothly handle sudden data traffic, relieve the message request pressure, and prevent the collapse or performance degradation of message processing nodes.
[0053] In a feasible solution, after receiving the message request sent by the business system through the request receiving service, the method further includes:
[0054] If it is detected that the distributed storage component is normal, generate a first message log and store the first message log in the distributed storage component; the distributed storage component is the distributed storage component matched by the target application cluster;
[0055] If it is detected that the distributed storage component is abnormal, generate a first message log and store the first message log in the backup database;
[0056] After calling the message sending platform according to the message request to send a message to the user terminal, the method further includes:
[0057] If it is detected that the distributed storage component is normal, generate a second message log and store the second message log in the distributed storage component;
[0058] If it is detected that the distributed storage component is abnormal, generate a second message log and store the second message log in the backup database.
[0059] The target application cluster can record the processing process of message requests and store message logs. Each message processing node can be configured with a distributed storage component for storing the message logs generated by that message processing node. To ensure the reliability of message log storage, a backup database can be set in the target application cluster for storing message logs when the distributed storage component is abnormal.
[0060] Specifically, after receiving a message request sent by a business system through a request receiving service, the target application cluster can detect whether the distributed storage component is normal according to a preset detection period. If the distributed storage component is normal, the request receiving service can generate a first message log and store the first message log in the distributed storage component. If the distributed storage component is abnormal, the request receiving service can generate a first message log and store the first message log in the backup database. The first message log is used to record the processing process before the message request is received.
[0061] Similarly, after calling a message sending platform according to the message request and sending a message to a user terminal, the target application cluster can detect again whether the distributed storage component is normal. If the distributed storage component is normal, the request processing service can generate a second message log and store the second message log in the distributed storage component. If the distributed storage component is abnormal, the request processing service can generate a second message log and store the second message log in the backup database. The second message log is used to record the processing process after the message request is received.
[0062] Based on the above solution, after storing the first message log in the backup database, the method further includes:
[0063] If it is detected that the distributed storage component is normal, transfer the first message log stored in the backup database to the distributed storage component;
[0064] After storing the second message log in the backup database, the method further includes:
[0065] If it is detected that the distributed storage component is normal, transfer the second message log stored in the backup database to the distributed storage component.
[0066] After storing the first message log in the backup database, the target application cluster can continue to detect the distributed storage component according to the detection period. If the distributed storage component returns to normal, the target application cluster can transfer the first message log stored in the backup database to the distributed storage component. Correspondingly, after storing the second message log in the backup database, the target application cluster can continue to detect the distributed storage component according to the detection period. If the distributed storage component returns to normal, the target application cluster can transfer the second message log stored in the backup database to the distributed storage component.
[0067] This solution ensures the normal recording of message logs in case of abnormal distributed storage components by setting up an exception handling mechanism for distributed storage component failures, thus guaranteeing the normal operation of the message sending service.
[0068] Embodiment III
[0069] Figure 3 The following is a schematic structural diagram of a message request processing device provided in Embodiment III of the present invention. The device is configured in a target application cluster, and the target application cluster includes a request receiving service, a message queue service, and a request processing service. As Figure 3 shown, the device includes:
[0070] A message request receiving module 310, configured to receive a message request sent by a business system through the request receiving service;
[0071] A first message sending module 320, configured to, if it is detected that the message queue service is abnormal, switch the request receiving service to a request processing mode, and call a message sending platform according to the message request to send a message to a user terminal;
[0072] A second message sending module 330, configured to, if it is detected that the message queue service is normal, publish the message request to the message queue service through the request receiving service, obtain the message request from the message queue service through the request processing service, and call a message sending platform according to the message request to send a message to a user terminal; the request processing service has a subscription relationship with the message queue.
[0073] In this solution, the device further includes:
[0074] A first log storage module, configured to, after receiving a message request sent by a business system through the request receiving service, if it is detected that the distributed storage component is normal, generate a first message log and store the first message log in the distributed storage component; the distributed storage component is a distributed storage component matched with the target application cluster; if it is detected that the distributed storage component is abnormal, generate a first message log and store the first message log in a backup database;
[0075] A second log storage module, configured to, after calling a message sending platform according to the message request to send a message to a user terminal, if it is detected that the distributed storage component is normal, generate a second message log and store the second message log in the distributed storage component; if it is detected that the distributed storage component is abnormal, generate a second message log and store the second message log in a backup database.
[0076] Based on the above solution, the device further includes:
[0077] A first log transfer module, configured to, after storing the first message log in the backup database, if it is detected that the distributed storage component is normal, transfer the first message log stored in the backup database to the distributed storage component;
[0078] A second log transfer module, configured to transfer the second message log stored in the backup database to the distributed storage component if it is detected that the distributed storage component is normal after storing the second message log in the backup database.
[0079] In a feasible solution, the apparatus further includes:
[0080] A target topic determination module, configured to determine a target topic through a request receiving service according to a message type of the message request after receiving the message request sent by the service system through the request receiving service; the message type is determined based on a communication channel through which the message reaches the user terminal.
[0081] Based on the above solution, the second message sending module 330 is specifically configured to:
[0082] Publish the message request to a message queue service matching the target topic through a thread pool matching the target topic in the request receiving service;
[0083] Obtain the message request from a message queue service matching the target topic through a thread pool matching the target topic in the request processing service.
[0084] The message request processing apparatus provided by the embodiments of the present invention can execute the message request processing method provided by any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution of the method.
[0085] Embodiment 4
[0086] Figure 4 FIG. shows a schematic structural diagram of an electronic device 410 that can be used to implement embodiments of the present invention. The electronic device is intended to represent various forms of digital computers, such as, for example, a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, for example, a personal digital processor, a cellular phone, a smart phone, a wearable device (such as a helmet, glasses, a watch, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0087] Such as Figure 4As shown, the electronic device 410 includes at least one processor 411 and a memory communicatively connected to the at least one processor 411, such as a read-only memory (ROM) 412, a random access memory (RAM) 413, etc. The memory stores a computer program executable by the at least one processor. The processor 411 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 412 or the computer program loaded from the storage unit 418 into the random access memory (RAM) 413. In the RAM 413, various programs and data required for the operation of the electronic device 410 can also be stored. The processor 411, the ROM 412, and the RAM 413 are connected to each other via a bus 414. An input / output (I / O) interface 415 is also connected to the bus 414.
[0088] Multiple components in the electronic device 410 are connected to the I / O interface 415, including: an input unit 416, such as a keyboard, a mouse, etc.; an output unit 417, such as various types of displays, speakers, etc.; a storage unit 418, such as a magnetic disk, an optical disc, etc.; and a communication unit 419, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 419 allows the electronic device 410 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0089] The processor 411 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 411 include but are not limited to a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 411 executes the various methods and processes described above, such as the processing method of a message request.
[0090] In some embodiments, the processing method of a message request can be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as the storage unit 418. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 410 via the ROM 412 and / or the communication unit 419. When the computer program is loaded into the RAM 413 and executed by the processor 411, one or more steps of the processing method of the message request described above can be executed. Alternatively, in other embodiments, the processor 411 can be configured to execute the processing method of the message request by any other appropriate means (such as by means of firmware).
[0091] The various embodiments of the systems and techniques described above in this specification can be implemented in digital electronic circuitry, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which may be a special-purpose or general-purpose programmable processor that receives data and instructions from, and transmits data and instructions to, a storage system, at least one input device, and at least one output device.
[0092] The computer programs for implementing the methods of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions / operations specified in the flowchart and / or block diagram to be implemented. The computer programs can be executed entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
[0093] In the context of the present invention, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0094] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and a pointing device (e.g., a mouse or a trackball) through which the user can provide input to the electronic device. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0095] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a data server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system including any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected to each other by digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), blockchain network, and the Internet.
[0096] A computing system can include a client and a server. The client and the server are generally far from each other and typically interact through a communication network. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system and solves the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.
[0097] It should be understood that various forms of the processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in the present invention can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved, and no limitation is made herein.
[0098] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A method for processing a message request, characterized in that, The method is executed by a target application cluster, which includes a request receiving service, a message queue service, and a request processing service. The method includes: Receiving a message request sent by a business system through the request receiving service; If it is detected that the message queue service is abnormal, switching the request receiving service to the request processing mode, and calling a message sending platform according to the message request to send a message to a user terminal; If it is detected that the message queue service is normal, publishing the message request to the message queue service through the request receiving service, obtaining the message request from the message queue service through the request processing service, and calling a message sending platform according to the message request to send a message to a user terminal; there is a subscription relationship between the request processing service and the message queue.
2. The method according to claim 1, wherein After receiving the message request sent by the business system through the request receiving service, the method further includes: If it is detected that the distributed storage component is normal, generating a first message log and storing the first message log in the distributed storage component; the distributed storage component is a distributed storage component matched with the target application cluster; If it is detected that the distributed storage component is abnormal, generating a first message log and storing the first message log in a backup database; After calling the message sending platform according to the message request to send a message to the user terminal, the method further includes: If it is detected that the distributed storage component is normal, generating a second message log and storing the second message log in the distributed storage component; If it is detected that the distributed storage component is abnormal, generating a second message log and storing the second message log in a backup database.
3. The method according to claim 2, wherein After storing the first message log in the backup database, the method further includes: If it is detected that the distributed storage component is normal, transferring the first message log stored in the backup database to the distributed storage component; After storing the second message log in the backup database, the method further includes: If it is detected that the distributed storage component is normal, transferring the second message log stored in the backup database to the distributed storage component.
4. The method according to claim 1, characterized in that After receiving the message request sent by the business system through the request receiving service, the method further includes: Determining a target topic through the request receiving service according to the message type of the message request; the message type is determined based on the communication channel through which the message reaches the user terminal.
5. The method according to claim 4, wherein The step of publishing the message request to the message queue service through the request receiving service includes: Publishing the message request to the message queue service matching the target topic through a thread pool matching the target topic in the request receiving service.
6. The method according to claim 4, wherein The step of obtaining the message request from the message queue service through the request processing service includes: Obtaining the message request from the message queue service matching the target topic through a thread pool matching the target topic in the request processing service.
7. A processing device for message requests, characterized in that, The device is configured in a target application cluster, which includes a request receiving service, a message queue service, and a request processing service. The device includes: A message request receiving module, configured to receive a message request sent by a business system through the request receiving service; The first message sending module is configured to switch the request receiving service to the request processing mode if a message queue service exception is detected, and call a message sending platform according to the message request to send a message to a user terminal; The second message sending module is configured to, if a normal message queue service is detected, publish the message request to the message queue service through the request receiving service, obtain the message request from the message queue service through the request processing service, and call a message sending platform according to the message request to send a message to a user terminal; the request processing service has a subscription relationship with the message queue.
8. An electronic device, characterized in that, The electronic device includes: At least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the message request processing method according to any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing a processor to execute the message request processing method according to any one of claims 1-6 when executed.
10. A computer program product includes a computer program which, when executed by a processor, implements the message request processing method according to any one of claims 1-6.