CN114124871A - Message information processing method and device of MQ message queue - Google Patents

Message information processing method and device of MQ message queue Download PDF

Info

Publication number
CN114124871A
CN114124871A CN202111406711.5A CN202111406711A CN114124871A CN 114124871 A CN114124871 A CN 114124871A CN 202111406711 A CN202111406711 A CN 202111406711A CN 114124871 A CN114124871 A CN 114124871A
Authority
CN
China
Prior art keywords
state
service
message
service state
updated
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111406711.5A
Other languages
Chinese (zh)
Inventor
钱垚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bank of China Ltd
Original Assignee
Bank of China 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 Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202111406711.5A priority Critical patent/CN114124871A/en
Publication of CN114124871A publication Critical patent/CN114124871A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]
    • H04L51/043Real-time or near real-time messaging, e.g. instant messaging [IM] using or handling presence information

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a message information processing method and a device of an MQ message queue, which can be used in the financial field, wherein the method comprises the following steps: obtaining message information of an MQ message queue, wherein the message information comprises: the service type and the service state to be updated; reading a corresponding service state control table according to the service type, wherein the service state control table comprises the existing state and a state sequence chart; and updating the service state according to the service state to be updated, the existing state and the state sequence diagram. The invention can process the message information of the MQ message queue, and avoid the problem of logic disorder.

Description

Message information processing method and device of MQ message queue
Technical Field
The invention relates to the field of finance, in particular to a message information processing method and device of an MQ message queue. It should be noted that the message information processing method and apparatus of MQ message queue of the present invention may be used in the financial field, and may also be used in any fields other than the financial field.
Background
This section is intended to provide a background or context to the embodiments of the invention that are recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.
An mq (message queue) message queue is a first-in first-out queue, and after data (message) to be transmitted is put in the queue, a consumer reads the message from the queue to perform subsequent message service processing. The order in which the consumer reads the messages is consistent with the order in the MQ queue. Although MQ can guarantee the message sequence under most conditions, for reasons of communication and the like, in some cases, as different types of messages of the same type of service are initiated to a certain bank in a large amount at a time point, the message sequence in MQ may be inconsistent with the message sending sequence, which may cause the situation that the later message arrives first in service logic, which may cause the later message to be logically processed by a background consumer first, which may cause logic confusion.
Therefore, there is a need for a message processing scheme for MQ message queues that can overcome the above-mentioned problems.
Disclosure of Invention
The embodiment of the invention provides a message information processing method of an MQ message queue, which is used for processing the message information of the MQ message queue and avoiding the problem of logic disorder, and comprises the following steps:
obtaining message information of an MQ message queue, wherein the message information comprises: the service type and the service state to be updated;
reading a corresponding service state control table according to the service type, wherein the service state control table comprises the existing state and a state sequence chart;
and updating the service state according to the service state to be updated, the existing state and the state sequence diagram.
The embodiment of the invention provides a message information processing device of an MQ message queue, which is used for processing the message information of the MQ message queue and avoiding the problem of logic disorder, and comprises the following components:
a message information obtaining module, configured to obtain message information of the MQ message queue, where the message information includes: the service type and the service state to be updated;
a control table reading module, configured to read a corresponding service state control table according to the service type, where the service state control table includes an existing state and a state timing chart;
and the service state updating module is used for updating the service state according to the service state to be updated, the existing state and the state sequence diagram.
The embodiment of the invention also provides computer equipment, which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein when the processor executes the computer program, the message information processing method of the MQ message queue is realized.
The embodiment of the invention also provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the message information processing method of the MQ message queue.
The embodiment of the present invention further provides a computer program product, where the computer program product includes a computer program, and when executed by a processor, the computer program implements the message information processing method for the MQ message queue.
The embodiment of the invention obtains the message information of the MQ message queue, wherein the message information comprises the following components: the service type and the service state to be updated; reading a corresponding service state control table according to the service type, wherein the service state control table comprises the existing state and a state sequence chart; and updating the service state according to the service state to be updated, the existing state and the state sequence diagram. The embodiment of the invention reads the corresponding business state control table according to the business type in the message information, and realizes the business state updating according to the business state to be updated and the existing state and state sequence chart, thereby avoiding the problems of longer and longer main control program and logic disorder caused by more and more business states along with the development of the business, and being simpler, more convenient and more flexible to maintain.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts. In the drawings:
fig. 1 is a schematic diagram of a message information processing method of an MQ message queue in an embodiment of the present invention;
fig. 2 is a flow chart of message processing for another MQ message queue in an embodiment of the present invention;
fig. 3 is a diagram of a message processing apparatus of an MQ message queue according to an embodiment of the present invention;
fig. 4 is a diagram of a message processing apparatus of another MQ message queue according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings. The exemplary embodiments and descriptions of the present invention are provided to explain the present invention, but not to limit the present invention.
First, terms in the embodiments of the present invention are described:
COBOL: (COMMON BUSINESS-organized LANGUAGE) a programming LANGUAGE ORIENTED to the process, mainly used for data processing, at present, is used in a large number of financial industry systems such as banks, insurance, securities, etc.
CDS-CPE: a ticket transaction system.
At present, the existing MQ triggering background processing logic generally processes the messages according to the sequence of the messages in the MQ, and a consumer program is directly triggered to process the messages, so that the problem of message state updating errors caused by the fact that the messages which have been registered are processed and the previous messages are processed later can occur. The updating is carried out according to the state in the message, so that the condition of wrong updating can be caused for the condition of message disorder. Or whether the current state is updated or not is judged by directly comparing the current state with the message state, and the main control program may have extra logic, so that the main control program is redundant and difficult to maintain. The method is realized based on UNIX and COBOL, and is suitable for an application system which uses UNIX as an operating system and COBOL as a development language.
In order to perform message information processing on an MQ message queue and avoid a problem of logic confusion, an embodiment of the present invention provides a message information processing method for an MQ message queue, where as shown in fig. 1, the method may include:
step 101, obtaining message information of an MQ message queue, wherein the message information comprises: the service type and the service state to be updated;
step 102, reading a corresponding service state control table according to the service type, wherein the service state control table comprises the existing state and a state sequence chart;
and 103, updating the service state according to the service state to be updated, the existing state and the state sequence chart.
As shown in fig. 1, it can be known that, in the embodiment of the present invention, by obtaining the message information of the MQ message queue, the message information includes: the service type and the service state to be updated; reading a corresponding service state control table according to the service type, wherein the service state control table comprises the existing state and a state sequence chart; and updating the service state according to the service state to be updated, the existing state and the state sequence diagram. The embodiment of the invention reads the corresponding business state control table according to the business type in the message information, and realizes the business state updating according to the business state to be updated and the existing state and state sequence chart, thereby avoiding the problems of longer and longer main control program and logic disorder caused by more and more business states along with the development of the business, and being simpler, more convenient and more flexible to maintain.
In an embodiment, message information of an MQ message queue is obtained, where the message information includes: the service type and the service state to be updated; reading a corresponding service state control table according to the service type, wherein the service state control table comprises the existing state and a state sequence chart; and updating the service state according to the service state to be updated, the existing state and the state sequence diagram.
In this embodiment, the service types include: bill prompting payment service, bill posting service and bill transferring posting service.
In this embodiment, updating the service state according to the service state to be updated, the existing state and the state sequence diagram includes: and if the service state to be updated is in the state sequence diagram and is behind the existing state, updating the service state.
In this embodiment, as shown in fig. 2, the method for processing message information of the MQ message queue in fig. 1 further includes:
and step 104, recording the field information of the current trigger program after updating the service state.
In this embodiment, updating the service state according to the service state to be updated, the existing state and the state sequence diagram includes:
and if the service state to be updated is in the state sequence diagram and before the existing state, not updating the service state.
During specific implementation, firstly, after receiving a service message, the MQ message queue is put into the MQ queue, then message information is read from the MQ message queue, and if the service state updating processing is involved, a service state control table is read according to the service type; there are 3 states at this time: firstly, the service state to be updated in the message and secondly, the existing state in the service table; and thirdly, the state sequence in the service state control table. Comparing the logic relationship among the three, if the service state to be updated is in the state sequence diagram in the state control table and before the existing state, not updating the service state; if the service state to be updated is in the state sequence diagram in the state control table and is behind the existing state, the service state is updated; and determining whether to perform updating operation on the service state according to the judgment result.
A specific embodiment is given below to describe a specific application of the message information processing of the MQ message queue in the embodiment of the present invention. In this embodiment, the message information processing of the MQ message queue is performed according to the following steps:
(1) and the MQ receives the service message and puts the service message into an MQ message queue.
(2) Reading message information from MQ, and if the message information relates to service state updating processing, performing the following processing:
(2.1) reading a service state control table according to the service type; there are 3 states at this time: firstly, the service state to be updated in the message and secondly, the existing state in the service table; thirdly, the state time sequence in the business state control table;
(2.2) comparing the logical relations among the three, if the service state to be updated is in the state sequence chart in the state control table and before the existing state, not updating the service state; if the service state to be updated is in the state sequence diagram in the state control table and is behind the existing state, the service state is updated;
(3) and the main control program determines whether to update the service state according to the judgment result.
The embodiment of the invention needs to design a service state control table, and the service state sequence can be described in the service state control table according to different service types. After reading the message from MQ, updating the service state according to the data in the service state control table, instead of writing each service state in the main control program for judgment, the whole process is determined according to the service state control table, and in the processing process, the message data of the current processing service needs to be synchronously recorded, so that when an update error occurs, the information of the current operation time point, the failure reason and the like can be judged in a manual intervention mode for subsequent processing.
In specific implementation, the service state control table can be used for updating the service state when the MQ receives the report, and can also be used in subsequent online service logic processing. If the logic is a change logic related to the service state, the table can be read to judge whether the state is changed. Based on this, a field such as a trigger procedure may be added to the table to distinguish which step the status update is performed at.
The embodiment of the invention aims to facilitate and automate the processing of message receiving and reporting and service state updating, introduce a service state control table, set the service state, whether the service state is a final state, an updated program name and the like in the service state control table for configuration, take the content of the control table as a drive, and be used as a processing basis for updating the service state after receiving and reporting. The state change is controlled through the business state control table, the state data is used as the drive, the state full-flow processing is carried out, the situation that the main control program is more and more lengthy along with the development of business states is avoided, and the main control program is easy to maintain. When the business process needs to be modified, the effect of setting the business process can be achieved by setting the business state in the operation table, the master control program does not need to be modified, and the maintenance is simpler, more convenient and more flexible.
Based on the same inventive concept, the embodiment of the present invention further provides a message information processing apparatus of an MQ message queue, as described in the following embodiments. Because the principles of these solutions are similar to the message information processing method of the MQ message queue, the implementation of the message information processing apparatus of the MQ message queue may refer to the implementation of the method, and repeated details are not repeated.
Fig. 3 is a structural diagram of a message information processing apparatus of an MQ message queue in an embodiment of the present invention, and as shown in fig. 3, the message information processing apparatus of the MQ message queue includes:
a message information obtaining module 301, configured to obtain message information of the MQ message queue, where the message information includes: the service type and the service state to be updated;
a control table reading module 302, configured to read a corresponding service state control table according to the service type, where the service state control table includes an existing state and a state timing chart;
and a service state updating module 303, configured to update the service state according to the service state to be updated, the existing state, and the state sequence diagram.
In one embodiment, the service status updating module 303 is further configured to:
and if the service state to be updated is in the state sequence diagram and is behind the existing state, updating the service state.
In one embodiment, as shown in fig. 4, the message information processing apparatus of the MQ message queue of fig. 3 further includes:
the field information recording module 304 is configured to record field information of the current trigger procedure after the service status is updated.
In one embodiment, the service status updating module 303 is further configured to:
and if the service state to be updated is in the state sequence diagram and before the existing state, not updating the service state.
Based on the foregoing inventive concept, as shown in fig. 5, an embodiment of the present invention further provides a computer device 500, which includes a memory 510, a processor 520, and a computer program 530 stored on the memory 510 and executable on the processor 520, where the processor 520 executes the computer program 530 to implement the message information processing method of the MQ message queue.
Based on the foregoing inventive concept, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the method for processing the message information of the MQ message queue is implemented.
The embodiment of the present invention further provides a computer program product, where the computer program product includes a computer program, and when executed by a processor, the computer program implements the message information processing method for the MQ message queue.
The embodiment of the invention obtains the message information of the MQ message queue, wherein the message information comprises the following components: the service type and the service state to be updated; reading a corresponding service state control table according to the service type, wherein the service state control table comprises the existing state and a state sequence chart; and updating the service state according to the service state to be updated, the existing state and the state sequence diagram. The embodiment of the invention reads the corresponding business state control table according to the business type in the message information, and realizes the business state updating according to the business state to be updated and the existing state and state sequence chart, thereby avoiding the problems of longer and longer main control program and logic disorder caused by more and more business states along with the development of the business, and being simpler, more convenient and more flexible to maintain.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (11)

1. A message information processing method of MQ message queue is characterized by comprising the following steps:
obtaining message information of an MQ message queue, wherein the message information comprises: the service type and the service state to be updated;
reading a corresponding service state control table according to the service type, wherein the service state control table comprises the existing state and a state sequence chart;
and updating the service state according to the service state to be updated, the existing state and the state sequence diagram.
2. The method for processing the message information of the MQ message queue according to claim 1, wherein the updating the service state according to the service state to be updated, the existing state and the state sequence chart comprises:
and if the service state to be updated is in the state sequence diagram and is behind the existing state, updating the service state.
3. The method for message handling at MQ message queues according to claim 2, further comprising:
and after the service state is updated, recording the field information of the current trigger program.
4. The method for processing the message information of the MQ message queue according to claim 1, wherein the updating the service state according to the service state to be updated, the existing state and the state sequence chart comprises:
and if the service state to be updated is in the state sequence diagram and before the existing state, not updating the service state.
5. A message information processing apparatus for MQ message queues, comprising:
a message information obtaining module, configured to obtain message information of the MQ message queue, where the message information includes: the service type and the service state to be updated;
a control table reading module, configured to read a corresponding service state control table according to the service type, where the service state control table includes an existing state and a state timing chart;
and the service state updating module is used for updating the service state according to the service state to be updated, the existing state and the state sequence diagram.
6. The message information processing apparatus of MQ message queue of claim 5, wherein the traffic state update module is further to:
and if the service state to be updated is in the state sequence diagram and is behind the existing state, updating the service state.
7. The message processing apparatus of MQ message queue of claim 6, further comprising:
and the column information recording module is used for recording the column information of the current trigger program after the service state is updated.
8. The message information processing apparatus of MQ message queue of claim 5, wherein the traffic state update module is further to:
and if the service state to be updated is in the state sequence diagram and before the existing state, not updating the service state.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any one of claims 1 to 4 when executing the computer program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, implements the method of any of claims 1 to 4.
11. A computer program product, characterized in that the computer program product comprises a computer program which, when being executed by a processor, carries out the method of any one of claims 1 to 4.
CN202111406711.5A 2021-11-24 2021-11-24 Message information processing method and device of MQ message queue Pending CN114124871A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111406711.5A CN114124871A (en) 2021-11-24 2021-11-24 Message information processing method and device of MQ message queue

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111406711.5A CN114124871A (en) 2021-11-24 2021-11-24 Message information processing method and device of MQ message queue

Publications (1)

Publication Number Publication Date
CN114124871A true CN114124871A (en) 2022-03-01

Family

ID=80372282

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111406711.5A Pending CN114124871A (en) 2021-11-24 2021-11-24 Message information processing method and device of MQ message queue

Country Status (1)

Country Link
CN (1) CN114124871A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110489437A (en) * 2019-08-21 2019-11-22 中国工商银行股份有限公司 Distributed transaction processing method, device, computer equipment and storage medium
CN111030784A (en) * 2019-11-13 2020-04-17 泰康保险集团股份有限公司 Information synchronization method and device
CN111045839A (en) * 2019-12-04 2020-04-21 中国建设银行股份有限公司 Sequence calling method and device based on two-phase transaction message in distributed environment
CN111090532A (en) * 2019-12-13 2020-05-01 深圳前海环融联易信息科技服务有限公司 Application service calling method and device, electronic equipment and computer storage medium
CN111352753A (en) * 2020-04-26 2020-06-30 中国银行股份有限公司 Accounting processing method and device
CN112667382A (en) * 2020-12-30 2021-04-16 平安普惠企业管理有限公司 Task scheduling method, device, equipment and storage medium
CN113590497A (en) * 2021-09-27 2021-11-02 腾讯科技(深圳)有限公司 Business service test method and device, electronic equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110489437A (en) * 2019-08-21 2019-11-22 中国工商银行股份有限公司 Distributed transaction processing method, device, computer equipment and storage medium
CN111030784A (en) * 2019-11-13 2020-04-17 泰康保险集团股份有限公司 Information synchronization method and device
CN111045839A (en) * 2019-12-04 2020-04-21 中国建设银行股份有限公司 Sequence calling method and device based on two-phase transaction message in distributed environment
CN111090532A (en) * 2019-12-13 2020-05-01 深圳前海环融联易信息科技服务有限公司 Application service calling method and device, electronic equipment and computer storage medium
CN111352753A (en) * 2020-04-26 2020-06-30 中国银行股份有限公司 Accounting processing method and device
CN112667382A (en) * 2020-12-30 2021-04-16 平安普惠企业管理有限公司 Task scheduling method, device, equipment and storage medium
CN113590497A (en) * 2021-09-27 2021-11-02 腾讯科技(深圳)有限公司 Business service test method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US11023528B1 (en) Transaction exchange platform having configurable microservices
US11037168B1 (en) Transaction exchange platform with watchdog microservice
CN103164523A (en) Inspection method, device and system of data consistency inspection
US10789600B1 (en) Transaction exchange platform with snapshot microservice
US20230075668A1 (en) Transaction Exchange Platform Having Streaming Transaction Data and Microservices
CN110675247B (en) Unknown transaction processing method and system, peripheral system and core bank system
CN113094362A (en) Method and device for reliably delivering and processing asynchronous message
CN107908737B (en) File splitting control method and device
CN114077518A (en) Data snapshot method, device, equipment and storage medium
CN110490742B (en) Transaction execution method and device in blockchain
CN112395050B (en) Virtual machine backup method and device, electronic equipment and readable storage medium
CN114124871A (en) Message information processing method and device of MQ message queue
CN112788108A (en) Cross-block-chain distributed message processing method, platform and storage medium
JPH0214361A (en) Update processing system for accumulated data in automatic transaction machine
US11762688B2 (en) Systems and methods for batch job execution in clustered environments using execution timestamp granularity between service instances having different system times
CN109697216B (en) Clearing transaction information processing method, device and system
CN112968970B (en) Configuration information backup method and device and network equipment
EP4220519A1 (en) Transaction exchange platform having streaming transaction data and microservices
CN110659980A (en) Transaction information processing method, system and peripheral system
CN110648219A (en) Method and device for standardizing input area of bank transaction system
CN111541747A (en) Data check point setting method and device
CN111752842B (en) Bank batch program fault processing method and device
JPS5856142B2 (en) Online recovery control method
CN111563092B (en) Public service data updating method and device
US20210382645A1 (en) File processing method, computer device and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20220301