CN113656374A - Method and device for processing service message with attachment - Google Patents

Method and device for processing service message with attachment Download PDF

Info

Publication number
CN113656374A
CN113656374A CN202110952895.9A CN202110952895A CN113656374A CN 113656374 A CN113656374 A CN 113656374A CN 202110952895 A CN202110952895 A CN 202110952895A CN 113656374 A CN113656374 A CN 113656374A
Authority
CN
China
Prior art keywords
message
service
attachment
messages
processed
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
CN202110952895.9A
Other languages
Chinese (zh)
Inventor
何镇男
张斌
王一甲
李梦莎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 CN202110952895.9A priority Critical patent/CN113656374A/en
Publication of CN113656374A publication Critical patent/CN113656374A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/219Managing data history or versioning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/254Extract, transform and load [ETL] procedures, e.g. ETL data flows in data warehouses

Abstract

The invention discloses a method and a device for processing a service message with an attachment, wherein the method comprises the following steps: receiving a service message and an attachment message; the message serial numbers of the service message and the accessory message are used for recording the association relationship between the service message and the accessory message; storing the received service message and the received attachment message in a database; taking out the service message to be processed from the database in a polling mode, and inquiring whether the accessory messages related to the service message to be processed are collected according to the message serial number; and carrying out service transaction logic processing on the service messages to be processed which are collected by the associated accessory messages. The invention relates to the technical field of big data, which can reduce the long-time occupation of bank system resources, improve the utilization rate of the bank system resources and shorten the transaction response time.

Description

Method and device for processing service message with attachment
Technical Field
The invention relates to the technical field of big data, in particular to a method and a device for processing a service message with an attachment.
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.
When a banking system receives a service message with an attachment, the banking system usually needs to wait for the attachment to be collected and then can normally process the attachment. One processing method in the prior art is as follows: the initiator of the transaction performs system control, or the clear operation requires that all the accessories are sent first, then the service message is sent, and the receiver of the transaction immediately processes the service message after receiving the service message. The method has the defects that the development workload of an initiator is large, the business operation is complicated, the communication between bank systems occurs in a later-sending first-arriving situation, and the attachment message cannot be guaranteed to arrive earlier than the business message. Another prior art processing method is: the initiator of the transaction does not control, and the receiver of the transaction waits until the attachment messages are collected after receiving the service messages. The method has the disadvantages that when the transaction amount of the bank system is large, a large number of threads are occupied to wait, the utilization rate of the bank system resources is low, and even the bank system is slow and fails. Therefore, a suitable method is needed to be found, which can process the service messages of the collected attachments as soon as possible and also can prevent the service messages from waiting for a long time to cause excessive occupation of bank system resources.
Disclosure of Invention
The embodiment of the invention provides a method for processing a service message with an attachment, which is used for reducing the long-time occupation of bank system resources, improving the utilization rate of the bank system resources and shortening the transaction response time, and comprises the following steps:
receiving a service message and an attachment message; the message serial numbers of the service message and the accessory message are used for recording the association relationship between the service message and the accessory message;
storing the received service message and the received attachment message in a database;
taking out the service message to be processed from the database in a polling mode, and inquiring whether the accessory messages related to the service message to be processed are collected according to the message serial number;
and carrying out service transaction logic processing on the service messages to be processed which are collected by the associated accessory messages.
The embodiment of the invention also provides a processing device of the service message with the attachment, which is used for reducing the long-time occupation of the bank system resources, improving the utilization rate of the bank system resources and shortening the transaction response time, and the device comprises:
the message receiving module is used for receiving the service message and the attachment message; the message serial numbers of the service message and the accessory message are used for recording the association relationship between the service message and the accessory message;
the data access module is used for storing the received service message and the received attachment message in a database;
the operation scheduling module is used for taking out the service message to be processed from the database in a polling mode and inquiring whether the accessory messages related to the service message to be processed are collected or not according to the message serial number;
and the logic processing module is used for carrying out service transaction logic processing on the service messages to be processed which are collected by the associated accessory messages.
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 processing method of the service message with the attachment is realized.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program for executing the method for processing the service packet with the attachment is stored in the computer-readable storage medium.
In the embodiment of the invention, a service message and an attachment message are received; the message serial numbers of the service message and the accessory message are used for recording the association relationship between the service message and the accessory message; storing the received service message and the received attachment message in a database; taking out the service message to be processed from the database in a polling mode, and inquiring whether the accessory messages related to the service message to be processed are collected according to the message serial number; and carrying out service transaction logic processing on the service messages to be processed which are collected by the associated accessory messages. Compared with the technical scheme in the prior art, the method can reduce the long-time occupation of the bank system resources, improve the utilization rate of the bank system resources and shorten the transaction response time.
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 flowchart of a processing method of a service packet with an attachment according to an embodiment of the present invention;
fig. 2 is a diagram of a specific example of a method for processing a service packet with an attachment according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a processing apparatus for a service packet with an attachment according to an embodiment of the present invention;
fig. 4 is a diagram of an embodiment of a device for processing a service packet with an attachment according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a computer device provided in 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.
Fig. 1 is a flowchart of a method for processing a service packet with an attachment provided in an embodiment of the present invention, and as shown in fig. 1, the method includes the following steps:
step 101: receiving a service message and an attachment message; the message serial numbers of the service message and the accessory message are used for recording the association relationship between the service message and the accessory message;
step 102: storing the received service message and the received attachment message in a database;
step 103: taking out the service message to be processed from the database in a polling mode, and inquiring whether the accessory messages related to the service message to be processed are collected according to the message serial number;
step 104: and carrying out service transaction logic processing on the service messages to be processed which are collected by the associated accessory messages.
As can be known from the flow shown in fig. 1, the processing method of the service packet with the attachment according to the embodiment of the present invention is different from the prior art that the initiator of the transaction performs system control, or the clear operation requires that all the accessories are sent first and then the service message is sent, the scheme that the receiver of the transaction immediately processes after receiving the service message is different from the scheme that the initiator of the transaction does not control and the receiver of the transaction waits until the accessory messages are collected, but the service message to be processed is taken out from the database in a polling mode, whether the accessory messages related to the service message to be processed are collected or not is inquired according to the message serial number, the service transaction logic processing is carried out on the service messages to be processed which are collected by the associated accessory messages, so that the long-time occupation of bank system resources can be reduced, the utilization rate of the bank system resources is improved, and the transaction response time is shortened.
In one embodiment, after receiving the message, it is determined through the message number that the received message is a service message or an attachment message. For example, in this example, the message number has uniqueness, and each message number corresponds to only one message, where one bit in the message number is used to determine the type of the message, and if the bit is 1, the message is a service message, and if the bit is 0, the message is an attachment message.
In one embodiment, after receiving a service message, the received service message is marked as a pending state by a state field of a message number. For example, in this embodiment, the status field of the message number is used to determine the processed or pending status of the message, and when the status field is 1, the status of the message is indicated as pending, and when the status field is 0, the status of the message is indicated as processed.
In one embodiment, for the service messages to be processed whose associated attachment messages are not collected, the next polling is waited to query whether the associated attachment messages are collected again. For example, in this example, the service message to be processed is taken out from the database in a polling manner, whether the accessory messages associated with the service message to be processed are collected according to the message serial number is queried, if so, the service transaction logic processing is performed, and if not, the next polling is waited, wherein the initial polling waiting time can be set, for example, the service message received before one minute is taken out from the database in the polling manner, the time of one minute is used for collecting the accessory messages, and the probability of collecting the associated accessory message when the service message to be processed is taken out can be increased; for example, after polling for fifteen minutes, if the accessory messages associated with the service messages to be processed are not collected, it is determined that polling is failed, and a failure receipt is returned.
In one embodiment, an attachment message includes: a text file, and/or a picture file.
Fig. 2 is a diagram of a specific example of a method for processing a service packet with an attachment according to an embodiment of the present invention, as shown in fig. 2, in this example, the method shown in fig. 1 may further include the following steps:
step 201: and polling the service messages to be processed, which are not integrated with the associated attachment messages, for the next time, and if the service messages to be processed are not integrated with the associated attachment messages after polling for fifteen minutes, judging that the polling is failed and returning a failure receipt.
The embodiment of the present invention further provides a device for processing a service packet with an attachment, as described in the following embodiments. Because the principle of the device for solving the problems is similar to the method for processing the service message with the attachment, the implementation of the device can refer to the implementation of the method for processing the service message with the attachment, and repeated parts are not described again.
An embodiment of the present invention provides a processing apparatus for a service packet with an attachment, and fig. 3 is a schematic diagram of a processing apparatus for a service packet with an attachment provided in an embodiment of the present invention, as shown in fig. 3, the apparatus includes the following modules:
a message receiving module 31, configured to receive a service message and an attachment message; the message serial numbers of the service message and the accessory message are used for recording the association relationship between the service message and the accessory message;
a data access module 32, configured to store the received service packet and the received attachment packet in a database;
the operation scheduling module 33 is configured to take out the service packet to be processed from the database in a polling manner, and query whether the accessory packets associated with the service packet to be processed are collected according to the packet serial number;
and the logic processing module 34 is configured to perform service transaction logic processing on the service messages to be processed, which are collected by the associated accessory messages.
In one embodiment, the message receiving module is specifically configured to: and after receiving the message, determining that the received message is a service message or an attachment message through the message number.
In one embodiment, the message receiving module is specifically configured to: after receiving the service message, marking the received service message as a to-be-processed state through the state column of the message number.
In one embodiment, the job scheduling module is specifically configured to: and waiting for the next polling to inquire whether the associated attachment messages are collected or not for the service messages to be processed, which are not collected, of the associated attachment messages.
In one embodiment, an attachment message includes: a text file, and/or a picture file.
Fig. 4 is a diagram of a specific example of a processing apparatus for a service packet with an attachment according to an embodiment of the present invention, and as shown in fig. 4, interaction among modules of the processing apparatus for a service packet with an attachment is as follows: a transaction initiator sends a service message and an attachment message, a message receiving module 31 receives the service message and the attachment message, a data access module 32 stores the service message and the attachment message in a database, an operation scheduling module 33 performs polling processing and judgment on the service message to be processed in the database, if the attachment messages associated with the service message to be processed are collected, the service message to be processed with the collected associated attachment messages is sent to a logic processing module 34 for service transaction logic processing, and if the attachment messages associated with the service message to be processed are not collected, the service message to be processed with the collected associated attachment messages is not processed.
Fig. 5 is a schematic diagram of a computer device provided in an embodiment of the present invention, and as shown in fig. 5, the computer device 500 includes: a memory 510, a processor 520, and a computer program 530 stored on the memory 510 and executable on the processor 520, when executing the computer program 530, effecting: the processing method of the service message with the attachment is provided.
An embodiment of the present invention further provides a computer-readable storage medium, configured to reduce long-time occupation of resources of a bank system, improve utilization rate of resources of the bank system, and shorten transaction response time, where the computer-readable storage medium stores a computer program for executing the method, and when executed by a processor, the computer program implements: the processing method of the service message with the attachment is provided.
In summary, in the embodiment of the present invention, a service packet and an attachment packet are received; the message serial numbers of the service message and the accessory message are used for recording the association relationship between the service message and the accessory message; storing the received service message and the received attachment message in a database; taking out the service message to be processed from the database in a polling mode, and inquiring whether the accessory messages related to the service message to be processed are collected according to the message serial number; and carrying out service transaction logic processing on the service messages to be processed which are collected by the associated accessory messages. Compared with the technical scheme in the prior art, the method can reduce the long-time occupation of the bank system resources, improve the utilization rate of the bank system resources and shorten the transaction response time.
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 (12)

1. A method for processing a service message with an attachment is characterized by comprising the following steps:
receiving a service message and an attachment message; the message serial numbers of the service message and the accessory message are used for recording the association relationship between the service message and the accessory message;
storing the received service message and the received attachment message in a database;
taking out the service message to be processed from the database in a polling mode, and inquiring whether the accessory messages related to the service message to be processed are collected according to the message serial number;
and carrying out service transaction logic processing on the service messages to be processed which are collected by the associated accessory messages.
2. The method of claim 1, wherein receiving the service message and the attachment message comprises:
and after receiving the message, determining that the received message is a service message or an attachment message through the message number.
3. The method of claim 1, wherein receiving the service message and the attachment message comprises:
after receiving the service message, marking the received service message as a to-be-processed state through the state column of the message number.
4. The method of claim 1, further comprising:
and waiting for the next polling to inquire whether the associated attachment messages are collected or not for the service messages to be processed, which are not collected, of the associated attachment messages.
5. The method of claim 1, wherein the attachment message comprises: a text file, and/or a picture file.
6. A device for processing a service packet with an attachment, comprising:
the message receiving module is used for receiving the service message and the attachment message; the message serial numbers of the service message and the accessory message are used for recording the association relationship between the service message and the accessory message;
the data access module is used for storing the received service message and the received attachment message in a database;
the operation scheduling module is used for taking out the service message to be processed from the database in a polling mode and inquiring whether the accessory messages related to the service message to be processed are collected or not according to the message serial number;
and the logic processing module is used for carrying out service transaction logic processing on the service messages to be processed which are collected by the associated accessory messages.
7. The apparatus for processing the service packet with the attachment according to claim 6, wherein the packet receiving module is specifically configured to:
and after receiving the message, determining that the received message is a service message or an attachment message through the message number.
8. The apparatus for processing the service packet with the attachment according to claim 6, wherein the packet receiving module is specifically configured to:
after receiving the service message, marking the received service message as a to-be-processed state through the state column of the message number.
9. The apparatus for processing the service packet with the attachment according to claim 6, wherein the job scheduling module is specifically configured to:
and waiting for the next polling to inquire whether the associated attachment messages are collected or not for the service messages to be processed, which are not collected, of the associated attachment messages.
10. The apparatus for processing service messages with attachments according to claim 6, wherein the attachment messages include: a text file, and/or a picture file.
11. 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 for processing a service message with an attachment according to any one of claims 1 to 5 when executing the computer program.
12. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program for executing the processing method of the service packet with attachment according to any one of claims 1 to 5.
CN202110952895.9A 2021-08-19 2021-08-19 Method and device for processing service message with attachment Pending CN113656374A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110952895.9A CN113656374A (en) 2021-08-19 2021-08-19 Method and device for processing service message with attachment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110952895.9A CN113656374A (en) 2021-08-19 2021-08-19 Method and device for processing service message with attachment

Publications (1)

Publication Number Publication Date
CN113656374A true CN113656374A (en) 2021-11-16

Family

ID=78481213

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110952895.9A Pending CN113656374A (en) 2021-08-19 2021-08-19 Method and device for processing service message with attachment

Country Status (1)

Country Link
CN (1) CN113656374A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114244829A (en) * 2021-12-14 2022-03-25 中国建设银行股份有限公司 Interceptor-based transaction belt accessory double-track parallel processing method and system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114244829A (en) * 2021-12-14 2022-03-25 中国建设银行股份有限公司 Interceptor-based transaction belt accessory double-track parallel processing method and system
CN114244829B (en) * 2021-12-14 2024-03-22 中国建设银行股份有限公司 Transaction belt accessory double-track parallel processing method and system based on interceptor

Similar Documents

Publication Publication Date Title
WO2020211579A1 (en) Processing method, device and system for distributed bulk processing system
CN108647104B (en) Request processing method, server and computer readable storage medium
CN111782360A (en) Distributed task scheduling method and device
CN106844055B (en) Task execution method and device
CN110968586A (en) Distributed transaction processing method and device
US10274919B2 (en) Method, device and computer program product for programming a plurality of control units
CN107589990B (en) Data communication method and system based on thread pool
CN113067866B (en) Batch file transmission method and device between heterogeneous systems
CN110099108B (en) Block chain event duplicate removal method and device, computer equipment and storage medium
US20210103475A1 (en) Cooperation-based node management protocol
CN113656374A (en) Method and device for processing service message with attachment
CN114218135A (en) Source end flow control method and system based on Redis cache
CN111831408A (en) Asynchronous task processing method and device, electronic equipment and medium
CN111698233A (en) Message processing method and device
CN116361031A (en) Message transmission method, system, device, processor and electronic equipment
CN111309548A (en) Timeout monitoring method and device and computer readable storage medium
CN111553652A (en) Service processing method and device
CN112114938A (en) Transaction processing method and device and server
CN105790975A (en) Service processing operation execution method and device
CN114721801A (en) Dynamic scheduling method and device for batch task execution time
CN108062224A (en) Data read-write method, device and computing device based on file handle
CN110008010B (en) System calling method, device, equipment and readable storage medium
CN111158934A (en) Method and device for realizing different-level delay splicing based on buffer queue received data
CN112333262A (en) Data updating prompting method and device, computer equipment and readable storage medium
CN111639129A (en) Transaction processing method and device, electronic equipment and computer-readable storage medium

Legal Events

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