Message push processing method and device, computer equipment, readable storage medium and program product
By setting up intermediate components and queues to be pushed between the business end and the parsing end, storing and processing message identification information, the problem of performance degradation of the message parser in the big data environment is solved, and stable push processing of massive messages is achieved.
Patent Information
- Application Number
- CN202411202277.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2024-10-08
AI Technical Summary
In a big data environment, message parsers are prone to performance degradation or even downtime when processing a large number of messages, and cannot effectively cope with the push requirements of massive messages.
Set up an intermediate component between the business end and the parsing end, store the original message and generate identification information, obtain the identification information through the queue to be pushed when the performance processing conditions of the parsing end are met, obtain the original message from the intermediate component for processing, and realize the proactive performance of the parsing end. Fetch messages and decouple them.
It reduces the probability of parser downtime on the parsing end, improves the scalability and stability of message parsing, and can effectively handle the push of massive information.
Smart Images

Figure CN118748665A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of big data technology, and in particular to a message push processing method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art
[0002] At present, the commonly used message push method is that the business system generates the original message, and sends the original message to be pushed to the message parser by calling the message parser interface. The message parser is responsible for parsing, verifying and formatting these original messages, and outputting message packets in a specific format, and then pushing them to the message producer.
[0003] However, as the number of original messages generated by business systems in a big data environment continues to increase, message parsers are prone to data message phenomena when processing a large number of messages, resulting in performance degradation or even downtime of the message parser. Therefore, a message push processing method that can cope with the push demand of massive messages is urgently needed. Summary of the invention
[0004] Based on this, it is necessary to provide a message push processing method, device, computer equipment, computer-readable storage medium and computer program product that can cope with the push demand of massive messages in response to the above technical problems.
[0005] In a first aspect, the present application provides a message push processing method, which is applied to a service end, wherein an intermediate component is provided between the service end and a parsing end for parsing messages of the service end, and the method comprises:
[0006] In response to a push request of the original message, the original message is stored in the intermediate component; wherein the intermediate component generates identification information of the original message when storing the original message;
[0007] Receiving identification information of the original message returned by the intermediate component;
[0008] The identification information of the original message is stored in a queue to be pushed. The queue to be pushed is used by the parsing end to obtain the identification information from the queue to be pushed when the performance processing conditions of the parsing end are met, and obtain the corresponding original message from the intermediate component for processing based on the obtained identification information.
[0009] In one embodiment, storing the identification information of the original message in a queue to be pushed, the queue to be pushed is used by the parsing end to obtain the identification information from the queue to be pushed when the performance processing condition of the parsing end is met, and obtaining the corresponding original message from the intermediate component for processing based on the obtained identification information includes:
[0010] The identification information of the original message is stored in a queue to be pushed, and the queue to be pushed is used by the parsing end to obtain the corresponding original message from the intermediate component for processing according to the identification information in the queue to be pushed at a set time interval; wherein the set time interval is determined according to the performance processing conditions of the parsing end.
[0011] In one embodiment, storing the identification information of the original message in a queue to be pushed, the queue to be pushed is used by the parsing end to obtain the corresponding original message from the intermediate component for processing according to the identification information in the queue to be pushed at a set time interval, including:
[0012] The identification information of the original message is stored in the queue to be pushed. The queue to be pushed is used by the parsing end to obtain the corresponding original message from the intermediate component at a set time interval according to the identification information in the queue to be pushed, and then store it in the queue to be pushed, and obtain the original message from the queue to be pushed for processing.
[0013] In one embodiment, in response to the push request of the original message, storing the original message in the intermediate component includes:
[0014] In response to a push request of an original message, encapsulating the original message into a message file;
[0015] The message file is stored in the intermediate component; wherein the intermediate component generates identification information of the message file when storing the message file, and returns the identification information of the message file to the intermediate component;
[0016] The storing of the identification information of the original message in a queue to be pushed, the queue to be pushed is used by the parsing end to obtain the identification information from the queue to be pushed when the performance processing condition of the parsing end is met, and obtaining the corresponding original message from the intermediate component for processing based on the obtained identification information includes:
[0017] The identification information of the message file is stored in a queue to be pushed. The queue to be pushed is used by the parsing end to obtain the identification information from the queue to be pushed when the performance processing conditions of the parsing end are met, and obtain the corresponding message file from the intermediate component for processing based on the obtained identification information.
[0018] In one embodiment, the step of storing the original message in the intermediate component in response to the push request of the original message comprises:
[0019] Original messages from multiple data sources are obtained; wherein the data sources correspond to services, and the services include at least one of the following: resource interaction, common accumulation and allocation of resources.
[0020] In one of the embodiments, the parsing end is used to convert the original message into a message body in a fixed format, and push the message body to the message producer.
[0021] In a second aspect, the present application also provides a message push processing device, including:
[0022] An original message storage module, used to store the original message in the intermediate component in response to a push request of the original message; wherein the intermediate component generates identification information of the original message when storing the original message;
[0023] An identification information receiving module, used to receive the identification information of the original message returned by the intermediate component;
[0024] An identification information storage module is used to store the identification information of the original message in a queue to be pushed. The queue to be pushed is used by the parsing end to obtain the identification information from the queue to be pushed when the performance processing conditions of the parsing end are met, and obtain the corresponding original message from the intermediate component for processing based on the obtained identification information.
[0025] In one embodiment, the identification information storage module includes:
[0026] An identification information storage submodule is used to store the identification information of the original message in a queue to be pushed, and the queue to be pushed is used by the parsing end to obtain the corresponding original message from the intermediate component for processing according to the identification information in the queue to be pushed at a set time interval; wherein the set time interval is determined according to the performance processing conditions of the parsing end.
[0027] In one embodiment, the identification information storage submodule includes:
[0028] An identification information storage unit is used to store the identification information of the original message in a queue to be pushed. The queue to be pushed is used by the parsing end to obtain the corresponding original message from the intermediate component at a set time interval according to the identification information in the queue to be pushed, and then store it in the queue to be pushed, and obtain the original message from the queue to be pushed for processing.
[0029] In one of the embodiments, the original message storage module includes:
[0030] The original message encapsulation submodule is used to encapsulate the original message into a message file in response to a push request of the original message;
[0031] A message file storage submodule, used to store the message file in the intermediate component; wherein the intermediate component generates identification information of the message file when storing the message file, and returns the identification information of the message file to the intermediate component;
[0032] The identification information storage module is specifically used for:
[0033] The identification information of the message file is stored in a queue to be pushed. The queue to be pushed is used by the parsing end to obtain the identification information from the queue to be pushed when the performance processing conditions of the parsing end are met, and obtain the corresponding message file from the intermediate component for processing based on the obtained identification information.
[0034] In one embodiment, the device further comprises:
[0035] The original message acquisition module is used to acquire original messages from multiple data sources; wherein the data sources correspond to services, and the services include at least one of the following: resource interaction, common accumulation and allocation of resources.
[0036] In one of the embodiments, the parsing end is used to convert the original message into a message body in a fixed format, and push the message body to the message producer.
[0037] In a third aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements any of the above steps when executing the computer program.
[0038] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements any of the above steps when executed by a processor.
[0039] In a fifth aspect, the present application also provides a computer program product, including a computer program, which implements any of the steps described above when executed by a processor.
[0040] The above-mentioned message push processing method, device, computer equipment, computer-readable storage medium and computer program product can decouple the parsing end from the business end by setting an intermediate component between the business end that generates the message and the parsing end that parses the message to store the messages that need to be parsed, and store the identification information of the message separately in the queue to be pushed; by obtaining the identification of the message to be pushed from the queue to be pushed when the performance of the parsing end meets the conditions, and then obtaining the message from the intermediate component for parsing based on these identifications, the parsing end can actively capture the message according to its own processing performance and then parse it, which reduces the probability of the parser crashing at the parsing end when massive information needs to be pushed. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0042] Figure 1 An application environment diagram of a message push processing method in an embodiment;
[0043] Figure 2 A schematic diagram of a flow chart of a message push processing method in one embodiment;
[0044] Figure 3 A schematic diagram of a flow chart of a message push processing method in another embodiment;
[0045] Figure 4 It is a flowchart of a message push processing method in another embodiment;
[0046] Figure 5 is a flow chart of step S202 in one embodiment;
[0047] Figure 6 It is an application environment diagram of a message push processing method in another embodiment;
[0048] Figure 7 A schematic diagram of a flow chart of a message push processing method in yet another embodiment;
[0049] Figure 8 It is an application environment diagram of a message push processing method in yet another embodiment;
[0050] Fig. 9 It is a structural block diagram of a message push processing device in an embodiment;
[0051] Fig.10FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0052] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application. It should be noted that in the embodiments of the present application, certain software, groups, models and other existing solutions in the industry may be mentioned, which should be considered as exemplary, and their purpose is only to illustrate the feasibility of the implementation of the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0053] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations. The acquisition, storage, use, and processing of data in the technical solution of this application are in compliance with relevant provisions of national laws and regulations.
[0054] The message push processing method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown, the business end 102, the parsing end 104, and the intermediate component 106 communicate with each other through a network, the parsing end 104 is used to parse the message generated by the business end 102, and the intermediate component 106 is arranged between the business end 102 and the parsing end 104. The intermediate component 106 can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.
[0055] In an exemplary embodiment, Figure 2 As shown, a message push processing method is provided, which is applied to Figure 1 Taking the service end 102 in the example as an example, the method includes the following steps S202 to S206. Among them:
[0056] Step S202, in response to the push request of the original message, the original message is stored in the intermediate component; wherein the intermediate component generates identification information of the original message when storing the original message.
[0057] Among them, a business system may be running on the business end, and the business system is used to generate an original message when executing business logic. For example, the original message can be used to prompt the user of resource changes. The push request of the original message can be actively triggered or passively triggered. The intermediate component can be a server.
[0058] Exemplarily, after executing the business logic, the business system generates an original message and automatically generates a push request for the original message. The push request for the original message may include a timestamp, user ID (Identification), etc. After receiving the original message, the intermediate component generates unique identification information of the original message, stores the original message and the corresponding identification information in the database, and returns the identification information to the business end.
[0059] Step S204: receiving identification information of the original message returned by the intermediate component.
[0060] Exemplarily, the business end continuously sends the original message to the intermediate component, and receives the response of the intermediate component, and if the response is valid, parses the response body and extracts the identification information, wherein the identification information of the original message may be a message ID.
[0061] Step S206, storing the identification information of the original message in the queue to be pushed, the queue to be pushed is used by the parser to obtain the identification information from the queue to be pushed when the performance processing conditions of the parser are met, and obtain the corresponding original message from the intermediate component for processing based on the obtained identification information.
[0062] Among them, a parser can be run on the parsing end, and the parser is used to parse the message content, convert the message into a specific format, and push it to the subsequent processing system or consumer. Figure 1 As shown, the queue to be pushed can run on the parsing end, and the queue to be pushed can be a message queue such as Kafka, RabbitMQ, ActiveMQ, etc. It should be noted that the queue to be pushed can also run on other independent servers besides the parsing end.
[0063] Exemplarily, in response to receiving the identification information of the original message returned by the intermediate component, the business end can send the identification information to the queue to be pushed for storage. When the parsing end determines that it meets the performance processing conditions, it can obtain a list of identification information from the queue to be pushed, and obtain the corresponding original message from the intermediate component based on the obtained list of identification information for processing. Specifically, the parser of the parsing end can parse the obtained original message. It is understandable that the identification information will be continuously stored in the queue to be pushed, and the parser can process the identification information in the queue to be pushed in batches.
[0064] In one possible implementation, the performance processing conditions of the parsing end may be predetermined based on fixed configurations such as the maximum number of messages that the parser can process simultaneously, the maximum processing time for each message, and the upper limit of CPU and memory usage. For example, the performance processing conditions of the parsing end may include the time interval for obtaining messages and the maximum number of messages obtained each time. The performance processing conditions of the parsing end may also be determined dynamically and in real time based on the load of the parser. For example, when the number of original messages currently processed by the parser and the performance indicators (e.g., CPU, memory usage, etc.) are within the set safety range, it can be determined that the performance processing conditions of the parsing end are met.
[0065] In the above-mentioned message push processing method, by setting an intermediate component between the business end that generates the message and the parsing end that parses the message to store the messages that need to be parsed, and storing the identification information of the message separately in the queue to be pushed, the parsing end can be decoupled from the business end; by obtaining the identification of the message to be pushed from the queue to be pushed when the performance of the parsing end meets the conditions, and then obtaining the message from the intermediate component for parsing based on these identifications, the parsing end can actively capture the message according to its own processing performance and then parse it, which reduces the probability of the parser on the parsing end crashing when massive information needs to be pushed.
[0066] In an exemplary embodiment, Figure 3 As shown, the above step S206 may include:
[0067] Step A1, store the identification information of the original message in the queue to be pushed, the queue to be pushed is used by the parsing end to obtain the corresponding original message from the intermediate component for processing according to the identification information in the queue to be pushed at a set time interval; wherein the set time interval is determined according to the performance processing conditions of the parsing end.
[0068] The set time interval can be dynamically adjusted according to the performance processing conditions of the parsing end. For example, when the performance of the parsing end is good, the time interval can be set to be shortened; when the performance of the parsing end is poor, the time interval can be set to be extended.
[0069] Exemplarily, the parsing end may obtain identification information from the queue to be pushed at a set time interval, determine the number of original messages to be processed based on the obtained identification information, and when the number of original messages to be processed is within a set safety range, obtain the original messages corresponding to all the identification information from the intermediate component for processing, or, when the number of original messages to be processed is not within a set safety range, obtain the original messages corresponding to part of the identification information from the intermediate component for processing, so as to process the original messages corresponding to all the identification information in batches. In a possible implementation, the parsing end may obtain the original message from the intermediate component in real time after obtaining the identification information.
[0070] In this embodiment, the identification information of the original message is stored in the queue to be pushed, so that the parsing end can obtain the corresponding original message from the intermediate component for processing according to the set time interval. In this way, the message processing and message reception can be effectively separated, and the scalability and flexibility of message parsing can be improved. In addition, the set time interval can be dynamically adjusted according to the performance processing conditions of the parsing end, which can ensure the stability of message parsing under different load conditions.
[0071] In high-concurrency and large-data-volume scenarios, the queue to be pushed can also be used to temporarily store a portion of the original messages. Figure 4 As shown, the above step A1 may include:
[0072] Step A11, store the identification information of the original message in the queue to be pushed. The queue to be pushed is used by the parsing end to obtain the corresponding original message from the intermediate component at a set time interval according to the identification information in the queue to be pushed, and store it in the queue to be pushed, and obtain the original message from the queue to be pushed for processing.
[0073] Exemplarily, the parsing end can periodically check the identification information in the queue to be pushed according to a set time interval, and pull a certain amount of identification information from the queue to be pushed; for each pulled identification information, the parsing end sends a request to the intermediate component to obtain the corresponding original message, and stores it in the queue to be pushed; the parsing end performs batch pulling and post-processing on the original messages in the queue to be pushed.
[0074] In this embodiment, the queue to be pushed is used as a buffer, which can effectively prevent the accumulation of messages due to excessive load in the intermediate components, and further enhance the fault tolerance and stability of message parsing.
[0075] In an exemplary embodiment, Figure 5 As shown, the above step S202 may include:
[0076] Step S2021, in response to the push request of the original message, encapsulate the original message into a message file.
[0077] Step S2022, storing the message file in the intermediate component; wherein the intermediate component generates identification information of the message file when storing the message file, and returns the identification information of the message file to the intermediate component.
[0078] For example, please refer to Figure 6 , Figure 6 FIG. 1 is an application environment diagram of a message push processing method in another embodiment. Specifically, the service end can use a compression algorithm to encapsulate the original message into a message file.
[0079] Furthermore, the above step S206 may include:
[0080] The identification information of the message file is stored in the queue to be pushed. The queue to be pushed is used by the parser to obtain the identification information from the queue to be pushed when the performance processing conditions of the parser are met, and obtain the corresponding message file from the intermediate component for processing based on the obtained identification information.
[0081] Specifically, the parser can be used to obtain the corresponding message file, restore the message file to the original message, and then process it.
[0082] In this embodiment, by encapsulating the original message into a message file and then storing it in the intermediate component, the storage space and transmission cost can be reduced, and the data volume of the message that can be pushed can be further increased.
[0083] In one embodiment, Figure 7 As shown, before the above step S202, the following steps may be included:
[0084] Step S201, obtaining original messages from multiple data sources; wherein the data source corresponds to a business, and the business includes at least one of the following: resource interaction, common accumulation and allocation of resources.
[0085] The data source may be a business system, and the business system may run on one or more business terminals. Each business system may be used to execute different business logics.
[0086] Specifically, an API interface can be designed to receive original messages from different business systems through different protocols (such as HTTP, RPC, etc.). These systems may include but are not limited to loan systems, provident fund management systems, etc.
[0087] In this embodiment, original messages from different data sources are processed through a unified message processing mechanism, and intermediate components are shared, which can facilitate unified management of message push and realize resource sharing between, for example, financial-related business systems.
[0088] In one embodiment, Figure 8 As shown, the above-mentioned parsing end is used to convert the original message into a message body in a fixed format, and push the message body to the message producer.
[0089] Exemplarily, the business end is connected to the intermediate component, encapsulates the generated original message into a message file and uploads it to the intermediate component; the intermediate component returns identification information corresponding to the message file to the business end; the business end receives the identification information of the message file and pushes the obtained identification information to the queue of files to be processed, the parsing end periodically checks the queue of files to be processed, obtains the identification information in the queue of files to be processed, and obtains the corresponding message file from the intermediate component according to the obtained identification information; the parsing end parses the obtained message file and converts it into a message body in a fixed format; the parsing end pushes the message body to the message producer; the message producer pushes the message body to the message queue; the message consumer consumes the message body in the message queue.
[0090] To summarize, in the above-mentioned message push processing method, by setting an intermediate component between the business end that generates the message and the parsing end that parses the message to store the messages that need to be parsed, and storing the identification information of the message separately in the queue to be pushed, the parsing end can be decoupled from the business end; by obtaining the identification of the message to be pushed from the queue to be pushed when the performance of the parsing end meets the conditions, and then obtaining the message from the intermediate component for parsing based on these identifications, the parsing end can actively capture the message according to its own processing performance and then parse it, which reduces the probability of the parser on the parsing end crashing when massive information needs to be pushed.
[0091] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0092] Based on the same inventive concept, the embodiment of the present application also provides a message push processing device for implementing the message push processing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more message push processing device embodiments provided below can refer to the limitations of the message push processing method above, and will not be repeated here.
[0093] In an exemplary embodiment, Fig.10As shown, a message push processing device 300 is provided, comprising: an original message storage module 301, an identification information receiving module 302 and an identification information storage module 303, wherein:
[0094] The original message storage module 301 is used to store the original message in the intermediate component in response to the push request of the original message; wherein the intermediate component generates identification information of the original message when storing the original message.
[0095] The identification information receiving module 302 is used to receive the identification information of the original message returned by the intermediate component.
[0096] The identification information storage module 303 is used to store the identification information of the original message in the queue to be pushed. The queue to be pushed is used by the parser to obtain the identification information from the queue to be pushed when the performance processing conditions of the parser are met, and obtain the corresponding original message from the intermediate component based on the obtained identification information for processing.
[0097] In one embodiment, the identification information storage module 303 includes:
[0098] The identification information storage submodule is used to store the identification information of the original message in the queue to be pushed. The queue to be pushed is used by the parsing end to obtain the corresponding original message from the intermediate component for processing according to the identification information in the queue to be pushed at a set time interval; wherein the set time interval is determined according to the performance processing conditions of the parsing end.
[0099] In one embodiment, the identification information storage submodule includes:
[0100] The identification information storage unit is used to store the identification information of the original message in the queue to be pushed. The queue to be pushed is used by the parsing end to obtain the corresponding original message from the intermediate component at a set time interval according to the identification information in the queue to be pushed, and then store it in the queue to be pushed, and obtain the original message from the queue to be pushed for processing.
[0101] In one embodiment, the original message storage module 301 includes:
[0102] The original message encapsulation submodule is used to encapsulate the original message into a message file in response to the push request of the original message;
[0103] The message file storage submodule is used to store the message file in the intermediate component; wherein the intermediate component generates identification information of the message file when storing the message file, and returns the identification information of the message file to the intermediate component;
[0104] The identification information storage module 303 is specifically used for:
[0105] The identification information of the message file is stored in the queue to be pushed. The queue to be pushed is used by the parser to obtain the identification information from the queue to be pushed when the performance processing conditions of the parser are met, and obtain the corresponding message file from the intermediate component for processing based on the obtained identification information.
[0106] In one embodiment, the message push processing device 300 further includes:
[0107] The original message acquisition module is used to acquire original messages from multiple data sources; wherein the data source corresponds to a business, and the business includes at least one of the following: resource interaction, common accumulation and allocation of resources.
[0108] In one embodiment, the parsing end is used to convert the original message into a message body in a fixed format, and push the message body to the message producer.
[0109] Each module in the above message push processing device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0110] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Fig.10 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a message push processing method is implemented.
[0111] Those skilled in the art will understand that Fig.10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0112] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0113] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0114] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0115] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0116] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0117] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A message push processing method, It is characterized in that Applied to a business end, an intermediate component is provided between the business end and a parsing end for parsing messages of the business end, and the method comprises: In response to a push request of the original message, the original message is stored in the intermediate component; wherein the intermediate component generates identification information of the original message when storing the original message; Receiving identification information of the original message returned by the intermediate component; The identification information of the original message is stored in a queue to be pushed. The queue to be pushed is used by the parsing end to obtain the identification information from the queue to be pushed when the performance processing conditions of the parsing end are met, and obtain the corresponding original message from the intermediate component for processing based on the obtained identification information.
2. The method according to claim 1, It is characterized in that The storing of the identification information of the original message in a queue to be pushed, the queue to be pushed is used by the parsing end to obtain the identification information from the queue to be pushed when the performance processing condition of the parsing end is met, and obtaining the corresponding original message from the intermediate component for processing based on the obtained identification information includes: The identification information of the original message is stored in a queue to be pushed, and the queue to be pushed is used by the parsing end to obtain the corresponding original message from the intermediate component for processing according to the identification information in the queue to be pushed at a set time interval; wherein the set time interval is determined according to the performance processing conditions of the parsing end.
3. The method according to claim 2, It is characterized in that The storing of the identification information of the original message in a queue to be pushed, wherein the queue to be pushed is used by the parsing end to obtain the corresponding original message from the intermediate component at a set time interval according to the identification information in the queue to be pushed for processing, comprises: The identification information of the original message is stored in the queue to be pushed. The queue to be pushed is used by the parsing end to obtain the corresponding original message from the intermediate component at a set time interval according to the identification information in the queue to be pushed, and then store it in the queue to be pushed, and obtain the original message from the queue to be pushed for processing.
4. The method according to claim 1, It is characterized in that The storing the original message in the intermediate component in response to the push request of the original message comprises: In response to a push request of an original message, encapsulating the original message into a message file; The message file is stored in the intermediate component; wherein the intermediate component generates identification information of the message file when storing the message file, and returns the identification information of the message file to the intermediate component; The storing of the identification information of the original message in a queue to be pushed, the queue to be pushed is used by the parsing end to obtain the identification information from the queue to be pushed when the performance processing condition of the parsing end is met, and obtaining the corresponding original message from the intermediate component for processing based on the obtained identification information includes: The identification information of the message file is stored in a queue to be pushed. The queue to be pushed is used by the parsing end to obtain the identification information from the queue to be pushed when the performance processing conditions of the parsing end are met, and obtain the corresponding message file from the intermediate component for processing based on the obtained identification information.
5. The method according to claim 1, It is characterized in that The step of storing the original message in the intermediate component in response to the push request of the original message comprises: Original messages from multiple data sources are obtained; wherein the data sources correspond to services, and the services include at least one of the following: resource interaction, common accumulation and allocation of resources.
6. The method according to claim 1, It is characterized in that The parsing end is used to convert the original message into a message body in a fixed format, and push the message body to the message producer.
7. A message push processing device, It is characterized in that The device comprises: An original message storage module, used to store the original message in the intermediate component in response to a push request of the original message; wherein the intermediate component generates identification information of the original message when storing the original message; An identification information receiving module, used to receive the identification information of the original message returned by the intermediate component; An identification information storage module is used to store the identification information of the original message in a queue to be pushed. The queue to be pushed is used by the parsing end to obtain the identification information from the queue to be pushed when the performance processing conditions of the parsing end are met, and obtain the corresponding original message from the intermediate component for processing based on the obtained identification information.
8. The device according to claim 7, It is characterized in that The identification information storage module includes: An identification information storage submodule is used to store the identification information of the original message in a queue to be pushed, and the queue to be pushed is used by the parsing end to obtain the corresponding original message from the intermediate component for processing according to the identification information in the queue to be pushed at a set time interval; wherein the set time interval is determined according to the performance processing conditions of the parsing end.
9. The device according to claim 8, It is characterized in that The identification information storage submodule includes: An identification information storage unit is used to store the identification information of the original message in a queue to be pushed. The queue to be pushed is used by the parsing end to obtain the corresponding original message from the intermediate component at a set time interval according to the identification information in the queue to be pushed, and then store it in the queue to be pushed, and obtain the original message from the queue to be pushed for processing.
10. The device according to claim 7, It is characterized in that The original message storage module comprises: The original message encapsulation submodule is used to encapsulate the original message into a message file in response to a push request of the original message; A message file storage submodule, used to store the message file in the intermediate component; wherein the intermediate component generates identification information of the message file when storing the message file, and returns the identification information of the message file to the intermediate component; The identification information storage module is specifically used for: The identification information of the message file is stored in a queue to be pushed. The queue to be pushed is used by the parsing end to obtain the identification information from the queue to be pushed when the performance processing conditions of the parsing end are met, and obtain the corresponding message file from the intermediate component for processing based on the obtained identification information.
11. The device according to claim 7, It is characterized in that The device also includes: The original message acquisition module is used to acquire original messages from multiple data sources; wherein the data sources correspond to services, and the services include at least one of the following: resource interaction, common accumulation and allocation of resources.
12. The device according to claim 7, It is characterized in that The parsing end is used to convert the original message into a message body in a fixed format, and push the message body to the message producer.
13. A computer device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
14. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
15. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
