CN114884915A - Information processing method, device and equipment based on gray release - Google Patents

Information processing method, device and equipment based on gray release Download PDF

Info

Publication number
CN114884915A
CN114884915A CN202210412726.0A CN202210412726A CN114884915A CN 114884915 A CN114884915 A CN 114884915A CN 202210412726 A CN202210412726 A CN 202210412726A CN 114884915 A CN114884915 A CN 114884915A
Authority
CN
China
Prior art keywords
message
application instance
gray
target
application
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210412726.0A
Other languages
Chinese (zh)
Other versions
CN114884915B (en
Inventor
肖京
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba China Co Ltd
Original Assignee
Alibaba China Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba China Co Ltd filed Critical Alibaba China Co Ltd
Priority to CN202210412726.0A priority Critical patent/CN114884915B/en
Publication of CN114884915A publication Critical patent/CN114884915A/en
Application granted granted Critical
Publication of CN114884915B publication Critical patent/CN114884915B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/07User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail characterised by the inclusion of specific contents
    • H04L51/18Commands or executable codes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/06Message adaptation to terminal or network requirements

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application provides a message processing method, device and equipment based on gray scale publishing. The method comprises the following steps: generating a first message by a message producer of a first application instance, the first message comprising a grayscale attribute field, the grayscale attribute field included in a field indicating a message custom attribute, and a value of the grayscale attribute field used to indicate that the first message belongs to a grayscale message, the first application instance being an application instance operating in a grayscale environment in a target invocation link, and sending the first message to an MQ by the message producer of the first application instance, and then executing at least one second application instance based on the first message in the MQ to obtain an execution result of the target invocation link, the at least one second application instance comprising the application instance in the target invocation link that was invoked after the first application instance. The method and the device realize accurate control on the gray level flow, and further realize accurate verification on the gray level application example on the target calling link.

Description

Information processing method, device and equipment based on gray release
Technical Field
The present application relates to the field of network technologies, and in particular, to a method, an apparatus, and a device for processing a message based on gray-scale publishing.
Background
The gray scale release means that when a new software version is released, the new software version running in a gray scale environment is verified through a small part of flow (namely, gray scale flow) in user flow, and under the condition that no abnormity occurs in verification, the gray scale flow is gradually increased until all the user flow is transferred to the new software version.
In the above-described grayscale release process, it is desirable to be able to precisely control the grayscale traffic so that the grayscale traffic passes through all software versions in the grayscale environment in the call link to ensure the accuracy and integrity of the verification of the new software version. However, when there is asynchronous transmission of a message in a call link, it is not guaranteed that a gray scale message is always forwarded in a gray scale environment, and therefore, in the case of asynchronous transmission of a gray scale release presence message, how to accurately control a gray scale flow is a problem to be solved at present.
Disclosure of Invention
The embodiment of the application provides a message processing method, a message processing device and message processing equipment based on gray scale release, so that under the condition that the gray scale release exists asynchronous sending of messages, the gray scale flow is controlled accurately.
In a first aspect, an embodiment of the present application provides a method for processing a message based on grayscale publishing, including: generating a first message by a message producer of a first application instance, wherein the first message comprises a gray attribute field, the gray attribute field is included in a field indicating a message custom attribute, the value of the gray attribute field is used for indicating that the first message belongs to a gray message, and the first application instance is an application instance running in a gray environment in a target call link; sending, by the message producer of the first application instance, the first message to the MQ; and running at least one second application instance based on the first message in the MQ to obtain a running result of the target calling link, wherein the at least one second application instance comprises the application instance called after the first application instance in the target calling link.
In a second aspect, an embodiment of the present application provides a method for processing a message based on grayscale publishing, including: receiving a first message sent by an application server through a message producer of a first application instance, wherein the first message comprises a gray attribute field, the gray attribute field is included in a field indicating message custom attributes, and the value of the gray attribute field is used for indicating that the first application instance belongs to a gray environment; determining a first message filtering rule met by the gray attribute field, wherein the first message filtering rule corresponds to a target application example; the first message is sent to a message consumer of the target application instance.
In a third aspect, an embodiment of the present application provides a message processing apparatus, including: the message processing unit is used for generating a first message through a message producer of a first application instance, the first message comprises a gray attribute field, the gray attribute field is included in a field indicating message self-definition attributes, the value of the gray attribute field is used for indicating that the first message belongs to gray messages, and the first application instance is an application instance running in a gray environment in a target calling link; a messaging unit for sending the first message to a message queue MQ by a message producer of the first application instance; and the application running unit is used for running at least one second application instance based on the first message in the MQ to obtain a running result of the target calling link, wherein the at least one second application instance comprises the application instance called after the first application instance in the target calling link.
In a fourth aspect, an embodiment of the present application provides a message processing apparatus, including: the message receiving and sending unit is used for receiving a first message sent by an application server side through a message producer of a first application instance, the first message comprises a gray attribute field, the gray attribute field is included in a field indicating message self-defining attributes, and the value of the gray attribute field is used for indicating that the first application instance belongs to a gray environment; the rule processing unit is used for determining a first message filtering rule met by the gray attribute field, wherein the first message filtering rule corresponds to a target application example; the messaging unit is further configured to send the first message to a message consumer of the target application instance.
In a fifth aspect, an embodiment of the present application provides an electronic device, including: at least one processor and memory; the memory stores computer-executable instructions; the at least one processor executes computer-executable instructions stored by the memory, causing the at least one processor to perform a method as provided in the first aspect, or the second aspect.
In a sixth aspect, embodiments of the present application provide a computer-readable storage medium, where computer-executable instructions are stored, and when a processor executes the computer-executable instructions, the method as provided in the first aspect or the second aspect is implemented.
In a seventh aspect, the present application provides a computer program product, which includes computer instructions, and when executed by a processor, the computer instructions implement the first aspect or the second aspect or the provided method.
In the embodiment of the application, the application server generates the first message through the message producer of the first application instance, and the generated first message carries the gray attribute field to distinguish whether the message is a gray scale message or not through the gray attribute field, so that the gray scale message can be forwarded in a gray scale environment, the accurate control of gray scale flow is realized, and the accurate verification of the gray scale application instance (namely, the application instance for gray scale release) on the target call link is further realized.
Drawings
Fig. 1 is a schematic view of a scene of gray scale publishing provided in an embodiment of the present application;
fig. 2 is a schematic flowchart of a message processing method based on gray scale publishing according to an embodiment of the present application;
fig. 3 is an interaction flow diagram of a message processing method based on gray scale publishing according to an embodiment of the present application;
fig. 4 is a schematic block diagram of a message processing apparatus according to an embodiment of the present application;
fig. 5 is a schematic block diagram of a message processing apparatus according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present application.
Detailed Description
Fig. 1 is a scene schematic diagram of gray scale publishing provided in an embodiment of the present application. As shown in fig. 1, a plurality of application instances (such as application instances a, b, and c in the figure) that complete publishing may run in the application server 110, and hereinafter, the published plurality of application instances are referred to as application instances running in the baseline environment. The multiple application instances have a calling relationship, and can form a calling link A, and application functions of the application program or partial function modules of the application program can be realized by running the calling link A. When software version update for all or part of a plurality of application instances is required, the updated application instance can be operated in a gray scale environment (hereinafter referred to as a gray scale application instance) to realize gray scale distribution of the application instance.
With reference to fig. 1, taking gray scale publishing for an application instance a and an application instance B in multiple application instances as an example, a gray scale application instance a ', a gray scale application instance B', and a gray scale application instance c form a call link B. The gateway 120 may divide the acquired user request traffic into grayscale traffic and baseline traffic, input the grayscale traffic into the call link B to verify the newly issued grayscale application instance a 'and grayscale application instance B', and input the baseline traffic into the call link a to implement grayscale issuance. Optionally, in the initial stage of the gray scale release, the smaller flow may be divided into the gray scale flow, and the larger flow may be divided into the baseline flow, and in the case that the operation result of the calling link B is not abnormal, the gray scale flow may be gradually increased and the baseline flow may be decreased until all the user flows are transferred to the calling link B, so as to complete the gray scale release.
An application instance may be a software module or may be a piece of program code.
It should be noted that, in an actual application scenario, the call link may include more or fewer application instances, which is not limited in this application.
On the basis of the above example, the full link gray scale is released in a manner of accurately controlling inter-process traffic, so that both the gray scale traffic and the baseline traffic are respectively forwarded in their respective call links. For example, the grayscale application instance a 'in fig. 1 is run and then the grayscale application instance b' is called, but the application instance b is not called; as another example, application instance b is invoked after application instance a runs, and grayscale application instance b' is not invoked. Under the full-link gray scale scene, on one hand, the gray scale flow can complete closed loop under the gray scale environment without missing some gray scale application examples to be verified, and the accuracy and the integrity of verification of newly-issued software versions are improved; on the other hand, the baseline flow always runs in the baseline environment, and the problem that whether the abnormal problem is caused by a newly issued global version cannot be positioned when the abnormal problem is verified is avoided.
Generally, the forwarding of inter-process traffic includes the following two ways:
the first mode is a synchronous transmission mode. Taking synchronous sending of messages between the application instance b and the application instance c as an example, in the synchronous sending process, the application instance b sends the messages to the application instance c, and the application instance c processes the messages after receiving the messages and sends response messages back to the application instance b. Optionally, the application instance b may Call the application instance c by means of a Remote Procedure Call (RPC), for example, to implement synchronous sending of the message.
The second mode is an asynchronous transmission mode. Taking asynchronous sending of messages between the grayscale application instance a ' and the grayscale application instance b ' as an example, in the asynchronous sending process, the grayscale application instance a ' sends the messages to a Message Queue (MQ) for Message caching, and the grayscale application instance b ' acquires the messages of the grayscale application instance a ' from the MQ to realize the asynchronous sending of the messages.
Optionally, the MQ may be deployed at a transit Server (Broker Server)130, or the relevant functions of the MQ may be provided by the transit Server.
In the first manner, the application server 110 may ensure that the message is sent to the corresponding application instance c by synchronously sending the message through the application instance b. However, in the second mode, after the application server 110 sends the message to the MQ through the grayscale application instance a ', the message may be acquired by the application instance b or the application instance b', in this case, the verification environment of the full-link grayscale is destroyed, and the verification accuracy is affected.
In order to solve the above technical problem, an embodiment of the present application provides a message processing method, where a grayscale attribute field is introduced, and in an asynchronous message sending process, an application instance may implement filtering of a message based on the grayscale attribute field, so as to implement accurate control on grayscale traffic, thereby improving accuracy of grayscale verification.
It should be noted that the application server 110 and the relay server 130 in fig. 1 can be implemented as a common server or a server cluster, or a cloud server or a server cluster. The application server 110 and the transfer server 130 may be deployed in the same or different server clusters, which is not limited in this application.
It should also be understood that the application server 110 and the transit server 130 both have a message queue system deployed therein, for example, a client having the message queue system deployed therein in the application server 110, and a server having the message queue system deployed therein in the transit server 130. The message queue system can be, for example, a rockmq system, which is a distributed, open-source message queue system, and has characteristics of low delay, high concurrency, high availability, high reliability, scalability, trillion-level capacity, and the like, and therefore, is widely applied in the field of message processing.
The terms associated with the present application will be described first.
1. Message Producer (Producer): for generating messages for the application instance and sending the generated messages to an MQ, such as the transit server 130 in fig. 1, described above. The way in which the message producer sends the message includes, but is not limited to: at least one of a synchronous transmission mode, an asynchronous transmission mode, a sequential transmission mode and a single transmission mode. The synchronous sending mode and the asynchronous mode both need the relay server to return confirmation information, and the unidirectional sending mode does not need the relay server to return confirmation information.
2. Message Producer Group (Producer Group): the message producers that send the same type of message are referred to as a message producer group.
3. Message Consumer (Consumer): for asynchronous consumption of messages on MQs. The consumption forms provided from the application perspective include, but are not limited to: pull-type consumption and push-type consumption.
4. Message Consumer Group (Consumer Group): message consumers who consume the same type of messages and consume logically consistent messages are referred to as a message consumer group. The message consumer group makes it very easy to achieve the goals of load balancing and fault tolerance in terms of message consumption. It should be understood that message consumers of a message consumer group consume messages in the same Topic (Topic). Message consumer groups support message consumption patterns including, but not limited to: cluster consumption (Clustering) and broadcast consumption (Broadcasting).
5. Topic: is a logical classification of messages, for example, a message of an order class and a message of an inventory class correspond to different topics respectively.
6. And (3) message filtering: including but not limited to Tag (Tag) filtering and Structured Query Language (SQL) 92 filtering. Wherein SQL92 is an ANSI/ISO standard for databases. It defines a language (SQL) and the behavior of the database (transaction, isolation level, etc.).
And (3) Tag filtration: tag may be considered a further refinement of Topic, e.g., a message consumer whose order message is Topic may further subscribe to the message that Tag is an order to be paid. The message consumer can specify Tag besides Topic when subscribing the message, after pulling the message, the message consumer checks the Tag character string of the message, if the Tag character string of the message is consistent with the Tag specified when subscribing the message, the message is consumed, and if the Tag character string of the message is inconsistent with the Tag specified when subscribing the message, the message is discarded without message consumption.
Generally, the Tag can only specify one application attribute of the message, and when the message to which the message consumer needs to subscribe has multiple attributes, the message filtering by the Tag is difficult.
SQL92 filters: when subscribing the message, the message consumer can also specify an SQL92 expression besides specifying Topic, and the transit service end constructs and executes the SQL92 expression, so that the message consumer consumes the message meeting the SQL92 expression.
The following describes a message processing method provided in an embodiment of the present application in detail with reference to the accompanying drawings.
Fig. 2 is a schematic flowchart of a message processing method based on gray-scale publishing according to an embodiment of the present application. The execution subject of the embodiment of the present application may be an application server, such as the application server 110 in fig. 1, and in some embodiments, the application server may execute a related process executed by the transit server, in other words, the transit server may be integrated with the application server. As shown in fig. 2, the method includes:
s210, generating a first message through a message producer of a first application instance, wherein the first message comprises a gray attribute field, the gray attribute field is included in a field indicating a message custom attribute, the value of the gray attribute field is used for indicating that the first message belongs to a gray message, and the first application instance is an application instance running in a gray environment in a target call link;
s220, sending the first message to a message queue MQ through a message producer of the first application instance;
and S230, running at least one second application instance based on the first message in the MQ to obtain a running result of the target call link.
It should be noted that, the target call link includes a plurality of application instances, and the plurality of application instances includes at least one application instance running in a grayscale environment, and the first application instance may be any one of the at least one application instance running in the grayscale environment. For example, the target call link may be call link B in fig. 1, and the first application instance may be grayscale application instance a 'or grayscale application instance B' in call link B.
It should also be understood that the at least one second application instance may comprise an application instance in the target invocation link that is invoked after the first application instance. For example, the first application instance is a grayscale application instance a 'in call link B, and the at least one second application instance may include a grayscale application instance B' and an application instance c.
In S210, the first message generated by the application server through the first application instance carries the grayscale attribute field. The grayscale attribute field may be, for example, the attribute field identified by the SQL92 filter previously described. The value of the grayscale attribute field is used to indicate that the first message belongs to the grayscale message, of course, if the value of the grayscale attribute field carried by the message generated by the application instance running in the baseline environment is used to indicate that the message belongs to the baseline message.
Optionally, the gray attribute field may be a user-property (user-property) field, or a partial field in the user-property field, and the user-property field may be used to indicate a message custom attribute, so as to implement user definition of an additional message attribute.
Optionally, in this embodiment of the application, the message producer of the first application instance may modify the user-property field through a Hook function (Hook) to add the grayscale property field to the first message. The Hook may be implemented based on Java Agent technology.
In the above S220, the application server may send the first message to the MQ deployed by the application server through the message generator of the first application instance, or send the first message to the MQ deployed by the transit server, which is not limited in this application.
In the above S230, the application server continues to invoke at least one second application instance after the first application instance in the target invocation link to complete the target invocation link, so as to obtain an operation result of the target invocation link, where the operation result may be used to verify each grayscale application instance in the target invocation connection. It is to be understood that the second instance of application may include a grayscale instance of application in a grayscale environment, and/or an instance of application in a baseline environment.
In the embodiment of the application, the application server generates the first message through the message producer of the first application instance, and the generated first message carries the gray attribute field to distinguish whether the message is a gray scale message or not through the gray attribute field, so that the gray scale message can be forwarded in a gray scale environment, the accurate control of gray scale flow is realized, and the accurate verification of the gray scale application instance (namely, the application instance for gray scale release) on the target call link is further realized.
In some embodiments, the application server obtains the first message sent by the MQ through a message consumer of a target application instance, which may be an application instance of the at least one second application instance having a neighboring invocation relationship with the first application instance, e.g., the first application instance is a grayscale application instance a 'in invocation link B and the target application instance may be a grayscale application instance B'.
Continuing with the above embodiment, the message subscribed by the message consumer of the target application instance satisfies the first message filtering rule. For example, the first message filtering rule may include that a value of the grayscale attribute field indicates that the message is a grayscale message, in other words, that the message satisfies the first message filtering rule when the value of the grayscale attribute field indicates that the message is a grayscale message. As described above, since the first application instance operates in a grayscale environment, the grayscale attribute field carried by the first message generated by the first application instance indicates that the first message is a grayscale message, and then the first message satisfies the first message filtering rule. In this case, the application server may retrieve the first message from the MQ.
Alternatively, the first message filtering rule may be a message filtering rule constructed based on the above SQL92 expression.
It should be understood that the first message filtering rule is only one of the message filtering rules, and does not represent that it is related to the first message, and the first message filtering rule should not be understood as a filtering rule of the first message.
The following illustrates the first message filtering rules for generating a target application instance by two possible examples:
in a first example, the target application instance may be an application instance operating in a grayscale environment, i.e. the target application instance is a grayscale application instance. The application server side can generate a first message filtering rule according to the gray level environment where the target application instance is located. For example, the application server may generate a first message filtering rule by the filtering rule generator during initialization of the message consumer. Further, the application server may obtain the first message filtering rule based on the Java Agent technology, and fuse the first message filtering rule with other preset message filtering rules. For example, when the other preset message filtering rules are rules based on Tag filtering, the first message filtering rule may be added after the Tag filtering rule is syntax-converted to obtain the SQL92 filtering rule.
In a second example, the target application instance may be an application instance running in a baseline environment, i.e., the target application instance is a baseline application instance. The application server may generate a second message filtering rule based on the baseline environment in which the target application instance is located. In general, the second message filtering rule may be used to filter messages for which the value of the grayscale attribute field indicates that the message is a baseline message, but in two cases, the first message filtering rule described above needs to be added to the message filtering rules (including the second message filtering rule) of the baseline application instance: in the first case, an application instance having an adjacent calling relationship with the first application instance does not have a grayscale application instance, in this case, although the target application instance is the baseline application instance, the grayscale message also needs to be consumed, so the first message filtering rule needs to be added; in the second case, the grayscale application instance (e.g., the grayscale application instance b 'in fig. 1) having a neighboring call relationship with the first application instance (e.g., the grayscale application instance a' in fig. 1) is disabled (e.g., there is an exception causing consumption of the grayscale message in the MQ), in which case the consumption of the grayscale message needs to be performed by the baseline application instance (e.g., the baseline application instance c in fig. 1), i.e., the target application instance, having a neighboring call relationship with the first application instance, then the first message filtering rule needs to be added to the message filtering rule of the target application instance.
In any of the above embodiments, the MQ-related execution process may also be executed by a transit server (e.g., the transit server 130 in fig. 1). The method provided by the embodiment of the present application will be described in detail below by taking an interaction between an application server (e.g., the application server 110 in fig. 1) and a relay server as an example.
Of course, the related procedures performed by the transit server in the following description may also be performed by the application server (e.g., MQ function module in the application server).
Fig. 3 is an interaction flow diagram of a message processing method based on gray-scale publishing according to an embodiment of the present application. As shown in fig. 3, the method includes the following partial or whole processes:
s310, the application server generates a first message through a message producer of a first application example, the first message comprises a gray attribute field, the gray attribute field is included in a field indicating message custom attribute, the value of the gray attribute field is used for indicating that the first message belongs to gray information, and the first application example is an application example running in a gray environment in a target calling link.
S320, the application server side sends the first message to a transfer server through a message producer of the first application example; correspondingly, the transit server receives a first message sent by the application server through the first application instance.
S330, the transfer server determines a first message filtering rule met by the gray attribute field.
S340, the transfer server sends the first message to the message consumer of the target application example.
Correspondingly, the application server receives the first message sent by the transit server through the message consumer of the target application instance.
And S350, the application server side runs at least one second application instance based on the first message to obtain a running result of the target call link.
The above S310 and S350 are exemplarily described in the embodiments related to S210 and S230 in the embodiment shown in fig. 2, and are not described herein again.
In the above S320, the application server sends the first message to the transit server through the message producer of the first application instance, and the transit server may place the first message into the MQ.
In the above S330, the relay server may store the message filtering rules subscribed by the message consumers of each application instance in the target call link, and the relay server may determine, according to the gray attribute field of the first message received in the above S320, the first message filtering rule that the first message satisfies, and in the above S340, send the first message to the consumer of the target application instance corresponding to the first message filtering rule, so that the target application instance consumes the first message.
In the above S350, the application server executes at least one second application instance based on the first message, for example, the application server consumes the first message through the target application instance, and executes the called second application instance after the target application instance is executed, until the target calling link is executed, so as to obtain an execution result.
In some embodiments, S310 may further include at least part of the processes of S360 to S380 before:
s360, the application server side obtains a construction method of the message consumer of the target application instance, the construction method comprises the information indicating the environment of the target application instance,
and S370, the application server adds a gray scale identifier to the message consumer of the target application example according to the construction method, wherein the gray scale identifier is determined based on the environment where the target application example is located.
And S380, the application server sends the report information to the transfer server through the message consumer of the target application example, wherein the report information comprises the gray scale identification carried by the message consumer.
Correspondingly, the transfer server receives the report information sent by the application server side through the message consumer of the target application instance.
It should be noted that, in the above-mentioned S360, S370 and S380, the construction method is a special method, which is a method with the same name as the above-mentioned method. The creation of the object is completed by a construction method, and the function of the object is mainly to complete the initialization of the object. The build method is automatically invoked when a class instantiates an object. The application server side can identify information of an environment where the application instance indicated in the construction method is located based on Java Agent technology when a message consumer of any application instance (including a target application instance) initializes, wherein the environment comprises a gray level environment or a baseline environment, and further, the application server side can add a gray level identifier to the message consumer of the target application instance according to the construction method. Further, the application server sends the report information to the transfer server through the message consumer of the target application instance, wherein the report information includes the gray scale identifier carried by the message consumer, so that in the process of forwarding the message by the transfer server, the message consumer of the target application instance can be identified as the message consumer of the gray scale application instance or the message consumer of the baseline application instance based on the gray scale identifier.
In some embodiments, the method further comprises: the application server side sends heartbeat information to the transfer server side periodically through the message consumers of the target application examples, and the heartbeat information comprises message filtering rules of the target application examples. Correspondingly, the transit server receives heartbeat information periodically sent by the application server side through the message consumer of the target application instance, wherein the heartbeat information comprises the message filtering rule of the target application instance. Based on the heartbeat information periodically sent by the application server, the transfer server can obtain the latest message filtering rule of the message consumer of the target application instance, and further the transfer server can update the message filtering rule of the message consumer of the target application instance according to the heartbeat information. For example, the period of sending heartbeat information by the application server side may be 30 s.
For example, in response to the filtering rule adding request, the application server may add the first message filtering rule to the message filtering rule of the target application instance, and further include the message filtering rule of the target application instance in the heartbeat information and send the heartbeat information to the transit server. For another example, in response to the filtering rule addition request, the application server may include the first message filtering rule in the heartbeat information and send the heartbeat information to the transit server, so that the transit server adds the first message filtering rule to the message filtering rule of the target application instance.
It should be noted that, the above description is only given by taking the example of updating the message filtering rule of the message consumer of the target application instance, but should not be construed as any limitation to the present application. For example, the application server and the transit server may update the message filtering rules for the message consumer of any application instance in a similar manner.
It should be noted that, the descriptions of "first", "second", etc. in this document are used to distinguish different application examples, messages, etc., and do not represent a sequential order, nor limit the types of "first" and "second" to be different.
Fig. 4 is a schematic block diagram of a message processing apparatus according to an embodiment of the present application. As shown in fig. 4, the apparatus 400 includes at least a message processing unit 410, a messaging unit 420, and an application execution unit 430.
The message processing unit 410 may be configured to generate, by a message producer of a first application instance, a first message, where the first message includes a grayscale attribute field, the grayscale attribute field is included in a field indicating a message custom attribute, and a value of the grayscale attribute field is used to indicate that the first message belongs to a grayscale message, and the first application instance is an application instance running in a grayscale environment in a target call link; the messaging unit 420 may be configured to send the first message to a message queue MQ by the message producer of the first application instance; the application execution unit 430 may be configured to execute at least one second application instance based on the first message in the MQ to obtain an execution result of the target call link, where the at least one second application instance includes an application instance in the target call link that is called after the first application instance.
In some embodiments, the at least one second application instance comprises a target application instance, the value of the grayscale attribute field of the first message satisfying the first message filtering rule of the target application instance; before running the target application instance, the messaging unit 420 is further configured to: the first message sent by the MQ is obtained by a message consumer of the target application instance.
In some embodiments, the target application instance is an application instance operating in a grayscale environment, and the apparatus 400 further includes: a rule processing unit 440, configured to generate the first message filtering rule according to the gray-scale environment in which the target application instance is located.
In some embodiments, the target application instance is an application instance running in a baseline environment, and the rule processing unit 440 is further configured to: in response to a filter rule addition request, the first message filter rule is added to the message filter rule of the target application instance.
In some embodiments, the apparatus 400 further comprises: the information reporting unit 450 is configured to periodically send heartbeat information to the transit server through the message consumer of the target application instance, where the heartbeat information includes a message filtering rule of the target application instance.
In some embodiments, the apparatus 400 further comprises: and a consumer identification unit 460, configured to obtain a construction method of the message consumer of the target application instance, where the construction method includes information indicating an environment where the target application instance is located, and add, according to the construction method, a grayscale identifier to the message consumer of the target application instance, where the grayscale identifier is determined based on the environment where the target application instance is located.
In some embodiments, after adding the gray identifier to the message consumer of the target application instance according to the construction method, the information reporting unit 460 is further configured to send reporting information to the transit server through the message consumer of the target application instance, where the reporting information includes the gray identifier carried by the message consumer.
In some embodiments, the messaging unit 420 is specifically configured to send the first message to the transit server via the message producer of the first application instance.
It should be understood that the specific processes of the units for executing the corresponding steps are already described in detail in the above method embodiments, and therefore, for brevity, detailed descriptions thereof are omitted.
Fig. 5 is a schematic block diagram of a message processing apparatus according to an embodiment of the present application. As shown in fig. 5, the apparatus 500 includes at least a messaging unit 510 and a rule processing unit 520.
The messaging unit 510 may be configured to receive a first message sent by an application server through a message producer of a first application instance, where the first message includes a grayscale attribute field, the grayscale attribute field is included in a field indicating a message customization attribute, and a value of the grayscale attribute field is used to indicate that the first application instance belongs to a grayscale environment; rule processing unit 520 may be configured to determine a first message filtering rule that is satisfied by the grayscale attribute field, where the first message filtering rule corresponds to a target application instance; the messaging unit 510 is also configured to send the first message to a message consumer of the target application instance.
In some embodiments, the apparatus 500 further comprises: an information obtaining unit 530, configured to receive heartbeat information periodically sent by the application server through a message consumer of the target application instance, where the heartbeat information includes a message filtering rule of the target application instance; the rule processing unit 520 is further configured to update the message filtering rule of the message consumer of the target application instance according to the heartbeat information.
In some embodiments, the information obtaining unit 530 is further configured to receive report information sent by the application server through a message consumer of the target application instance, where the report information includes a grayscale identifier carried by the message consumer.
It should be understood that the specific processes of the units for executing the corresponding steps are already described in detail in the above method embodiments, and therefore, for brevity, detailed descriptions thereof are omitted.
Fig. 6 is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present application. The electronic device 600 may be an implementation of the application server or the relay server in the above method embodiments. As shown in fig. 6, the electronic device 600 includes: a memory 610 and a processor 620.
A memory 610 for storing computer programs and may be configured to store other various data to support operations on the cloud server. The Storage 610 may be an Object Storage Service (OSS).
A processor 620, coupled to the memory 610, for executing the computer program in the memory 610, so as to implement the method implemented by the application server or the transfer server in the above method embodiments.
Further, as shown in fig. 6, when the electronic device is implemented as a cloud server, the method further includes: firewall 630, load balancer 640, communications component 650, power component 660, and other components. Only some of the components are schematically shown in fig. 6, and it is not meant that the server includes only the components shown in fig. 6.
It should be understood that the electronic device 600 shown in fig. 6 can implement the processes of the above method embodiments that involve the application server or the relay server. The operations and/or functions of the respective modules in the electronic device 600 are respectively to implement the corresponding flows in the above-described method embodiments. Reference may be made specifically to the description of the above method embodiments, and a detailed description is appropriately omitted herein to avoid redundancy.
The application also provides a processing device, which includes at least one processor, where the at least one processor is configured to execute a computer program stored in a memory, so that the processing device executes the method executed by the application server or the relay server in the foregoing method embodiments.
The embodiment of the application also provides a processing device which comprises a processor and an input/output interface. The input-output interface is coupled to the processor. The input/output interface is used for inputting and/or outputting information. The information includes at least one of instructions and data. The processor is configured to execute the computer program, so that the processing apparatus executes the method executed by the application server or the relay server in the foregoing method embodiment.
An embodiment of the present application further provides a processing apparatus, which includes a processor and a memory. The memory is used for storing a computer program, and the processor is used for calling and running the computer program from the memory so as to enable the processing device to execute the method executed by the application server or the transfer server in the method embodiment.
It is to be understood that the processing means described above may be one or more chips. For example, the processing device may be a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), a system on chip (SoC), a Central Processing Unit (CPU), a Network Processor (NP), a digital signal processing circuit (DSP), a Microcontroller (MCU), a Programmable Logic Device (PLD), or other integrated chips.
In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The steps of a method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or may be implemented by a combination of hardware and software modules in a processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor. To avoid repetition, it is not described in detail here.
It should be noted that the processor in the embodiments of the present application may be an integrated circuit chip having signal processing capability. In implementation, the steps of the above method embodiments may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The processor described above may be a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor.
It will be appreciated that the memory in the embodiments of the subject application can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. The non-volatile memory may be a read-only memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an electrically Erasable EPROM (EEPROM), or a flash memory. Volatile memory can be Random Access Memory (RAM), which acts as external cache memory. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), double data rate SDRAM, enhanced SDRAM, SLDRAM, Synchronous Link DRAM (SLDRAM), and direct rambus RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
According to the method provided by the embodiment of the present application, the present application further provides a computer program product, which includes: computer program code which, when run on a computer, causes the computer to perform the method performed by the application server or the mediation server in the above-described method embodiments.
According to the method provided by the embodiment of the present application, the present application further provides a computer-readable storage medium, where the computer-readable storage medium stores a program code, and when the program code runs on a computer, the computer is caused to execute the method executed by the application server or the relay server in the foregoing method embodiment.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (14)

1. A message processing method based on gray release is characterized by comprising the following steps:
generating a first message by a message producer of a first application instance, wherein the first message comprises a gray attribute field, the gray attribute field is included in a field indicating a message custom attribute, the value of the gray attribute field is used for indicating that the first message belongs to a gray message, and the first application instance is an application instance running in a gray environment in a target call link;
sending, by a message producer of the first application instance, the first message to a message queue, MQ;
and running at least one second application instance based on the first message in the MQ to obtain a running result of the target calling link, wherein the at least one second application instance comprises an application instance called after the first application instance in the target calling link.
2. The method of claim 1, wherein the at least one second application instance comprises a target application instance, and wherein a value of a grayscale attribute field of the first message satisfies a first message filtering rule of the target application instance; before running the target application instance, the method further comprises:
the first message sent by the MQ is obtained by a message consumer of the target application instance.
3. The method of claim 2, wherein the target application instance is an application instance running in a grayscale environment, the method further comprising:
and generating the first message filtering rule according to the gray level environment of the target application instance.
4. The method of claim 2, wherein the target application instance is an application instance running in a baseline environment, the method further comprising:
in response to a filter rule addition request, adding the first message filter rule in a message filter rule of the target application instance.
5. The method according to any one of claims 2 to 4, further comprising:
and periodically sending heartbeat information to a transit server through the message consumer of the target application example, wherein the heartbeat information comprises the message filtering rule of the target application example.
6. The method according to any one of claims 2 to 4, further comprising:
acquiring a construction method of a message consumer of the target application instance, wherein the construction method comprises information indicating the environment where the target application instance is located;
according to the construction method, a gray scale identifier is added to a message consumer of the target application instance, wherein the gray scale identifier is determined based on the environment where the target application instance is located.
7. The method of claim 6, wherein after said adding a gray scale identification to a message consumer of said target application instance according to said construction method, said method further comprises:
and sending report information to a transfer server through the message consumer of the target application example, wherein the report information comprises the gray scale identification carried by the message consumer.
8. The method of any of claims 1 to 4, wherein sending the first message to a message queue by a message producer of the first application instance comprises:
and sending the first message to a transfer server through the message producer of the first application instance.
9. A message processing method based on gray release is characterized by comprising the following steps:
receiving a first message sent by an application server through a message producer of a first application instance, wherein the first message comprises a gray attribute field, the gray attribute field is included in a field indicating message custom attributes, and the value of the gray attribute field is used for indicating that the first application instance belongs to a gray environment;
determining a first message filtering rule met by the gray attribute field, wherein the first message filtering rule corresponds to a target application example;
sending the first message to a message consumer of the target application instance.
10. The method of claim 9, further comprising:
receiving heartbeat information periodically sent by the application server side through a message consumer of the target application instance, wherein the heartbeat information comprises a message filtering rule of the target application instance;
and updating the message filtering rule of the message consumer of the target application instance according to the heartbeat information.
11. The method according to claim 9 or 10, further comprising:
and receiving reported information sent by the application server side through the message consumer of the target application example, wherein the reported information comprises the gray scale identification carried by the message consumer.
12. A message processing apparatus, comprising:
the message processing unit is used for generating a first message through a message producer of a first application instance, the first message comprises a gray attribute field, the gray attribute field is included in a field indicating message custom attributes, the value of the gray attribute field is used for indicating that the first message belongs to a gray message, and the first application instance is an application instance running in a gray environment in a target calling link;
a message receiving and sending unit, configured to send the first message to a message queue MQ through a message producer of the first application instance;
and the application running unit is used for running at least one second application instance based on the first message in the MQ to obtain a running result of the target call link, wherein the at least one second application instance comprises an application instance called after the first application instance in the target call link.
13. A message processing apparatus, comprising:
the message receiving and sending unit is used for receiving a first message sent by an application server through a message producer of a first application instance, the first message comprises a gray attribute field, the gray attribute field is included in a field indicating message self-defining attributes, and the value of the gray attribute field is used for indicating that the first application instance belongs to a gray environment;
the rule processing unit is used for determining a first message filtering rule met by the gray attribute field, and the first message filtering rule corresponds to a target application example;
the messaging unit is further configured to send the first message to a message consumer of the target application instance.
14. An electronic device, comprising: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executing the memory-stored computer-executable instructions cause the at least one processor to perform the method of any of claims 1-11.
CN202210412726.0A 2022-04-19 2022-04-19 Message processing method, device and equipment based on gray release Active CN114884915B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210412726.0A CN114884915B (en) 2022-04-19 2022-04-19 Message processing method, device and equipment based on gray release

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210412726.0A CN114884915B (en) 2022-04-19 2022-04-19 Message processing method, device and equipment based on gray release

Publications (2)

Publication Number Publication Date
CN114884915A true CN114884915A (en) 2022-08-09
CN114884915B CN114884915B (en) 2024-03-26

Family

ID=82672454

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210412726.0A Active CN114884915B (en) 2022-04-19 2022-04-19 Message processing method, device and equipment based on gray release

Country Status (1)

Country Link
CN (1) CN114884915B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115499317A (en) * 2022-11-15 2022-12-20 阿里云计算有限公司 Gray scale verification method, electronic device and readable storage medium

Citations (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120330952A1 (en) * 2011-06-23 2012-12-27 Microsoft Corporation Scalable metadata extraction for video search
US20130007767A1 (en) * 2011-06-29 2013-01-03 International Business Machines Corporation Automated generation of service definitions for message queue application clients
US20130086004A1 (en) * 2011-10-03 2013-04-04 H. Jonathan Chao Updating a perfect hash data structure, such as a multi-dimensional perfect hash data structure, used for high-speed string matching
US20140337537A1 (en) * 2013-05-13 2014-11-13 Xerox Corporation Method and system for facilitating communication between message consumers and message producers
CN108376118A (en) * 2018-02-09 2018-08-07 腾讯科技(深圳)有限公司 Service delivery system, method, equipment and storage medium
CN108848092A (en) * 2018-06-20 2018-11-20 中国联合网络通信集团有限公司 The processing method and processing device of micro services gray scale publication based on call chain
CN109726099A (en) * 2018-04-12 2019-05-07 平安普惠企业管理有限公司 A kind of application gray scale dissemination method, device and equipment
CN110365502A (en) * 2018-03-26 2019-10-22 华为技术有限公司 A kind of method, apparatus and storage medium of service upgrade management
US20190332433A1 (en) * 2018-04-27 2019-10-31 Paypal, Inc. Systems and methods for providing services in a stateless application framework
CN110650163A (en) * 2018-06-26 2020-01-03 马上消费金融股份有限公司 Gray scale publishing method, system, equipment and computer readable storage medium
CN110781013A (en) * 2019-10-25 2020-02-11 湖南御家科技有限公司 Gray scale publishing method, device, equipment and medium
CN111163085A (en) * 2019-12-29 2020-05-15 北京车与车科技有限公司 Gray level release scene optimization method
CN111586095A (en) * 2020-03-26 2020-08-25 中国平安财产保险股份有限公司 Micro-service-based gray scale publishing method and device, computer equipment and storage medium
CN111897542A (en) * 2020-08-31 2020-11-06 北京三快在线科技有限公司 Method and device for gray scale release
CN112685060A (en) * 2020-12-24 2021-04-20 深圳前海微众银行股份有限公司 Gray scale distribution method and device, terminal equipment and computer storage medium
CN113014651A (en) * 2021-03-03 2021-06-22 中国工商银行股份有限公司 Gray scale publishing method, application server and gray scale publishing system
CN113315824A (en) * 2021-05-26 2021-08-27 武汉悦学帮网络技术有限公司 Application gray level publishing method and device and application gray level publishing system
CN113342595A (en) * 2021-05-26 2021-09-03 北京奇艺世纪科技有限公司 Gray scale verification method, device, equipment and storage medium
WO2021243666A1 (en) * 2020-06-04 2021-12-09 深圳市欢太科技有限公司 Information processing method and system, and device, medium, chip and program
WO2022037272A1 (en) * 2020-08-21 2022-02-24 烽火通信科技股份有限公司 Gray release method, apparatus and device, and readable storage medium

Patent Citations (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120330952A1 (en) * 2011-06-23 2012-12-27 Microsoft Corporation Scalable metadata extraction for video search
US20130007767A1 (en) * 2011-06-29 2013-01-03 International Business Machines Corporation Automated generation of service definitions for message queue application clients
US20130086004A1 (en) * 2011-10-03 2013-04-04 H. Jonathan Chao Updating a perfect hash data structure, such as a multi-dimensional perfect hash data structure, used for high-speed string matching
US20140337537A1 (en) * 2013-05-13 2014-11-13 Xerox Corporation Method and system for facilitating communication between message consumers and message producers
CN108376118A (en) * 2018-02-09 2018-08-07 腾讯科技(深圳)有限公司 Service delivery system, method, equipment and storage medium
US20210011834A1 (en) * 2018-03-26 2021-01-14 Huawei Technologies Co., Ltd. Service Upgrade Management Method, Apparatus, And Storage Medium
CN110365502A (en) * 2018-03-26 2019-10-22 华为技术有限公司 A kind of method, apparatus and storage medium of service upgrade management
CN109726099A (en) * 2018-04-12 2019-05-07 平安普惠企业管理有限公司 A kind of application gray scale dissemination method, device and equipment
US20190332433A1 (en) * 2018-04-27 2019-10-31 Paypal, Inc. Systems and methods for providing services in a stateless application framework
CN108848092A (en) * 2018-06-20 2018-11-20 中国联合网络通信集团有限公司 The processing method and processing device of micro services gray scale publication based on call chain
CN110650163A (en) * 2018-06-26 2020-01-03 马上消费金融股份有限公司 Gray scale publishing method, system, equipment and computer readable storage medium
CN110781013A (en) * 2019-10-25 2020-02-11 湖南御家科技有限公司 Gray scale publishing method, device, equipment and medium
CN111163085A (en) * 2019-12-29 2020-05-15 北京车与车科技有限公司 Gray level release scene optimization method
CN111586095A (en) * 2020-03-26 2020-08-25 中国平安财产保险股份有限公司 Micro-service-based gray scale publishing method and device, computer equipment and storage medium
WO2021243666A1 (en) * 2020-06-04 2021-12-09 深圳市欢太科技有限公司 Information processing method and system, and device, medium, chip and program
WO2022037272A1 (en) * 2020-08-21 2022-02-24 烽火通信科技股份有限公司 Gray release method, apparatus and device, and readable storage medium
CN111897542A (en) * 2020-08-31 2020-11-06 北京三快在线科技有限公司 Method and device for gray scale release
CN112685060A (en) * 2020-12-24 2021-04-20 深圳前海微众银行股份有限公司 Gray scale distribution method and device, terminal equipment and computer storage medium
CN113014651A (en) * 2021-03-03 2021-06-22 中国工商银行股份有限公司 Gray scale publishing method, application server and gray scale publishing system
CN113315824A (en) * 2021-05-26 2021-08-27 武汉悦学帮网络技术有限公司 Application gray level publishing method and device and application gray level publishing system
CN113342595A (en) * 2021-05-26 2021-09-03 北京奇艺世纪科技有限公司 Gray scale verification method, device, equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
柳吉庆;石磊;张军;: "基于消息的系统异步集成框架设计与实现", 制造业自动化, no. 10 *
邰宇;: "基于海量数据消息队列的性能比较及其优化", 科技传播, no. 03 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115499317A (en) * 2022-11-15 2022-12-20 阿里云计算有限公司 Gray scale verification method, electronic device and readable storage medium
CN115499317B (en) * 2022-11-15 2023-04-07 阿里云计算有限公司 Gray scale verification method, electronic device and readable storage medium

Also Published As

Publication number Publication date
CN114884915B (en) 2024-03-26

Similar Documents

Publication Publication Date Title
CN108196961B (en) Asynchronous message processing method, terminal, system and storage medium
US10776107B2 (en) Microservice-based data processing apparatus, method, and program
CN108874558B (en) Message subscription method of distributed transaction, electronic device and readable storage medium
US20200177391A1 (en) Sending cross-chain authenticatable messages
US20200177572A1 (en) Sending cross-chain authenticatable messages
US20090292877A1 (en) Event server using caching
US8850401B2 (en) Monitoring a software system using an interpretation rule of an ontology
CN111580884A (en) Configuration updating method and device, server and electronic equipment
CN109840298A (en) The multi information source acquisition method and system of large scale network data
US8862613B2 (en) Extensibility of business process and application logic
US20080244613A1 (en) Method and system for processing messages in an application cluster
US10601915B2 (en) Data stream processor with both in memory and persisted messaging
CN113703954A (en) Message backup method and device, electronic equipment and computer storage medium
US8429238B2 (en) Method for providing feedback to a publisher
CN112882846A (en) Data processing method and device of message queue, computer equipment and storage medium
CN114884915A (en) Information processing method, device and equipment based on gray release
CN114338738B (en) Rule engine and scene linkage realization method based on Actor model
CN109992279A (en) Method for updating configuration data, calculates equipment and storage medium at device
US8752071B2 (en) Identifying subscriber data while processing publisher event in transaction
US20200267206A1 (en) Method and apparatus for data quality framework module
US20220044144A1 (en) Real time model cascades and derived feature hierarchy
US20230359513A1 (en) Orchestration system and method to provide client independent api integration model
CN113032477B (en) Long-distance data synchronization method and device based on GTID and computing equipment
CN114138778A (en) Data processing system, method, device, equipment and computer readable medium
CN108536438B (en) Dotting module, method and computer readable medium for processing user behavior data

Legal Events

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