CN114244899B - Message transmission method, device and readable storage medium - Google Patents

Message transmission method, device and readable storage medium Download PDF

Info

Publication number
CN114244899B
CN114244899B CN202111462448.1A CN202111462448A CN114244899B CN 114244899 B CN114244899 B CN 114244899B CN 202111462448 A CN202111462448 A CN 202111462448A CN 114244899 B CN114244899 B CN 114244899B
Authority
CN
China
Prior art keywords
message
original message
original
database
receiver
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.)
Active
Application number
CN202111462448.1A
Other languages
Chinese (zh)
Other versions
CN114244899A (en
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.)
Shanghai Weimeng Enterprise Development Co ltd
Original Assignee
Shanghai Weimeng Enterprise Development 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 Shanghai Weimeng Enterprise Development Co ltd filed Critical Shanghai Weimeng Enterprise Development Co ltd
Priority to CN202111462448.1A priority Critical patent/CN114244899B/en
Publication of CN114244899A publication Critical patent/CN114244899A/en
Application granted granted Critical
Publication of CN114244899B publication Critical patent/CN114244899B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The application discloses a message transmission method, a device and a readable storage medium, which relate to the field of electronic information, and are characterized in that a message sender is controlled to send an original message to an intermediate component, the intermediate component is then used to forward the original message to a message middleware, the original message is stored in a database, and a message receiver is judged whether the original message is received or not, if the original message is not received, the original message is sent to the message receiver through the database, and compared with the prior message middleware which is directly used for message transmission, even if the abnormal conditions such as message middleware faults and network fluctuation are met, the original message can be sent to the message receiver through the database, the loss or the circulation failure of the message is prevented, the storage capacity of the database is far greater than the data storage capacity of the message middleware, and when the service flow is large, the original message can be sent to the message receiver through the database, so that the accumulation of the original message in the message middleware is relieved, and the timely consumption of the message and the reliability of the message transmission are ensured.

Description

Message transmission method, device and readable storage medium
Technical Field
The present application relates to the field of electronic information, and in particular, to a message transmission method, device and readable storage medium.
Background
In recent years, with the rapid development of internet information technology, the information transmission technology is applied to the aspect of the network, especially in the part of internet shopping, and has very high requirements on smoothness and reliability of message circulation.
The existing internet information transmission technology generally transmits the information to the information middleware through the information sender and then forwards the information to the information receiver, so that no guarantee measures are provided, if abnormal conditions such as faults of the information middleware, network fluctuation and the like are met, the circulation of the information can be interrupted, the normal operation of a service line is influenced, the problems that the information is lost or the information circulation fails to cause incorrect feedback and the like are caused, the working efficiency of the information middleware is limited, and the problems that the information is accumulated and the like are also caused under the condition of large service flow.
In view of the foregoing, it would be desirable to find a message delivery method that improves the reliability of message delivery.
Disclosure of Invention
The application aims to provide a message transmission method so as to solve the problem of low message transmission reliability.
In order to solve the above technical problems, the present application provides a message transmission method, including:
the method comprises the steps that a control message sender sends an original message to an intermediate component, and the intermediate component forwards the original message to a message middleware so that the message middleware can send the original message to a message receiver and store the original message to a database;
judging whether the message receiver receives the original message or not;
if not, the original message in the database is sent to the message receiver.
Preferably, the determining whether the message receiver receives the original message includes:
judging whether a receiving success signal sent by the message receiver is received or not, wherein the receiving success signal is a feedback signal generated after the message receiver receives the original message;
If yes, characterizing that the message receiver receives the original message;
If not, characterizing that the message receiver does not receive the original message.
Preferably, the method further comprises:
When the original message is stored in the database, setting the state of the original message as a state to be confirmed;
After receiving the receiving success signal corresponding to the original message, changing the state of the original message from the state to be confirmed to the confirmed state;
And sending the original message in the to-be-confirmed state in the database to the message receiver at intervals of a first preset time.
Preferably, the method further comprises:
if the number of times of sending the original message in the to-be-confirmed state to the message receiver in the database reaches a threshold value, stopping sending the original message to the message receiver, and changing the state of the original message from the to-be-confirmed state to a confirmation failure state.
Preferably, the method further comprises:
and clearing all the original messages reaching a set time threshold in the database every second preset time.
Preferably, said storing said original message in a database comprises:
placing the original message into a thread pool and/or a buffer zone; storing the original message processed by the thread pool and/or the buffer into the database;
the receiving the successful signal sent by the message receiver includes:
Placing the successful receipt signal into the thread pool and/or the buffer;
Storing the successful receipt signals processed by the thread pool and/or the buffer into the database.
Preferably, the sending of the original message to the intermediate component by the control message sender, and forwarding the original message to the message middleware by the intermediate component, and storing the original message in the database include:
And controlling the message sender to send the original message to the intermediate component in an asynchronous mode, forwarding the original message to the message middleware by the intermediate component, and storing the original message to the database.
In order to solve the above problems, the present application also provides a message transmission apparatus, including:
The control module is used for controlling the message sender to send the original message to the intermediate component, and then the intermediate component forwards the original message to the message middleware so that the message middleware can send the original message to the message receiver and store the original message to the database;
the judging module is used for judging whether the message receiver receives the original message or not, and starting the sending module when the judging result is negative;
And the sending module is used for sending the original message in the database to the message receiver.
Preferably, the apparatus further comprises:
The setting module is used for setting the state of the original message to be a state to be confirmed when the original message is stored in the database;
The modification module is used for changing the state of the original message from the state to be confirmed to the confirmed state after receiving the receiving success signal corresponding to the original message;
And the period sending module is used for sending the original message in the to-be-confirmed state in the database to the message receiver at intervals of a first preset time.
Preferably, the apparatus further comprises:
and the stopping module is used for stopping sending the original message to the message receiver if the number of times of sending the original message in the state to be confirmed in the database to the message receiver reaches a threshold value, and changing the state of the original message from the state to be confirmed to a confirmation failure state.
Preferably, the apparatus further comprises:
and the clearing module is used for clearing all the original messages reaching a set time threshold in the database every second preset time.
To solve the above problems, the present application also provides a message passing device including a memory for storing a computer program;
A processor for implementing the steps of the messaging method as described above when executing the computer program.
To solve the above-mentioned problems, the present application also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the message passing method as described above.
According to the message transmission method provided by the application, the original message is transmitted to the intermediate component by the control message sender, then the original message is forwarded to the message middleware by the intermediate component, the original message is stored in the database, and if the original message is not received by the message receiver, the original message is transmitted to the message receiver by the database, compared with the prior art that the message middleware is directly used for message transmission, even if the abnormal conditions such as message middleware faults and network fluctuation are met, the original message can be transmitted to the message receiver by the database, the loss or the circulation failure of the message is prevented, the storage capacity of the database is far greater than the data storage capacity of the message middleware, and when the service flow is large, the original message can be transmitted to the message receiver by the database, so that the accumulation of the original message is relieved, and the reliability of the message transmission is ensured.
The message transfer device and the readable storage medium provided by the application correspond to the method, and have the same beneficial effects.
Drawings
For a clearer description of embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described, it being apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to the drawings without inventive effort for those skilled in the art.
FIG. 1 is a flow chart of a message passing method according to an embodiment of the present application;
FIG. 2 is a block diagram of a preferred messaging system provided in accordance with an embodiment of the present application;
FIG. 3 is a schematic diagram of a message passing device according to an embodiment of the present application;
fig. 4 is a block diagram of a message passing device according to another embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. Based on the embodiments of the present application, all other embodiments obtained by a person of ordinary skill in the art without making any inventive effort are within the scope of the present application.
The core of the application is to provide a message transmission method so as to solve the problem of low message transmission reliability.
In order to better understand the aspects of the present application, the present application will be described in further detail with reference to the accompanying drawings and detailed description.
Fig. 1 is a flowchart of a message passing method according to an embodiment of the present application, as shown in fig. 1, where the method includes:
S10: the control message sender sends the original message to the intermediate component, and then the intermediate component forwards the original message to the message middleware so that the message middleware can send the original message to the message receiver and store the original message to the database;
it should be noted that the intermediate component, i.e. the component newly proposed in the present application for use in a messaging system, includes a database and a control device.
In practical applications, the message sender generates the original message, the message receiver receives the original message, for example, in online shopping, whether the commodity is delivered is confirmed, and when the commodity needs to be confirmed by the user, the merchant is the message sender, and the buyer is the message receiver. It should be noted that, the original message may be sent by one message sender, or may be combined information sent by a plurality of message senders, or the original message may be sent to only one message receiver, or may be sent to a plurality of message receivers at the same time, and in consideration of the existence of a plurality of message senders and message receivers, the preferred solution performs information processing by providing one message sending interface and one message receiving interface, and the sending and receiving modes of the original message are not limited herein.
It should be noted that the message middleware is supporting software that provides synchronous or asynchronous, reliable message transmission for the application system in the network environment based on the queue and message passing technology. The message middleware utilizes an efficient and reliable message passing mechanism for platform-independent data communication and for distributed integration based on data communication. By providing a messaging and message queuing model, it can extend inter-process communication in a distributed environment. In the present embodiment, the specific type of the message middleware is not limited.
In this embodiment, the type of the database is not limited, but in consideration of various factors such as the operation speed and the cost, namely, the migration, it is generally preferable to use a MySQL database, which has the advantages of fast operation speed, low cost, simple operation and convenient migration. In this embodiment, the primary message may be sent to the message middleware and the primary message may be sent to the database synchronously or asynchronously, and the sending sequence is not limited.
S11: judging whether the message receiver receives the original message or not, if not, entering S12;
It should be noted that, in this embodiment, the method for determining whether the message receiver receives the original message is not limited, for example, the message sender may query the message receiver, or the message receiver may feedback the received message by itself, etc.
S12: the original message in the database is sent to the message recipient.
In this embodiment, the number of times of transmission, the transmission time, etc. of the original message in the database are not limited, and for example, the original message may be transmitted to the message receiver who does not receive the original message once at intervals until the message receiver is confirmed to receive the original message.
In practical application, the steps are all controlled by the control component, and the specific form, i.e. type, of the control component is not limited in this embodiment, and a distributed control system is generally preferred in consideration of practical application situations. In this embodiment, the message may be sent as a single message or in bulk, which is not limited herein.
According to the message transmission method provided by the embodiment, the message sender is controlled to send the original message to the message middleware, the original message is stored in the database, whether the original message is received by the message receiver or not is judged, if not, the original message is sent to the message receiver through the database, and compared with the prior method of directly using the message middleware to carry out message transmission, even if the message middleware is in fault, network fluctuation and other abnormal conditions are met, the original message can be sent to the message receiver through the database, the loss or the circulation failure of the message is prevented, the storage capacity of the database is far greater than the data storage capacity of the message middleware, and when the service flow is large, the original message can be sent to the message receiver through the database, so that the accumulation of the original message is relieved, and the reliability of the message transmission is ensured.
In the above embodiment, how to determine whether the message receiver receives the original message is not limited, and a preferred scheme is proposed herein, and determining whether the message receiver receives the original message includes:
Judging whether a receiving success signal sent by a message receiver is received or not, wherein the receiving success signal is a feedback signal generated after the message receiver receives an original message;
if yes, characterizing that the message receiver receives the original message;
if not, the character message receiver does not receive the original message.
It should be noted that, there are various ways to determine whether the reception success signal sent by the message receiver is received, for example, the preset time may be set, the reception success signal sent by the message receiver is not received within the preset time from the message sending by the message sender, that is, the reception success signal is not sent by the message receiver, or a total of A, B, C original messages are sequentially sent, and the reception success signals of a and C are received, that is, the reception success signal of B is not received.
In this embodiment, it is limited how to determine that the message receiver receives the original message, and by determining whether a reception success signal sent by the message receiver is received, the reception success signal is a feedback signal generated after the message receiver receives the original message, so that no other component is needed to confirm whether the message receiver receives the original message, but the accuracy of the information is ensured and the efficiency of information transmission is also ensured through feedback of the message receiver.
In view of the fact that there may be multiple original messages in the database at the same time, some of which are received by the message receivers and others of which are not, in order to accurately send the original messages that are not received by the message receivers, a preferred embodiment is proposed herein, the method further comprises:
When the original message is stored in the database, setting the state of the original message as a state to be confirmed;
after receiving a successful receiving signal corresponding to the original message, changing the state of the original message from the state to be confirmed to the confirmed state;
And sending the original message in the to-be-confirmed state in the database to a message receiver at intervals of a first preset time.
The state of the data may be set by attaching an identifier, or may be classified by a database, and here, the state of how to set the original message is not limited, the number of times the original message in the state to be confirmed is transmitted to the message receiving side is not limited, and the specific time of the first preset time is not limited.
In this embodiment, the status classification is performed on the original messages in the database, the original messages which are not determined are set to be in the to-be-confirmed status, the determined original messages are set to be in the to-be-confirmed status, and then the original messages to be confirmed are periodically sent to the message receiver.
In consideration of the problem of database resource utilization in practical application, a preferred scheme is provided in this embodiment, and the method further includes:
If the number of times of sending the original message in the to-be-confirmed state to the message receiver reaches a threshold value, stopping sending the original message to the message receiver, and changing the state of the original message from the to-be-confirmed state to the confirmation failure state.
In this embodiment, the number of times that the original message of the state to be confirmed is sent to the message receiver is provided with a threshold value, and the specific value of the threshold value is not limited. After the number of times of transmission reaches a threshold value, confirming that the original message fails to be transmitted, modifying the state into a confirmation failure state, and considering the timeliness of part of the messages, thereby avoiding meaningless transmission of the original message, for example, the order information is not confirmed for many times, and regarding that the order information fails to be confirmed.
In practical application, because the database capacity is limited and the existence value of the original message which is confirmed and failed to confirm is not high, a preferred scheme is provided, and the method further comprises:
and clearing the original message reaching the set time threshold in the database every second preset time.
In combination with the foregoing embodiments, fig. 2 is a diagram of a preferred message delivery system according to the embodiment of the present application, as shown in fig. 2, a message sender sends an original message to an intermediate component, then the intermediate component forwards the original message to a message middleware, and stores the original message in a database, and then a message receiver feeds back a receiving success signal to a control component to confirm whether the message receiver receives the original message, so that the control component periodically sends the original message to be confirmed to the message receiver from the database, and periodically cleans the original message up to a time threshold, i.e. the confirmed or failed confirmation.
It should be noted that, in this embodiment, the specific duration of the second preset time and the time threshold is not limited, and by removing all meaningless original messages reaching the set time threshold, considering that the old data also has a certain usability, the preferred scheme can build a database for recovering the old data to recover the original messages that have been confirmed and failed to confirm.
The proposal provided by the embodiment avoids the waste of the storage amount in the database and optimizes the storage amount of the original message to be confirmed in the whole database.
In the above embodiment, the manner of storing the original message in the database and acquiring the reception success signal is not limited, and a preferred solution is proposed herein, where storing the original message in the database includes:
placing the original message into a thread pool and/or a buffer zone;
Storing the original message processed by the thread pool and/or the buffer area into a database;
The receiving success signal sent by the receiving side of the receiving message comprises:
Placing the successful signal into a thread pool and/or a buffer zone;
The received success signal processed by the thread pool and/or the buffer is stored in a database.
The thread pool is a multi-thread processing form, tasks are added to a queue in the processing process, then the tasks are automatically started after the threads are created, a buffer is a memory for temporarily storing output or input data, in the embodiment, the number and specific processing modes of the thread pool and the buffer area are not limited, in consideration of the feasibility and optimization problem of programming, 3 thread pools and one buffer area are adopted in a preferred scheme, an original message or a received success signal is put into the buffer area for buffering through the first thread pool, then a part of data is pulled from the buffer area by the second thread pool, construction processing is carried out, then the data is stored in the third thread pool for data persistence processing, and then the original message is stored in a database or the state of the original data is transmitted and updated in batches.
In practical application, the data flow rate in the transaction service scene is relatively large, so that the throughput capacity of the system can be greatly improved by adopting the thread pool and the buffer area, and the system can smoothly process the service with relatively large flow rate.
In the above embodiments, the specific manner of sending the original message to the message middleware and storing the original message in the database by the message sender is not limited, and a preferred scheme is proposed herein, where controlling the message sender to send the original message to the middleware and forwarding the original message to the message middleware by the middleware so that the message middleware sends the original message to the message receiver and stores the original message in the database includes:
The message sender is controlled to send the original message to the intermediate component in an asynchronous mode, the intermediate component forwards the original message to the message middleware, and the original message is stored in the database.
It should be noted that, because the data reading requires time, when the two ports simultaneously read the data of the original message sent by the message sender during the synchronous processing, the performance of sending the message will be affected, and the data reading in this embodiment is asynchronous in the save and send operations, so that the performance of sending the message will not be affected.
In the above embodiments, the message transmission method is described in detail, and the application also provides a corresponding embodiment of the message transmission device. It should be noted that the present application describes an embodiment of the device portion from two angles, one based on the angle of the functional module and the other based on the angle of the hardware.
Fig. 3 is a schematic diagram of a message transfer apparatus according to an embodiment of the present application, as shown in fig. 3, where the apparatus includes:
The control module 10 is configured to control the message sender to send the original message to the intermediate component, and then the intermediate component forwards the original message to the message middleware, so that the message middleware sends the original message to the message receiver, and stores the original message in the database;
The judging module 11 is used for judging whether the message receiver receives the original message or not, and starting the sending module when the judging result is negative;
A sending module 12, configured to send the original message in the database to a message receiver.
Since the embodiments of the apparatus portion and the embodiments of the method portion correspond to each other, the embodiments of the apparatus portion are referred to the description of the embodiments of the method portion, and are not repeated herein.
Preferably, the apparatus further comprises:
the setting module is used for setting the state of the original message to be a state to be confirmed when the original message is stored in the database;
The modification module is used for changing the state of the original message from the state to be confirmed to the confirmed state after receiving a receiving success signal corresponding to the original message;
And the period sending module is used for sending the original message in the to-be-confirmed state in the database to the message receiver at intervals of a first preset time.
Preferably, the apparatus further comprises:
And the stopping module is used for stopping sending the original message to the message receiver if the number of times of sending the original message in the to-be-confirmed state to the message receiver in the database reaches a threshold value, and changing the state of the original message from the to-be-confirmed state to the confirmation failure state.
Preferably, the apparatus further comprises:
The clearing module is used for clearing all original messages reaching the set time threshold in the database every second preset time.
The message transmission device provided in this embodiment includes a control module 10, a judging module 11, and a transmitting module 12, where the control message sender sends the original message to the intermediate component, and then the intermediate component forwards the original message to the message middleware, and stores the original message in the database, and if the original message is not received, the database sends the original message to the message receiver, so that the message transmission device can send the original message to the message receiver through the database, even if the message middleware is in failure, network fluctuation, and other abnormal conditions, and prevent the loss or circulation failure of the message, and the storage capacity of the database is far greater than the data storage capacity of the message middleware, and when the traffic flow is large, the database sends the original message to the message receiver, so that the accumulation of the original message is alleviated, and the reliability of the message transmission is ensured.
Fig. 4 is a block diagram of a message transmission device according to another embodiment of the present application, and as shown in fig. 4, the message transmission device includes: a memory 20 for storing a computer program;
A processor 21 for implementing the steps of the messaging method as mentioned in the above embodiments when executing a computer program.
The message transmitting device provided in this embodiment may include, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, or the like.
Processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 may be implemented in at least one hardware form of DSP (DIGITAL SIGNAL Processing), FPGA (Field-Programmable gate array), PLA (Programmable Logic Array ). The processor 21 may also include a main processor, which is a processor for processing data in an awake state, also called a CPU (Central Processing Unit ), and a coprocessor; a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 21 may integrate a GPU (Graphics Processing Unit, image processor) for rendering and drawing of content required to be displayed by the display screen. In some embodiments, the processor 21 may also include an AI (ARTIFICIAL INTELLIGENCE ) processor for processing computing operations related to machine learning.
Memory 20 may include one or more computer-readable storage media, which may be non-transitory. Memory 20 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In this embodiment, the memory 20 is at least used for storing a computer program 201, which, when loaded and executed by the processor 21, is capable of implementing the relevant steps of the message passing method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 20 may further include an operating system 202, data 203, and the like, where the storage manner may be transient storage or permanent storage. Operating system 202 may include Windows, unix, linux, among other things. Data 203 may include, but is not limited to, data involved in a messaging method, and the like.
In some embodiments, the message passing device may further include a display 22, an input/output interface 23, a communication interface 24, a power supply 25, and a communication bus 26.
Those skilled in the art will appreciate that the configuration shown in fig. 4 is not limiting of the message delivery device and may include more or fewer components than shown.
The message transfer device provided by the embodiment of the application comprises a memory and a processor, wherein the processor can realize the following method when executing a program stored in the memory: the messaging method mentioned in the above embodiment.
Because the embodiment of the message transmission device corresponds to the above-mentioned method embodiment, the beneficial effects are the same and will not be described in detail herein.
Finally, the application also provides a corresponding embodiment of the computer readable storage medium. The computer-readable storage medium has stored thereon a computer program which, when executed by a processor, performs the steps as described in the method embodiments above.
It will be appreciated that the methods of the above embodiments, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored on a computer readable storage medium. Based on this understanding, the technical solution of the present application may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium for performing all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RandomAccess Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The above describes in detail a message passing method, device and readable storage medium provided by the present application. In the description, each embodiment is described in a progressive manner, and each embodiment is mainly described by the differences from other embodiments, so that the same similar parts among the embodiments are mutually referred. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section. It should be noted that it will be apparent to those skilled in the art that various modifications and adaptations of the application can be made without departing from the principles of the application and these modifications and adaptations are intended to be within the scope of the application as defined in the following claims.
It should also be noted that in this specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.

Claims (10)

1. A messaging method for use in a messaging system including an intermediary component, the method comprising:
The method comprises the steps that a control message sender sends an original message to an intermediate component, and the intermediate component forwards the original message to a message middleware so that the message middleware can send the original message to a message receiver and store the original message to a database;
judging whether the message receiver receives the original message or not;
if not, the original message in the database is sent to the message receiver;
Wherein the intermediate component is a component comprising the database and a control device;
The step of judging whether the message receiver receives the original message or not, if not, the step of sending the original message in the database to the message receiver comprises the following steps: after detecting that the original message is not received by the message receiver, reissuing by the database; specifically, the original message is sent once to the message receiver which does not receive the original message at intervals until the message receiver is confirmed to receive the original message.
2. The method of messaging according to claim 1, wherein said determining whether the message recipient received the original message comprises:
judging whether a receiving success signal sent by the message receiver is received or not, wherein the receiving success signal is a feedback signal generated after the message receiver receives the original message;
If yes, characterizing that the message receiver receives the original message;
If not, characterizing that the message receiver does not receive the original message.
3. The messaging method of claim 2, further comprising:
When the original message is stored in the database, setting the state of the original message as a state to be confirmed;
After receiving the receiving success signal corresponding to the original message, changing the state of the original message from the state to be confirmed to the confirmed state;
And sending the original message in the to-be-confirmed state in the database to the message receiver at intervals of a first preset time.
4. A messaging method according to claim 3, further comprising:
if the number of times of sending the original message in the to-be-confirmed state to the message receiver in the database reaches a threshold value, stopping sending the original message to the message receiver, and changing the state of the original message from the to-be-confirmed state to a confirmation failure state.
5. The messaging method of claim 4, further comprising:
and clearing all the original messages reaching a set time threshold in the database every second preset time.
6. The messaging method of any of claims 2 to 5, wherein storing the original message in a database comprises:
Placing the original message into a thread pool and/or a buffer zone;
storing the original message processed by the thread pool and/or the buffer into the database;
the receiving the successful signal sent by the message receiver includes:
Placing the successful receipt signal into the thread pool and/or the buffer;
Storing the successful receipt signals processed by the thread pool and/or the buffer into the database.
7. The messaging method of any of claims 1 to 5, wherein the controlling the sender of the message to send the original message to the intermediary component, and wherein forwarding the original message to the message intermediary by the intermediary component to facilitate the message intermediary to send the original message to the message recipient and storing the original message in the database comprises:
and controlling the message sender to send the original message to an intermediate component in an asynchronous mode, forwarding the original message to the message middleware by the intermediate component, and storing the original message to the database.
8. A messaging device, comprising:
The control module is used for controlling a message sender to send the original message to an intermediate component, and then the intermediate component forwards the original message to a message middleware so that the message middleware can send the original message to a message receiver, and the intermediate component stores the original message to a database;
the judging module is used for judging whether the message receiver receives the original message or not, and starting the sending module when the judging result is negative;
the sending module is used for sending the original message in the database to the message receiver;
Wherein the intermediate component is a component comprising the database and a control device;
The step of judging whether the message receiver receives the original message or not, if not, the step of sending the original message in the database to the message receiver comprises the following steps: after detecting that the original message is not received by the message receiver, reissuing by the database; specifically, the original message is sent once to the message receiver which does not receive the original message at intervals until the message receiver is confirmed to receive the original message.
9. A messaging appliance comprising a memory for storing a computer program;
Processor for implementing the steps of the messaging method according to any of claims 1 to 7 when said computer program is executed.
10. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the message passing method according to any of claims 1 to 7.
CN202111462448.1A 2021-12-02 2021-12-02 Message transmission method, device and readable storage medium Active CN114244899B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111462448.1A CN114244899B (en) 2021-12-02 2021-12-02 Message transmission method, device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111462448.1A CN114244899B (en) 2021-12-02 2021-12-02 Message transmission method, device and readable storage medium

Publications (2)

Publication Number Publication Date
CN114244899A CN114244899A (en) 2022-03-25
CN114244899B true CN114244899B (en) 2024-05-17

Family

ID=80752824

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111462448.1A Active CN114244899B (en) 2021-12-02 2021-12-02 Message transmission method, device and readable storage medium

Country Status (1)

Country Link
CN (1) CN114244899B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104731912A (en) * 2015-03-24 2015-06-24 浪潮集团有限公司 Message transmission method and device for message middleware MQ
CN105871959A (en) * 2015-01-22 2016-08-17 阿里巴巴集团控股有限公司 Message delivery method, system and device
CN107592215A (en) * 2017-08-31 2018-01-16 郑州云海信息技术有限公司 A kind of method for managing message-oriented middleware
CN107870982A (en) * 2017-10-02 2018-04-03 深圳前海微众银行股份有限公司 Data processing method, system and computer-readable recording medium
CN108009027A (en) * 2017-11-23 2018-05-08 北京百度网讯科技有限公司 Implementation method, device, equipment and the storage medium of queue message uniformity
CN109451032A (en) * 2018-11-20 2019-03-08 上海联寓智能科技有限公司 A kind of messaging system
CN111049729A (en) * 2019-11-29 2020-04-21 苏州浪潮智能科技有限公司 Persistent message transmission method and device
CN111127088A (en) * 2019-12-17 2020-05-08 深圳前海环融联易信息科技服务有限公司 Method, device, computer equipment and storage medium for realizing final consistency
CN111666162A (en) * 2020-04-30 2020-09-15 平安科技(深圳)有限公司 Distributed message transmission method, device, computer equipment and storage medium
CN112702371A (en) * 2019-10-22 2021-04-23 深圳市茁壮网络股份有限公司 Message sending method and device and intelligent terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8626778B2 (en) * 2010-07-23 2014-01-07 Oracle International Corporation System and method for conversion of JMS message data into database transactions for application to multiple heterogeneous databases

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105871959A (en) * 2015-01-22 2016-08-17 阿里巴巴集团控股有限公司 Message delivery method, system and device
CN104731912A (en) * 2015-03-24 2015-06-24 浪潮集团有限公司 Message transmission method and device for message middleware MQ
CN107592215A (en) * 2017-08-31 2018-01-16 郑州云海信息技术有限公司 A kind of method for managing message-oriented middleware
CN107870982A (en) * 2017-10-02 2018-04-03 深圳前海微众银行股份有限公司 Data processing method, system and computer-readable recording medium
CN108009027A (en) * 2017-11-23 2018-05-08 北京百度网讯科技有限公司 Implementation method, device, equipment and the storage medium of queue message uniformity
CN109451032A (en) * 2018-11-20 2019-03-08 上海联寓智能科技有限公司 A kind of messaging system
CN112702371A (en) * 2019-10-22 2021-04-23 深圳市茁壮网络股份有限公司 Message sending method and device and intelligent terminal
CN111049729A (en) * 2019-11-29 2020-04-21 苏州浪潮智能科技有限公司 Persistent message transmission method and device
CN111127088A (en) * 2019-12-17 2020-05-08 深圳前海环融联易信息科技服务有限公司 Method, device, computer equipment and storage medium for realizing final consistency
CN111666162A (en) * 2020-04-30 2020-09-15 平安科技(深圳)有限公司 Distributed message transmission method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN114244899A (en) 2022-03-25

Similar Documents

Publication Publication Date Title
US9832275B2 (en) Message processing method, device and system for internet of things
US10417062B2 (en) Method and apparatus of unloading out of memory processing flow to user space
US20100318663A1 (en) Optimizing mobile device synchronization with multiple data sources
CN108008950B (en) Method and device for realizing user interface updating
CN101567903A (en) Method for uploading file and system based on Ajax technology
CN113703954A (en) Message backup method and device, electronic equipment and computer storage medium
CN114095438A (en) Data transmission method, device, equipment, storage medium and computer program product
CN112291325A (en) Message processing method and device and computer system
CN114244899B (en) Message transmission method, device and readable storage medium
US20160294926A1 (en) Using a single work item to send multiple messages
CN113254274A (en) Message processing method, device, storage medium and server
CN107241788A (en) The power consumption control method and device of wearable device
CN114567536B (en) Abnormal data processing method, device, electronic equipment and storage medium
EP2908277A1 (en) Device, method and non-transitory computer readable storage medium for performing instant message communication
US20060294188A1 (en) Providing status information about email recipients
CN107729136B (en) Processing priority configuration method and device based on FPGA
CN114301857A (en) Water meter communication method and device based on Internet of things
CN114884906A (en) Failure retry notification method and device based on quick recovery
CN104956328B (en) One kind can reentry resource regulating method, equipment and system
CN114168367A (en) Method and system for solving queue backlog through batch tasks
JP2010049314A (en) Task scheduling device and task scheduling method
CN110865891A (en) Asynchronous message arranging method and device
CN117290074B (en) Method, device, equipment and medium for setting process in vehicle type configuration
CN116996450B (en) Management data processing method, device and system
CN115150348B (en) Mail attachment restoring method and system

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
GR01 Patent grant
GR01 Patent grant