CN113794744A - Message processing method and related equipment - Google Patents

Message processing method and related equipment Download PDF

Info

Publication number
CN113794744A
CN113794744A CN202110128771.9A CN202110128771A CN113794744A CN 113794744 A CN113794744 A CN 113794744A CN 202110128771 A CN202110128771 A CN 202110128771A CN 113794744 A CN113794744 A CN 113794744A
Authority
CN
China
Prior art keywords
message
processing
server
failed
cache server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110128771.9A
Other languages
Chinese (zh)
Inventor
王晨鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Tuoxian Technology Co Ltd
Original Assignee
Beijing Jingdong Tuoxian Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Tuoxian Technology Co Ltd filed Critical Beijing Jingdong Tuoxian Technology Co Ltd
Priority to CN202110128771.9A priority Critical patent/CN113794744A/en
Publication of CN113794744A publication Critical patent/CN113794744A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/07User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail characterised by the inclusion of specific contents
    • H04L51/18Commands or executable codes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • H04L67/5682Policies or rules for updating, deleting or replacing the stored data

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the disclosure provides a message processing method and device, a computer readable storage medium and electronic equipment, and belongs to the technical field of computers and communication. The method comprises the following steps: when the message processing fails, storing the message into a cache server; querying the cache server to obtain the message with processing failure; notifying a message server to resend the message with processing failure; and when the message which fails to be processed is successfully reprocessed, deleting the corresponding message which fails to be processed and is stored in the cache server. The method can solve the problem that the failed message is lost.

Description

Message processing method and related equipment
Technical Field
The present disclosure relates to the field of computer and communication technologies, and in particular, to a method and an apparatus for processing a message, a computer-readable storage medium, and an electronic device.
Background
In the prior art, after a message is processed for a long time and fails, the message is not retried any more, and the message is stored in an archive log. If a message is found to be unprocessed, the message can be found from the archive log and manually retried. When the archive log is cleaned regularly, messages which are not processed and failed to be processed are cleaned, and the messages are lost.
In a scene or a company with a large message amount, because the message amount is large, querying and processing failed messages manually can seriously affect the efficiency of the company and possibly cause omission, and finally, the loss of the messages or the processing timeliness is low.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present disclosure, and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The embodiment of the disclosure provides a message processing method and device, a computer readable storage medium and an electronic device, which can solve the problem of message loss caused by processing failure.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows, or in part will be obvious from the description, or may be learned by practice of the disclosure.
According to an aspect of the present disclosure, there is provided a method for processing a message, including:
when the message processing fails, storing the message into a cache server;
querying the cache server to obtain the message with processing failure;
notifying a message server to resend the message with processing failure;
and when the message which fails to be processed is successfully reprocessed, deleting the corresponding message which fails to be processed and is stored in the cache server.
In one embodiment, storing the message to a cache server upon a message processing failure comprises:
when the message processing fails, inquiring the message with failed processing in the cache server;
if the message with processing failure is inquired, the message with processing failure is not stored;
and if the message with processing failure is not inquired, storing the message with processing failure.
In one embodiment, storing the message to a cache server upon a message processing failure comprises:
when the message processing fails, storing the cache key points of the message into the cache server;
wherein the cache key point comprises a server name for processing the message, a subject of the message and an identity of the message.
In one embodiment, querying the cache server for the message of processing failure comprises:
querying the cache server at a specific time interval to obtain the message with processing failure.
In one embodiment, querying the cache server for the message of processing failure comprises:
querying the cache server with a cache key point prefix to obtain the message with processing failure;
wherein the caching key point prefix includes a server name for processing the message, a subject of the message.
In one embodiment, notifying the message server of the retransmission of the message that failed the process comprises:
when the message is not retransmitted and the interval from the message transmission failure time to the current time is greater than a specific time, notifying a message server to retransmit the message which is failed in processing;
and when the message is retransmitted and the interval from the latest retransmission time of the message to the current time is more than a specific time, informing a message server of retransmitting the message with failed processing.
In one embodiment, notifying the message server of the retransmission of the message that failed the process comprises:
notifying a message server of the resending of the message for which the processing failed and storing the time of the resending of the message in the cache server.
In one embodiment, further comprising:
and when the message processing fails or succeeds, notifying the message server.
According to an aspect of the present disclosure, there is provided a message processing apparatus, including:
the storage module is configured to store the message into the cache server when the message processing fails;
the query module is configured to query the cache server to acquire the message with processing failure;
a notification module configured to notify a message server to resend the message for which processing failed;
and the deleting module is configured to delete the corresponding processing-failed message stored in the cache server when the processing-failed message is successfully reprocessed.
According to an aspect of the present disclosure, there is provided an electronic device including:
one or more processors;
a storage device configured to store one or more programs that, when executed by the one or more processors, cause the one or more processors to implement the method of any of the above embodiments.
According to an aspect of the present disclosure, there is provided a computer readable storage medium storing a computer program which, when executed by a processor, implements the method of any one of the above embodiments.
In the technical scheme provided by some embodiments of the present disclosure, the problem of message loss due to processing failure can be solved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The following figures depict certain illustrative embodiments of the invention in which like reference numerals refer to like elements. These described embodiments are to be considered as exemplary embodiments of the disclosure and not limiting in any way.
Fig. 1 shows a schematic diagram of an exemplary system architecture to which a message processing method or a message processing apparatus of the embodiments of the present disclosure may be applied;
FIG. 2 illustrates a schematic structural diagram of a computer system suitable for use with the electronic device implementing embodiments of the present disclosure;
FIG. 3 schematically illustrates a flow chart of a method of processing a message according to an embodiment of the present disclosure;
FIG. 4 illustrates a message processing diagram according to an embodiment of the present disclosure;
FIG. 5 is a process diagram illustrating message retry coordination, according to one embodiment of the present disclosure;
FIG. 6 schematically shows a block diagram of a processing device of a message according to an embodiment of the present disclosure;
fig. 7 schematically shows a block diagram of a device for processing messages according to another embodiment of the invention;
fig. 8 schematically shows a block diagram of a device for processing messages according to another embodiment of the invention.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the disclosure.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
Fig. 1 shows a schematic diagram of an exemplary system architecture 100 to which a message processing method or a message processing apparatus of the embodiments of the present disclosure may be applied.
As shown in fig. 1, the system architecture 100 may include one or more of terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation. For example, server 105 may be a server cluster comprised of multiple servers, or the like.
The client may use the terminal devices 101, 102, 103 to interact with the server 105 over the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may be various electronic devices having display screens including, but not limited to, smart phones, tablets, portable and desktop computers, digital cinema projectors, and the like.
The server 105 may be a server that provides various services. For example, the client sends a message to the server 105 using the terminal device 103 (which may also be the terminal device 101 or 102). When the message processing fails, the server 105 stores the message in a cache server; querying the cache server to obtain the message with processing failure; notifying a message server to resend the message with processing failure; and when the message which fails to be processed is successfully reprocessed, deleting the corresponding message which fails to be processed and is stored in the cache server. The server 105 can transmit the result of the message processing to the terminal device 103 to display the result of the message processing on the terminal device 103, and the client can view the result of the message processing based on the content displayed on the terminal device 103.
Also for example, the terminal device 103 (also may be the terminal device 101 or 102) may be a smart tv, a VR (Virtual Reality)/AR (Augmented Reality) helmet display, or a mobile terminal such as a smart phone, a tablet computer, etc. on which navigation, network appointment, instant messaging, video Application (APP) and the like are installed, and the user may send a message to the server 105 through the smart tv, the VR/AR helmet display or the navigation, network appointment, instant messaging, video APP. The server 105 may obtain a result of the message processing based on the processing of the message, and return the result of the message processing to the smart television, the VR/AR helmet display, or the navigation, network appointment, instant messaging, and video APP, and then display the result of the message processing through the smart television, the VR/AR helmet display, or the navigation, network appointment, instant messaging, and video APP.
FIG. 2 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present disclosure.
It should be noted that the computer system 200 of the electronic device shown in fig. 2 is only an example, and should not bring any limitation to the functions and the scope of the application of the embodiments of the present disclosure.
As shown in fig. 2, the computer system 200 includes a Central Processing Unit (CPU)201 that can perform various appropriate actions and processes according to a program stored in a Read-only Memory (ROM) 202 or a program loaded from a storage section 208 into a Random Access Memory (RAM) 203. In the RAM 203, various programs and data necessary for system operation are also stored. The CPU 201, ROM 202, and RAM 203 are connected to each other via a bus 204. An input/output (I/O) interface 205 is also connected to bus 204.
The following components are connected to the I/O interface 205: an input portion 206 including a keyboard, a mouse, and the like; an output section 207 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section 208 including a hard disk and the like; and a communication section 209 including a Network interface card such as a LAN (Local Area Network) card, a modem, or the like. The communication section 209 performs communication processing via a network such as the internet. A drive 210 is also connected to the I/O interface 205 as needed. A removable medium 211, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like, is mounted on the drive 210 as necessary, so that a computer program read out therefrom is installed into the storage section 208 as necessary.
In particular, the processes described below with reference to the flowcharts may be implemented as computer software programs, according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable storage medium, the computer program containing program code for performing the method illustrated by the flow chart. In such embodiments, the computer program may be downloaded and installed from a network via the communication section 209 and/or installed from the removable medium 211. The computer program, when executed by a Central Processing Unit (CPU)201, performs various functions defined in the methods and/or apparatus of the present application.
It should be noted that the computer readable storage medium shown in the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having 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. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer-readable signal medium may include a propagated data signal with computer-readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable storage medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable storage medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF (Radio Frequency), etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of methods, apparatus, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules and/or units and/or sub-units described in the embodiments of the present disclosure may be implemented by software, or may be implemented by hardware, and the described modules and/or units and/or sub-units may also be disposed in a processor. Wherein the names of such modules and/or units and/or sub-units in some cases do not constitute a limitation on the modules and/or units and/or sub-units themselves.
As another aspect, the present application also provides a computer-readable storage medium, which may be contained in the electronic device described in the above embodiment; or may exist separately without being assembled into the electronic device. The computer-readable storage medium carries one or more programs which, when executed by an electronic device, cause the electronic device to implement the method described in the embodiments below. For example, the electronic device may implement the steps as shown in fig. 3.
In the related art, for example, a machine learning method, a deep learning method, or the like may be used to process a message, and the range of application of different methods is different.
Fig. 3 schematically shows a flow chart of a method of processing a message according to an embodiment of the present disclosure. The method steps of the embodiment of the present disclosure may be executed by the terminal device, the server, or the terminal device and the server interactively, for example, the server 105 in fig. 1 described above, but the present disclosure is not limited thereto.
In step S310, when the message processing fails, the message is stored in the cache server.
In this step, the terminal device or the server stores the message in the cache server when the message processing fails.
Fig. 4 shows a message processing diagram according to an embodiment of the present disclosure. Fig. 5 is a diagram illustrating a process for coordinating retry of messages according to an embodiment of the disclosure. The execution server in fig. 4 and the retry coordination server in fig. 5 may be the same server, or may be two separate servers, which is not limited in this application. The execution main body of the processing method of the application message may be executed by the execution server alone, or may be executed by two servers, namely, the execution server and the retry coordination server, in a coordinated and interactive manner, which is not limited in this disclosure. In one embodiment, the message servers in FIG. 4 are the same server.
Referring to fig. 4, in this step, the execution server stores the message in the cache server when the message processing fails. In one embodiment, when the message processing fails, the execution server queries the cache server for the message with processing failure; if the message with processing failure is inquired, the message with processing failure is not stored; and if the message with processing failure is not inquired, storing the message with processing failure. In one embodiment, storing the message to the cache server includes storing the time of the processing failure simultaneously. In one embodiment, when the message processing fails, the execution server stores the cache key point of the message into the cache server; wherein the cache key point comprises a server name for processing the message, a subject of the message and an identity of the message. For example, if the execution server is a, the subject of the message is payment, and the identity of the message is 1, "a + payment + 1" is stored in the cache server.
In the embodiments of the present disclosure, the terminal device may be implemented in various forms. For example, the terminal described in the present disclosure may include a mobile terminal such as a mobile phone, a tablet computer, a notebook computer, a palmtop computer, a Personal Digital Assistant (PDA), a Portable Media Player (PMP), a processing device of a message, a wearable device, a smart band, a pedometer, a robot, an unmanned vehicle, and the like, and a fixed terminal such as a digital TV (television), a desktop computer, and the like.
In step S320, the cache server is queried to obtain the message of processing failure.
In this step, the terminal device or the server queries the cache server to obtain the message with processing failure.
Referring to fig. 5, the retry coordination server queries the cache server to obtain the message that failed processing. In one embodiment, the retry coordination server queries the cache server at certain time intervals to obtain the message that failed processing. The specific time interval is, for example, 10 minutes. In one embodiment, the retry coordination server queries the cache server with a cache key prefix to obtain the message that failed processing; wherein the caching key point prefix includes a server name for processing the message, a subject of the message. For example, the executive server is a, the subject of the message is payment, and the retry coordination server queries the cache server for the message that failed processing with "a + payment".
In step S330, the message server is notified to resend the message whose processing failed.
In this step, the terminal device or the server notifies the message server to resend the message whose processing failed.
Referring to fig. 5, after the retry coordination server queries the cache server to obtain the message with failed processing, the retry coordination server notifies the message server to resend the message with failed processing. In one embodiment, when the message is not retransmitted and the interval from the message transmission failure time to the current time is greater than a specific time, the message server is informed to retransmit the message with failed processing; and when the message is retransmitted and the interval from the latest retransmission time of the message to the current time is more than a specific time, informing a message server of retransmitting the message with failed processing. The specific time is, for example, 1 minute. In one embodiment, the retry coordination server notifies the message server of the retransmission of the message that failed the processing and stores the time of retransmission of the message in the cache server.
In step S340, when the message with failed processing is successfully reprocessed, the corresponding message with failed processing stored in the cache server is deleted.
In this step, when the message that failed to be processed is reprocessed successfully, the terminal device or the server deletes the corresponding message that failed to be processed, which is stored in the cache server.
Referring to fig. 4, when the message is successfully processed, the execution server queries whether the cache server stores the message, where the message is stored, which indicates that the previous processing of the message has failed, and deletes the corresponding message stored in the cache server that has failed in processing.
According to the message processing method, when the message processing fails, the message is stored in the cache server, the cache server is inquired to acquire the message which fails to process, the message server is informed of resending the message which fails to process, when the message which fails to process is reprocessed successfully, the corresponding message which fails to process and is stored in the cache server is deleted, the problem that the message is lost, the message is retransmitted to cause untimely message consumption, and the problem that the misoperation caused by the retransmitted message possibly causes the retransmission of the correct consumed message to cause the inconsistency of data between systems can be avoided.
In one embodiment, the execution server notifies the message server when the message processing fails or succeeds.
Referring to fig. 4:
FIG. 4, step one: when the execution server receives the message, the original message processing logic is executed first, and the processing result is obtained when the original message processing logic is executed.
FIG. 4, step two, branch one: if an error occurs in the message processing, acquiring the name of the current server, the subject of the current message and the unique identity (id) of the message from the current execution server, then splicing the name of the current server and the subject of the current message into a cache KEY point (KEY) to be inquired or stored in the cache server, acquiring the message from the cache server according to the spliced cache KEY, if the message is acquired, the message is stored, then the message is not stored, and then the step three is carried out, if the message is not acquired from the cache server, then the message is not stored, and then the current message and the current processing time are stored in the cache server by using the cache KEY spliced just before to finish the storage of the error processing message, thereby avoiding the loss.
FIG. 4, step two, branch two: if the message processing is normally completed, acquiring the name of the current server, the subject of the current message and the unique id of the message from the current execution server, then splicing the messages into a KEY to be inquired from the cache server, inquiring from the cache server by using the KEY, if the message is not acquired, indicating that the message is not processed and failed before, directly entering the step three, and if the message is acquired, indicating that the message is processed and failed before, deleting the KEY corresponding to the message and the content stored in the KEY from the cache server.
FIG. 4, step three: and informing the message server of the success or failure of message processing according to the execution result of the first step.
Referring to fig. 5:
FIG. 5, step one: when the retry coordination server is started, configuration information required by the operation of the corresponding retry coordination server is firstly obtained from a configuration file of the retry coordination server, for example, an error message of what execution server needs to be monitored, a name of the corresponding execution server needing to be monitored, and a name of a message subject needing to be monitored, time for resending the message if the message still fails after first consumption failure or message resending (generally, about one more minute is added to time for automatically entering archiving after the message is always processed and failed), and time configuration for how many time intervals for a timed retry coordination task in the message retry coordination server to operate once.
FIG. 5, step two: after the configuration is completed, the retry coordination server starts the timing task, and runs the timing retry coordination task according to the timing task interval obtained in the step one in fig. 5, for example, if the configuration time of the obtained timing task is 10 minutes, the timing task runs retry coordination once every 10 minutes. The flow of the third, fourth and fifth steps in fig. 5 is executed in each operation.
FIG. 5, step three: the names of the servers to be monitored, which are configured in the configuration file acquired in the step one in fig. 5, and the names of the message topics to be monitored under the corresponding service are spliced into corresponding cache prefixes KEY, and the cache prefixes KEY formed by splicing are gradually cached in the servers to acquire the data of the cache prefixes KEY one by one and are gradually handed to the step four in fig. 5 to be processed.
FIG. 5, step four: judging the data acquired from the third step of fig. 5 by the time (hereinafter referred to as retransmission configuration time) for retransmitting the message obtained in the first step of fig. 5 after the first consumption fails or the message is retransmitted if the message still fails for a long time, and if the message retransmission time is not empty, judging whether the interval between the current time and the message retransmission time exceeds the retransmission configuration time; if the message retransmission time is null, judging whether the interval between the first message processing failure time and the current time exceeds the retransmission configuration time. And if the current time exceeds the preset time, the step five in the figure 5 is carried out for processing, the message retransmission time in the data acquired from the cache server is set as the current time and is stored in the cache server, and if the current time does not exceed the preset time, the step is finished.
Fig. 5, step five: and informing the message server of the message which conforms to the fourth step in the figure 5 to resend the message.
Messages are dependent on the subject of the message, which is the set of data sent under the subject of the message that is passed between software systems.
A message topic is a classification of a message that indicates which type of message belongs to.
The cache KEY is a character string formed by splicing according to a certain rule. Most of the data stored in the cache servers are in one-to-one correspondence, one data KEY corresponds to one data content, and the corresponding data can be retrieved from the cache servers through the corresponding cache KEYs.
Because the cache KEY is a character string spliced according to a certain rule, the general prefixes of one type of cache KEY are the same, and the data of the KEY in the cache server conforming to the corresponding prefix can be acquired through the cache prefix KEY.
Fig. 6 schematically shows a block diagram of a processing device of a message according to an embodiment of the present disclosure. The message processing apparatus 600 provided in the embodiment of the present disclosure may be disposed on a terminal device, a server, or a part of the terminal device and a part of the server, for example, the server 105 in fig. 1, but the present disclosure is not limited thereto.
The message processing device 600 provided by the embodiment of the present disclosure may include a storage module 610, a query module 620, a notification module 630, and a deletion module 640.
The storage module is configured to store the message into the cache server when the message processing fails;
the query module is configured to query the cache server to acquire the message with processing failure;
a notification module configured to notify a message server to resend the message for which processing failed;
and the deleting module is configured to delete the corresponding processing-failed message stored in the cache server when the processing-failed message is successfully reprocessed.
According to the embodiment of the present disclosure, the processing device 600 of the message may be used to implement the processing method of the message described in the embodiment of fig. 3.
Fig. 7 schematically shows a block diagram of a device 700 for processing messages according to another embodiment of the invention.
As shown in fig. 7, the device 700 for processing the message further includes a display module 710 in addition to the storage module 610, the query module 620, the notification module 630, and the deletion module 640 described in the embodiment of fig. 6.
Specifically, the display module 710 is configured to display a processing result of the message.
In the message processing apparatus 700, the display module 710 can perform visual display of the processing result of the message.
Fig. 8 schematically shows a block diagram of a device 800 for processing messages according to another embodiment of the invention.
As shown in fig. 8, the apparatus 800 for processing a message includes a data module 810 in addition to the storage module 610, the query module 620, the notification module 630, and the deletion module 640 described in the embodiment of fig. 6.
In particular, the data module 810 is configured to store various items of data called during message processing in a database for repeated querying and checking.
It is understood that the storage module 610, the query module 620, the notification module 630, the deletion module 640, the display module 710, and the data module 810 may be combined into one module for implementation, or any one of them may be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of the other modules and implemented in one module. According to an embodiment of the present invention, at least one of the storage module 610, the query module 620, the notification module 630, the deletion module 640, the display module 710, and the data module 810 may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or any other reasonable manner of integrating or packaging a circuit, or as a suitable combination of software, hardware, and firmware implementations. Alternatively, at least one of the storage module 610, the query module 620, the notification module 630, the deletion module 640, the display module 710, and the data module 810 may be at least partially implemented as a computer program module that, when executed by a computer, may perform the functions of the respective modules.
For details that are not disclosed in the embodiments of the apparatus of the present invention, reference is made to the above-described embodiments of the method for processing a message of the present invention for details that are not disclosed in the embodiments of the apparatus of the present invention, since various modules of the apparatus for processing a message of the exemplary embodiments of the present invention may be used to implement the steps of the above-described exemplary embodiments of the method for processing a message described in fig. 3.
The specific implementation of each module, unit and sub-unit in the message processing apparatus provided in the embodiments of the present disclosure may refer to the content in the message processing method, and is not described herein again.
It should be noted that although several modules, units and sub-units of the apparatus for action execution are mentioned in the above detailed description, such division is not mandatory. Indeed, the features and functionality of two or more modules, units and sub-units described above may be embodied in one module, unit and sub-unit, in accordance with embodiments of the present disclosure. Conversely, the features and functions of one module, unit and sub-unit described above may be further divided into embodiments by a plurality of modules, units and sub-units.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (11)

1. A method for processing a message, comprising:
when the message processing fails, storing the message into a cache server;
querying the cache server to obtain the message with processing failure;
notifying a message server to resend the message with processing failure;
and when the message which fails to be processed is successfully reprocessed, deleting the corresponding message which fails to be processed and is stored in the cache server.
2. The method of claim 1, wherein storing the message to a cache server upon a message processing failure comprises:
when the message processing fails, inquiring the message with failed processing in the cache server;
if the message with processing failure is inquired, the message with processing failure is not stored;
and if the message with processing failure is not inquired, storing the message with processing failure.
3. The method of claim 1, wherein storing the message to a cache server upon a message processing failure comprises:
when the message processing fails, storing the cache key points of the message into the cache server;
wherein the cache key point comprises a server name for processing the message, a subject of the message and an identity of the message.
4. The method of claim 1, wherein querying the cache server for the message that failed processing comprises:
querying the cache server at a specific time interval to obtain the message with processing failure.
5. The method of claim 1, wherein querying the cache server for the message that failed processing comprises:
querying the cache server with a cache key point prefix to obtain the message with processing failure;
wherein the caching key point prefix includes a server name for processing the message, a subject of the message.
6. The method of claim 1, wherein notifying a message server of the retransmission of the message that failed processing comprises:
when the message is not retransmitted and the interval from the message transmission failure time to the current time is greater than a specific time, notifying a message server to retransmit the message which is failed in processing;
and when the message is retransmitted and the interval from the latest retransmission time of the message to the current time is more than a specific time, informing a message server of retransmitting the message with failed processing.
7. The method of claim 1, wherein notifying a message server of the retransmission of the message that failed processing comprises:
notifying a message server of the resending of the message for which the processing failed and storing the time of the resending of the message in the cache server.
8. The method of claim 1, further comprising:
and when the message processing fails or succeeds, notifying the message server.
9. An apparatus for processing a message, comprising:
the storage module is configured to store the message into the cache server when the message processing fails;
the query module is configured to query the cache server to acquire the message with processing failure;
a notification module configured to notify a message server to resend the message for which processing failed;
and the deleting module is configured to delete the corresponding processing-failed message stored in the cache server when the processing-failed message is successfully reprocessed.
10. An electronic device, comprising:
one or more processors;
a storage device configured to store one or more programs that, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1-8.
11. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 8.
CN202110128771.9A 2021-01-29 2021-01-29 Message processing method and related equipment Pending CN113794744A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110128771.9A CN113794744A (en) 2021-01-29 2021-01-29 Message processing method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110128771.9A CN113794744A (en) 2021-01-29 2021-01-29 Message processing method and related equipment

Publications (1)

Publication Number Publication Date
CN113794744A true CN113794744A (en) 2021-12-14

Family

ID=78876880

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110128771.9A Pending CN113794744A (en) 2021-01-29 2021-01-29 Message processing method and related equipment

Country Status (1)

Country Link
CN (1) CN113794744A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107908494A (en) * 2017-11-10 2018-04-13 泰康保险集团股份有限公司 Processing method, device, electronic equipment and the storage medium of anomalous event
CN108965164A (en) * 2017-05-17 2018-12-07 北京京东尚科信息技术有限公司 Service request repeating method, device and readable storage medium storing program for executing based on message queue
CN109120713A (en) * 2018-09-21 2019-01-01 中国建设银行股份有限公司 Message sends the processing method and system, device and storage medium of failure
CN109474688A (en) * 2018-11-27 2019-03-15 北京微播视界科技有限公司 Sending method, device, equipment and the medium of instant messaging network request message
CN110062340A (en) * 2019-04-11 2019-07-26 Oppo广东移动通信有限公司 Instant message sending method and device, storage medium, communication terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108965164A (en) * 2017-05-17 2018-12-07 北京京东尚科信息技术有限公司 Service request repeating method, device and readable storage medium storing program for executing based on message queue
CN107908494A (en) * 2017-11-10 2018-04-13 泰康保险集团股份有限公司 Processing method, device, electronic equipment and the storage medium of anomalous event
CN109120713A (en) * 2018-09-21 2019-01-01 中国建设银行股份有限公司 Message sends the processing method and system, device and storage medium of failure
CN109474688A (en) * 2018-11-27 2019-03-15 北京微播视界科技有限公司 Sending method, device, equipment and the medium of instant messaging network request message
CN110062340A (en) * 2019-04-11 2019-07-26 Oppo广东移动通信有限公司 Instant message sending method and device, storage medium, communication terminal

Similar Documents

Publication Publication Date Title
CN111274503B (en) Data processing method, device, electronic equipment and computer readable medium
CN112184367A (en) Order processing method and device
CN115757400B (en) Data table processing method, device, electronic equipment and computer readable medium
CN111352957A (en) Remote dictionary service optimization method and related equipment
CN112148705A (en) Data migration method and device
CN113794744A (en) Message processing method and related equipment
CN112073395B (en) File distribution method and device
CN114116675A (en) Data archiving method and device
CN112346661A (en) Data processing method and device and electronic equipment
CN113365231A (en) Method and device for sending short message
CN113779048A (en) Data processing method and device
CN112799863A (en) Method and apparatus for outputting information
CN112732728A (en) Data synchronization method and system
CN111008202A (en) Distributed transaction processing method and framework
CN111262776B (en) Method, device, electronic equipment and computer readable medium for sending notification message
CN113766437B (en) Short message sending method and device
CN112950380B (en) Block chain-based transaction consistency processing method and device
CN115988132B (en) Method and device for improving anonymous call rate through binding exchange manner
CN118035594B (en) Method, apparatus, electronic device and computer readable medium for accessing production document
CN111400322B (en) Method, apparatus, electronic device and medium for storing data
CN110262756B (en) Method and device for caching data
CN113065042A (en) Management method and device of terminal equipment
CN115705326A (en) Real-time data storage method and device and terminal equipment
CN115412538A (en) Network request information processing method, device, equipment and storage medium
CN114090139A (en) Page processing method and device, electronic equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination