Message agent transmission control method and its device, equipment, medium and product
By providing the message body configuration page on the user side, constructing message objects and generating proxy objects, and realizing message delivery between online services, the problem of complex message data delivery logic and difficult system maintenance in the prior art is solved, and development efficiency and system scalability are improved.
Patent Information
- Application Number
- CN202111308294.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-05
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2041-11-05
AI Technical Summary
In the prior art, the message data transmission logic between each online service is complex and cumbersome, resulting in high development costs and difficult system maintenance. Once an error occurs in the message data delivery service, the entire system may crash.
A message proxy delivery control method is proposed, by pushing a message body configuration page to the user, receiving and constructing message objects, generating producer and consumer proxy objects, and realizing message delivery through message queues, decoupling online services and message delivery services.
This method reduces the development time of message broker delivery services and improves the development efficiency of the system. By decoupling online services and message delivery services, the coupling of the system is reduced and the scalability and robustness of the system is improved.
Smart Images

Figure CN114064311B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of network alarm notification push technology, and in particular to a message agent delivery control method, and also to corresponding devices, equipment, non-volatile storage media and computer program products of the method. Background Art
[0002] With the development of the Internet, the applications developed by major Internet platforms have multiple online services to provide users with a complete service process. For example, in an e-commerce trading platform, the user's product ordering service often includes message data transmission between multiple online services, such as payment online service, order online service, product inventory online service and product logistics online service. Message data transmission, and some online services act as message producers to produce messages and as message consumers to consume messages, so that the online services included in an online service have complex and cumbersome message data transmission logic, the development cost is high, and each online service is coupled with its message data transmission service, making the system maintenance more difficult. If an error occurs in the message data transmission service of any online service, it will lead to the collapse of the entire system. In view of the problems existing in the prior art, the applicant has made corresponding explorations in order to solve this problem. Summary of the invention
[0003] The purpose of the present application is to provide a message agent delivery control method to meet user needs, and also relates to corresponding devices, equipment, non-volatile storage media and computer program products of the method.
[0004] In order to achieve the purpose of this application, the following technical solutions are adopted:
[0005] A message agent delivery control method proposed for the purpose of this application includes the following steps:
[0006] Pushing a message body configuration page to the user to receive the message body configuration information submitted by the user, wherein the message body configuration information includes a message name, a producer tag, and a consumer tag;
[0007] Construct the corresponding message object according to the message body configuration information, and load it into the service container with the associated message name;
[0008] Generate a proxy object for the message object, and obtain the production proxy object corresponding to the producer tag and the consumption proxy object corresponding to the consumer tag;
[0009] The message body carrying the message name submitted by the production proxy object is passed to the consumption proxy object via the message queue to realize the consumption of the message body.
[0010] In a further embodiment, the message body carrying the message name submitted by the production proxy object is passed to the consumption proxy object via a message queue to realize the step of consuming the message body, including the following steps performed by the production proxy object:
[0011] The production proxy object receives a message body carrying the message name sent by the first online service;
[0012] The production proxy object pre-processes the message body to convert it into a message body suitable for consumption by the consumption proxy object;
[0013] The production proxy object adds the message body to a preset message queue.
[0014] In a further embodiment, the message body carrying the message name submitted by the production proxy object is passed to the consumption proxy object via a message queue to realize the step of consuming the message body, including the following steps performed by the consumption proxy object:
[0015] The consumer proxy object obtains the message body from the message queue;
[0016] The consumption proxy object consumes the message body to generate a consumption result required by the second online service;
[0017] The consumption proxy object pushes the consumption result to the second online service.
[0018] In a further embodiment, the step of constructing a corresponding message object according to the message body configuration information and associating it with the message name and loading it into the service container comprises the following steps:
[0019] Verify the data format of the message name, producer tag and consumer tag in the message body configuration information;
[0020] When the message body configuration information passes verification, the producer tag and the consumer tag are encapsulated to construct the message object;
[0021] The message object and the message name are loaded into the service container as mapping relationship data.
[0022] In a further embodiment, generating a proxy object for the message object, and correspondingly obtaining a production proxy object corresponding to the producer tag and a consumer proxy object corresponding to the consumer tag, comprises the following steps:
[0023] Obtaining the producer tag and the consumer tag contained in the message object from the service container;
[0024] The proxy factory is called to uniformly generate a production proxy object corresponding to the producer tag and a consumer proxy object corresponding to the consumer tag.
[0025] In a further embodiment, before executing the pushing of the message body configuration page to the user, the following steps are performed:
[0026] Receive a request pushed by a user for obtaining a message body configuration page, and obtain the login identity information contained in the request;
[0027] The login identity information is verified, and when the login identity information passes the verification, the message body configuration page is pushed to the user.
[0028] A message agent transmission control device proposed for the purpose of this application includes:
[0029] The configuration information receiving module is used to push the message body configuration page to the user to receive the message body configuration information submitted by the user, wherein the message body configuration information includes the message name, producer tag, and consumer tag;
[0030] A message object construction module, used to construct a corresponding message object according to the message body configuration information, and load the associated message name into the service container;
[0031] A proxy object generation module, used to generate a proxy object for the message object, and correspondingly obtain a production proxy object corresponding to the producer tag and a consumer proxy object corresponding to the consumer tag;
[0032] The message body delivery module is used to deliver the message body carrying the message name submitted by the production proxy object to the consumption proxy object via the message queue to realize the consumption of the message body.
[0033] In a further embodiment, the message object construction module includes:
[0034] A data format verification submodule, used to verify the data format of the message name, producer tag and consumer tag in the message body configuration information;
[0035] A message object construction submodule, used to encapsulate the producer tag and the consumer tag and construct the message object after the message body configuration information passes the verification;
[0036] The message object loading submodule is used to load the message object and the message name as mapping relationship data into the service container.
[0037] In a further embodiment, the proxy object generation module includes:
[0038] The tag acquisition submodule is used to obtain the producer tag and the consumer tag contained in the message object from the service container;
[0039] The proxy factory calling submodule is used to call the proxy factory to uniformly generate the production proxy object corresponding to the producer tag and the consumption proxy object corresponding to the consumer tag.
[0040] In a further embodiment, the message body delivery module includes:
[0041] A message body receiving submodule, used for the production proxy object to receive a message body carrying the message name sent by the first online service;
[0042] A preprocessing submodule, used for the production proxy object to preprocess the message body to convert it into a message body suitable for consumption by the consumption proxy object;
[0043] The message body adding submodule is used for the production proxy object to add the message body to a preset message queue.
[0044] In a further embodiment, the message body delivery module further includes:
[0045] A message body acquisition submodule, used for the consumer proxy object to obtain the message body from the message queue;
[0046] A message body consumption submodule, used for the consumption proxy object to consume the message body to generate a consumption result required by the second online service;
[0047] The consumption result pushing submodule is used for the consumption proxy object to push the consumption result to the second online service.
[0048] To solve the above technical problems, an embodiment of the present application further provides a computer device, including a memory and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the steps of the above-mentioned message agent delivery control method.
[0049] In order to solve the above technical problems, an embodiment of the present application also provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the above-mentioned message agent delivery control method.
[0050] In order to solve the above technical problems, the embodiment of the present application also provides a computer program product, including a computer program and computer instructions. When the computer program and computer instructions are executed by a processor, the processor executes the steps of the above-mentioned message agent transmission control method.
[0051] Compared with the prior art, the advantages of this application are as follows:
[0052] The present application provides developers with a message body configuration page, so that developers can quickly configure the message proxy delivery service between various online services only through the message body configuration page, saving the development time of the message proxy delivery service and improving the overall development efficiency of the system. The message body configuration page will provide developers with pre-configured message objects through the service container. Developers can select corresponding message objects from them and recompile them to develop new message proxy delivery services. There is no need to start development from scratch, which reduces the amount of redundant business agents and greatly improves development efficiency.
[0053] Secondly, this application uses a proxy mode to provide message delivery services between message producers and message consumers to decouple online services from message delivery services, and through the proxy message delivery mode, the scalability of the code is improved to achieve high cohesion and low coupling of the system composed of various services.
[0054] In addition, this application performs message proxy delivery services on the front-end message body configuration page, replaces the traditional coding development model with a universal configuration, improves development efficiency, unifies the message data format between each proxy object, and dynamically reads configuration information to build a message proxy delivery service, effectively improving the scalability of the overall service. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0056] Figure 1 A schematic diagram of a typical network deployment architecture related to implementing the technical solution of this application;
[0057] Figure 2 A flowchart of a typical embodiment of the message agent transmission control method of the present application;
[0058] Figure 3 A schematic diagram of a graphical user interface for a message body configuration page of the present application;
[0059] Figure 4 A schematic diagram of data interaction when the production proxy object and the message proxy object in this application each provide data proxy services for the corresponding online services;
[0060] Figure 5 A flow chart of an embodiment of the production proxy object in the present application performing message body production processing for the first online service;
[0061] Figure 6 A flow chart of an embodiment of the present application in which a consumer proxy object performs message body consumption processing for a second online service;
[0062] Figure 7 A flowchart of a specific embodiment of the present application regarding the construction of a message object;
[0063] Figure 8 A flowchart of the specific columns for generating proxy objects in this application;
[0064] Fig. 9 A schematic diagram of a flow chart formed by an embodiment of the present application for verifying identity login information pushed by a user;
[0065] Fig.10 A schematic diagram of a graphical user interface of a user login window of the present application;
[0066] Fig.11 A principle block diagram of a typical embodiment of the message agent transmission control device of the present application;
[0067] Fig.12 This is a basic structural block diagram of a computer device according to an embodiment of the present application. DETAILED DESCRIPTION
[0068] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limiting the present application.
[0069] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be intermediate elements. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.
[0070] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as generally understood by those skilled in the art to which this application belongs. It should also be understood that terms such as those defined in common dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as here.
[0071] It will be understood by those skilled in the art that the "client", "terminal" and "terminal device" used herein include both devices with wireless signal receivers, which are devices with only wireless signal receivers without transmission capabilities, and devices with receiving and transmitting hardware, which are devices with receiving and transmitting hardware capable of two-way communication on a two-way communication link. Such devices may include: cellular or other communication devices such as personal computers, tablet computers, which have single-line displays or multi-line displays or cellular or other communication devices without multi-line displays; PCS (Personal Communications Service, personal communication system), which can combine voice, data processing, fax and / or data communication capabilities; PDA (Personal Digital Assistant, personal digital assistant), which may include a radio frequency receiver, pager, Internet / intranet access, web browser, notepad, calendar and / or GPS (Global Positioning System, global positioning system) receiver; traditional laptop and / or palmtop computers or other devices, which have and / or include radio frequency receivers. The "client", "terminal" and "terminal device" used herein may be portable, transportable, installed in a vehicle (air, sea and / or land), or suitable and / or configured to run locally, and / or in a distributed form, at any other location on the earth and / or in space. The "client", "terminal" and "terminal device" used herein may also be a communication terminal, an Internet terminal, a music / video playback terminal, such as a PDA, a MID (Mobile Internet Device) and / or a mobile phone with a music / video playback function, or a smart TV, a set-top box and other devices.
[0072] The hardware referred to by the names such as "server", "client", and "service node" in this application is essentially an electronic device with capabilities equivalent to those of a personal computer. It is a hardware device that has the necessary components revealed by the von Neumann principle, such as a central processing unit (including an arithmetic unit and a controller), a memory, an input device, and an output device. The computer program is stored in its memory, and the central processing unit calls the program stored in the external memory into the internal memory for execution, executes the instructions in the program, and interacts with the input and output devices to complete specific functions.
[0073] It should be pointed out that the concept of "server" referred to in this application can also be extended to the case of server clusters. According to the network deployment principle understood by those skilled in the art, the servers should be logically divided. In physical space, these servers can be independent of each other but can be called through interfaces, or integrated into a physical computer or a set of computer clusters. Those skilled in the art should understand this flexibility, and should not use it to restrict the implementation of the network deployment method of this application.
[0074] See also Figure 1 , the hardware foundation required for the implementation of the relevant technical solutions of this application can be deployed according to the architecture shown in the figure. The server 80 referred to in this application is deployed in the cloud. As a business server, it can be responsible for further connecting relevant data servers and other servers that provide relevant support, etc., so as to form a logically related service cluster to provide services for relevant terminal devices such as the smartphone 81 and personal computer 82 shown in the figure or a third-party server (not shown). The smartphone and personal computer can access the Internet through a well-known network access method and establish a data communication link with the server 80 in the cloud to run terminal applications related to the services provided by the server.
[0075] For the server, the application is usually constructed as a service process, opening the corresponding program interface for remote calls by applications running on various terminal devices. The relevant technical solutions suitable for running on the server in this application can be implemented in the server in this way.
[0076] The application described herein refers to an application running on a server or terminal device. This application implements the relevant technical solutions of the present application in a programming manner. Its program code can be stored in a non-volatile storage medium recognizable by a computer in the form of computer executable instructions, and can be loaded into the memory by the central processing unit for execution. The relevant device of the present application is constructed by the operation of the application on the computer.
[0077] For the server, the application is usually constructed as a service process, opening the corresponding program interface for remote calls by applications running on various terminal devices. The relevant technical solutions suitable for running on the server in this application can be implemented in the server in this way.
[0078] Those skilled in the art should be aware that, although the various methods of the present application are described based on the same concept and thus present commonality to each other, unless otherwise specified, these methods can be independently executed. Similarly, for each embodiment disclosed in the present application, they are all proposed based on the same inventive concept, therefore, concepts with the same expression, and concepts that are appropriately changed for convenience despite different expressions, should be understood as equivalent.
[0079] See also Figure 2 A message agent delivery control method of the present application, in its typical embodiment, comprises the following steps:
[0080] Step S11, push the message body configuration page to the user to receive the message body configuration information submitted by the user, the message body configuration information includes the message name, producer tag, consumer tag:
[0081] The server pushes the message body configuration page to the user to receive the message body configuration information configured by the user through the message body configuration page, parses the message body configuration information, and obtains the message name, producer tag and consumer tag included in the message body configuration information.
[0082] The message body configuration page is used to configure the message body configuration message. After the user receives the message body configuration page, the user edits the message name, the producer tag and the consumer tag through the message body configuration page, and can edit the message preprocessing method of the production agent object corresponding to the producer tag, and edit the message consumption method of the consumer agent object corresponding to the consumer tag. After the user completes editing the information contained in the message body configuration information through the message body configuration page, the message body configuration information is submitted to the server so that the server performs message agent transmission processing according to the message body configuration information.
[0083] Please refer to Figure 3 , Figure 3The schematic diagram of the graphical user interface of the message body configuration page is as follows. After the user end receives the message body configuration page for output display, the message name can be edited through the message name input box 301 of the message body configuration page, the producer tag can be edited through the producer tag input box 302, the message preprocessing method of the production proxy object corresponding to the producer tag can be edited through the message preprocessing method input box 303, or the message preprocessing method can be loaded from the local storage space through the message preprocessing method browsing control 304. Correspondingly, the user edits the consumer tag through the consumer tag input box 305, edits the message consumption method of the consumption proxy object corresponding to the consumer tag through the message consumption method input box 306, or loads the message consumption method from the local storage space through the message consumption method browsing control 307. In addition, the user can select the message object loaded into the service container from the service container 309 for reuse, so as to edit the message body configuration information based on the preloaded message object, thereby saving the user's development time. After completing the editing of the above information, the message body configuration information edited through the message body configuration page is pushed to the server through the submit control 308.
[0084] The message name is used to load the message object subsequently constructed according to the message body configuration information into the service container as mapping relationship data, so that the server can distinguish the various message objects stored in the service container. Accordingly, the user edits the message name to facilitate determining the target message body affected by the message body configuration information containing the message name, and in the message transmission process of the message body, the consumer proxy object generally obtains the corresponding message body from the message queue according to the message name for consumption processing.
[0085] The producer tag is identified as characteristic information by its corresponding production proxy object, so that in the subsequent message body transmission process, after the server obtains the message body pushed by the online service, when it queries the production proxy object corresponding to the message body, it pushes the message body to the production proxy object corresponding to the producer tag for production message processing according to the producer tag specified by the message body.
[0086] The consumer tag is used to be identified as characteristic information by its corresponding consumer proxy object, so that in the subsequent message body transmission process, after the consumer proxy object completes the consumption processing of the corresponding consumer body, the consumer proxy object will push the consumption result output by the consumption processing to the online service corresponding to the consumer tag.
[0087] In one embodiment, the preprocessing method is pre-edited by a developer through the message body configuration page, which corresponds to the producer tag. The production proxy object constructed by the server according to the producer tag will perform preprocessing on the message body according to the preprocessing method to convert the data format of the consumer body into a consumer body suitable for consumption by the corresponding consumer proxy object. The specific implementation method refers to the subsequent steps and this step will not be repeated.
[0088] In one embodiment, the message consumption method is pre-edited by a developer through the message body configuration page, which corresponds to the consumer producer tag. The consumer proxy object constructed by the server according to the consumer tag will consume the consumer body obtained from the message queue according to the message consumption method, obtain consumption results suitable for the corresponding online service and push them.
[0089] Step S12: construct the corresponding message object according to the message body configuration information, and load it into the service container by associating it with the message name:
[0090] After the server obtains the message body configuration information, it will construct the message object corresponding to the message body configuration information according to the producer tag and consumer tag contained in the message body configuration information, and store the message object and the information name contained in the message body configuration information as mapping relationship data in the service container.
[0091] The server constructs the message object according to the message body configuration information to instantiate the message body configuration information. The message object includes the producer tag and the consumer tag, and is associated with the message name included in the message body configuration message and loaded into the service container, so that the subsequent server obtains the message object from the service container according to the message name to generate the corresponding proxy object.
[0092] After constructing the message object, the server stores the message object and the message name as mapping relationship data in the service container so that the message object can be reused by other developers. For example, please refer to Figure 3 The service container 309 loads and displays summaries of multiple information objects that have been instantiated by the server. Users can select corresponding information objects through the service container 309 for re-editing to develop the messaging service they need, effectively saving development time and improving the overall development efficiency of the messaging service.
[0093] In one embodiment, the message object will include the preprocessing method and the message consumption method included in the message body configuration information, so that when the developer obtains the corresponding message object from the service container, he can write based on the original preprocessing method and the message consumption method to develop a message delivery service suitable for his needs.
[0094] Step S13, generating a proxy object for the message object, and obtaining a production proxy object corresponding to the producer tag and a consumption proxy object corresponding to the consumer tag:
[0095] After the server completes the construction of the message object and stores it in the service container, it will generate a corresponding proxy object for the message object, that is, it will generate a production proxy object corresponding to the producer tag and a consumer proxy object corresponding to the consumer tag, so as to perform the message delivery service of the message body corresponding to the message name through the production proxy object and the consumer proxy object.
[0096] The production proxy object is used to perform production processing for the message body corresponding to the message name. It receives the message body pushed by the corresponding online service and pre-processes the message body to convert the message body into a message body that meets the requirements of the consumer proxy object for message consumption processing, and stores the message body in a message queue so that the consumer proxy object can obtain the message body from the message queue for consumption processing.
[0097] The consumer proxy object is used to perform message consumption processing for the message body corresponding to the message name. After the consumer proxy object obtains the message body corresponding to the message name from the message queue, it will perform message consumption processing on the message body and obtain the consumption result of the message consumption processing, so as to push the consumption result to the corresponding online service, so as to facilitate the online service to perform the corresponding service.
[0098] Specifically, the server generally obtains the message object from the service container to extract the producer tag and consumer tag contained in the message object, and calls the proxy factory to uniformly generate the production proxy object corresponding to the producer tag and the consumer proxy object corresponding to the consumer tag.
[0099] By generating the production proxy object and the consumption proxy object for the message object, the message delivery service of the message body corresponding to the message name is decoupled from the actual online service. Through the proxy mode, the coupling between the message delivery service and the actual online service is reduced so that the two parties do not interfere with each other. Moreover, through the proxy mode, the message body preprocessing method of the production proxy object and the message consumption method of the consumption proxy object can be flexibly adjusted to enhance the message body processing capability of the proxy object and improve the overall robustness of the message delivery service.
[0100] Step S14, passing the message body carrying the message name submitted by the production proxy object to the consumption proxy object via the message queue to realize consumption of the message body:
[0101] After the server produces the production proxy object and the consumption proxy object, it will start the message passing service associated with the production proxy object and the consumption proxy object, and the message passing service for the message body corresponding to the message name. Through the proxy mode, the message body carrying the message name submitted by the production proxy object is stored in the message queue, so that the message body can be passed to the consumption proxy object through the message queue, so that the consumption proxy object can consume the message body.
[0102] For specific business logic, please refer to Figure 4 The server receives a message body delivery instruction pushed by the first online service, obtains the message body, producer tag and consumer tag contained in the instruction, determines the corresponding production proxy object through the consumer tag, and submits the message body to the production proxy object so that the production proxy object pre-processes the message body, converts the rest body into a message body suitable for consumption by the message proxy object, and stores the message body in the message queue. When the message queue outputs the message body, the server passes the message body to the consumer proxy object corresponding to the consumer tag, so that the consumer proxy object consumes the message body, obtains the consumption result, and pushes the consumption result to the second online service corresponding to the consumer tag.
[0103] In one embodiment, the production proxy object preprocesses the message body received from the first online service according to the preprocessing method to convert the message body into a data format suitable for consumption by the consumption proxy object. After completing the preprocessing of the message body, the preprocessed message body is stored in the message queue so that the message proxy object can obtain the message body from the message queue, perform message consumption processing on the message body according to the message consumption method, obtain corresponding consumption results, and push the consumption results to the second online service.
[0104] In one embodiment, the consumer proxy object has a subscription mechanism to trigger the server to push the message body in the message queue that the message proxy object needs to consume and process to the message proxy object, and sets a title tag for the message proxy object to represent the message name of the message body required by the message proxy object. When the message body output in the message queue is the message body corresponding to the title tag, the server pushes the message body to the consumer proxy object to trigger the consumer proxy object to consume and process the message body.
[0105] In an actual business scenario, the first online service can be an online service for constructing e-commerce orders. Correspondingly, the second online service can be an online service for outputting e-commerce orders. It pushes a message body containing an order message to the production proxy object. After preprocessing the message body, the production proxy object pushes the message body to the message queue. The consumption proxy object serving the second online service obtains the message body for consumption processing and pushes the obtained consumption result to the second online service, so that the second online service pushes the order message in the consumption result to the corresponding client for output display.
[0106] It can be understood that the present application provides users with message body configuration services through the message body configuration page. Users can edit the message body configuration information in the message body configuration page and submit it. Users only need to perform simple configuration in the page, thereby reducing the number of redundant business codes and improving development efficiency. The page provides multiple message objects in the service container for users to reuse, so as to save users' development time and improve the overall editing efficiency of message body configuration information. After receiving the message body configuration information, the server constructs the message body and generates the corresponding proxy object, and provides message proxy delivery services for the corresponding online services to decouple the online services from the message delivery services. Moreover, through the proxy message delivery mode, the scalability of the code is improved, so as to achieve the purpose of high cohesion and low coupling of the system composed of various services.
[0107] The above typical embodiments and their variations fully disclose the implementation scheme of the message agent delivery control method of the present application. However, various variations of the method can still be derived by changing and amplifying some technical means. Other embodiments are briefly described as follows:
[0108] Please refer to Figure 5 , regarding the specific implementation method of the message body proxy production performed by the production proxy object, it includes the following steps:
[0109] Step S15: the production proxy object receives a message body carrying the message name sent by the first online service:
[0110] After the server receives the message body carrying the message name generated by the first online service, it pushes the message body to the production agent object of the message body serving the message name, so that the production agent object performs proxy production services for the message body, that is, pre-processes the message body and adds it to the message queue.
[0111] Step S16, the production proxy object preprocesses the message body to convert it into a message body suitable for consumption by the consumption proxy object:
[0112] After the production proxy object obtains the message body, it will preprocess the message body according to the preprocessing method to convert the message body into a message body suitable for consumption processing by the consumption proxy object, and the consumption proxy object serves the message body of the message name.
[0113] Step S17, the production proxy object adds the message body to a preset message queue:
[0114] After the production proxy object completes the preprocessing of the message body, the preprocessed message body is added to the preset message queue, so that the consumption proxy object obtains the consumption body from the message queue for processing.
[0115] In this embodiment, the production proxy object receives the message body pushed by the online service it serves, pre-processes the message body and adds it to the message queue to complete the message body production service that it needs to perform as a production proxy object. The production proxy object is decoupled from the first online service, and it provides production proxy services to the first online service in an agent manner.
[0116] Please refer to Figure 6 , regarding the specific implementation method of message body proxy consumption performed by the consumer proxy object, it includes the following steps:
[0117] Step S15', the consumer proxy object obtains the message body from the message queue:
[0118] When the message body served by the consumer proxy object exists in the message queue, the consumer proxy object will obtain the message body from the message queue to consume the message body.
[0119] Step S16', the consumer proxy object consumes the message body to generate the consumption result required by the second online service:
[0120] After obtaining the message body, the consumer proxy object will consume the message body according to its own message consumption method to produce the consumption result required by the second online service served by the consumer proxy object.
[0121] Step S17', the consumption proxy object pushes the consumption result to the second online service:
[0122] After the consumption proxy object obtains the consumption result generated for the message body according to the message consumption method, the consumption result is pushed to the second online service so that the second online service performs corresponding business processing on the consumption result, for example, outputs the consumption result to the corresponding client for output display.
[0123] In this embodiment, the consumer proxy object obtains the message body from the message queue to perform consumption processing on the message body for the second online service it serves, and pushes the corresponding consumption result to the second online service. The consumer proxy object provides message consumption service for the second online service in a proxy manner. Similar to the production proxy object, the consumer proxy object and the second online service are decoupled from each other to facilitate system maintenance of both parties.
[0124] Please refer to Figure 7 , regarding the specific implementation method of the server constructing the corresponding message object according to the message body configuration information, and associating it with the message name and loading it into the service container, it includes the following steps:
[0125] Step S121, verify the data format of the message name, producer tag and consumer tag in the message body configuration information:
[0126] After the server obtains the message body configuration information submitted by the user on the message body configuration page, it will verify the message body configuration information to verify the data format of the message name, producer tag and consumer tag contained in the message body configuration information, so as to prevent the incorrect data format from causing the subsequent message object construction and proxy object generation to be unable to be carried out effectively.
[0127] Step S122: When the message body configuration information passes verification, the producer tag and consumer tag are encapsulated to construct the message object:
[0128] When the message body configuration information passes the data format verification of the server, the server will encapsulate the producer tag and consumer tag contained in the message body configuration information to construct the information object, so as to facilitate the server to generate a corresponding proxy object for the consumer object and reuse the information body configuration information.
[0129] Step S123: Load the message object and message name as mapping relationship data into the service container:
[0130] After the server completes the construction of the information object, it uses the information name contained in the information object and the message body configuration information as mapping relationship data, and loads the mapping relationship data into the service container, so that subsequent users can load the service container displayed in the message body configuration page, select the message object for re-editing, and construct the message body configuration information required for another message agent delivery service.
[0131] In this embodiment, the server performs data format verification on the message body configuration information to prevent erroneous data from affecting subsequent message object construction and proxy object generation implementation, and by constructing the message object and loading it into the service container, the message body configuration message is reused, saving corresponding development time, so as to improve the overall development efficiency of developing message proxy delivery services.
[0132] Please refer to Figure 8 , regarding the specific implementation method of the server generating a proxy object for the message object, and correspondingly obtaining the production proxy object corresponding to the producer tag and the consumption proxy object corresponding to the consumer tag, it includes the following steps:
[0133] Step S131, obtaining the producer tag and consumer tag contained in the message object from the service container:
[0134] The server obtains the message object from the service container to obtain the producer tag and the consumer tag contained in the message object, and performs subsequent proxy object generation service.
[0135] Step S132, calling the proxy factory to uniformly generate the production proxy object corresponding to the producer tag and the consumption proxy object corresponding to the consumer tag:
[0136] After the server obtains the producer tag and the consumer tag, it will call the proxy factory to trigger the proxy factory to uniformly generate the production proxy object corresponding to the producer tag and the consumer proxy object corresponding to the consumer tag, so as to facilitate the subsequent provision of message proxy delivery services for the corresponding online services.
[0137] In this embodiment, the server generates a corresponding proxy object for the message object by calling the proxy factory, so as to provide message generation service and message consumption service for the corresponding online service through the proxy, so that the message transmission service does not affect the implementation of the online service, so as to achieve the purpose of high cohesion and low coupling of system modules.
[0138] Please refer to Fig. 9 and10 Before executing the message body configuration page to push to the user, perform the following steps:
[0139] Step S09: receiving a request pushed by the user for obtaining a message body configuration page, and obtaining the login identity information contained in the request:
[0140] The user sends a request for obtaining the message body configuration page to the server through the built-in browser to drive the server to verify the login identity information contained in the request.
[0141] For details, please refer to Fig.10 , Fig.10 This is a schematic diagram of the graphical user interface of the user login window. Through the user login window, the user enters user account information in the user account input box 1001 and user password information in the user password input box 1002, and submits the user account information and user password information entered by touching the login control 1003, so that the user account information and user password information are encapsulated as the login identity information of the user, and the acquisition request containing the login identity information is pushed to the server to drive the server to verify the login identity information.
[0142] Step S10, verifying the login identity information, and when the login identity information passes the verification, pushing the message body configuration page to the user:
[0143] After the server obtains the login identity information, it will verify the login identity information by querying the user database whether the user account information contained in the login identity information exists, and determining whether the user password information is the same as the user password information system associated with the user account information in the user database. If they are the same, the login identity information passes the verification of the server.
[0144] When the login identity information passes the verification of the authentication server, the server will push the message body configuration page to the user so that the user can construct and submit the message body configuration information of the corresponding message proxy delivery service through the message body configuration page.
[0145] In this embodiment, after verifying the user's login identity information, the message body configuration page corresponding to the user is pushed to the user, thereby ensuring the system security of the message proxy delivery service and preventing the system from being attacked and tampered.
[0146] Furthermore, by functionalizing each step in the method disclosed in the above embodiments, a message proxy transmission control device of the present application can be constructed. According to this idea, please refer to Fig.11In a typical embodiment, the device includes: a configuration information receiving module 11, which is used to push a message body configuration page to a user to receive message body configuration information submitted by the user, wherein the message body configuration information includes a message name, a producer tag, and a consumer tag; a message object construction module 12, which is used to construct a corresponding message object according to the message body configuration information, and associate it with the message name and load it into a service container; a proxy object generation module 13, which is used to generate a proxy object for the message object, and obtain a production proxy object corresponding to the producer tag and a consumption proxy object corresponding to the consumer tag; a message body delivery module 14, which is used to deliver the message body carrying the message name submitted by the production proxy object to the consumption proxy object via a message queue to realize the consumption of the message body.
[0147] In one embodiment, the message object construction module 12 includes: a data format verification submodule, used to verify the data format of the message name, producer tag and consumer tag in the message body configuration information; a message object construction submodule, used to encapsulate the producer tag and consumer tag and construct the message object after the message body configuration information passes the verification; and a message object loading submodule, used to load the message object and message name as mapping relationship data into the service container.
[0148] In one embodiment, the proxy object generation module 13 includes: a tag acquisition submodule, used to obtain the producer tag and the consumer tag contained in the message object from the service container; and a proxy factory calling submodule, used to call the proxy factory to uniformly generate the production proxy object corresponding to the producer tag and the consumer proxy object corresponding to the consumer tag.
[0149] In one embodiment, the message body delivery module 14 includes: a message body receiving submodule, which is used by the production agent object to receive the message body carrying the message name sent by the first online service; a preprocessing submodule, which is used by the production agent object to preprocess the message body to convert it into a message body suitable for consumption by the consumption agent object; and a message body adding submodule, which is used by the production agent object to add the message body to a preset message queue.
[0150] In another embodiment, the message body delivery module 14 also includes: a message body acquisition submodule, which is used for the consumer proxy object to obtain the message body from the message queue; a message body consumption submodule, which is used for the consumer proxy object to consume the message body to generate a consumption result required by the second online service; and a consumption result push submodule, which is used for the consumer proxy object to push the consumption result to the second online service.
[0151] In order to solve the above technical problems, the embodiment of the present application also provides a computer device for running a computer program implemented according to the message agent transmission control method. Fig.12 , Fig.12 This is a basic structural block diagram of the computer device in this embodiment.
[0152] like Fig.12 As shown, a schematic diagram of the internal structure of a computer device. The computer device includes a processor, a non-volatile storage medium, a memory, and a network interface connected via a system bus. Among them, the non-volatile storage medium of the computer device stores an operating system, a database, and computer-readable instructions. The database may store a control information sequence. When the computer-readable instructions are executed by the processor, the processor can implement a message agent delivery control method. The processor of the computer device is used to provide computing and control capabilities to support the operation of the entire computer device. The memory of the computer device may store computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor can execute a message agent delivery control method. The network interface of the computer device is used to connect and communicate with a terminal. Those skilled in the art will understand that Fig.12 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.
[0153] In this embodiment, the processor is used to execute the specific functions of each module / submodule in the message proxy delivery control device of the present application, and the memory stores the program code and various data required to execute the above modules. The network interface is used to transmit data between user terminals or servers. The memory in this embodiment stores the program code and data required to execute all modules / submodules in the message proxy delivery control device, and the server can call the program code and data of the server to execute the functions of all submodules.
[0154] The present application also provides a non-volatile storage medium, in which the message agent delivery control method is written into a computer program and stored in the storage medium in the form of computer-readable instructions. When the computer-readable instructions are executed by one or more processors, it means that the program is run in the computer, thereby enabling one or more processors to execute the steps of the message agent delivery control method of any of the above-mentioned embodiments.
[0155] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0156] In summary, the present application provides developers with a message body configuration page, so that developers can quickly configure the message proxy delivery service between various online services only through the message body configuration page, thereby saving the development time of the message proxy delivery service and improving the overall development efficiency of the system. The message body configuration page will provide developers with pre-configured message objects through the service container. Developers can select the corresponding message objects therefrom and recompile them to develop new message proxy delivery services. There is no need to start development from scratch, which reduces the amount of redundant business agents and greatly improves development efficiency.
[0157] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0158] Those skilled in the art will appreciate that the various operations, methods, steps, measures, and schemes in the processes discussed in this application may be alternated, altered, combined, or deleted. Further, other steps, measures, and schemes in the various operations, methods, and processes discussed in this application may also be alternated, altered, rearranged, decomposed, combined, or deleted. Further, the steps, measures, and schemes in the prior art that are similar to those disclosed in this application may also be alternated, altered, rearranged, decomposed, combined, or deleted.
[0159] The above description is only a partial implementation method of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A message agent transmission control method, characterized in that: The steps include: Pushing a message body configuration page to the user to receive the message body configuration information submitted by the user, wherein the message body configuration information includes a message name, a producer tag, and a consumer tag, wherein the consumer tag is used to be identified by its corresponding consumer proxy object as characteristic information; Construct the corresponding message object according to the message body configuration information, and load it into the service container with the associated message name; Generate a proxy object for the message object, and obtain the production proxy object corresponding to the producer tag and the consumption proxy object corresponding to the consumer tag; The message body carrying the message name submitted by the production proxy object is passed to the consumption proxy object via a message queue to realize consumption of the message body, wherein the method includes the following steps executed by the production proxy object: the production proxy object receives the message body carrying the message name sent by the first online service; the production proxy object preprocesses the message body to convert it into a message body suitable for consumption by the consumption proxy object; the production proxy object adds the message body to a preset message queue; and also includes the following steps executed by the consumption proxy object: the consumption proxy object obtains the message body from the message queue; the consumption proxy object consumes the message body to generate a consumption result required by the second online service; and the consumption proxy object pushes the consumption result to the second online service.
2. The method according to claim 1, characterized in that The step of constructing a corresponding message object according to the message body configuration information and associating it with the message name and loading it into the service container comprises the following steps: Verify the data format of the message name, producer tag and consumer tag in the message body configuration information; When the message body configuration information passes verification, the producer tag and the consumer tag are encapsulated to construct the message object; The message object and the message name are loaded into the service container as mapping relationship data.
3. The method according to claim 1, characterized in that The step of generating a proxy object for the message object, and correspondingly obtaining a production proxy object corresponding to the producer tag and a consumer proxy object corresponding to the consumer tag, comprises the following steps: Obtaining the producer tag and the consumer tag contained in the message object from the service container; The proxy factory is called to uniformly generate a production proxy object corresponding to the producer tag and a consumer proxy object corresponding to the consumer tag.
4. The method according to any one of claims 1 to 3, characterized in that: Before executing the message body configuration page push to the user, perform the following steps: Receive a request pushed by a user for obtaining a message body configuration page, and obtain the login identity information contained in the request; The login identity information is verified, and when the login identity information passes the verification, the message body configuration page is pushed to the user.
5. A message agent transmission control device, characterized in that: It includes: A configuration information receiving module is used to push a message body configuration page to a user to receive message body configuration information submitted by the user, wherein the message body configuration information includes a message name, a producer tag, and a consumer tag, wherein the consumer tag is used to be identified by its corresponding consumer proxy object as characteristic information; A message object construction module, used to construct a corresponding message object according to the message body configuration information, and load the associated message name into the service container; A proxy object generation module, used to generate a proxy object for the message object, and correspondingly obtain a production proxy object corresponding to the producer tag and a consumer proxy object corresponding to the consumer tag; A message body delivery module is used to deliver the message body carrying the message name submitted by the production proxy object to the consumption proxy object via a message queue to realize consumption of the message body, which includes the following steps executed by the production proxy object: the production proxy object receives the message body carrying the message name sent by the first online service; the production proxy object preprocesses the message body to convert it into a message body suitable for consumption by the consumption proxy object; the production proxy object adds the message body to a preset message queue; and also includes the following steps executed by the consumption proxy object: the consumption proxy object obtains the message body from the message queue; the consumption proxy object consumes the message body to generate a consumption result required by the second online service; the consumption proxy object pushes the consumption result to the second online service.
6. An electronic device, comprising a central processing unit and a memory, characterized in that: The central processing unit is used to call and run a computer program stored in the memory to execute the steps of the method according to any one of claims 1 to 4.
7. A non-volatile storage medium, characterized in that: It stores a computer program implemented according to the method described in any one of claims 1 to 4 in the form of computer-readable instructions, and when the computer program is called and executed by a computer, the steps included in the method are executed.
8. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Message transmission test method and device, electronic equipment and storage medium
CN111740872A