CN110968439B - Intersystem message notification method, device, server, system and storage medium - Google Patents

Intersystem message notification method, device, server, system and storage medium Download PDF

Info

Publication number
CN110968439B
CN110968439B CN201911216687.1A CN201911216687A CN110968439B CN 110968439 B CN110968439 B CN 110968439B CN 201911216687 A CN201911216687 A CN 201911216687A CN 110968439 B CN110968439 B CN 110968439B
Authority
CN
China
Prior art keywords
message
source
subscriber
sent
rule
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
CN201911216687.1A
Other languages
Chinese (zh)
Other versions
CN110968439A (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.)
Bee Assistant Co ltd
Original Assignee
Bee Assistant 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 Bee Assistant Co ltd filed Critical Bee Assistant Co ltd
Priority to CN201911216687.1A priority Critical patent/CN110968439B/en
Publication of CN110968439A publication Critical patent/CN110968439A/en
Application granted granted Critical
Publication of CN110968439B publication Critical patent/CN110968439B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/548Queue

Abstract

The invention discloses a method, a device, a server, a system and a computer storage medium for message notification among systems, which comprises the following steps: receiving a plurality of source messages after the source message receiver sends message consumption by the message queue; the source message receiver receives source messages sent by a plurality of source message systems by adopting a dubbo technology; after the consumed source messages are processed by the universal rule engine, the consumed source messages meeting the judgment of the strategy conditions are spliced according to the subscription parameters of the subscriber so as to be spliced into a message body to be sent; and sending the message body to be sent to the source message sender so that the source message sender sends the message body to be sent to a corresponding subscriber according to the address specified by the subscriber, thereby being capable of customizing various service rate measurement rules, realizing the service requirements of each party, optimizing the processing rate of the whole system, enabling the whole system to have higher performance and greatly reducing the performance pressure of the subscriber system.

Description

Intersystem message notification method, device, server, system and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a server, a system, and a storage medium for inter-system message notification
Background
The problem that notification among systems lacks a service policy rule routing configuration function is solved. In the prior art, messages are generally generated through a system memory queue for consuming and sending notifications, and once a new subscription exists, a new message processing notification interface is developed by a developer and then sent to a subscriber, or messages are forwarded to the subscriber through an mq component queue.
The above implementation has the following disadvantages:
1. when a system using a memory queue for message consumption is shutdown and upgraded, a large amount of source messages are stored in a memory to wait for being consumed, at this time, the system must wait for the complete consumption of the messages and then can perform project packaging and upgrading, otherwise, the source messages may be lost, thus unpredictable loss is caused, the waiting time depends on the number of the source messages, the waiting time is longer when the number is larger, and the system upgrading and maintenance are very inconvenient.
2. Under most conditions, the services of the subscribers are the same and different, the messages are received and then sent to the subscribers, but the system multiplexing cannot be realized by using the prior art scheme, and when a new subscriber accesses the source message system, manpower and material resources are required to be invested to develop the retransmission receiving and notification message interfaces, interface codes are repeatedly developed, and a large amount of manpower and material resources are wasted.
3. The existing mq components only transparently transmit and forward source messages, and do not customize any business rule strategy, so that a subscriber needs to spend a great deal of effort to perform business rule processing on the messages, on one hand, extra development workload is brought to a subscription and release system, and on the other hand, all useless source messages are notified to the subscriber, and performance pressure is brought to the subscriber system, and even serious consequences are caused.
4. The failure message can not be self-defined, the consumption message using the memory queue is unidirectional, and once the message is failed to be sent, the message is lost, and the daemon cannot be used for sending the message for multiple times. Can leave subscribers with a sense of trust in our notification system.
Disclosure of Invention
In view of the above problems, an object of the present invention is to provide a method, an apparatus, a server, a system and a storage medium for notifying messages between systems, which can customize various business rate measurement rules, meet the business requirements of each party, optimize the processing rate of the whole system, and greatly reduce the performance pressure of the system of the subscriber if the whole system becomes higher in performance.
The embodiment of the invention provides a method for notifying messages between systems, which comprises the following steps:
receiving a plurality of source messages after the source message receiver sends message consumption by the message queue; the source message receiver receives source messages sent by a plurality of source message systems by adopting a dubbo technology;
after the consumed source messages are processed by a general rule engine, the consumed source messages meeting the judgment of strategy conditions are spliced according to subscription parameters of a subscriber so as to be spliced into a message body to be sent;
and sending the message body to be sent to the source message sender so that the source message sender sends the message body to be sent to a corresponding subscriber according to the address specified by the subscriber.
Preferably, after the source message is processed by the general rule engine, the consumed source message meeting the policy condition judgment is assembled according to the subscription parameters of the subscriber, so as to assemble a message body to be sent, specifically:
when the consumed source message is judged to hit the subscription rule and the effective period of the subscription rule, whether the consumed source message hits a pre-customized service strategy rule or not is continuously judged; the business strategy rule is a strategy condition parameter appointed by the subscriber;
and when judging that the corresponding condition parameter values of the consumed source messages hit the service strategy rules, assembling the consumed source messages according to the subscription parameters of the subscriber so as to assemble a message body to be sent.
Preferably, the method further comprises the following steps:
and sending the source message data record to a source message warehousing party so that the source message warehousing party generates the source message data record into an sql statement to execute database insertion operation to store the source message.
Preferably, the method further comprises the following steps: and carrying out signature encryption on the assembled message body to be sent.
Preferably, the method further comprises the following steps:
and when receiving failure of sending the message body to be sent to the subscriber, which is fed back by the source message sender, starting a corresponding daemon mechanism according to the subscription rule of the message body to be sent, so that the message body to be sent is sent to the subscriber again when the daemon time set by the subscriber is reached.
An embodiment of the present invention further provides an inter-system message notification apparatus, including:
a source message receiving unit, configured to receive a plurality of source messages that are sent by a source message receiver and are subjected to message consumption by a message queue; the source message receiver receives source messages sent by a plurality of source message systems by adopting a dubbo technology;
the message body assembling unit is used for assembling the consumed source messages meeting the strategy condition judgment according to the subscription parameters of the subscriber after the consumed source messages are processed by the universal rule engine so as to assemble the message body to be sent;
and the to-be-sent message body sending unit is used for sending the to-be-sent message body to the source message sender so that the source message sender sends the to-be-sent message body to a corresponding subscriber according to an address specified by the subscriber.
Preferably, the assembly unit for a message body to be sent specifically includes:
the first judgment module is used for continuously judging whether the consumed source message hits a pre-customized service strategy rule or not when judging that the consumed source message hits a subscription rule and the subscription rule is in an effective period; the business strategy rule is a strategy condition parameter appointed by the subscriber;
and the second judging module is used for splicing the consumed source messages according to the subscription parameters of the subscriber to form a message body to be sent when judging that the corresponding condition parameter values of the consumed source messages hit the service strategy rules.
Preferably, the method further comprises the following steps:
and sending the source message data record to a source message warehousing party so that the source message warehousing party generates the source message data record into an sql statement to execute database insertion operation to store the source message.
Preferably, the method further comprises the following steps: and carrying out signature encryption on the assembled message body to be sent.
Preferably, the method further comprises the following steps:
and when receiving failure of sending the message body to be sent to the subscriber, which is fed back by the source message sender, starting a corresponding daemon mechanism according to the subscription rule of the message body to be sent, so that the message body to be sent is sent to the subscriber again when the daemon time set by the subscriber is reached.
The embodiment of the present invention further includes a source message processing server, which includes a memory and a processor, where the memory stores executable codes, and the executable codes can be executed by the processor, so as to implement the inter-system message notification method according to the above embodiment.
The embodiment of the invention also provides an intersystem message notification system, which comprises a source message transmitter, a source message receiver and the source message processing server in the embodiment; wherein the content of the first and second substances,
the source message receiver is used for receiving source messages sent by a plurality of source message systems by adopting a dubbo technology, assembling the source messages into a message queue required by a message middleware, consuming the message queue and sending the message queue to the source message processing server;
the source message processing server is used for receiving a plurality of source messages which are sent by the source message receiver and are subjected to message consumption by the message queue, processing the consumed source messages by the universal rule engine,will satisfy the policy condition judgment The consumed source messages are assembled according to subscription parameters of a subscriber so as to assemble a message body to be sent; treat the hair Sending the message body to the source message sendingConveying device
And the source message transmitter is used for transmitting the message body to be transmitted to the corresponding subscriber according to the address specified by the subscriber.
Preferably, the method further comprises the following steps: a source message storage person and a configuration management background; wherein the content of the first and second substances,
the source message processing server is also used for sending the source message data record to a source message storage person;
the source message warehousing device is used for generating an sql statement by the source message data record to execute database insertion operation so as to store the source message;
and the configuration management background is used for newly adding a subscriber, formulating a subscription rule strategy and managing configuration information of a subscription message body.
An embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium includes a stored computer program, where when the computer program runs, a device in which the computer-readable storage medium is located is controlled to execute the inter-system message notification method according to the above embodiment.
In the above embodiment, the source message receiver of the present invention receives source messages sent by multiple source message systems by using a dubbo technology, performs message consumption on a message queue to obtain multiple source messages, processes the multiple source messages by using a rule engine, and assembles the consumed source messages meeting policy condition judgment according to subscription parameters of a subscriber to assemble a message body to be sent; and then sending the message body to be sent to the source message sender so that the source message sender sends the message body to be sent to a corresponding subscriber according to the address specified by the subscriber. The method not only can reduce the coupling among systems, reduce the load of the server and improve the throughput of the system, but also can reduce the code development amount of the access system and quickly, conveniently and efficiently access the whole system. Meanwhile, various business rate measurement rules can be customized, the business requirements of all parties are met, the processing rate of the whole system is optimized, the whole system is enabled to be higher in performance, and the performance pressure of a subscriber system is greatly reduced.
Drawings
In order to more clearly illustrate the technical solution of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a block diagram of an intersystem message notification system according to a first embodiment of the present invention.
FIG. 2 is a schematic workflow diagram of a generic daemon engine according to an embodiment of the present invention.
Fig. 3 is a schematic flow chart of a work flow for providing a delay queue according to an embodiment of the present invention.
Fig. 4 is a flowchart illustrating an intersystem message notification method according to a second embodiment of the present invention.
Fig. 5 is a block diagram of an inter-system message notification apparatus according to a third embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1 to 4, a first embodiment of the present invention provides an intersystem message notification system, including: a source message transmitter 3, a source message receiver 1 and a source message processing server 2; wherein the content of the first and second substances,
the source message receiver 1 is configured to receive source messages sent by multiple source message systems by using a dubbo technology, assemble the source messages into a message queue required by a message middleware, consume the message queue, and send the consumed message queue to the source message processing server 2.
The source message processing server 2 is configured to receive a plurality of source messages sent by the source message receiver 1 and subjected to message consumption by the message queue, process the consumed source messages by the general rule engine, and assemble the consumed source messages meeting policy condition judgment according to subscription parameters of a subscriber to assemble a message body to be sent; and sending the message body to be sent to the source message sender 3.
And the source message transmitter 3 is configured to send the message body to be sent to the corresponding subscriber according to the address specified by the subscriber.
In this embodiment, because the technical solution of the memory queue may cause the message notification system to spend a lot of time waiting for the system consumer to consume the message buffered in the memory queue when the message notification system is upgraded in the later maintenance, otherwise the message may be lost, which may cause the upgrade of the message notification system to be very inconvenient, the source message receiver 1 may interface the system generating the source message by using the dubbo + mq technology, immediately throw the source message into the corresponding mq queue after the source message receiver 1 receives the message by using the dubbo technology, there is no any complex business logic processing, and because the receiving rate and the feedback message rate of the dubbo + mq are fast, it may satisfy the million-level data second receiving, and it is very convenient and simple for accessing the message notification system, only needs to access the corresponding dubbo service of us, it will not affect the operation performance of the source message system, and will not affect the later upgrade maintenance of the source message system, and it is understood that, for each different source message system, a respective unique source message queue is allocated, such as: the order system source message queue, the marketing system source message queue, the user center source message queue and the like can avoid influencing the receiving and sending of other system source messages when the source message volume of one system is very large, so that the source messages are not mutually influenced.
In this embodiment, because the existing technical solution generally consumes the message through the mq or the memory queue and notifies the message to the subscriber, but generally only the source message is forwarded to the subscriber intact, and no processing of its own service is performed before that, or a code interface needs to be developed manually to process its own service, so that the subscriber receives many useless messages, the performance of the receiving system of the subscriber becomes very poor in the case of a large amount of source messages, and even in a more serious case, there is a possibility of collapsing the system of the subscriber. Therefore, the invention provides a set of complete functions for formulating service policy rules for subscribers, firstly, the sender provides all message parameter structures for subscribers, the message parameter structures comprise fixed and subscription-required message parameters, the subscribers can subscribe the required message parameters according to their own needs, finally, when the source message processing server 2 assembles the messages, other messages are assembled according to the parameters subscribed by the subscribers after the fixed message parameters are assembled, and simultaneously, all the message parameters can be redisplayed and cached, thereby improving the processing speed of the whole system as much as possible. Meanwhile, the sender can open all condition parameters capable of specifying the strategy to be used by the subscriber, and provide rich judgment condition types to be matched with the condition parameters for use, and finally the strategy of the technical scheme is characterized by comprising the following strategy rules: the rule condition is 1: n, namely, a subscriber can have a plurality of policy rules, then a policy rule can contain a plurality of rule conditions, and the policy rules are in an or relationship and the rule conditions are in an and relationship, under such a policy function system, the business policy rule formulation almost all of the subscriber can be satisfied. It should be noted that the technique using Java 8steam is arranged for conditional judgment, and Stream is a big highlight of Java8, and is a completely different concept from the InputStream and OutputStream in the Java. It is also different from Stream for StAX parsing XML, and is also different from Stream for AmazonKinesis processing large data in real time. Stream in Java8 is an enhancement to the function of Collection (Collection) objects, and it focuses on performing various very convenient and efficient aggregation operations (aggregation operations) or bulk data operations (bulk data operations) on Collection objects. The Stream API greatly improves programming efficiency and program readability by means of the Lambda expression which is newly appeared, meanwhile, the Stream API provides a serial mode and a parallel mode for convergence operation, the parallel mode can fully utilize the advantages of a multi-core processor, a fork/join parallel mode is used for splitting tasks and accelerating the processing process, the technology is facilitated, the whole message notification system is enabled to be very quick when the whole message notification system is accurate in processing judgment conditions, and the running speed of the whole message notification system is greatly improved.
Specifically, the source message processing server 2 can reduce the complexity of components for implementing complex business logic and reduce the maintenance and extensibility costs of the application program by using a rule engine. When the consumed source message is judged to hit the subscription rule and the effective period of the subscription rule, whether the consumed source message hits a pre-customized service strategy rule or not is continuously judged; the business strategy rule is a strategy condition parameter appointed by the subscriber; and when judging that the corresponding condition parameter values of the consumed source messages hit the service strategy rules, assembling the consumed source messages according to the subscription parameters of the subscriber so as to assemble a message body to be sent. For example, the rule engine makes various policy condition judgments for the trigger level of each source message when processing the source message, and then adds a read-fast-storage Redis non-relational database to form the whole structure. The method comprises the following steps that firstly, the most basic filtering and screening (such as whether subscription rules are subscribed or not and whether effective failure time is expired or not) needs to be carried out when a source message enters an engine, if the subscription rules are not satisfied, the whole engine finishes processing the source message, remarks are made on source message data, the source message data are packaged and sent to a warehousing operator for data recording warehousing storage operation, and if the subscription rules are satisfied, the next processing operation is carried out: whether the customized service policy rule is hit or not, a subscriber configures the service policy rule according to the condition parameters provided by a sender, a source message enters an engine, the engine performs redis cache processing on all condition parameter names and values of the source message, the cached rule is to store according to the parameter value included by each source message Id and the parameter name, and finally the engine compares the policy condition parameter specified by the subscriber with the corresponding condition parameter value of the source message, if the condition is met, the service policy rule is hit, otherwise, the service policy rule is not met, and the service policy rule is customized according to the service requirement of the subscriber, for example, the policy rule: the rule condition is 1: n, that is, a subscriber may have multiple policy rules and then a policy rule may contain multiple rule conditions, and the policy rules are in an or relationship and the rule conditions are in an and relationship, and the rule conditions also provide most basic condition judgments such as: greater than, equal to, less than, greater than, less than, including, etc.). The latest java8 flow-based condition judgment is also quoted in the process of the basic condition judgment, so that the method is very quick and accurate. After the judgment of the strategy rules is processed, if the strategy is satisfied, the message is assembled, and it needs to be explained that, when assembling the message notification request message, the scheme of fixed message + optional message can be provided for the subscriber, the simple and useful message can be sent to the subscriber as far as possible, the engine processes the message assembly and performs redis cache processing on the fixed and unchangeable message parameters, then switching data sources to read in real time across databases according to the parameters subscribed by the user, and performing redis cache processing after reading the non-fixed subscribed parameters, the next subscriber also subscribes the parameter and can directly read the parameter, after the message is assembled, the engine will carry on signature encryption operation to the said message, will encapsulate it into a message body to be sent and lose to send the queue after finishing, send the source message data record to the queue of putting in storage to put in storage and keep the operation at the same time.
In this embodiment, the source message sender 3 is a processor directly interfacing with a subscriber, and the source message sender 3 sends a message body encapsulated by the source message processing server 2 according to a specified address when receiving the message body. Wherein, when the source message sender encounters the condition of failure of sending the message body, the condition can be fed back to the source message processing server 2, so that the source message processing server 2 performs corresponding operation according to the rule whether the subscription customizes or not, that is, when the source message processing server 2 receives the failure of sending the message body to be sent to the subscriber fed back by the source message sender 3, the source message processing server 2 starts a corresponding daemon mechanism according to the subscription rule of the message body to be sent, so as to resend the message body to be sent to the subscriber when reaching the daemon time set by the subscriber, the daemon rule engine is realized based on the principle of mq overdue queue, then, the overdue time of the overdue queue is set according to the daemon time set by the subscriber, so as to resend the message to the subscriber after the time is exceeded, of course, the guard time may be self-defined, or may be set according to the business rule of the user, and the present invention is not limited specifically herein. The invention can realize the guard of the failure message, and the message is not lost due to system or network problems, thereby ensuring the accuracy and integrity of the real system and improving the trust sense of the subscriber to the system.
Referring to fig. 2 and 3, a specific implementation of the principle based on the mq expired queue is: the message TTL of the Rabbitmq is combined with the dead message Exchange, the message TTL is the survival time of the message, and the RabbitMQ can set TTL for the queue and the message respectively. The setting of the queue is the retention time of the queue without the consumer, and can also be a separate setting for each separate message, if the time is exceeded, the message is defaulted to be expired, which is called as a dead letter. The TTL can set the time by setting the expiration field or the x-message-TTL attribute of the message. The message guard function can be realized, a failed message is put into a delay queue, the failure time of the delay queue is the guard interval time, and the message enters a sending queue and then is sent to a subscriber again after the time. It should be noted that, in order to solve the problem that the performance is affected by the corresponding time and the congestion is caused by excessive requests, an Okhttp component is introduced to send the request while the timeout time is set, and Okhttp is an efficient http client and has some good characteristics such as: the connection pool reduces request delay, shares socket connections, caches corresponding content, and the like.
It can be understood that, the failure message daemon is implemented by using a delay queue, a timer task may be used instead, and the timer task may be used to scan and send a failure message record at regular time and then re-push the message meeting the daemon time after calculating the message to the subscriber, which is not described herein again.
In the above embodiment, the source message receiver 1 of the present invention receives source messages sent by multiple source message systems by using a dubbo technology, performs message consumption on a message queue to obtain multiple source messages, processes the multiple source messages by using a rule engine, and assembles the consumed source messages meeting policy condition judgment according to subscription parameters of a subscriber to assemble a message body to be sent; and then, sending the message body to be sent to the source message sender 3, so that the source message sender 3 sends the message body to be sent to a corresponding subscriber according to an address specified by the subscriber. The method not only can reduce the coupling among systems, reduce the load of the server and improve the throughput of the system, but also can reduce the code development amount of the access system and quickly, conveniently and efficiently access the whole system. Meanwhile, various business rate measurement rules can be customized, the business requirements of all parties are met, the processing rate of the whole system is optimized, the whole system is enabled to be higher in performance, and the performance pressure of a subscriber system is greatly reduced. And the method can realize the guard of the failure message, and the message is not lost due to system or network problems, thereby ensuring the accuracy and integrity of the real system and improving the trust sense of the subscriber to the system.
On the basis of the above embodiment, in a preferred embodiment of the present invention, the message notification system further includes: a source message storage 4 and a configuration management background 5; the source message warehousing server 4 is configured to receive a source message data record sent by the source message processing server 2, and generate an sql statement from the source message data record to perform a database insertion operation to store the source message. And the configuration management background 5 is used for newly adding a subscriber, formulating a subscription rule strategy and managing configuration information of a subscription message body.
Referring to fig. 4, a second embodiment of the present invention provides an intersystem message notification method, including:
s101, receiving a plurality of source messages after message consumption is carried out by a message queue, wherein the source messages are sent by a source message receiver; the source message receiver receives source messages sent by a plurality of source message systems by adopting a dubbo technology;
s102, after the consumed source messages are processed by a general rule engine, the consumed source messages meeting the judgment of strategy conditions are spliced according to subscription parameters of a subscriber so as to be spliced into a message body to be sent;
s103, the message body to be sent is sent to the source message sender, so that the source message sender sends the message body to be sent to a corresponding subscriber according to an address specified by the subscriber.
On the basis of the foregoing embodiment, in a preferred embodiment of the present invention, after the source message is processed by the universal rule engine, the consumed source message meeting the policy condition judgment is assembled according to the subscription parameters of the subscriber, so as to assemble a message body to be sent, specifically:
when the consumed source message is judged to hit the subscription rule and the effective period of the subscription rule, whether the consumed source message hits a pre-customized service strategy rule or not is continuously judged; the business strategy rule is a strategy condition parameter appointed by the subscriber;
and when judging that the corresponding condition parameter values of the consumed source messages hit the service strategy rules, assembling the consumed source messages according to the subscription parameters of the subscriber so as to assemble a message body to be sent.
On the basis of the above embodiment, in a preferred embodiment of the present invention, the method further includes:
and sending the source message data record to a source message warehousing party so that the source message warehousing party generates the source message data record into an sql statement to execute database insertion operation to store the source message.
On the basis of the above embodiment, in a preferred embodiment of the present invention, the method further includes: and carrying out signature encryption on the assembled message body to be sent.
On the basis of the above embodiment, in a preferred embodiment of the present invention, the method further includes:
and when receiving failure of sending the message body to be sent to the subscriber, which is fed back by the source message sender, starting a corresponding daemon mechanism according to the subscription rule of the message body to be sent, so that the message body to be sent is sent to the subscriber again when the daemon time set by the subscriber is reached.
Referring to fig. 5, a third embodiment of the present invention provides an intersystem message notification apparatus, including:
a source message receiving unit 100, configured to receive a plurality of source messages that are sent by a source message receiver and are consumed by a message queue; the source message receiver receives source messages sent by a plurality of source message systems by adopting a dubbo technology;
a message body assembling unit 200 for assembling the consumed source messages meeting the policy condition judgment according to the subscription parameters of the subscriber after the consumed source messages are processed by the universal rule engine, so as to assemble the message body to be sent;
a to-be-sent message body sending unit 300, configured to send the to-be-sent message body to the source message sender, so that the source message sender sends the to-be-sent message body to a corresponding subscriber according to an address specified by the subscriber.
On the basis of the foregoing embodiment, in a preferred embodiment of the present invention, the assembly unit 200 for a message body to be sent specifically includes:
the first judgment module is used for continuously judging whether the consumed source message hits a pre-customized service strategy rule or not when judging that the consumed source message hits a subscription rule and the subscription rule is in an effective period; the business strategy rule is a strategy condition parameter appointed by the subscriber;
and the second judging module is used for splicing the consumed source messages according to the subscription parameters of the subscriber to form a message body to be sent when judging that the corresponding condition parameter values of the consumed source messages hit the service strategy rules.
On the basis of the above embodiment, in a preferred embodiment of the present invention, the method is further configured to:
and sending the source message data record to a source message warehousing party so that the source message warehousing party generates the source message data record into an sql statement to execute database insertion operation to store the source message.
On the basis of the above embodiment, in a preferred embodiment of the present invention, the method is further configured to: and carrying out signature encryption on the assembled message body to be sent.
On the basis of the above embodiment, in a preferred embodiment of the present invention, the method is further configured to:
and when receiving failure of sending the message body to be sent to the subscriber, which is fed back by the source message sender, starting a corresponding daemon mechanism according to the subscription rule of the message body to be sent, so that the message body to be sent is sent to the subscriber again when the daemon time set by the subscriber is reached.
The embodiment of the present invention further includes a source message processing server, which includes a memory and a processor, where the memory stores executable codes, and the executable codes can be executed by the processor, so as to implement the inter-system message notification method according to the above embodiment.
An embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium includes a stored computer program, where when the computer program runs, a device in which the computer-readable storage medium is located is controlled to execute the inter-system message notification method according to the above embodiment.
It should be noted that, in the above embodiments, each server may implement the corresponding functions by executing a computer program, and the computer program may be divided into one or more modules, and the one or more modules are stored in the memory and executed by the processor, so as to complete the present invention. The one or more modules may be a series of computer program instruction segments capable of performing particular functions.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory may be used to store the computer programs and/or modules, and the processor may perform various functions by operating or executing the computer programs and/or modules stored in the memory and calling data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, a text conversion function, etc.), and the like; the storage data area may store data (such as audio data, text message data, etc.) created according to the use of the cellular phone, etc. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
Wherein, the modules integrated by each server can be stored in a computer readable storage medium if they are implemented in the form of software functional units and sold or used as independent products. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
It should be noted that the above-described device embodiments are merely illustrative, where the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. In addition, in the drawings of the embodiment of the apparatus provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, and may be specifically implemented as one or more communication buses or signal lines. One of ordinary skill in the art can understand and implement it without inventive effort.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention.

Claims (10)

1. An intersystem message notification method, comprising:
receiving a plurality of source messages after the source message receiver sends message consumption by the message queue; the source message receiver receives source messages sent by a plurality of source message systems by adopting a dubbo technology;
after the consumed source messages are processed by the universal rule engine, the consumed source messages meeting the judgment of the strategy conditions are spliced according to the subscription parameters of the subscriber so as to splice a message body to be sent; the method comprises the steps that a sender provides all message parameter structures for a subscriber, the message parameter structures comprise fixed message parameters and message parameters needing subscription, the subscriber subscribes the required message parameters according to the self requirement, when the messages are assembled, other messages are assembled according to the parameters subscribed by the subscriber after the fixed message parameters are assembled, and all the message parameters are subjected to redis caching processing; the sender opens all condition parameters capable of appointing the strategy to the subscriber for use, and provides rich judgment condition types to be matched with the condition parameters for use, and the strategy is characterized in that the strategy rule is as follows: rule condition = 1: n, namely a subscriber can set a plurality of policy rules, each policy rule can contain a plurality of rule conditions, the policy rules are in an or relationship, and the rule conditions are in an and relationship, so as to meet the requirement of the business policy rule formulation of the subscriber;
and sending the message body to be sent to a source message sender so that the source message sender sends the message body to be sent to a corresponding subscriber according to an address specified by the subscriber.
2. The intersystem message notification method according to claim 1, wherein the method, after processing the source message by the universal rule engine, assembles the consumed source message that meets the policy condition judgment according to a subscription parameter of a subscriber to assemble a message body to be sent, and specifically includes:
when the consumed source message is judged to hit the subscription rule and the effective period of the subscription rule, whether the consumed source message hits a pre-customized service strategy rule or not is continuously judged; the business strategy rule is a strategy condition parameter appointed by the subscriber;
and when judging that the corresponding condition parameter values of the consumed source messages hit the service strategy rules, assembling the consumed source messages according to the subscription parameters of the subscriber so as to assemble a message body to be sent.
3. The method of claim 1, further comprising:
and sending the source message data record to a source message warehousing party so that the source message warehousing party generates the source message data record into an sql statement to execute database insertion operation to store the source message.
4. The intersystem message notification method according to claim 2, further comprising: and carrying out signature encryption on the assembled message body to be sent.
5. The method of claim 1, further comprising:
and when receiving failure of sending the message body to be sent to the subscriber, which is fed back by the source message sender, starting a corresponding daemon mechanism according to the subscription rule of the message body to be sent, so that the message body to be sent is sent to the subscriber again when the daemon time set by the subscriber is reached.
6. An intersystem message notification apparatus, comprising:
a source message receiving unit, configured to receive a plurality of source messages that are sent by a source message receiver and are subjected to message consumption by a message queue; the source message receiver receives source messages sent by a plurality of source message systems by adopting a dubbo technology;
the message body assembling unit is used for assembling the consumed source messages meeting the strategy condition judgment according to the subscription parameters of the subscriber after the consumed source messages are processed by the universal rule engine so as to assemble the message body to be sent; the method comprises the steps that a sender provides all message parameter structures for a subscriber, the message parameter structures comprise fixed message parameters and message parameters needing subscription, the subscriber subscribes the required message parameters according to the self requirement, when the messages are assembled, other messages are assembled according to the parameters subscribed by the subscriber after the fixed message parameters are assembled, and all the message parameters are subjected to redis caching processing; the sender opens all condition parameters capable of appointing the strategy to the subscriber for use, and provides rich judgment condition types to be matched with the condition parameters for use, and the strategy is characterized in that the strategy rule is as follows: rule condition = 1: n, namely a subscriber can set a plurality of policy rules, each policy rule can contain a plurality of rule conditions, the policy rules are in an or relationship, and the rule conditions are in an and relationship, so as to meet the requirement of the business policy rule formulation of the subscriber;
and the message body to be sent sending unit is used for sending the message body to be sent to a source message sender so that the source message sender sends the message body to be sent to a corresponding subscriber according to an address specified by the subscriber.
7. A source message processing server, comprising a memory and a processor, wherein the memory stores executable code, and the executable code can be executed by the processor to implement the inter-system message notification method according to any one of claims 1 to 5.
8. An intersystem message notification system comprising a source message sender, a source message receiver, and the source message processing server of claim 7; wherein the content of the first and second substances,
the source message receiver is used for receiving source messages sent by a plurality of source message systems by adopting a dubbo technology, assembling the source messages into a message queue required by a message middleware, consuming the message queue and sending the message queue to the source message processing server;
the source message processing server is used for receiving a plurality of source messages which are sent by a source message receiver and subjected to message consumption by a message queue, processing the consumed source messages by a general rule engine, and splicing the consumed source messages meeting the judgment of strategy conditions according to subscription parameters of a subscriber so as to splice a message body to be sent; sending the message body to be sent to the source message sender;
and the source message transmitter is used for transmitting the message body to be transmitted to the corresponding subscriber according to the address specified by the subscriber.
9. The intersystem message notification system according to claim 8, further comprising: a source message storage person and a configuration management background; wherein the content of the first and second substances,
the source message processing server is also used for sending the source message data record to a source message storage person;
the source message warehousing device is used for generating an sql statement by the source message data record to execute database insertion operation so as to store the source message;
and the configuration management background is used for newly adding a subscriber, formulating a subscription rule strategy and managing configuration information of a subscription message body.
10. A computer-readable storage medium, comprising a stored computer program, wherein when the computer program runs, the computer-readable storage medium controls an apparatus to execute the method for notifying a message between systems according to any one of claims 1 to 5.
CN201911216687.1A 2019-11-28 2019-11-28 Intersystem message notification method, device, server, system and storage medium Active CN110968439B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911216687.1A CN110968439B (en) 2019-11-28 2019-11-28 Intersystem message notification method, device, server, system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911216687.1A CN110968439B (en) 2019-11-28 2019-11-28 Intersystem message notification method, device, server, system and storage medium

Publications (2)

Publication Number Publication Date
CN110968439A CN110968439A (en) 2020-04-07
CN110968439B true CN110968439B (en) 2020-12-15

Family

ID=70032729

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911216687.1A Active CN110968439B (en) 2019-11-28 2019-11-28 Intersystem message notification method, device, server, system and storage medium

Country Status (1)

Country Link
CN (1) CN110968439B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112241430A (en) * 2020-10-26 2021-01-19 浪潮云信息技术股份公司 Model applied to multi-system docking processing

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107087033A (en) * 2017-05-17 2017-08-22 深圳市小牛在线互联网信息咨询有限公司 Information push method, device, storage medium and computer equipment
CN108984325A (en) * 2018-07-20 2018-12-11 北京北信源信息安全技术有限公司 Message queue consuming method and device

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8850451B2 (en) * 2006-12-12 2014-09-30 International Business Machines Corporation Subscribing for application messages in a multicast messaging environment
US10552239B2 (en) * 2009-12-01 2020-02-04 International Business Machines Corporation Message recall
CN107454186A (en) * 2017-08-24 2017-12-08 国网浙江省电力公司衢州供电公司 A kind of data safe transmission method based on message queue
CN107688499A (en) * 2017-08-29 2018-02-13 广州云移信息科技有限公司 A kind of queued event processing method and system
CN108063803B (en) * 2017-12-04 2020-10-13 苏州狗尾草智能科技有限公司 Message management method and system based on distributed subscription and publication message system
CN108196961B (en) * 2017-12-28 2020-05-12 蜂助手股份有限公司 Asynchronous message processing method, terminal, system and storage medium
CN109800239B (en) * 2019-01-15 2022-09-06 科大国创软件股份有限公司 Redis-based distributed architecture data sharing method
CN110032459B (en) * 2019-04-22 2022-05-03 深圳乐信软件技术有限公司 Message queue configuration method and device, computer equipment and storage medium
CN110417646A (en) * 2019-08-01 2019-11-05 北京吉旗咨询服务有限公司 The method and device for subscribing to message are pushed based on RPC application program

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107087033A (en) * 2017-05-17 2017-08-22 深圳市小牛在线互联网信息咨询有限公司 Information push method, device, storage medium and computer equipment
CN108984325A (en) * 2018-07-20 2018-12-11 北京北信源信息安全技术有限公司 Message queue consuming method and device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
主动推送型WS-Notification系统的可靠性保证研究与实现;郭文琪,;《中国优秀硕士学位论文全文数据库信息科技辑(月刊)》;20131115(第11期);I139-225 *
基于发布订阅模式的医疗消息推送系统;成海霞;《中国优秀硕士学位论文全文数据库信息科技辑(月刊)》;20151215(第12期);I138-71 *
基于发布订阅的分布式复杂事件处理系统的研究与实现;王奇;《中国优秀硕士学位论文全文数据库信息科技辑(月刊)》;20181115(第11期);I138-390 *

Also Published As

Publication number Publication date
CN110968439A (en) 2020-04-07

Similar Documents

Publication Publication Date Title
US10938769B2 (en) Monitoring of subscriber message processing in a publish/subscribe messaging environment
CN108196961B (en) Asynchronous message processing method, terminal, system and storage medium
CN108449410B (en) Message management method, system and related device in cloud platform
US8606859B2 (en) Method and system to communicate messages in a computer network
CN110633442A (en) Pushing method and device and electronic equipment
CN103733568A (en) Stream processing using a client-server architecture
US9323591B2 (en) Listening for externally initiated requests
CN112799825A (en) Task processing method and network equipment
WO2021057500A1 (en) Message sending management method and device
CN111770029B (en) Dynamic queue forwarding method, system and storage medium based on RabbitMQ and ActiveMQ
US9106596B2 (en) Method and apparatus of configuring a data broadcast service
CN110968439B (en) Intersystem message notification method, device, server, system and storage medium
CN111666745A (en) File downloading method, device, server and medium
CN103037000A (en) Publish-subscribe system and notification message processing method thereof
CN113472687B (en) Data processing method and device
CN105917694B (en) Service in telecommunication network provides and activation
CN108347471B (en) Method, device and system for acquiring third-party user information
CN112448987A (en) Fusing degradation triggering method and system and storage medium
CN112202914B (en) Message pushing method and device
CN111401819B (en) Intersystem data pushing method and system
CN112347191A (en) Method and device for sharing and exchanging data, computer equipment and storage medium
CN102006546A (en) Personalization information service system and sending method thereof
CN112910763B (en) Method, device, equipment and medium for providing real-time data interface service
CN112579148B (en) Service message processing method and device based on service agent and electronic equipment
CN114257598B (en) Resource downloading method and device, storage medium and electronic equipment

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
PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Message notification method, device, server, system and storage medium between systems

Effective date of registration: 20220406

Granted publication date: 20201215

Pledgee: Shanghai Pudong Development Bank Limited by Share Ltd. Guangzhou branch

Pledgor: Bee Assistant Co.,Ltd.

Registration number: Y2022440000064