Message processing method and device, equipment and medium

By designing a message processing system based on microservice architecture, the problem of the difficulty of the existing technology in covering massive business lines and message channels driving stable operation is solved, and efficient and flexible message processing and management are achieved.

CN120216221APending Publication Date: 2025-06-27ZHEJIANG SHENDA INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510319332.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-18
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

The existing message processing system cannot cover the merchant's massive business lines, and the stable operation driven by the message channel is difficult to ensure, and there are problems such as high procurement costs, high management and control costs, high system responsibility, and high message link tracking.

Method used

Design a message processing system based on microservice architecture, including gateways, message producers, aggregation message channel driver layer, middleware, and message consumer. The message channel basic information, association links and message templates are configured through the aggregate message channel driver layer, and the legitimacy checksum message forwarding of message request tasks is realized through remote procedure calls.

Benefits of technology

It has achieved coverage of massive business lines, ensured the stable operation of message channel driven, reduced costs, improved system configuration flexibility and development efficiency, and simplified system management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120216221A_ABST
    Figure CN120216221A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, and provides a message processing method and device, equipment and a medium, a message processing system with an aggregation message channel driving layer and middleware located on an existing message center is built based on a micro-service architecture, the operation process of a merchant can be simplified, and the user experience can be improved. Massive service lines can be covered through a unified message management service; uniform event processing service can enable a message channel driver to run stably and enable a service message to reach message middleware quickly, the message middleware ensures efficient consumption and processing of message content and guarantees real-time transmission of information, and by combining a micro-service architecture, a self-constructed aggregation message channel driver layer and the middleware, the cost is remarkably reduced, and the service quality is improved. And the configuration flexibility and the development efficiency of the system are greatly improved, and the system management is simplified, so that the system is more convenient and efficient.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular, to a message processing method, apparatus, device, and medium. Background Art

[0002] With the continuous development of the economy, various types of merchants have emerged, such as restaurants and clothing stores in large shopping malls. Therefore, how to enable messages to flow quickly to improve business processing efficiency has become an urgent problem to be solved.

[0003] However, the current message processing system cannot cover the massive business lines of merchants, nor can it ensure the stable operation of the message channel driver. At the same time, there are problems such as high procurement costs, high management and control costs, high system complexity, and great difficulty in tracking message links. Summary of the Invention

[0004] In view of the above, it is necessary to provide a message processing method, apparatus, device, and medium, aiming to solve the problems of low merchant coverage rate and low transfer efficiency.

[0005] A message processing method is applied to a message processing system built based on a microservices architecture. The message processing system includes a gateway, a message producer, an aggregated message channel driver layer, a middleware, and a message consumer; the aggregated message channel driver layer includes at least one message channel driver, and each message channel driver includes a message channel driver receiver and a message channel driver forwarder; the message processing method includes:

[0006] When the message producer receives a message request task forwarded by the gateway, the message producer requests the aggregated message channel driver layer to perform rule processing through a remote procedure call to perform a legality check on the message request task;

[0007] When the message request task passes the legality check, the message producer determines the target business line to which the message request task belongs, and pushes the message request task to the message channel driver receiver of the target message channel driver corresponding to the target business line;

[0008] The target message channel driver rectifies the message request task to obtain a target message, and forwards the target message to the middleware through the message channel driver forwarder of the target message channel driver;

[0009] The middleware consumes the target message and issues the target message to the message consumer.

[0010] According to a preferred embodiment of the present invention, the gateway uses a bytecode instrumentation method to empower rules for the API and perform traffic monitoring;

[0011] The gateway transfers APIs in real time through a duplex communication protocol to capture performance metrics and abnormal patterns;

[0012] After the gateway matches and calculates the parameters of the received message with the preset rules based on the rule engine, it issues the obtained message request task to the message producer.

[0013] According to a preferred embodiment of the present invention, the aggregated message channel driver layer is used to configure basic information of the message channel, and the basic information of the message channel includes a message channel driver name, business identity, event type, event scope, and message type; wherein, the business identity includes at least one business line included in the message consumer; the event type includes the production message side of each business line; the event scope includes the business format on the business side;

[0014] The aggregated message channel driver layer is further used to configure associated links; wherein, the associated links include a directional link when sending a message of a specified message type, and are used to obtain relevant information through the empowerment of the message producer;

[0015] The aggregated message channel driver layer is further used to associate available parameters; wherein, the available parameters include message fragment information required when sending message content;

[0016] The aggregated message channel driver layer is further used to configure a message template;

[0017] The aggregated message channel driver layer is further used to update the information of each message channel driver;

[0018] The aggregated message channel driver layer is further used to broadcast the message channel drivers with completed configuration for the message producer to subscribe.

[0019] According to a preferred embodiment of the present invention, when the aggregated message channel driver layer is applied to the message producer, the aggregated message channel driver layer is further used to query the message channel driver corresponding to the business line of the message producer according to the message channel driver name;

[0020] When the aggregated message channel driver layer is applied to the message producer, the aggregated message channel driver layer is further used to subscribe to the message channel driver corresponding to the business line of the message producer, so that the message producer can synchronize messages to the subscribed message channel driver through a remote procedure call interface for persistence;

[0021] When the aggregated message channel driver layer is applied to the message producer, the aggregated message channel driver layer is further used to determine the message channel according to the message channel driver corresponding to the business line of the message producer;

[0022] When the aggregated message channel driver layer is applied to the message producer, the aggregated message channel driver layer is further configured to perform customization processing on the queried message channel driver corresponding to the business line of the message producer: wherein, the customization processing includes defining the event name of the message channel driver, the time point of the sending object, the event scope of the service, and performing customization processing on the message content template based on the fragments empowered by the driving message;

[0023] When the aggregated message channel driver layer is applied to the message producer, the aggregated message channel driver layer is further configured to perform maintenance processing on the queried message channel driver corresponding to the business line of the message producer according to the maintenance operation of the message producer.

[0024] According to a preferred embodiment of the present invention, the method further includes:

[0025] When a message creation event is detected, the aggregated message channel driver layer detects whether a template has been created through idempotency verification;

[0026] When passing the idempotency verification, all message producer information is pulled based on a specified API interface, and the all producer information is verified for duplication according to the driver ID transaction, event type, and event scope;

[0027] When all the producer information passes the duplication verification, all the message producer information is batch-added, and the corresponding message channel drivers are batch-updated; wherein, for the existing message channel drivers, the corresponding fields are overwritten;

[0028] Message templates are batch-added based on the updated message channel drivers.

[0029] According to a preferred embodiment of the present invention, the target message channel driver rectifies the message request task to obtain the target message, including:

[0030] The target message channel driver queries the message driver template corresponding to the message producer;

[0031] The target message channel driver generates a message body corresponding to the message content of the message request task based on the driver status, multilingual ability, and the message producer, based on the message driver template, to obtain the target message.

[0032] According to a preferred embodiment of the present invention, forwarding the target message to the middleware through the message channel driver forwarder of the target message channel driver includes:

[0033] The message channel driver forwarder adds the target message to the message content task;

[0034] The task center of the message channel-driven forwarder performs multi-scenario task scans at specified time intervals and records the start time of the scan as the current time;

[0035] The task center queries the smallest task ID whose target execution time is earlier than the current time and the largest task ID whose target execution time is earlier than the current time;

[0036] The task center queries tasks in segments with the smallest task ID and the largest task ID as the closed interval to obtain a task list;

[0037] The message channel-driven forwarder traverses the task list and extracts the message content to the middleware.

[0038] A message processing device runs in a message processing system built based on a microservices architecture. The message processing system includes a gateway, a message producer, an aggregated message channel driver layer, middleware, and a message consumer; the aggregated message channel driver layer includes at least one message channel driver, and each message channel driver includes a message channel driver receiver and a message channel driver forwarder; the message processing device includes:

[0039] The message producer is used to, when receiving a message request task forwarded by the gateway, request the aggregated message channel driver layer to perform rule processing through remote procedure call to perform legality verification on the message request task;

[0040] The message producer is also used to, when the message request task passes the legality verification, determine the target business line to which the message request task belongs and push the message request task to the message channel driver receiver of the target message channel driver corresponding to the target business line;

[0041] The target message channel driver is used to rectify the message request task to obtain a target message and forward the target message to the middleware through the message channel driver forwarder of the target message channel driver;

[0042] The middleware is used to consume the target message and send the target message to the message consumer.

[0043] A computer device, the computer device includes:

[0044] A memory that stores at least one instruction; and

[0045] A processor that executes the instructions stored in the memory to implement the message processing method.

[0046] A computer-readable storage medium stores at least one instruction, and the at least one instruction is executed by a processor in a computer device to implement the message processing method.

[0047] As can be seen from the above technical solutions, the present invention builds a message processing system based on a microservices architecture, which has an aggregated message channel driver layer and middleware located above the existing message center. It can simplify the operation process of merchants and improve the user experience; through a unified message management service, it can cover a large number of business lines; the unified event processing service can make the message channel driver operate stably, enabling business messages to quickly reach the message middleware, and the message middleware ensures the efficient consumption and processing of message content, guaranteeing the real-time transmission of information. Combining the microservices architecture, the self-built aggregated message channel driver layer and middleware not only significantly reduces costs, but also greatly improves the configuration flexibility and development efficiency of the system, and simplifies system management, making it more convenient and efficient. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 is a flowchart of a preferred embodiment of the message processing method of the present invention.

[0049] Figure 2 is a functional module diagram of a preferred embodiment of the message processing device of the present invention.

[0050] Figure 3 is a schematic structural diagram of a computer device of a preferred embodiment for implementing the message processing method of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0051] In order to make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0052] As Figure 1 shown, it is a flowchart of a preferred embodiment of the message processing method of the present invention. According to different requirements, the order of the steps in this flowchart can be changed, and some steps can be omitted.

[0053] The message processing method is applied to one or more computer devices. The computer device is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to a microprocessor, an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a digital signal processor (DSP), an embedded device, etc.

[0054] The computer device can be any kind of electronic product that can interact with users, such as a personal computer, a tablet computer, a smart phone, a personal digital assistant (PDA), a game console, an Internet Protocol Television (IPTV), a smart wearable device, etc.

[0055] The computer device may also include a network device and / or a user device. Among them, the network device includes, but is not limited to, a single network server, a server group composed of multiple network servers, or a cloud composed of a large number of hosts or network servers based on cloud computing.

[0056] The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0057] Among them, artificial intelligence (AI) is a theory, method, technology, and application system that uses a digital computer or a machine controlled by a digital computer to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to obtain the best results.

[0058] Artificial intelligence basic technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation / interaction systems, and mechatronics. Artificial intelligence software technologies mainly include several major directions such as computer vision technology, robotics, biometric technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0059] The network where the computer device is located includes, but is not limited to, the Internet, wide area network, metropolitan area network, local area network, virtual private network (VPN), etc.

[0060] This embodiment is applied to a message processing system built based on a microservices architecture. The message processing system includes a gateway, a message producer, an aggregated message channel driver layer, middleware, and a message consumer; the aggregated message channel driver layer includes at least one message channel driver, and each message channel driver includes a message channel driver receiver and a message channel driver forwarder; the message processing method includes:

[0061] S10. When the message producer receives the message request task forwarded by the gateway, the message producer requests the aggregated message channel driver layer to perform rule processing through Remote Procedure Call (RPC) to perform a legality check on the message request task.

[0062] In this embodiment, the message producer may be a mall business service provider, such as a mall administrator, a mall consumer user, etc.

[0063] In this embodiment, the message request task may include a gateway forwarding task, a message processing task, etc.

[0064] In this embodiment, for a message request task that does not conform to the rules, the process is directly ended.

[0065] In this embodiment, the gateway uses the bytecode instrumentation method to empower rules for the API (Application Programming Interface) (such as the link trace TraceId), and performs traffic monitoring;

[0066] The gateway transfers the API in real time through the duplex communication protocol (WebSocket) to capture performance metrics (such as response time, queries per second, success rate and failure rate, server load, etc.), and abnormal forms;

[0067] After the gateway matches and calculates the parameters of the received message with the preset rules based on the rule engine, the obtained message request task is sent to the message producer.

[0068] Among them, the parameters of the received message may include URI (Uniform Resource Identifier), HTTP (Hypertext Transfer Protocol), HEADER, and path parameters, etc.

[0069] S11. When the message request task passes the legality check, the message producer determines the target business line to which the message request task belongs, and pushes the message request task to the message channel driver receiver of the target message channel driver corresponding to the target business line.

[0070] In this embodiment, the aggregated message channel driver layer is used to configure the basic information of the message channel. The basic information of the message channel includes the message channel driver name, business identity, event type, event scope, and message type. Among them, the business identity includes at least one business line included in the message consumer; the event type includes the production message side of each business line; the event scope includes the business formats on the business side; and the message type includes various types such as text messages, emails, in-site messages, official accounts, etc.

[0071] The aggregated message channel driver layer is also used to configure the associated link. Among them, the associated link includes the directed link when sending messages of a specified message type, which is used to obtain relevant information through the empowerment of the message producer.

[0072] The aggregated message channel driver layer is also used to associate available parameters. Among them, the available parameters include the message fragment information required when sending the message content.

[0073] The aggregated message channel driver layer is also used to configure the message template. Among them, through the message template, the Chinese and English message contents corresponding to various message types can be defined.

[0074] The aggregated message channel driver layer is also used to update the information of each message channel driver. For example, the relevant information of the message channel driver can be modified.

[0075] The aggregated message channel driver layer is also used to broadcast the message channel drivers with completed configurations for the message producer to subscribe to. For example: the configured drivers can be broadcast, and the broadcast drivers will be delivered to each merchant in the mall for the merchants to subscribe to.

[0076] S12, the target message channel driver rectifies the message request task to obtain the target message, and forwards the target message to the middleware through the message channel driver forwarder of the target message channel driver.

[0077] In this embodiment, the target message channel driver rectifying the message request task to obtain the target message includes:

[0078] The target message channel driver queries the message driver template corresponding to the message producer.

[0079] The target message channel driver generates a message body corresponding to the message content of the message request task based on the driver status, multilingual ability, and the message producer (such as mall administrators, mall consumer users, etc.), based on the message driver template, to obtain the target message.

[0080] Through the above embodiments, it is possible to achieve message rectification after receiving the message.

[0081] In this embodiment, the message channel-driven forwarder driven by the target message channel forwarding the target message to the middleware includes:

[0082] The message channel-driven forwarder adds the target message to the message content task;

[0083] The task center of the message channel-driven forwarder performs multi-scenario task scanning at a specified time interval and records the start scanning time as the current time;

[0084] The task center queries the minimum task ID whose target execution time is earlier than the current time, and queries the maximum task ID whose target execution time is earlier than the current time;

[0085] The task center segmentally queries tasks with the minimum task ID and the maximum task ID as the closed interval to obtain a task list;

[0086] The message channel-driven forwarder traverses the task list and extracts the message content to the middleware.

[0087] In this embodiment, when the aggregated message channel driver layer is applied to the message producer, the aggregated message channel driver layer is further configured to query the message channel driver corresponding to the business line of the message producer according to the message channel driver name. For example, the message channel driver to be subscribed is retrieved through full match or fuzzy check of the message channel driver name;

[0088] When the aggregated message channel driver layer is applied to the message producer, the aggregated message channel driver layer is further configured to subscribe to the message channel driver corresponding to the business line of the message producer, so that the message producer can synchronize messages to the subscribed message channel driver for persistence through the remote procedure call interface. For example, the message channel driver that meets the merchant can be subscribed, and the mall synchronizes to the message channel driver side through the RPC interface for persistence;

[0089] When the aggregated message channel driver layer is applied to the message producer, the aggregated message channel driver layer is further configured to determine the message channel according to the message channel driver corresponding to the business line of the message producer. For example, the message range can be embodied according to the retrieved message channel driver that meets the merchant, and specified to specific message channels such as official accounts, text messages, emails, in-site messages, etc.;

[0090] When the aggregated message channel driver layer is applied to the message producer, the aggregated message channel driver layer is further configured to perform customization processing on the queried message channel driver corresponding to the business line of the message producer: wherein, the customization processing includes defining the event name of the message channel driver, the time point of the sending object, the event scope of the service (such as other capabilities of the product or store), and performing customization processing on the message content template based on the fragments empowered by the driving message;

[0091] When the aggregated message channel driver layer is applied to the message producer, the aggregated message channel driver layer is further configured to perform maintenance processing on the queried message channel driver corresponding to the business line of the message producer according to the maintenance operation of the message producer. For example, a mall merchant can maintain the message channel driver according to daily maintenance needs.

[0092] In this embodiment, the method further includes:

[0093] When a message creation event is detected, the aggregated message channel driver layer detects whether a template has been created through idempotency verification;

[0094] When passing the idempotency verification, pull all message producer information based on the specified API interface, and perform duplicate verification on all the producer information according to the driver ID transaction, event type, and event scope;

[0095] When all the producer information passes the duplicate verification, perform batch addition on all the message producer information and batch update the corresponding message channel drivers; wherein, for the existing message channel drivers, cover the corresponding fields;

[0096] Batch add message templates based on the updated message channel drivers.

[0097] Among them, when batch updating the corresponding message channel drivers, obtain time information, and verify whether the driver event exists according to the system time id. If it does not exist, do not perform the update; if it exists, only some fields can be covered.

[0098] S13, the middleware consumes the target message and delivers the target message to the message consumer.

[0099] In this embodiment, the middleware is a platform that aggregates multiple message components and is used to process the sending of different types of messages. The server integrates rich and diverse message processing capabilities and can support a wide range of business requirements.

[0100] In this embodiment, the message consumer is a carrier for receiving various message contents produced by the business party (i.e., the message producer) and is used to carry and process the message contents.

[0101] As can be seen from the above technical solutions, the present invention builds a message processing system based on a microservices architecture, which has an aggregated message channel driver layer and middleware located above the existing message center. It can simplify the operation process of merchants and improve the user experience; through a unified message management service, it can cover a large number of business lines; the unified event processing service can make the message channel driver operate stably, enable business messages to quickly reach the message middleware, and the message middleware ensures the efficient consumption and processing of message content, guaranteeing the real-time transmission of information. Combining the microservices architecture, the self-built aggregated message channel driver layer and middleware not only significantly reduces costs, but also greatly improves the configuration flexibility and development efficiency of the system, and simplifies system management, making it more convenient and efficient.

[0102] As Figure 2 shown, it is a functional module diagram of a preferred embodiment of the message processing device of the present invention. The message processing device 11 runs on a message processing system built based on a microservices architecture. The message processing system includes a gateway, a message producer, an aggregated message channel driver layer, middleware, and a message consumer; the aggregated message channel driver layer includes at least one message channel driver, and each message channel driver includes a message channel driver receiver and a message channel driver forwarder; the message processing device 11 includes a message producer 110, a target message channel driver 111, and middleware 112. The module / unit referred to in the present invention means a series of computer program segments that can be executed by a processor and can complete fixed functions, and are stored in a memory. In this embodiment, the functions of each module / unit will be described in detail in subsequent embodiments.

[0103] Among them, the message producer 110 is used to, when the message producer 110 receives a message request task forwarded by the gateway, request the aggregated message channel driver layer to perform rule processing through a remote procedure call to perform a legality check on the message request task;

[0104] The message producer 110 is further used to, when the message request task passes the legality check, determine the target business line to which the message request task belongs, and push the message request task to the message channel driver receiver of the target message channel driver 111 corresponding to the target business line;

[0105] The target message channel driver 111 is used to rectify the message request task to obtain a target message, and forward the target message to the middleware 112 through the message channel driver forwarder of the target message channel driver 111;

[0106] The middleware 112 is used to consume the target message and send the target message to the message consumer.

[0107] As can be seen from the above technical solutions, the present invention builds a message processing system based on a microservices architecture, which has an aggregated message channel driving layer and middleware located above the existing message center. It can simplify the operation process of merchants and improve the user experience; through the unified message management service, it can cover a large number of business lines; the unified event processing service can make the message channel drive operate stably, enable business messages to quickly reach the message middleware, and the message middleware ensures the efficient consumption and processing of message content, guaranteeing the real-time transmission of information. Combining the microservices architecture, the self-built aggregated message channel driving layer and middleware not only significantly reduces costs, but also greatly improves the configuration flexibility and development efficiency of the system, and simplifies system management, making it more convenient and efficient.

[0108] As Figure 3 shown, it is a schematic structural diagram of a computer device of a preferred embodiment for implementing the message processing method of the present invention.

[0109] The computer device 1 may include a memory 12, a processor 13, and a bus (the arrows in the figure are the bus), and may also include a computer program stored in the memory 12 and executable on the processor 13, such as a message processing program.

[0110] Those skilled in the art can understand that the schematic diagram is only an example of the computer device 1 and does not constitute a limitation on the computer device 1. The computer device 1 can be either a bus structure or a star structure. The computer device 1 may also include more or fewer other hardware or software than shown in the figure, or different component arrangements. For example, the computer device 1 may also include input / output devices, network access devices, etc.

[0111] It should be noted that the computer device 1 is only an example. Other existing or future possible electronic products that can be adapted to the present invention should also be included within the protection scope of the present invention and are hereby incorporated by reference.

[0112] Among them, the memory 12 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (such as SD or DX memory, etc.), magnetic memory, magnetic disk, optical disc, etc. In some embodiments, the memory 12 can be an internal storage unit of the computer device 1, such as the mobile hard disk of the computer device 1. In other embodiments, the memory 12 can also be an external storage device of the computer device 1, such as a plug-in mobile hard disk, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, etc. equipped on the computer device 1. Further, the memory 12 can also include both the internal storage unit and the external storage device of the computer device 1. The memory 12 can be used not only to store application software installed on the computer device 1 and various types of data, such as the code of the message processing program, etc., but also to temporarily store the data that has been output or will be output.

[0113] In some embodiments, the processor 13 can be composed of integrated circuits. For example, it can be composed of a single packaged integrated circuit, or can be composed of multiple integrated circuits with the same or different functions packaged, including a combination of one or more Central Processing Units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips, etc. The processor 13 is the control core (Control Unit) of the computer device 1, connecting various components of the entire computer device 1 through various interfaces and circuits, and by running or executing programs or modules stored in the memory 12 (such as executing the message processing program, etc.), and calling the data stored in the memory 12, to execute various functions of the computer device 1 and process data.

[0114] The processor 13 executes the operating system of the computer device 1 and various installed application programs. The processor 13 executes the application program to implement the steps in the above-mentioned embodiments of each message processing method, such as Figure 1 the steps shown.

[0115] Exemplarily, the computer program can be divided into one or more modules / units, and the one or more modules / units are stored in the memory 12 and executed by the processor 13 to complete the present invention. The one or more modules / units can be a series of computer-readable instruction segments capable of completing specific functions, and these instruction segments are used to describe the execution process of the computer program in the computer device 1. For example, the computer program can be divided into a message producer 110, a target message channel driver 111, and a middleware 112.

[0116] The integrated units implemented in the form of software functional modules described above can be stored in a computer-readable storage medium. The above software functional modules are stored in a storage medium and include several instructions for causing a computer device (which may be a personal computer, a computer device, or a network device, etc.) or a processor to execute a part of the message processing method described in various embodiments of the present invention.

[0117] If the integrated module / unit of the computer device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, to implement all or part of the processes in the above-described embodiment methods of the present invention, it can also be completed by a computer program instructing relevant hardware devices. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above various method embodiments can be implemented.

[0118] Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, an executable file, or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disc, a computer memory, a read-only memory (ROM, Read-Only Memory), a random access memory, etc.

[0119] Furthermore, the computer-readable storage medium mainly includes a storage program area and a storage data area. Among them, the storage program area can store an operating system, application programs required for at least one function, etc.; the storage data area can store data created according to the use of blockchain nodes, etc.

[0120] The blockchain referred to in the present invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithms. Blockchain, in essence, is a decentralized database, a string of data blocks generated by using cryptographic methods. Each data block contains information about a batch of network transactions, which is used to verify the validity (anti-counterfeiting) of the information and generate the next block. The blockchain can include a blockchain underlying platform, a platform product service layer, and an application service layer, etc.

[0121] The bus can be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience of representation, in Figure 3 it is represented by only a straight line, but it does not mean that there is only one bus or one type of bus. The bus is arranged to implement the connection and communication between the memory 12 and at least one processor 13, etc.

[0122] Although not shown, the computer device 1 may further include a power supply (such as a battery) for powering each component. Preferably, the power supply can be logically connected to the at least one processor 13 through a power management device, so as to implement functions such as charge management, discharge management, and power consumption management through the power management device. The power supply may further include any components such as one or more DC or AC power supplies, a recharge device, a power failure detection circuit, a power converter or an inverter, and a power status indicator. The computer device 1 may further include a variety of sensors, a Bluetooth module, a Wi-Fi module, etc., which will not be elaborated here.

[0123] Furthermore, the computer device 1 may further include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the computer device 1 and other computer devices.

[0124] Optionally, the computer device 1 may further include a user interface. The user interface can be a display, an input unit (such as a keyboard), and optionally, the user interface can also be a standard wired interface or a wireless interface. Optionally, in some embodiments, the display can be an LED display, a liquid crystal display, a touch liquid crystal display, and an OLED (Organic Light-Emitting Diode) toucher, etc. Among them, the display can also be appropriately referred to as a display screen or a display unit, which is used to display the information processed in the computer device 1 and to display a visual user interface.

[0125] It should be understood that the above embodiments are only for illustration purposes and are not limited by this structure in the scope of the patent application.

[0126] Those skilled in the art can understand that Figure 3The structures shown do not constitute a limitation on the computer device 1, and may include fewer or more components than those shown, or combine certain components, or have different component arrangements.

[0127] In combination Figure 1 , the memory 12 in the computer device 1 stores a plurality of instructions to implement a message processing method, and the processor 13 can execute the plurality of instructions to implement:

[0128] When the message producer receives the message request task forwarded by the gateway, the message producer requests the aggregation message channel driver layer to perform rule processing through a remote procedure call to perform a legality check on the message request task;

[0129] When the message request task passes the legality check, the message producer determines the target business line to which the message request task belongs, and pushes the message request task to the message channel driver receiver of the target message channel driver corresponding to the target business line;

[0130] The target message channel driver rectifies the message request task to obtain a target message, and forwards the target message to the middleware through the message channel driver forwarder of the target message channel driver;

[0131] The middleware consumes the target message and distributes the target message to the message consumer.

[0132] Specifically, for the specific implementation method of the above instructions by the processor 13, reference can be made to Figure 1 the description of the relevant steps in the corresponding embodiment, which will not be elaborated here.

[0133] It should be noted that all the data involved in this case are legally obtained. The non-company software tools or components appearing in the embodiments of this application are only for illustrative introduction and do not represent actual use.

[0134] In several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

[0135] The present invention can be used in numerous general-purpose or special-purpose computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and so on. The present invention can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present invention can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0136] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0137] In addition, in each embodiment of the present invention, the functional modules can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated units can be implemented in the form of hardware or in the form of a combination of hardware and software functional modules.

[0138] For those skilled in the art, it is obvious that the present invention is not limited to the details of the above-described exemplary embodiments, and without departing from the spirit or basic characteristics of the present invention, the present invention can be implemented in other specific forms.

[0139] Therefore, from any point of view, the embodiments should be regarded as exemplary and non-limiting. The scope of the present invention is defined by the appended claims rather than the above description. Therefore, all changes falling within the meaning and scope of the equivalent elements of the claims are intended to be included in the present invention. Any associated drawing marks in the claims should not be regarded as limiting the claims involved.

[0140] In addition, obviously, the term "including" does not exclude other units or steps, and the singular does not exclude the plural. The multiple units or devices described in the present invention can also be implemented by one unit or device through software or hardware. Words such as first, second, etc. are used to represent names and do not indicate any specific order.

[0141] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. A message processing method, characterized in that: Applied to the message processing system built based on microservice architecture, the message processing system includes a gateway, a message producer, an aggregated message channel driver layer, middleware, and a message consumer; The aggregated message channel driver layer includes at least one message channel driver, and each message channel driver includes a message channel driver receiver and a message channel driver forwarder; The message processing method comprises: When the message producer receives the message request task forwarded by the gateway, the message producer requests the aggregate message channel driver layer to perform rule processing through a remote procedure call to verify the legitimacy of the message request task; When the message request task passes the legitimacy check, the message producer determines the target business line to which the message request task belongs, and pushes the message request task to a message channel driver receiver of a target message channel driver corresponding to the target business line; The target message channel driver rectifies the message request task to obtain a target message, and forwards the target message to the middleware through the message channel driver forwarder of the target message channel driver; The middleware consumes the target message and sends the target message to the message consumer.

2. The message processing method according to claim 1, characterized in that: The gateway uses bytecode instrumentation to enable rules for the API and perform traffic monitoring; The gateway streams the API in real time through a duplex communication protocol to capture performance indicators and abnormal patterns; After the gateway performs matching calculations on the parameters of the received message and the preset rules based on the rule engine, the obtained message request task is sent to the message producer.

3. The message processing method according to claim 1, wherein: The aggregated message channel driver layer is used to configure the basic information of the message channel, which includes the message channel driver name, business identity, event type, event range, and message type; wherein the business identity includes at least one business line included in the message consumer; the event type includes the production message side of each business line; the event range includes the business state of the business side; The aggregate message channel driver layer is also used to configure associated links; wherein the associated links include directional links when sending messages of a specified message type, and are used to obtain relevant information through the empowerment of the message producer; The aggregate message channel driver layer is also used to associate available parameters; wherein the available parameters include message fragment information required when sending message content; The aggregate message channel driver layer is also used to configure message templates; The aggregated message channel driver layer is also used to update the information of each message channel driver; The aggregate message channel driver layer is also used to broadcast the configured message channel driver for subscription by the message producer.

4. The message processing method according to claim 3, characterized in that: When the aggregated message channel driver layer is applied to the message producer, the aggregated message channel driver layer is further used to query the message channel driver corresponding to the business line of the message producer according to the message channel driver name; When the aggregated message channel driver layer is applied to the message producer, the aggregated message channel driver layer is also used to subscribe to the message channel driver corresponding to the business line of the message producer, so that the message producer can synchronize messages to the subscribed message channel driver through the remote procedure call interface for persistence; When the aggregate message channel driver layer is applied to the message producer, the aggregate message channel driver layer is further used to determine the message channel according to the message channel driver corresponding to the business line of the message producer; When the aggregated message channel driver layer is applied to the message producer, the aggregated message channel driver layer is also used to customize the message channel driver corresponding to the business line of the message producer that is queried: wherein the customized processing includes defining the event name of the message channel driver, the time point of the sending object, the event scope of the business, and customizing the message content template based on the fragments enabled by the driver message; When the aggregate message channel driver layer is applied to the message producer, the aggregate message channel driver layer is further used to perform maintenance processing on the queried message channel driver corresponding to the business line of the message producer according to the maintenance operation of the message producer.

5. The message processing method according to claim 1, characterized in that: The method further comprises: When a message creation event is detected, the aggregate message channel driver layer detects whether a template has been created through idempotence verification; When the idempotence check is passed, all message producer information is pulled based on the specified API interface, and the repeatability check is performed on all producer information based on the driver ID transaction, event type, and event range; When all the producer information passes the repeatability check, all the message producer information is added in batches, and the corresponding message channel drivers are updated in batches; wherein, for the existing message channel drivers, the corresponding fields are overwritten; Drive batches of new message templates based on the updated message channel.

6. The message processing method according to claim 1, characterized in that: The target message channel driver rectifying the message request task to obtain the target message includes: The target message channel drives a query for a message driven template corresponding to the message producer; The target message channel driver generates a message body corresponding to the message content of the message request task based on the message driver template according to the driver state, multi-language capability, and the message producer, to obtain the target message.

7. The message processing method according to claim 1, characterized in that: The message channel driven forwarder driven by the target message channel forwarding the target message to the middleware comprises: The message channel drives the forwarder to add the target message to the message content task; The message channel drives the task center of the forwarder to perform multi-scenario task scanning within a specified time interval, and records the time when the scanning starts as the current time; The task center queries the minimum task ID whose target execution time is earlier than the current time, and queries the maximum task ID whose target execution time is earlier than the current time; The task center uses the minimum task ID and the maximum task ID as closed interval segmentation query tasks to obtain a task list; The message channel drives the forwarder to traverse the task list and extract the message content to the middleware.

8. A message processing device, characterized in that: Running on a message processing system built on a microservice architecture, the message processing system includes a gateway, a message producer, an aggregated message channel driver layer, middleware, and a message consumer; The aggregated message channel driver layer includes at least one message channel driver, and each message channel driver includes a message channel driver receiver and a message channel driver forwarder; The message processing device comprises: The message producer is used to request the aggregated message channel driver layer to perform rule processing through a remote procedure call to verify the legitimacy of the message request task when the message producer receives the message request task forwarded by the gateway; The message producer is further configured to determine the target business line to which the message request task belongs when the message request task passes the legitimacy check, and push the message request task to a message channel driver receiver of a target message channel driver corresponding to the target business line; The target message channel driver is used to rectify the message request task to obtain a target message, and forward the target message to the middleware through the message channel driver forwarder of the target message channel driver; The middleware is used to consume the target message and send the target message to the message consumer.

9. A computer device, characterized in that: The computer device comprises: a memory storing at least one instruction; and A processor executes instructions stored in the memory to implement the message processing method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one instruction, and the at least one instruction is executed by a processor in a computer device to implement the message processing method according to any one of claims 1 to 7.