CN117891621A - Method, apparatus, device and computer readable medium for processing business message - Google Patents

Method, apparatus, device and computer readable medium for processing business message Download PDF

Info

Publication number
CN117891621A
CN117891621A CN202311719505.9A CN202311719505A CN117891621A CN 117891621 A CN117891621 A CN 117891621A CN 202311719505 A CN202311719505 A CN 202311719505A CN 117891621 A CN117891621 A CN 117891621A
Authority
CN
China
Prior art keywords
service
message
service message
application
processing
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
CN202311719505.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.)
Jingdong Technology Information Technology Co Ltd
Original Assignee
Jingdong Technology Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jingdong Technology Information Technology Co Ltd filed Critical Jingdong Technology Information Technology Co Ltd
Priority to CN202311719505.9A priority Critical patent/CN117891621A/en
Publication of CN117891621A publication Critical patent/CN117891621A/en
Pending legal-status Critical Current

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a method, a device, equipment and a computer readable medium for processing service messages, relating to the technical field of computers. One embodiment of the method comprises the following steps: receiving service information of an application, and sending the service information to an information queue of the application, wherein the information queue corresponds to a service information packet; screening out service messages belonging to service message packets corresponding to the message queues according to the identifiers of the service messages in the message queues; and processing the service message according to the service logic of the service message packet at the application server by adopting the message queue corresponding to the service message packet. This embodiment can reduce the business impact of business logic changes on the overall application.

Description

Method, apparatus, device and computer readable medium for processing business message
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a computer readable medium for processing a service message.
Background
At present, the distributed message is widely used in the Internet system, and the effects of decoupling and peak clipping and valley filling of the system are achieved through the distributed message, so that a very good effect is achieved. Distributed messaging is already an indispensable infrastructure in large internet systems.
In the process of implementing the present invention, the inventor finds that at least the following problems exist in the prior art: the distributed message monitoring service is adopted, and the influence on the whole service is larger due to the logic change of the service.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, apparatus, device, and computer readable medium for processing a service message, which can reduce the service impact of service logic changes on the whole application.
To achieve the above object, according to one aspect of an embodiment of the present invention, there is provided a method of processing a service message, including:
receiving service information of an application, and sending the service information to an information queue of the application, wherein the information queue corresponds to a service information packet;
screening out service messages belonging to service message packets corresponding to the message queues according to the identifiers of the service messages in the message queues;
and processing the service message according to the service logic of the service message packet at the application server by adopting the message queue corresponding to the service message packet.
The receiving the service message of the application and sending the service message to a message queue of the application, wherein the message queue corresponds to a service message packet and comprises:
monitoring and receiving service messages of the application according to the identification of the application;
and respectively sending the service messages to a plurality of message queues of the application, wherein each message queue corresponds to one service message packet.
The sending the service message to the message queue of the application comprises the following steps:
and respectively sending the service message to a gray message queue of the application and a normal message queue of the application, wherein the gray message queue corresponds to a service message packet for processing the gray message, and the normal message queue corresponds to a service message packet for processing the normal message.
The identification of the service message comprises: a primary key of the service message;
the step of screening out the service messages belonging to the service message packets corresponding to the message queues according to the identifiers of the service messages in the message queues comprises the following steps:
acquiring a main key of the service message from the message queue;
and screening out the service messages belonging to the service message packets corresponding to the message queues according to the cut-off ratio of the primary key of the service messages and the service messages.
The processing the service message according to the service logic of the service message packet at the application server by adopting the message queue corresponding to the service message packet comprises the following steps:
acquiring service messages in the service message packets in message queues corresponding to the service message packets;
and processing the service message acquired from the service message packet according to the service logic of the service message packet at the service end of the application.
The processing, at the server of the application, the service message obtained from the service message packet according to the service logic of the service message packet includes:
at the service end of the application, gray service messages obtained from the gray service message packets are processed according to gray logic of the gray service message packets;
and at the service end of the application, processing the normal service message acquired from the normal service message packet according to the normal logic of the normal service message packet.
After the gray scale logic according to the gray scale service message group processes the gray scale service message acquired from the gray scale service message group, the method further comprises the following steps:
and after the gray scale service messages are successfully processed, updating the normal logic by using the gray scale logic to send the service messages to the gray scale logic processing in the service message packet.
According to a second aspect of an embodiment of the present invention, there is provided an apparatus for processing a service message, including:
the receiving module is used for receiving the service message of the application and sending the service message to a message queue of the application, wherein the message queue corresponds to the service message packet;
the screening module is used for screening service messages belonging to service message packets corresponding to the message queues according to the identifiers of the service messages in the message queues;
and the processing module is used for adopting the message queue corresponding to the service message packet and processing the service message at the application server according to the service logic of the service message packet.
According to a third aspect of an embodiment of the present invention, there is provided an electronic device for processing a service message, including:
one or more processors;
storage means for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the methods as described above.
According to a fourth aspect of embodiments of the present invention, there is provided a computer readable medium having stored thereon a computer program which when executed by a processor implements a method as described above.
One embodiment of the above invention has the following advantages or benefits: receiving service information of an application, and sending the service information to an information queue of the application, wherein the information queue corresponds to a service information packet; screening out service messages belonging to service message packets corresponding to the message queues according to the identifiers of the service messages in the message queues; and processing the service message according to the service logic of the service message packet at the application server by adopting the message queue corresponding to the service message packet. For the service messages, the service logic processing of the service message packets is adopted according to the identification of the service messages, so that the service influence of service logic change on the whole application can be reduced.
Further effects of the above-described non-conventional alternatives are described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic flow diagram of a method of processing a business message according to an embodiment of the present invention;
FIG. 2 is a flow diagram of sending a business message into a message queue of an application according to an embodiment of the invention;
FIG. 3 is a flow diagram of sending a business message into a message queue of an application according to an embodiment of the invention;
FIG. 4 is a flow diagram of processing a service message according to service logic of a service message packet in accordance with an embodiment of the present invention;
FIG. 5 is a flow diagram of processing a traffic message according to gray scale logic and normal logic in accordance with an embodiment of the present invention;
fig. 6 is an application diagram of a method of processing a service message according to an embodiment of the present invention;
FIG. 7 is a schematic application diagram of another method of processing a traffic message according to an embodiment of the present invention;
fig. 8 is a main structural diagram of an apparatus for processing a service message according to an embodiment of the present invention;
FIG. 9 is an exemplary system architecture diagram in which embodiments of the present invention may be applied;
fig. 10 is a schematic diagram of a computer system suitable for use in implementing an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Currently, distributed message monitoring service messages are mostly adopted. As one example, a business message of a merchant gateway sent by a merchant system is received to complete the marketing system business logic. When a change occurs in the business logic of the marketing system, a part of processing logic needs to be added or modified on the basis of monitoring the business messages.
The business logic may be altered in the following manner.
Mode one: the topic of the distributed message is unchanged and a message consumption container containing a new logical version is started to monitor the task of handling merchant shops.
If a total of 10 containers are applied, the new logical version will cut to one tenth of the normal traffic. If the message volume is relatively large, the traffic occupied by the new logical version may also increase. Failure of the new logical version can also severely impact the service of the application.
Mode two: and adding the message theme, sending part of the message to the new theme by the upstream system, and monitoring the message of the new theme by the downstream system. In the above way, the upstream system needs to be coordinated, otherwise, the system cannot execute in a floor mode.
Mode three: by modifying the system, where the distributed message is consumed, parts of the message are forwarded to the new topic and then the new topic is consumed by the current application. As the number of listening messages increases, the number of new topic setups increases, resulting in problems of increased workload and difficult maintenance.
In summary, distributed message monitoring service is adopted, and the influence on the whole service is larger due to the logic change of the service.
In order to solve the problem that the influence on the whole service is large due to the service logic change, the following technical scheme in the embodiment of the invention can be adopted.
Referring to fig. 1 and 100, fig. 1 is a main flow diagram of a method for processing service messages according to an embodiment of the present invention, where different service logic is used to process service messages in different service message packets. As shown in fig. 1, the method specifically comprises the following steps:
s101, receiving service information of an application, and sending the service information to an information queue of the application, wherein the information queue corresponds to a service information packet.
In an embodiment of the invention, the service message is received from an application. I.e. receiving the service message of the application. As one example, the application comprises a java web application, which may be launched independently. After receiving the service message of the application, the service message may be sent to a Message Queue (MQ) of the application. The message queue belongs to a distributed message component.
In the traditional mode, a message queue is adopted for the same java web application to monitor service messages. That is, one message queue consumes all traffic messages. In an embodiment of the invention, a plurality of message queues consume service messages. Specifically, the message queues correspond to traffic message packets. Such as: the message queue A corresponds to the service message packet a; message queue B corresponds to service message packet B.
Referring to fig. 2 and 200, fig. 2 is a schematic flow diagram of sending a service message to a message queue of an application according to an embodiment of the present invention. The method specifically comprises the following steps:
s201, monitoring and receiving service messages of the application according to the identification of the application.
With the application marked with the identification, the application's traffic messages can be monitored according to the application's identification. As an example, the application is identified as 001, and the service message of the application is monitored and received according to the application identifier 001.
S202, the service messages are respectively sent to a plurality of message queues of the application, and each message queue corresponds to one service message packet.
In the embodiment of the invention, a plurality of message queues are applied. Each message queue may receive a service message. The message queues correspond to traffic message packets. A service message packet is a packet to which a service message belongs. As one example, the service message is divided into service message packets.
All traffic messages are received for each message queue and then only traffic messages for the belonging packet are processed. As one example, the service messages include service message 1, service message 2, service message 3, and service message 4. The message queue A corresponds to the service message packet a; message queue B corresponds to service message packet B. Message queue a receives service message 1, service message 2, service message 3, and service message 4. Message queue B receives service message 1, service message 2, service message 3, and service message 4.
In the embodiment of fig. 2, service messages of an application are monitored and received in a plurality of message queues.
In one embodiment of the invention, the service message is sent to two message queues of the application. The two message queues include a gray level message queue of the application and a normal message queue of the application. The gray scale message queue corresponds to the gray scale service message group; the normal message queue corresponds to a normal traffic message packet. The gray message queue of the application and the normal message queue of the application are used for monitoring the service message of the application. That is, the gray message queue of the application receives all traffic messages of the application; the normal message queue of the application receives all traffic messages of the application.
That is, the service message is sent to the gray message queue of the application and the normal message queue of the application, respectively, the gray message queue corresponds to the service message packet for processing the gray message, and the normal message queue corresponds to the service message packet for processing the normal message.
Wherein the grayscale service message packet is a packet to which grayscale service data belongs. The gradation service data is service data for performing a gradation test. The normal service message packet is a packet to which the normal service message belongs. Normal service message to the service data for executing normal service.
S102, in the message queue, the service messages belonging to the service message packets corresponding to the message queue are screened out according to the identification of the service messages.
In the embodiment of the invention, in order to avoid the logic repeated processing caused by repeated consumption of the same service message, the service message belonging to the service message packet corresponding to the message queue can be screened out from the message queue according to the identification of the service message. In this way, processing is performed for the service messages in the service message packet. Wherein the identity of the service message may be obtained from a data structure in the service message.
Referring to fig. 3, 300, fig. 3 is a schematic flow diagram of sending a service message to a message queue of an application according to an embodiment of the present invention. The method specifically comprises the following steps:
s301, acquiring a main key of the service message in the message queue.
In an embodiment of the present invention, the identification of the service message includes: a primary key of the service message. After the service message is acquired in the message queue, the primary key of the service message may be acquired from the field of the service message. Wherein the primary key of the service message is an identification distinguishing the service message.
S302, screening out the service messages belonging to the service message packets corresponding to the message queues according to the cut-out ratio of the primary key of the service messages and the service messages.
After the primary key of the service message is determined, the cut-to-cut ratio of the service message can be obtained from the configuration file. As an example, in the case of a message service message, the cut-to-cut ratio of the service message may be read through a profile.
And further, screening out the service messages belonging to the service message packets corresponding to the message queues according to the cut-out ratio of the main key of the service messages and the service messages. As one example, two service message packets are set for the same application to process service messages of the same topic. And obtaining the mode of the service message by taking the mode of the main key of the service message. And comparing the relation between the modulus and the cut-off ratio of the service message. The module of the service message is smaller than the cut-off ratio, and the service message is processed by the first service message packet; the traffic message is processed by the second traffic message packet if the modulus of the traffic message is greater than or equal to the cut-off ratio. That is, the screening of the service messages belonging to the service message packet corresponding to the message queue is realized.
Such as: the cut ratio was 1%. The first service message packet is a service message packet for processing gray service messages; the second service message packet is a service message packet that handles normal service messages. And reading the primary key of the service message, comparing the primary key with the cut-off ratio, and determining that the service message belongs to the service message group. The primary key value of the first service message packet processing is: 10000;20000 service messages; the second service message packet processing primary key value is: 10001;10005, a service message.
And for the service data of which the primary key module responsible for processing the service message is smaller than the cut-off ratio of the first service message packet, the rest service messages are not processed and are directly ignored. And for the second service message packet, the main key responsible for processing the service data with the service message modulus larger than or equal to the cut-off ratio is adopted, and other service messages are directly ignored without processing.
In the embodiment of fig. 3, the service messages are filtered to ensure that the service messages are completed by the full consumption, and classification of the service messages can be flexibly controlled by the cut-off ratio.
In one embodiment of the invention, during application deployment, service message packets for processing gray service messages are identified by a system identifier UAT, and service message packets for processing normal service messages are identified by an online identifier.
S103, adopting a message queue corresponding to the service message packet, and processing the service message at the application server according to the service logic of the service message packet.
Each service message packet has a corresponding message queue, and the service message can be processed according to the service logic of the service message packet at the server side of the application. The service logic of different service message packets is different, and under the condition that the service message packet to which the service message belongs is determined, the service message is processed according to the service logic of the service message packet.
Referring to fig. 4 and 400, fig. 4 is a schematic flow diagram of processing a service message according to service logic of a service message packet according to an embodiment of the present invention. The method specifically comprises the following steps:
s401, obtaining the business message in the business message packet in the corresponding message queue of the business message packet.
The service message packet corresponds to the message queue, and after all the service messages are received in the message queue and the service messages belonging to the service message packet are screened out, the service messages in the service message packet can be directly acquired.
S402, at the application server, processing the service message obtained from the service message packet according to the service logic of the service message packet.
At the server side of the application, the service messages in the service message packet are processed for the service logic of the service message packet. That is, the service message packets are different and the service logic for handling the service messages is different. The purpose of the service message packet is to adopt corresponding service logic processing for the service messages of different packets.
Referring to fig. 5, 500, fig. 5 is a flow chart illustrating processing of a service message according to gray scale logic and normal logic according to an embodiment of the present invention. The method specifically comprises the following steps:
s501, at the application server, gray service messages obtained from the gray service message packets are processed according to the gray logic of the gray service message packets.
In one embodiment of the invention, the traffic message packets include grayscale traffic message packets and normal traffic message packets. For the two packets, the service end of the application can adopt the logic corresponding to the packets to process the service message.
Specifically, at the application server, gray service messages obtained from the gray service message packets are processed according to the gray logic of the gray service message packets.
In one embodiment of the invention, gray scale logic is a new function based on normal logic. That is, the gray logic includes normal logic.
S502, at the application server, processing the normal business message obtained from the normal business message packet according to the normal logic of the normal business message packet.
The service message can be processed by adopting logic corresponding to the packet at the service end of the application. Specifically, at the application server, the normal service message obtained from the normal service message packet is processed according to the normal logic of the normal service message packet.
Wherein, the execution of S501 and S502 is not sequential.
In the embodiment of fig. 5, gray logic processing is employed for gray scale traffic messages and normal logic processing is employed for normal traffic messages.
In one embodiment of the invention, the purpose of processing gray scale service messages with gray scale logic is considered to test the operational state of gray scale logic. And when the gray service messages are successfully processed, the gray logic test is successful, the normal logic can be updated by the gray logic, and further the update of the application is realized. Then, the service message is processed with the gray logic as normal logic.
That is, after the gray scale service messages are successfully processed, the normal logic is updated by the gray scale logic to send the service messages to the gray scale logic processing in the service message packet.
Referring to fig. 6, 600, fig. 6 is an application diagram of a method of processing a service message according to an embodiment of the present invention. Application a in fig. 6 includes two traffic message packets, a grayscale packet and a formal packet. The grayscale packet corresponds to the goup1 of the MQ and the formal packet corresponds to the goup2 of the MQ.
Before the business message is consumed, i.e. the business message is processed, the business primary key, i.e. the primary key, of the message, i.e. the business message, is acquired. And obtaining the bill after the business primary key is modulo, judging the relationship between the bill and the cut percentage and determining the remainder according to the cut percentage, namely the cut ratio.
For the business information of which the bill is smaller than the remainder, consuming the business information in the gray level group, and executing new version logic, namely gray level logic; for the business messages with the bill being greater than or equal to the remainder, the old version logic, namely the normal logic, is executed for the message business messages in the formal grouping.
And distinguishing the service information in the gray scale group from the service data in the formal group, and verifying whether the gray scale logic is correct, and if so, cutting the whole amount.
Referring to fig. 7, 700, fig. 7 is an application diagram of another method of processing a service message according to an embodiment of the present invention.
The application in fig. 7 includes two traffic message packets, a grayscale packet and a formal packet. The grayscale packet corresponds to consumption goup1 and the formal packet corresponds to consumption goup2.
The upstream system is a service message producer, registers a new subscription consumption as a group1 application after producing the service message, the consumption theme is unchanged, and is used for monitoring part of gray level grouping flow, processing by using java application gray level grouping after consuming the service message, and adopting gray level logic processing. And the other part of business information is consumed and processed by adopting a group2 application, the same subject information is consumed, and formal logic processing is adopted for the formal grouping of the java application. In this way, the traffic messages in the grayscale packet are distinguished from the traffic messages in the formal packet, and it is verified whether the grayscale logic is correct, and if so, the traffic messages can be cut in total.
In the embodiment of the invention, receiving a service message of an application and sending the service message to a message queue of the application, wherein the message queue corresponds to a service message packet; screening out service messages belonging to service message packets corresponding to the message queues according to the identifiers of the service messages in the message queues; and processing the service message according to the service logic of the service message packet at the application server by adopting the message queue corresponding to the service message packet. For the service messages, the service logic processing of the service message packets is adopted according to the identification of the service messages, so that the service influence of service logic change on the whole application can be reduced.
In the embodiment of the invention, the transformation of the system is minimum, and the service message processed by the whole gray logic can be controlled, so that the risk of system on-line is reduced.
Referring to fig. 8, fig. 8 is a schematic main structure diagram of an apparatus for processing a service message according to an embodiment of the present invention, where the apparatus for processing a service message may implement a method for processing a service message, as shown in fig. 8, and the apparatus for processing a service message specifically includes:
a receiving module 801, configured to receive a service message of an application, and send the service message to a message queue of the application, where the message queue corresponds to a service message packet;
a screening module 802, configured to screen, in the message queue, service messages belonging to a service message packet corresponding to the message queue according to the identifier of the service message;
and a processing module 803, configured to process, at the application server, the service message according to the service logic of the service message packet by using the message queue corresponding to the service message packet.
In one embodiment of the present invention, the receiving module 801 is specifically configured to monitor and receive a service message of the application according to the identifier of the application;
and respectively sending the service messages to a plurality of message queues of the application, wherein each message queue corresponds to one service message packet.
In one embodiment of the present invention, the receiving module 801 is specifically configured to send the service message to a gray message queue of the application and a normal message queue of the application, where the gray message queue corresponds to a service message packet for processing a gray message, and the normal message queue corresponds to a service message packet for processing a normal message.
In one embodiment of the present invention, the identification of the service message includes: a primary key of the service message; a screening module 802, configured to obtain a primary key of the service message from the message queue;
and screening out the service messages belonging to the service message packets corresponding to the message queues according to the cut-off ratio of the primary key of the service messages and the service messages.
In one embodiment of the present invention, the processing module 803 is specifically configured to obtain, in the message queue corresponding to the service message packet, a service message in the service message packet;
and processing the service message acquired from the service message packet according to the service logic of the service message packet at the service end of the application.
In one embodiment of the present invention, the processing module 803 is specifically configured to process, at the service end of the application, the gray scale service message obtained from the gray scale service message group according to the gray scale logic of the gray scale service message group;
and at the service end of the application, processing the normal service message acquired from the normal service message packet according to the normal logic of the normal service message packet.
In one embodiment of the present invention, the processing module 803 is further configured to update the normal logic with the gray logic after the gray service messages are successfully processed, so as to send the service messages to the gray logic processing in the service message packet.
Fig. 9 illustrates an exemplary system architecture 900 of a method of processing a traffic message or an apparatus of processing a traffic message to which embodiments of the present invention may be applied.
As shown in fig. 9, system architecture 900 may include terminal devices 901, 902, 903, a network 904, and a server 905. The network 904 is the medium used to provide communications links between the terminal devices 901, 902, 903 and the server 905. The network 904 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may interact with the server 905 over the network 904 using the terminal devices 901, 902, 903 to receive or send messages, etc. Various communication client applications may be installed on the terminal devices 901, 902, 903, such as shopping class applications, web browser applications, search class applications, instant messaging tools, mailbox clients, social platform software, and the like (by way of example only).
Terminal devices 901, 902, 903 may be a variety of electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 905 may be a server that provides various services, such as a background management server (by way of example only) that provides support for shopping-type websites browsed by users using terminal devices 901, 902, 903. The background management server may analyze and process the received data such as the product information query request, and feedback the processing result (e.g., the target push information, the product information—only an example) to the terminal device.
It should be noted that, the method for processing a service message according to the embodiment of the present invention is generally performed by the server 905, and accordingly, the device for processing a service message is generally disposed in the server 905.
It should be understood that the number of terminal devices, networks and servers in fig. 9 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 10, there is illustrated a schematic diagram of a computer system 1000 suitable for use in implementing an embodiment of the present invention. The terminal device shown in fig. 10 is only an example, and should not impose any limitation on the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 10, the computer system 1000 includes a Central Processing Unit (CPU) 1001, which can execute various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 1002 or a program loaded from a storage section 1008 into a Random Access Memory (RAM) 1003. In the RAM 1003, various programs and data required for the operation of the system 1000 are also stored. The CPU 1001, ROM 1002, and RAM 1003 are connected to each other by a bus 1004. An input/output (I/O) interface 1005 is also connected to bus 1004.
The following components are connected to the I/O interface 1005: an input section 1006 including a keyboard, a mouse, and the like; an output portion 1007 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), etc., and a speaker, etc.; a storage portion 1008 including a hard disk or the like; and a communication section 1009 including a network interface card such as a LAN card, a modem, or the like. The communication section 1009 performs communication processing via a network such as the internet. The drive 1010 is also connected to the I/O interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like, is installed as needed in the drive 1010, so that a computer program read out therefrom is installed as needed in the storage section 1008.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 1009, and/or installed from the removable medium 1011. The above-described functions defined in the system of the present invention are performed when the computer program is executed by a Central Processing Unit (CPU) 1001.
The computer readable medium shown in the present invention may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules involved in the embodiments of the present invention may be implemented in software or in hardware. The described modules may also be provided in a processor, for example, as: a processor includes a receiving module, a screening module, and a processing module. The names of these modules do not in any way constitute a limitation of the module itself, for example, the receiving module may also be described as "receiving a service message of an application and sending the service message to a message queue of the application, where the message queue corresponds to a service message packet".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be present alone without being fitted into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to include:
receiving service information of an application, and sending the service information to an information queue of the application, wherein the information queue corresponds to a service information packet;
screening out service messages belonging to service message packets corresponding to the message queues according to the identifiers of the service messages in the message queues;
and processing the service message according to the service logic of the service message packet at the application server by adopting the message queue corresponding to the service message packet.
According to the technical scheme of the embodiment of the invention, the service message of the application is received, and the service message is sent to the message queue of the application, wherein the message queue corresponds to the service message packet; screening out service messages belonging to service message packets corresponding to the message queues according to the identifiers of the service messages in the message queues; and processing the service message according to the service logic of the service message packet at the application server by adopting the message queue corresponding to the service message packet. For the service messages, the service logic processing of the service message packets is adopted according to the identification of the service messages, so that the service influence of service logic change on the whole application can be reduced.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention. It should be noted that, in the technical solution of the present disclosure, the acquisition, storage, application, etc. of the related personal information of the user all conform to the rules of the related laws and regulations, and do not violate the popular regulations of the public order.

Claims (10)

1. A method of processing a traffic message, comprising:
receiving service information of an application, and sending the service information to an information queue of the application, wherein the information queue corresponds to a service information packet;
screening out service messages belonging to service message packets corresponding to the message queues according to the identifiers of the service messages in the message queues;
and processing the service message according to the service logic of the service message packet at the application server by adopting the message queue corresponding to the service message packet.
2. The method of processing a service message according to claim 1, wherein said receiving a service message of an application and sending said service message to a message queue of said application, said message queue corresponding to a service message packet, comprises:
monitoring and receiving service messages of the application according to the identification of the application;
and respectively sending the service messages to a plurality of message queues of the application, wherein each message queue corresponds to one service message packet.
3. The method of processing a service message according to claim 2, wherein said sending said service message to a message queue of said application comprises:
and respectively sending the service message to a gray message queue of the application and a normal message queue of the application, wherein the gray message queue corresponds to a service message packet for processing the gray message, and the normal message queue corresponds to a service message packet for processing the normal message.
4. A method of processing a service message according to claim 1, characterized in that the identification of the service message comprises: a primary key of the service message;
the step of screening out the service messages belonging to the service message packets corresponding to the message queues according to the identifiers of the service messages in the message queues comprises the following steps:
acquiring a main key of the service message from the message queue;
and screening out the service messages belonging to the service message packets corresponding to the message queues according to the cut-off ratio of the primary key of the service messages and the service messages.
5. The method for processing the service message according to claim 1, wherein said processing the service message at the service end of the application according to the service logic of the service message packet using the message queue corresponding to the service message packet comprises:
acquiring service messages in the service message packets in message queues corresponding to the service message packets;
and processing the service message acquired from the service message packet according to the service logic of the service message packet at the service end of the application.
6. The method for processing service messages according to claim 5, wherein said processing service messages acquired from said service message packets according to service logic of said service message packets at said application server comprises:
at the service end of the application, gray service messages obtained from the gray service message packets are processed according to gray logic of the gray service message packets;
and at the service end of the application, processing the normal service message acquired from the normal service message packet according to the normal logic of the normal service message packet.
7. The method for processing a service message according to claim 6, wherein after the gray scale logic according to the gray scale service message packet processes the gray scale service message acquired from the gray scale service message packet, further comprising:
and after the gray scale service messages are successfully processed, updating the normal logic by using the gray scale logic to send the service messages to the gray scale logic processing in the service message packet.
8. An apparatus for processing a traffic message, comprising:
the receiving module is used for receiving the service message of the application and sending the service message to a message queue of the application, wherein the message queue corresponds to the service message packet;
the screening module is used for screening service messages belonging to service message packets corresponding to the message queues according to the identifiers of the service messages in the message queues;
and the processing module is used for adopting the message queue corresponding to the service message packet and processing the service message at the application server according to the service logic of the service message packet.
9. An electronic device for processing a service message, comprising:
one or more processors;
storage means for storing one or more programs,
when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-7.
10. A computer readable medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-7.
CN202311719505.9A 2023-12-14 2023-12-14 Method, apparatus, device and computer readable medium for processing business message Pending CN117891621A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311719505.9A CN117891621A (en) 2023-12-14 2023-12-14 Method, apparatus, device and computer readable medium for processing business message

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311719505.9A CN117891621A (en) 2023-12-14 2023-12-14 Method, apparatus, device and computer readable medium for processing business message

Publications (1)

Publication Number Publication Date
CN117891621A true CN117891621A (en) 2024-04-16

Family

ID=90646296

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311719505.9A Pending CN117891621A (en) 2023-12-14 2023-12-14 Method, apparatus, device and computer readable medium for processing business message

Country Status (1)

Country Link
CN (1) CN117891621A (en)

Similar Documents

Publication Publication Date Title
CN111427701A (en) Workflow engine system and business processing method
CN112445868A (en) Service message processing method and device
CN112084042B (en) Message processing method and device
CN112817562A (en) Service processing method and device
CN113778499B (en) Method, apparatus, device and computer readable medium for publishing services
CN113010238A (en) Permission determination method, device and system for micro application call interface
CN113742389A (en) Service processing method and device
CN112948138A (en) Method and device for processing message
CN117891621A (en) Method, apparatus, device and computer readable medium for processing business message
CN113765871B (en) Method and device for managing fort machine
CN113778780B (en) Application stability determining method and device, electronic equipment and storage medium
CN112559001B (en) Method and device for updating application
CN111950232B (en) Method and device for automatically switching number segments
CN114049065A (en) Data processing method, device and system
CN113590243A (en) Energy enterprise project creation method and device, computer equipment and medium
CN113238919A (en) Statistical method, device and system for user access number
CN112272211A (en) Service request processing method, device and system
CN111580882A (en) Application program starting method, device, computer system and medium
CN113132447A (en) Reverse proxy method and system
CN111949472A (en) Method and device for recording application logs
CN112882838B (en) Method and apparatus for vacating resource instances
CN113760886B (en) Method, apparatus, device and computer readable medium for providing data service
CN113766437B (en) Short message sending method and device
CN116112880B (en) MQ-based high concurrency short message sending method and device
CN113282274B (en) Data processing method and device

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