Business implementation system, device, method and storage medium based on multi-environment deployment

Through independent user routing and message queue routing devices, combined with configuration servers and data verification servers, the complex user and message isolation logic in multi-environment deployments is solved, and the system is scalable and flexible.

CN113449231BActive Publication Date: 2025-08-19BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010229952.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-03-27
Publication Date
2025-08-19
Estimated Expiration
2040-03-27

AI Technical Summary

Technical Problem

In the prior art, in a multi-environmental service system, the isolation logic of users and messages is complicated, resulting in poor system scalability.

Method used

An independent user routing device and a message queue routing device are adopted to achieve isolation between users and messages using configuration servers and data verification servers, reducing isolation logic judgments within the service system.

Benefits of technology

It enhances the scalability of the business system, reduces the impact on the business system, and facilitates system expansion and migration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113449231B_ABST
    Figure CN113449231B_ABST
Patent Text Reader

Abstract

The present application discloses a business implementation system, device, method and storage medium based on multi-environment deployment, including: obtaining the user's user information during the user access to the business and the user environment correspondence obtained from the configuration server to determine the user's operating environment; determining the operating environment of the business message according to the message queue configuration information provided by the configuration server and the data verification result provided by the data verification server during the business process; the environment server accepts the user's access and executes the business message. Due to the establishment of independent user routing devices, message queue routing devices, configuration servers and data verification servers, the business subsystem does not need to consider complicated isolation logic and only needs to focus on its own business implementation. In this way, even if expansion or changes are required, it will not affect the online business of the business subsystem, and it can be easily migrated to other systems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet technology, and in particular to a business implementation system, device, method and storage medium based on multi-environment deployment. Background Art

[0002] During website development, to reduce online failures and accelerate iterative releases, multiple environments are typically built based on actual needs, such as staging, phased releases, and production environments. A staging environment simulates a live online environment, lacking real user traffic for testing purposes. A phased release utilizes a portion of a live online environment, utilizing real user traffic and data. A production environment is a live online environment provided to real users. Of course, in actual applications, other environments may also exist, such as development, testing, and regression environments. To ensure that users and business messages in these different environments operate within their respective environments, existing technologies often employ complex logical judgments within the business system, resulting in strong coupling between the various environments and poor scalability. Summary of the Invention

[0003] In response to the above-mentioned existing technologies, an embodiment of the present invention discloses a business implementation system based on multi-environment deployment, which can avoid complex logical judgments within the business system to isolate users and messages, and enhance the scalability of the business system.

[0004] A system for business implementation based on multi-environment deployment, the system includes a user routing device, a message queue routing device, a configuration server, a data verification server, and a business subsystem, wherein the business subsystem includes more than one environment server; wherein,

[0005] The user routing device is used to obtain user information of the user during the user access to the service, obtain the user environment correspondence from the configuration server, determine the operating environment of the user based on the user information and the user environment correspondence, and enable the user to directly access the environment server corresponding to the operating environment;

[0006] The message queue routing device is used to receive business messages sent to the business subsystem during the business process, determine the operating environment where the business message is located based on the message queue configuration information provided by the configuration server and the data verification result provided by the data verification server, and forward the business message to the message queue in the corresponding environment server when forwarding is required;

[0007] The one or more environment servers are configured to accept the user's access and execute the service message according to a preset environment configuration;

[0008] The configuration server is used to provide user environment correspondence and message queue configuration information, wherein the message queue configuration information indicates the routing of the message queue;

[0009] The data verification server is used to provide data verification results.

[0010] Furthermore,

[0011] The one or more environment servers include: a pre-release environment server, a grayscale environment server, and a production environment server;

[0012] The pre-launch environment server is used to accept the user's access according to the preset pre-launch environment and execute the service message forwarded by the message queue routing device;

[0013] The grayscale environment server is used to accept the user's access according to the preset grayscale environment and execute the business message forwarded by the message queue routing device;

[0014] The production environment server is used to accept the user's access according to the preset production environment and execute the business message not forwarded by the message queue routing device.

[0015] Furthermore,

[0016] The message queue routing device includes a message receiving module, a message environment identification module, and a message forwarding module; wherein,

[0017] The message receiving module is used to receive business messages sent to the business subsystem during the business process and send them to the message environment determination module;

[0018] The message environment identification module is used to determine the operating environment of the business message according to the message queue configuration information provided by the configuration server and the data verification result provided by the data verification server;

[0019] The message forwarding module is used to forward the business message to the message queue in the corresponding environment server when forwarding is required.

[0020] Furthermore,

[0021] The message environment identification module includes: a production environment identification submodule, a configuration information acquisition submodule, a grayscale environment identification submodule, and a pre-release environment identification submodule; wherein,

[0022] The production environment determination submodule is used to determine whether the current environment is configured as a production environment based on preset current environment variables. If the current environment is a production environment, the configuration information acquisition submodule is executed; otherwise, the service message forwarding is terminated.

[0023] The configuration information acquisition submodule is used to obtain message queue configuration information provided by the configuration server, wherein the message queue configuration information includes at least grayscale environment queue configuration information and pre-launch environment queue configuration information, wherein the grayscale environment queue configuration information indicates the routing of the grayscale environment message queue, and the pre-launch environment queue configuration information indicates the routing of the pre-launch environment message queue;

[0024] The grayscale environment determination submodule is configured to obtain the grayscale environment queue configuration information, obtain corresponding business data from the business message according to the grayscale environment queue configuration information, obtain a data verification result from the data verification server according to the grayscale environment queue configuration information and the corresponding business data, and determine whether the business message needs to be forwarded to the grayscale environment server according to the data verification result. If so, forward it to the message queue in the grayscale environment server through the message forwarding module; otherwise, execute the pre-transmission environment determination submodule;

[0025] The pre-launch environment judgment submodule is used to obtain the pre-launch environment queue configuration information, and obtain corresponding business data from the business message according to the pre-launch environment queue configuration information, obtain data verification results from the data verification server according to the pre-launch environment queue configuration information and the corresponding business data, and judge whether it is necessary to forward the business message to the pre-launch environment server according to the data verification result. If necessary, forward it to the message queue in the pre-launch environment server through the message forwarding module; otherwise, end the business message forwarding.

[0026] Further,

[0027] The message queue routing device also includes:

[0028] The message interception module uses the aspect-oriented programming (AOP) method to intercept the business message received by the message receiving module, and determines whether message environment judgment is required based on the preset processing identifier in the business message. If necessary, the message environment judgment module is executed.

[0029] The embodiment of the present invention also discloses a message queue routing device, which can avoid complex logical judgment and isolation of messages within a business system and enhance the scalability of the business system.

[0030] A message queue routing device is applied to the above-mentioned system for business implementation based on multi-environment deployment, and the message queue routing device includes a message receiving module, a message environment determination module, and a message forwarding module; wherein,

[0031] The message receiving module is used to receive business messages sent to the business subsystem during the business process and send them to the message environment determination module;

[0032] The message environment identification module is used to determine the operating environment of the business message based on the message queue configuration information provided by the configuration server and the data verification result provided by the data verification server;

[0033] The message forwarding module is used to forward the business message to the message queue in the corresponding environment server when forwarding is required.

[0034] Furthermore,

[0035] The message environment identification module includes: a production environment identification submodule, a configuration information acquisition submodule, a grayscale environment identification submodule, and a pre-release environment identification submodule; wherein,

[0036] The production environment determination submodule is used to determine whether the current environment is configured as a production environment based on preset current environment variables. If the current environment is a production environment, the configuration information acquisition submodule is executed; otherwise, the service message forwarding is terminated.

[0037] The configuration information acquisition submodule is used to obtain message queue configuration information provided by the configuration server, wherein the message queue configuration information includes at least grayscale environment queue configuration information and pre-launch environment queue configuration information, wherein the grayscale environment queue configuration information indicates the routing of the grayscale environment message queue, and the pre-launch environment queue configuration information indicates the routing of the pre-launch environment message queue;

[0038] The grayscale environment determination submodule is configured to obtain the grayscale environment queue configuration information, obtain corresponding business data from the business message according to the grayscale environment queue configuration information, obtain a data verification result from the data verification server according to the grayscale environment queue configuration information and the corresponding business data, and determine whether the business message needs to be forwarded to the grayscale environment server according to the data verification result. If so, forward it to the message queue in the grayscale environment server through the message forwarding module; otherwise, execute the pre-transmission environment determination submodule;

[0039] The pre-launch environment judgment submodule is used to obtain the pre-launch environment queue configuration information, and obtain corresponding business data from the business message according to the pre-launch environment queue configuration information, obtain data verification results from the data verification server according to the pre-launch environment queue configuration information and the corresponding business data, and judge whether it is necessary to forward the business message to the pre-launch environment server according to the data verification result. If necessary, forward it to the message queue in the pre-launch environment server through the message forwarding module; otherwise, end the business message forwarding.

[0040] Furthermore,

[0041] The message queue routing module also includes:

[0042] The message interception module intercepts the business message received by the message receiving module using the aspect-oriented programming (AOP) method, and determines whether message environment judgment is required based on the preset processing identifier in the business message. If necessary, the message judgment module is executed.

[0043] The embodiment of the present invention discloses a business implementation method based on multi-environment deployment, which can avoid complex logical judgments within the business system to isolate users and messages, and enhance the scalability of the business system.

[0044] A method for implementing a service based on multi-environment deployment, the method comprising:

[0045] Acquire user information of the user during the user access to the service, obtain the user environment correspondence from the configuration server, determine the operating environment of the user according to the user information and the user environment correspondence, and enable the user to directly access the environment server corresponding to the operating environment;

[0046] Receive a business message sent to a business subsystem during a business process, determine the operating environment of the business message based on the message queue configuration information provided by the configuration server and the data verification result provided by the data verification server, and forward the business message to the message queue in the corresponding environment server when forwarding is required; the message queue configuration information indicates the routing of the message queue;

[0047] The environment server accepts the user's access according to the preset environment configuration and executes the corresponding business message in the message queue.

[0048] Furthermore,

[0049] The step of determining the operating environment of the business message according to the message queue configuration information provided by the configuration server and the data verification result provided by the data verification server, and forwarding the business message to the message queue in the corresponding environment server when forwarding is required includes:

[0050] Determine whether the current environment is configured as a production environment according to a preset current environment variable. If the current environment is a production environment, continue to execute the step of obtaining the message queue configuration information provided by the configuration server; otherwise, end the business message forwarding;

[0051] Obtaining message queue configuration information provided by the configuration server, the message queue configuration information including at least grayscale environment queue configuration information and pre-launch environment queue configuration information, the grayscale environment queue configuration information indicating the routing of the grayscale environment message queue, and the pre-launch environment queue configuration information indicating the routing of the pre-launch environment message queue;

[0052] Obtaining the grayscale environment queue configuration information, and obtaining corresponding business data from the business message according to the grayscale environment queue configuration information, obtaining a data verification result from the data verification server according to the grayscale environment queue configuration information and the corresponding business data, and determining whether it is necessary to forward the business message to the grayscale environment server according to the data verification result. If so, forward it to the message queue in the grayscale environment server; otherwise, continuing to execute the step of obtaining the pre-transmission environment queue configuration information;

[0053] Obtain the pre-launch environment queue configuration information, and obtain corresponding business data from the business message according to the pre-launch environment queue configuration information, obtain data verification results from the data verification server according to the pre-launch environment queue configuration information and the corresponding business data, and determine whether it is necessary to forward the business message to the pre-launch environment server according to the data verification result. If necessary, forward it to the message queue in the pre-launch environment server; otherwise, end the business message forwarding.

[0054] Further,

[0055] Between the step of receiving a business message sent to the business subsystem during the business process and the step of determining whether the current environment is configured as a production environment based on preset current environment variables, the method further includes:

[0056] The received business message is intercepted by the aspect-oriented programming (AOP) method, and whether the message environment judgment is required is determined based on the preset processing identifier in the business message. If necessary, the step of determining whether the current environment is configured as a production environment based on the preset current environment variables is executed.

[0057] The embodiment of the present invention also discloses a message queue routing method, which can avoid complex logical judgment and isolation of messages within the business system and enhance the scalability of the business system.

[0058] A message queue routing method, the method comprising:

[0059] Receive business messages sent to business subsystems during the business process;

[0060] The operating environment of the business message is determined based on the message queue configuration information provided by the configuration server and the data verification result provided by the data verification server, and the business message is forwarded to the message queue in the corresponding environment server when forwarding is required; the message queue configuration information represents the route of the message queue.

[0061] Furthermore,

[0062] The step of determining the operating environment of the business message according to the message queue configuration information provided by the configuration server and the data verification result provided by the data verification server, and forwarding the business message to the message queue in the corresponding environment server when forwarding is required includes:

[0063] Determine whether the current environment is configured as a production environment according to a preset current environment variable. If the current environment is a production environment, continue to execute the step of obtaining the message queue configuration information provided by the configuration server; otherwise, end the business message forwarding;

[0064] Obtaining message queue configuration information provided by the configuration server, the message queue configuration information including at least grayscale environment queue configuration information and pre-launch environment queue configuration information, the grayscale environment queue configuration information indicating the routing of the grayscale environment message queue, and the pre-launch environment queue configuration information indicating the routing of the pre-launch environment message queue;

[0065] Obtaining the grayscale environment queue configuration information, and obtaining corresponding business data from the business message according to the grayscale environment queue configuration information, obtaining a data verification result from the data verification server according to the grayscale environment queue configuration information and the corresponding business data, and determining whether it is necessary to forward the business message to the grayscale environment server according to the data verification result. If so, forward it to the message queue in the grayscale environment server; otherwise, continuing to execute the step of obtaining the pre-transmission environment queue configuration information;

[0066] Obtain the pre-launch environment queue configuration information, and obtain corresponding business data from the business message according to the pre-launch environment queue configuration information, obtain data verification results from the data verification server according to the pre-launch environment queue configuration information and the corresponding business data, and determine whether it is necessary to forward the business message to the pre-launch environment server according to the data verification result. If necessary, forward it to the message queue in the pre-launch environment server; otherwise, end the business message forwarding.

[0067] Further,

[0068] Between the step of receiving a business message sent to the business subsystem during the business process and the step of determining whether the current environment is configured as a production environment based on preset current environment variables, the method further includes:

[0069] The received business message is intercepted by the aspect-oriented programming (AOP) method, and whether the message environment judgment is required is determined based on the preset processing identifier in the business message. If necessary, the step of determining whether the current environment is configured as a production environment based on the preset current environment variables is executed.

[0070] An embodiment of the present application further provides a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, can implement the steps in the above-mentioned method for implementing a business based on multi-environment deployment.

[0071] The embodiment of the present application further proposes another computer-readable storage medium on which computer instructions are stored. When the instructions are executed by a processor, the steps in the above-mentioned message queue routing method can be implemented.

[0072] The present application also provides an electronic device for message queue routing, the electronic device comprising:

[0073] processor;

[0074] a memory for storing instructions executable by the processor;

[0075] The processor is configured to read the executable instructions from the memory and execute the instructions to implement the steps in the above-mentioned message queue routing method.

[0076] In summary, thanks to the establishment of independent user routing devices, message queue routing devices, configuration servers, and data verification servers, the user routing device utilizes the user-environment mapping provided by the configuration server to achieve user isolation, while the message queue routing device utilizes the message queue configuration information provided by the configuration server and the data verification results provided by the data verification server to achieve business message isolation. This ensures privacy, allowing the business subsystem to focus solely on its own business operations without having to consider complex isolation logic. This ensures that even if expansion or changes are required, the business subsystem's online operations will not be affected, and migration to other systems is easy. BRIEF DESCRIPTION OF THE DRAWINGS

[0077] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0078] Figure 1 This is a schematic diagram of a second embodiment of a business implementation system based on multi-environment deployment in the present application.

[0079] Figure 2 This is a schematic diagram of a second embodiment of a business implementation system based on multi-environment deployment in the present application.

[0080] Figure 3 This is a schematic diagram of a third embodiment of a business implementation system based on multi-environment deployment in the present application.

[0081] Figure 4 This is a schematic diagram of a fourth embodiment of a business implementation system based on multi-environment deployment in the present application.

[0082] Figure 5 It is a schematic diagram of the internal structure of the message environment determination module A22 in an embodiment of the present application.

[0083] Figure 6 This is a flowchart of a first embodiment of a business implementation method based on multi-environment deployment in the present application.

[0084] Figure 7 This is a flowchart of Example 2 of a business implementation method based on multi-environment deployment in the present application.

[0085] Figure 8 This is a schematic diagram of the electronic device structure for message queue routing in this application. DETAILED DESCRIPTION

[0086] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0087] The terms "first", "second", "third", "fourth", etc. (if any) in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way are interchangeable where appropriate, so that the embodiments of the invention described herein can, for example, be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or apparatus that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or that are inherent to these processes, methods, products or apparatus.

[0088] The following specific embodiments are used to describe the technical solution of the present invention in detail. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0089] In actual applications, users can initiate access to services and, during the service implementation process, may also receive service messages from other systems. Therefore, both user access and service messages enter the business system. Because business systems are deployed across multiple environments, users and service messages in different environments must be isolated to ensure they operate within their respective environments.

[0090] The embodiment of the present application establishes a business implementation system based on multi-environment deployment, which includes a configuration server and a data verification server independent of the business subsystem. The configuration server is used to provide user environment correspondence and message queue configuration information, and the data verification server is used to provide data verification results. The embodiment of the present application establishes an independent user routing device and a message queue routing device. The user routing device uses the configuration server to complete the isolation of users in multiple environments, and the message queue routing device uses the configuration server and the data verification server to complete the isolation of business messages in multiple environments. In the embodiment of the present application, the business subsystem does not need to adopt complicated isolation logic judgment to distinguish users and business messages in different environments. It can be completed uniformly by the user routing device and the message queue routing device. The business subsystem only needs to focus on its own business, thereby decoupling the isolation logic from each environment and enhancing the scalability of the entire system. It should be noted that the business subsystem in the embodiment of the present application is different from the business system in the prior art and no longer includes complicated isolation logic. In order to distinguish it from it, it is referred to as the business subsystem here.

[0091] In order to better understand the concept of the present application, several embodiments are described in detail below.

[0092] Figure 1 This is a schematic diagram of a first embodiment of a business implementation system based on multi-environment deployment provided by this application. Figure 1 As shown, the system embodiment includes: user routing device A1, message queue routing device A2, configuration server A3, data verification server A4, and business subsystem A5, wherein the business subsystem A5 includes one or more environment servers A51. Among them, the configuration server A3 and the data verification server A4 are independent of the business subsystem A5, and can also be called the configuration center and the data verification center respectively. The user routing device A1 is used to complete user isolation, the message queue routing device A2 is used to complete business message isolation, and the environment server A51 mainly completes the business part of the business subsystem A5. Specifically:

[0093] The user routing device A1 is used to obtain the user information of the user during the user access to the service, obtain the user environment correspondence from the configuration server, determine the user's operating environment based on the user information and the user environment correspondence, and enable the user to directly access the environment server corresponding to the operating environment.

[0094] The message queue routing device A2 is used to receive business messages sent to the business subsystem during the business process, determine the operating environment of the business message based on the message queue configuration information provided by the configuration server and the data verification result provided by the data verification server, and forward the business message to the message queue in the corresponding environment server when forwarding is required.

[0095] One or more environment servers A51 are used to accept the user's access and execute the business message according to the preset environment configuration.

[0096] The configuration server A3 is used to provide user environment correspondence and message queue configuration information, where the message queue configuration information indicates the routing of the message queue.

[0097] The data verification server A4 is used to provide data verification results.

[0098] That is, when a user needs to access a service, user routing device A1 first obtains the user's user information during the service access process, obtains the user environment mapping from the configuration server A3, and determines the user's operating environment based on the user information and the user environment mapping, allowing the user to directly access the environment server corresponding to the operating environment. When a service message is received during the service process, sent to the service subsystem A5, message queue routing device A2 determines the operating environment of the service message based on the message queue configuration information provided by the configuration server A3 and the data verification results provided by the data verification server A4. If forwarding is required, the service message is forwarded to the message queue of the corresponding environment server A51. Environment server A51 accepts the user's access and executes the service message according to the preset environment configuration, thereby realizing user access and service.

[0099] In this embodiment, due to the establishment of independent user routing device A1, message queue routing device A2, configuration server A3, and data verification server A4, business subsystem A5 does not need to consider complex isolation logic and can focus only on its own business implementation. In this way, even if expansion or changes are required, it will not affect the online business of business subsystem A5, and can be easily migrated to other systems.

[0100] Figure 2 This is a schematic diagram of a second embodiment of a business implementation system based on multi-environment deployment provided by this application. Figure 2 As shown, the system embodiment includes: user routing device A1, message queue routing device A2, configuration server A3, data verification server A4, business subsystem A5, and the environment server in the business subsystem A5 includes a pre-release environment server B1, a gray environment server B2, and a production environment server B3. Among them, the functions of user routing device A1, message queue routing device A2, configuration server A3, and data verification server A4 are the same as those of Figure 1The system embodiment is the same as the first embodiment. This system embodiment only lists three environments in the business subsystem A5. In actual applications, other environments may also be included and can be expanded in the business subsystem A5. The method is similar to the method described in this embodiment. In addition, the message queue routing device A2 includes a message receiving module A21, a message environment determination module A22, a message forwarding module A23, and a message interception module A24. This system embodiment specifically includes:

[0101] The user routing device A1 is used to obtain the user information of the user during the user access to the service, obtain the user environment correspondence from the configuration server, determine the user's operating environment based on the user information and the user environment correspondence, and enable the user to directly access the environment server corresponding to the operating environment.

[0102] The message queue routing device A2 includes:

[0103] The message receiving module A21 is used to receive the business message sent to the business subsystem A5 during the business process and send it to the message environment determination module A22.

[0104] The message environment identification module A22 is used to determine the operating environment of the business message based on the message queue configuration information provided by the configuration server A3 and the data verification result provided by the data verification server A4.

[0105] The message forwarding module A23 is used to forward the business message to the message queue in the corresponding environment server when forwarding is required.

[0106] The message interception module A24 uses the aspect-oriented programming (AOP) method to intercept the business message received by the message receiving module A21, and determines whether a message environment judgment is required based on the preset processing identifier in the business message. If necessary, the message environment judgment module A22 is executed.

[0107] Each environment server includes:

[0108] The pre-launch environment server B1 is used to accept the user's access according to the preset pre-launch environment and execute the business message forwarded by the message queue routing device A2.

[0109] The grayscale environment server B2 is used to accept the user's access according to the preset grayscale environment and execute the business message forwarded by the message queue routing device A2.

[0110] The production environment server B3 is used to accept the user's access according to the preset production environment and execute the business message not forwarded by the message queue routing device.

[0111] The configuration server A3 is used to provide user environment correspondence and message queue configuration information, where the message queue configuration information indicates the routing of the message queue.

[0112] The data verification server A4 is used to provide data verification results.

[0113] In actual applications, some business messages need to identify the environment to which they belong, while other business messages may not need to identify the environment to which they belong. In order to increase the flexibility of system use, the message interception module A24 can be used for switching. Of course, if all business messages need to identify the environment to which they belong, the switching step can be omitted, that is, the message interception module A24 can be omitted. Those skilled in the art know that the aspect-oriented programming (AOP) method described in the message interception module A24 is a technology that realizes the unified maintenance of program functions through compilation and runtime dynamic proxy, which mainly plays the role of intercepting business messages.

[0114] That is, when a user needs to access a service, the user routing device A1 first obtains the user's user information during the service access process, obtains the user environment correspondence from the configuration server A3, and determines the user's operating environment based on the user information and the user environment correspondence, allowing the user to directly access the pre-release environment server B1, grayscale environment server B2, or production environment server B3 corresponding to the operating environment. During the service process, the message receiving module A21 receives the service message sent to the service subsystem A5 and sends it to the message environment determination module A22. The message environment determination module A22 determines the operating environment of the service message based on the message queue configuration information provided by the configuration server A3 and the data verification result provided by the data verification server A4. The message forwarding module A23 forwards the service message to the message queue in the corresponding environment server when forwarding is required. When the pre-release environment server B1, grayscale environment server B2, and production environment server B3 receive the service message, they execute the service message according to the preset environment configuration, thereby realizing user access and corresponding services.

[0115] In actual applications, in order to more quickly and easily determine the operating environment to which a business message belongs and reduce the forwarding of business messages, the message queue routing device A2 can be embedded in each environment in the business subsystem A5, and the message queue routing device A2 corresponding to the production environment first receives the external business message, and then screens and forwards it. It should be understood that although the embodiment of the present application embeds the message queue routing device A2 in each environment in the business subsystem A5, the message queue routing device A2 is still independent and is not mixed with the business subsystem A5. In actual applications, the production environment is a real online environment provided for real users, so most users and business messages belong to the production environment, and only a small number of users and business messages belong to the pre-release environment and the grayscale environment respectively. In order to distinguish different environments, this embodiment can set environment variables in each environment server, and the environment server itself can determine the environment currently implemented by the environment server based on the environment variables.

[0116] In the above situation, the present application provides a system embodiment 3 for business implementation based on multi-environment deployment. Figure 3 This is a schematic diagram of a system embodiment 3 of a business implementation based on multi-environment deployment provided by this application. Figure 3 As shown, the system embodiment includes: a user routing device A1, a message queue routing device A2, a configuration server A3, a data verification server A4, and a business subsystem A5. The environment servers in the business subsystem A5 include a pre-release environment server B1, a gray environment server B2, and a production environment server B3. The message queue routing device A2 is embedded in the business subsystem A5, corresponding to each environment. The embodiment of the present application assumes that the message queue routing device A2 corresponding to the production environment first receives external business messages, and then screens and forwards them. Therefore, the message queue routing devices A2 corresponding to other environments may not be executed temporarily (not clearly shown in the figure).

[0117] Among them, the functions of user routing device A1, message queue routing device A2, configuration server A3 and data verification server A4, pre-release environment server B1, gray environment server B2, and production environment server B3 are similar. Figure 2 The system embodiment 2 is the same as the second embodiment, except that the message queue routing device A2 is embedded in the business subsystem A5, which will not be described in detail here. In addition, the message queue routing device A2 may also include a message receiving module A21, a message environment determination module A22, a message forwarding module A23, and a message interception module A24. Their functions are the same as those of the second embodiment, but are not explicitly shown in the figure.

[0118] The embodiment of this system specifically includes:

[0119] The user routing device A1 is used to obtain the user information of the user during the user access to the service, obtain the user environment correspondence from the configuration server, determine the user's operating environment based on the user information and the user environment correspondence, and enable the user to directly access the environment server corresponding to the operating environment.

[0120] The message queue routing device A2 is used to receive business messages sent to the business subsystem during the business process, determine the operating environment of the business message based on the message queue configuration information provided by the configuration server and the data verification result provided by the data verification server, and forward the business message to the message queue in the corresponding environment server when forwarding is required.

[0121] Each environment server includes:

[0122] The pre-launch environment server B1 is used to accept the user's access according to the preset pre-launch environment and execute the business message forwarded by the message queue routing device A2.

[0123] The grayscale environment server B2 is used to accept the user's access according to the preset grayscale environment and execute the business message forwarded by the message queue routing device A2.

[0124] The production environment server B3 is used to accept the user's access according to the preset production environment and execute the business message not forwarded by the message queue routing device.

[0125] The configuration server A3 is used to provide user environment correspondence and message queue configuration information, where the message queue configuration information indicates the routing of the message queue.

[0126] The data verification server A4 is used to provide data verification results.

[0127] That is, when a user needs to access a service, the user routing device A1 first obtains the user's user information during the user's service access process, obtains the user environment correspondence from the configuration server A3, and determines the user's operating environment based on the user information and the user environment correspondence, allowing the user to directly access the environment server corresponding to the operating environment. When a service message is received during the service process and sent to the service subsystem A5, the message queue routing device A2 corresponding to the production environment determines the operating environment of the service message based on the message queue configuration information provided by the configuration server A3 and the data verification result provided by the data verification server A4. When forwarding is required, the service message is forwarded to the message queue of the corresponding pre-release environment or grayscale environment. Each environment server accepts the user's access and executes the service message according to the preset environment configuration, thereby realizing user access and service.

[0128] In the third embodiment of the above system, the message queue routing device A2 is embedded in the service subsystem A5. In actual application, for the convenience of implementation, the user routing device A1 may also be embedded in the service subsystem A5. Figure 4 This is a schematic diagram of a fourth embodiment of a business implementation system based on multi-environment deployment provided by this application. Figure 4 As shown, the fourth embodiment of the system is similar to the third embodiment of the system, except that the user routing device A1 is embedded in the service subsystem A5. The functions of each part are the same and will not be repeated here. However, it should be understood that although the embodiment of the present application embeds the user routing device A1 into the service subsystem A5, the user routing device A1 remains independent and is not mixed with the service subsystem A5.

[0129] In the above-mentioned embodiments, if the message queue routing device A2 includes a message receiving module A21, a message environment determination module A22, a message forwarding module A23, etc., when a business message sent to the business subsystem A5 is received, the message environment determination module A22 is required to determine the operating environment to which the business message belongs. Generally speaking, the message environment determination module A22 can determine the operating environment in which the business message is located based on the message queue configuration information provided by the configuration server A3 and the data verification result provided by the data verification server A4. Among them, the configuration server A3 provides the message queue configuration information, and the data verification server A4 provides the data verification result, that is, only business messages that meet the message queue configuration information and whose values meet the data verification conditions can be forwarded to the corresponding environment.

[0130] In order to forward business messages to the corresponding environment server more accurately and quickly, the embodiment of the present application also proposes a specific message environment determination module A22. Figure 5 This is a schematic diagram of the internal structure of the message environment identification module A22. Figure 5 As shown, the message environment determination module A22 includes a production environment determination submodule A221, a configuration information acquisition submodule A222, a grayscale environment determination submodule A223, and a pre-release environment determination submodule A224.

[0131] The production environment determination submodule A221 is used to determine whether its current environment is configured as a production environment based on preset current environment variables. If its current environment is a production environment, the configuration information acquisition submodule A222 is executed; otherwise, the business message forwarding is terminated.

[0132] The configuration information acquisition submodule A222 is used to obtain the message queue configuration information provided by the configuration server A3. The message queue configuration information includes at least the grayscale environment queue configuration information and the pre-launch environment queue configuration information. The grayscale environment queue configuration information represents the routing of the grayscale environment message queue, and the pre-launch environment queue configuration information represents the routing of the pre-launch environment message queue.

[0133] The grayscale environment judgment submodule A223 is used to obtain the grayscale environment queue configuration information, and obtain corresponding business data from the business message according to the grayscale environment queue configuration information, obtain the data verification result from the data verification server A4 according to the grayscale environment queue configuration information and the corresponding business data, and judge whether it is necessary to forward the business message to the grayscale environment server B2 according to the data verification result. If necessary, it is forwarded to the message queue in the grayscale environment server B2 through the message forwarding module A23; otherwise, the pre-transmission environment judgment submodule A224 is executed.

[0134] The pre-launch environment judgment submodule A224 is used to obtain the pre-launch environment queue configuration information, and obtain corresponding business data from the business message according to the pre-launch environment queue configuration information, obtain data verification results from the data verification server A4 according to the pre-launch environment queue configuration information and the corresponding business data, and judge whether it is necessary to forward the business message to the pre-launch environment server B3 according to the data verification results. If necessary, forward it to the message queue in the pre-launch environment server B3 through the message forwarding module; otherwise, end the business message forwarding.

[0135] That is, when an external business message arrives, the message queue routing device A2 corresponding to the production environment first receives the business message. When determining the environment to which the business message belongs, the production environment determination submodule A221 first determines whether the current environment is configured as the production environment based on preset current environment variables. If the current environment is the production environment, the configuration information acquisition submodule A222 is executed to screen whether the business message needs to be forwarded. Otherwise, the business message forwarding is terminated, and the environment server of the current environment directly executes the business message. If the production environment screens whether the business message needs to be forwarded, the configuration information acquisition submodule A222 obtains the message queue configuration information provided by the configuration server A3. The grayscale environment determination submodule A223 obtains the grayscale environment queue configuration information, obtains the corresponding business data from the business message based on the grayscale environment queue configuration information, and then obtains the data verification result from the data verification server A4 based on the grayscale environment queue configuration information and the corresponding business data. Based on the data verification result, it is determined whether the business message needs to be forwarded to the grayscale environment server B2. If necessary, it is forwarded to the message queue of the grayscale environment server B2. Similarly, if the production environment further screens whether the business message needs to be forwarded, the pre-launch environment judgment submodule A224 obtains the pre-launch environment queue configuration information, obtains the corresponding business data from the business message based on the pre-launch environment queue configuration information, obtains the data verification result from the data verification server A4 based on the pre-launch environment queue configuration information and the corresponding business data, and judges whether the business message needs to be forwarded to the pre-launch environment server B3 based on the data verification result. If necessary, it is forwarded to the message queue in the pre-launch environment server B3 through the message forwarding module; otherwise, the business message forwarding is terminated and the production environment executes the business message. Through the above judgment and screening, external business messages can be accurately, quickly and conveniently distributed to the corresponding environment server.

[0136] Based on the above system implementation schemes, this application also provides a method embodiment for implementing a multi-environment deployment service. Figure 1 This is an application scenario for the first embodiment of the present method. This scenario includes a user routing device A1, a message queue routing device A2, a configuration server A3, a data verification server A4, and a business subsystem A5. The business subsystem A5 includes one or more environment servers A51. The configuration server A3 and the data verification server A4 are independent of the business subsystem A5 and may also be referred to as the configuration center and the data verification center, respectively. The user routing device A1 is used to implement user isolation, the message queue routing device A2 is used to implement business message isolation, and the environment server A51 primarily implements the business portion of the business subsystem A5. Figure 6 This is a flow chart of a first embodiment of a business implementation method based on multi-environment deployment. Figure 6As shown, the method includes:

[0137] Step 601: Obtain user information of the user during the user access to the service, obtain the user environment correspondence from the configuration server A3, determine the user's operating environment based on the user information and the user environment correspondence, and enable the user to directly access the environment server corresponding to the operating environment.

[0138] In actual applications, users usually access the server through a client (such as a browser page). During the access process, the user routing device A1 can obtain the user's user information. For example: when a user clicks a link in a browser page, the service agent Nginx can obtain the user's user information (such as username, etc.) based on the client's cookie. In addition, the user routing device A1 can also obtain the user environment correspondence from the configuration server A3 through, for example, a Lua script. As mentioned above, different users belong to different environments. Most users are users in the production environment, and a small number of users are users in the pre-release environment or the grayscale environment. In this way, the correspondence between these users and environments can be saved in the configuration server A3 in advance. In actual applications, only a small number of user environment correspondences in the pre-release environment and the grayscale environment can be saved, while the rest of the users are defaulted to users in the production environment. This can greatly save the resources of the configuration server A3. By comparing the user information, the user routing device A1 can determine which operating environment the currently accessing user should belong to, and can jump to the IP address of the corresponding environment server, allowing the user to access the corresponding environment server directly.

[0139] At this point, the method embodiment of the present application has achieved isolation of users.

[0140] Step 602: Receive a business message sent to the business subsystem during the business process, determine the operating environment where the business message is located based on the message queue configuration information provided by the configuration server A3 and the data verification result provided by the data verification server A4, and forward the business message to the message queue in the corresponding environment server when forwarding is required; the message queue configuration information indicates the route of the message queue.

[0141] This step is to implement the message queue routing method.

[0142] In actual applications, during the implementation of services, a business system may exchange business messages with other systems. For example, assuming that the system in this embodiment is System X, a large number of business messages will be generated in various environments and sent to System Y and System Z. In turn, a large number of business messages may be returned from System Y and System Z to System X. These large numbers of returned business messages must enter their respective operating environments to be implemented. Therefore, before entering each environment, it is necessary to determine the operating environment of these business messages. In this embodiment, a dedicated message queue routing device A2 is used to determine the operating environment of the business messages.

[0143] Regardless of the operating environment, since the timing and speed of message generation and consumption are different, in order to compensate for this difference, it is usually necessary to set up a message queue to store business messages. In order to accurately send business messages to the message queue that matches them, it is necessary to set up a message queue route for each message queue in advance, requiring that the business messages saved in the queue comply with the message queue routing rules. In addition, the data verification server A4 can verify the data in the business message, and only those that meet the verification conditions can pass the verification. Of course, how to set the message queue configuration information and how to set the verification conditions can be determined by the actual business situation. At this point, the embodiment of this method realizes the isolation of business messages.

[0144] Step 603: The environment server accepts the user's access according to the preset environment configuration and executes the corresponding business message in the message queue.

[0145] Since steps 601 and 602 have achieved isolation of users and business messages, users can continue to access the business in their environment, and related business messages can also be executed in their environment, thereby achieving the purpose of isolation.

[0146] By applying the solution of the first embodiment of the present invention, since independent user routing device A1, message queue routing device A2, configuration server A3, and data verification server A4 are established, there is no need to consider complex isolation logic, and only the focus is on the implementation of the business. Even if expansion or changes are required, it will not affect the online business of the business subsystem A5, and can be easily migrated to other systems.

[0147] Referring to the above-mentioned system embodiments 2 to 4, it is assumed that the message queue routing device A2 is embedded in the business subsystem A5 and includes a receiving module A21, a message environment determination module A22, a message forwarding module A23, and a message interception module A24. Among them, the message environment determination module A22 includes a production environment determination submodule A221, a configuration information acquisition submodule A222, a grayscale environment determination submodule A223, and a pre-release environment determination submodule A224. In order to more accurately and quickly forward business messages to the corresponding environment server, this embodiment of the application also proposes a second embodiment of a method for business implementation based on multi-environment deployment.

[0148] Figure 7 This is a flowchart of the second embodiment of the method for implementing business based on multi-environment deployment proposed in this application.

[0149] like Figure 7 As shown, the method includes:

[0150] Step 701: Obtain user information of the user during the user access to the service, obtain the user environment correspondence from the configuration server A3, determine the user's operating environment based on the user information and the user environment correspondence, and enable the user to directly access the environment server corresponding to the operating environment.

[0151] This step is user isolation implemented by the message queue routing device A2, which is the same as step 601 of the first method embodiment and will not be described again here.

[0152] Steps 702-714 below illustrate the specific method used by message queue routing device A2 to implement message queue routing, thereby isolating business messages. This embodiment of the method implements message queue routing by screening business messages twice: first, screening for forwarding to the staged environment, and then screening for forwarding to the pre-release environment. If forwarding is not required in either screening, the business message is retained for the production environment.

[0153] Step 702: Receive a service message sent to the service subsystem A5 during the service process.

[0154] Step 703: intercept the received business message using the Aspect Oriented Programming (AOP) method.

[0155] The Aspect Oriented Programming (AOP) method described in this step is a technology that achieves unified maintenance of program functions through compilation and runtime dynamic proxy, which mainly plays the role of intercepting business messages.

[0156] Step 704: Determine whether a message environment judgment is required based on the processing identifier preset in the service message. If required, continue to execute 705; otherwise, end the service message forwarding.

[0157] In actual applications, some business messages require context identification, while others may not. To increase implementation flexibility, steps 702-704 are switched between modes requiring context identification and modes not requiring context identification. If all business messages require context identification, steps 702-704 can be omitted.

[0158] Step 705: Determine whether the current environment is configured as a production environment based on the preset current environment variables. If the current environment is a production environment, continue to execute step 706; otherwise, end the business message forwarding.

[0159] In this embodiment, the environment server includes a production environment server B1, a gray environment server B2 and a pre-release environment server B3. Each environment server is in a different physical server, and each environment server is configured with a different environment for implementation. However, when receiving a business message, each environment server itself does not know which environment it belongs to. In this case, environment variables can be set for each environment server, such as the environment variable value of the production environment is "pro", the environment variable of the gray environment is "gray", and the environment variable of the pre-release environment is "pre". Each environment server can determine its current environment based on its own current environment variables. If an environment server determines that its current environment is a gray environment or a pre-release environment, then it can be understood that the business message is forwarded from the production environment server, and it does not need to be forwarded again. It can directly execute the business message by getting it from the message queue later.

[0160] Step 706: Obtain the message queue configuration information provided by the configuration server A3, the message queue configuration information at least including the grayscale environment queue configuration information and the pre-launch environment queue configuration information, the grayscale environment queue configuration information represents the routing of the grayscale environment message queue, and the pre-launch environment queue configuration information represents the routing of the pre-launch environment message queue.

[0161] As mentioned above, in actual applications, you can set the message queue configuration information according to the actual business situation. For example, the configuration information of a bill message queue can be set as follows:

[0162]

[0163] The first four rows represent the queue configuration information for the grayscale environment, and the last four rows represent the queue configuration information for the pre-release environment.

[0164] Step 707: Obtain the grayscale environment queue configuration information, and obtain corresponding service data from the service message according to the grayscale environment queue configuration information.

[0165] In this step, after obtaining the grayscale queue configuration information, the corresponding business data can be obtained from the business message. For example, if the grayscale queue configuration information includes the business field "purchaseOrderPl", the business field value can be extracted from the business message as the obtained business data.

[0166] Step 708: Obtain data verification results from the data verification server A4 according to the grayscale environment queue configuration information and corresponding business data.

[0167] After obtaining business data from the business message, such as the "purchaseOrderPl" field value, this step sends the business data and the grayscale environment queue configuration information (such as the "grayCheckEnvFieldType" value of 10) to data verification server A4. Data verification server A4 has previously stored relevant information in its database and can determine whether verification conditions are met through query and comparison. For example, in the grayscale environment, a database table is created in data verification server A4's database. A query is performed based on the "purchaseOrderPl" field value and the "grayCheckEnvFieldType" value of 10. If a match is found, the verification conditions are met, and the grayscale environment transition is obtained.

[0168] Step 709 : Determine whether the business message needs to be forwarded to the grayscale environment server B2 based on the data verification result. If so, execute step 710 ; otherwise, continue to execute step 711 .

[0169] Step 710: Forward the message to the message queue in the grayscale environment server B2 through the message forwarding module A23, and end the business message forwarding.

[0170] The above steps 707 to 710 complete the first screening process of the business message, that is, the screening to determine whether to forward it to the grayscale environment.

[0171] Step 711: Obtain the pre-send environment queue configuration information, and obtain corresponding service data from the service message according to the pre-send environment queue configuration information.

[0172] This step is similar to the above step 708, except that this step is directed to the pre-send environment queue configuration information.

[0173] Step 712: Obtain data verification results from the data verification server A4 according to the pre-launch environment queue configuration information and corresponding business data.

[0174] Step 713: Determine whether the service message needs to be forwarded to the pre-transmission environment server B3 based on the data verification result. If so, execute step 714; otherwise, end the service message forwarding.

[0175] Step 714: Forward the message to the message queue in the pre-launch environment server B3 through the message forwarding module A23, and end the business message forwarding.

[0176] The above steps 711 to 714 complete the second screening process of the business message, that is, the screening to determine whether to forward it to the pre-transmission environment.

[0177] At this point, this method embodiment has achieved isolation of received business messages through the two screening steps described above. If the business message is not forwarded to the staging environment server B2 or the pre-production environment server B3 after the two screening steps, the business message should be retained for execution by the production environment server B1. Regardless of the environment server, the business message will be executed according to the following step 715.

[0178] Step 715: Accept the user's access according to the preset environment configuration, and execute the corresponding business message in the message queue.

[0179] It should be understood that step 701 in this embodiment is the isolation of users, steps 702 to 714 are the isolation of business messages, and step 715 is to accept user access and execute the business messages in the corresponding message queue. Due to the large number of users and business messages, these three parts can be implemented concurrently. For example, in the process of isolating business messages in steps 702 to 714, if the message forwarding is ended, it is possible to return to step 702 to process the next business message instead of executing step 715 immediately. As long as there are business messages in the corresponding message queue, the environment server can consume the business messages in the message queue. Therefore, the order of the steps in this method embodiment is for the convenience of description and cannot be used to limit the scope of protection of the present application scheme.

[0180] By applying the solution of the second embodiment of the present method, since the independent configuration server provides the user environment correspondence and message queue configuration information, and the independent data verification server provides the data verification results, the business subsystem A5 does not need to use complicated isolation logic judgment to distinguish users and business messages in different environments. It can be uniformly completed by the user routing device and the message queue routing device. The business subsystem only needs to focus on its own business, thereby decoupling the isolation logic from each environment and enhancing the scalability of the entire system.

[0181] The embodiment of the present application also provides a computer-readable storage medium, which stores instructions. When the instructions are executed by a processor, the steps in the method for implementing a business based on multi-environment deployment as described above can be executed. In practical applications, the computer-readable medium can be included in the user routing device A1, the message queue routing device A2, the configuration server A3, the data verification server A4, and each environment server A51 in the business subsystem A5 described in the above embodiments, or it can exist independently without being assembled into the device / device / system. Instructions are stored in the computer-readable storage medium in the message queue routing device A2, and the instructions stored therein can execute the steps in the message queue routing method as described above when executed by a processor.

[0182] According to the embodiments disclosed in the present application, the computer-readable storage medium may be a non-volatile computer-readable storage medium, such as, but not limited to, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof, but is not intended to limit the scope of protection of the present application. In the embodiments disclosed in the present application, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0183] like Figure 8 As shown, an embodiment of the present invention also provides an electronic device for message queue routing. Figure 8 , which shows a schematic structural diagram of an electronic device involved in an embodiment of the present invention, specifically:

[0184] The electronic device may include a processor 801 with one or more processing cores, a memory 802 with one or more computer-readable storage media, and a computer program stored in the memory and executable on the processor. When executing the program in the memory 802, the above-mentioned multi-threaded task-based method may be implemented.

[0185] Specifically, in actual applications, the electronic device may further include components such as a power supply 803 and an input / output unit 804. Those skilled in the art will appreciate that Figure 8 The structure of the electronic device shown in the figure does not constitute a limitation of the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. For example, Figure 8The electronic device shown may only include a memory 802, which is embedded in the service subsystem A5, and utilizes the processor, power supply, and input / output unit in the service subsystem as the processor 801, power supply 803, input / output unit 804, etc. to complete its own functions.

[0186] The processor 801 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. By running or executing software programs and / or modules stored in the memory 802 and calling data stored in the memory 802, it executes various functions of the server and processes data, thereby monitoring the electronic device as a whole.

[0187] The memory 802 can be used to store software programs and modules, that is, the computer-readable storage medium mentioned above. The processor 801 executes various functional applications and data processing by running the software programs and modules stored in the memory 802. The memory 802 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the server, etc. In addition, the memory 802 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device. Accordingly, the memory 802 may also include a memory controller to provide the processor 801 with access to the memory 802.

[0188] The electronic device also includes a power supply 803 for supplying power to various components. This power supply 803 can be logically connected to the processor 801 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. The power supply 803 can also include any of one or more DC or AC power supplies, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and other components.

[0189] The electronic device may further include an input / output unit 804. The input / output unit 804 may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. The input / output unit 804 may also be used to display information input by the user or information provided to the user, as well as various graphical user interfaces. These graphical user interfaces may be composed of graphics, text, icons, videos, or any combination thereof.

[0190] The flowcharts and block diagrams in the accompanying drawings of the present application show the possible implementation architecture, functions and operations of the systems, methods and computer program products according to the various embodiments disclosed in the present application. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in the order of the standards in different figures. For example, the boxes represented by two connections can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of the boxes in the block diagram or flowchart, can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.

[0191] Those skilled in the art will appreciate that the features described in the various embodiments and / or claims of this disclosure may be combined and / or coupled in various ways, even if such combinations and / or couplings are not explicitly described in this application. In particular, without departing from the spirit and teachings of this application, the features described in the various embodiments and / or claims of this application may be combined and / or coupled in various ways, and all such combinations and / or couplings fall within the scope of this application.

[0192] The principles and implementation methods of the present invention are described herein using specific embodiments. The description of the above embodiments is only used to help understand the method of the present invention and its core ideas, and is not intended to limit this application. For those skilled in the art, changes can be made in the specific implementation methods and application scope based on the ideas, spirit and principles of the present invention. Any modifications, equivalent replacements, improvements, etc. made therein should be included within the scope of protection of this application.

Claims

1. A business implementation system based on multi-environment deployment, characterized in that: The system includes a user routing device, a message queue routing device, a configuration server, a data verification server, and a business subsystem, wherein the business subsystem includes one or more environment servers; The user routing device is used to obtain user information of the user during the user access to the service, obtain the user environment correspondence from the configuration server, determine the operating environment of the user based on the user information and the user environment correspondence, and enable the user to directly access the environment server corresponding to the operating environment; The message queue routing device is used to receive business messages sent to the business subsystem during the business process, determine the operating environment where the business message is located based on the message queue configuration information provided by the configuration server and the data verification result provided by the data verification server, and forward the business message to the message queue in the corresponding environment server when forwarding is required; The one or more environment servers are configured to accept the user's access and execute the service message according to a preset environment configuration; The configuration server is used to provide user environment correspondence and message queue configuration information, wherein the message queue configuration information indicates the routing of the message queue; The data verification server is used to provide data verification results; The message queue routing device includes a message environment determination module, which includes: a production environment determination submodule, a configuration information acquisition submodule, a grayscale environment determination submodule and a pre-release environment determination submodule; wherein, The production environment determination submodule is used to determine whether the current environment is configured as a production environment based on preset current environment variables. If the current environment is a production environment, the configuration information acquisition submodule is executed; otherwise, the service message forwarding is terminated. The configuration information acquisition submodule is used to obtain message queue configuration information provided by the configuration server, wherein the message queue configuration information includes at least grayscale environment queue configuration information and pre-launch environment queue configuration information, wherein the grayscale environment queue configuration information indicates the routing of the grayscale environment message queue, and the pre-launch environment queue configuration information indicates the routing of the pre-launch environment message queue; The grayscale environment determination submodule is configured to obtain the grayscale environment queue configuration information, obtain corresponding business data from the business message according to the grayscale environment queue configuration information, obtain a data verification result from the data verification server according to the grayscale environment queue configuration information and the corresponding business data, and determine whether the business message needs to be forwarded to the grayscale environment server according to the data verification result. If so, forward it to the message queue in the grayscale environment server through the message forwarding module; otherwise, execute the pre-transmission environment determination submodule; The pre-launch environment judgment submodule is used to obtain the pre-launch environment queue configuration information, and obtain corresponding business data from the business message according to the pre-launch environment queue configuration information, obtain data verification results from the data verification server according to the pre-launch environment queue configuration information and the corresponding business data, and judge whether it is necessary to forward the business message to the pre-launch environment server according to the data verification result. If necessary, it is forwarded to the message queue in the pre-launch environment server through the message forwarding module; otherwise, the business message forwarding is terminated.

2. The system according to claim 1, wherein: The one or more environment servers include: a pre-release environment server, a grayscale environment server, and a production environment server; The pre-launch environment server is used to accept the user's access according to the preset pre-launch environment and execute the service message forwarded by the message queue routing device; The grayscale environment server is used to accept the user's access according to the preset grayscale environment and execute the business message forwarded by the message queue routing device; The production environment server is used to accept the user's access according to the preset production environment and execute the business message not forwarded by the message queue routing device.

3. The system according to claim 2, characterized in that The message queue routing device further includes a message receiving module and a message forwarding module; wherein, The message receiving module is used to receive business messages sent to the business subsystem during the business process and send them to the message environment determination module; The message environment identification module is used to determine the operating environment of the business message according to the message queue configuration information provided by the configuration server and the data verification result provided by the data verification server; The message forwarding module is used to forward the business message to the message queue in the corresponding environment server when forwarding is required.

4. A message queue routing device, characterized in that: The message queue routing device includes a message receiving module, a message environment identification module, and a message forwarding module; wherein, The message receiving module is used to receive business messages sent to the business subsystem during the business process and send them to the message environment determination module; The message environment identification module is used to determine the operating environment of the business message based on the message queue configuration information provided by the configuration server and the data verification result provided by the data verification server; The message forwarding module is used to forward the business message to the message queue in the corresponding environment server when forwarding is required; The message environment identification module includes: a production environment identification submodule, a configuration information acquisition submodule, a grayscale environment identification submodule and a pre-release environment identification submodule; wherein, The production environment determination submodule is used to determine whether the current environment is configured as a production environment based on preset current environment variables. If the current environment is a production environment, the configuration information acquisition submodule is executed; otherwise, the service message forwarding is terminated. The configuration information acquisition submodule is used to obtain message queue configuration information provided by the configuration server, wherein the message queue configuration information includes at least grayscale environment queue configuration information and pre-launch environment queue configuration information, wherein the grayscale environment queue configuration information indicates the routing of the grayscale environment message queue, and the pre-launch environment queue configuration information indicates the routing of the pre-launch environment message queue; The grayscale environment determination submodule is configured to obtain the grayscale environment queue configuration information, obtain corresponding business data from the business message according to the grayscale environment queue configuration information, obtain a data verification result from the data verification server according to the grayscale environment queue configuration information and the corresponding business data, and determine whether the business message needs to be forwarded to the grayscale environment server according to the data verification result. If so, forward it to the message queue in the grayscale environment server through the message forwarding module; otherwise, execute the pre-transmission environment determination submodule; The pre-launch environment judgment submodule is used to obtain the pre-launch environment queue configuration information, and obtain corresponding business data from the business message according to the pre-launch environment queue configuration information, obtain data verification results from the data verification server according to the pre-launch environment queue configuration information and the corresponding business data, and judge whether it is necessary to forward the business message to the pre-launch environment server according to the data verification result. If necessary, it is forwarded to the message queue in the pre-launch environment server through the message forwarding module; otherwise, the business message forwarding is terminated.

5. A business implementation method based on multi-environment deployment, characterized in that: The method includes: Acquire user information of the user during the user access to the service, obtain the user environment correspondence from the configuration server, determine the operating environment of the user based on the user information and the user environment correspondence, and enable the user to directly access the environment server corresponding to the operating environment; Receive a business message sent to the business subsystem during a business process, determine the operating environment of the business message based on the message queue configuration information provided by the configuration server and the data verification result provided by the data verification server, and forward the business message to the message queue in the corresponding environment server when forwarding is required; the message queue configuration information indicates the routing of the message queue; the business subsystem includes one or more environment servers; The environment server accepts the user's access according to the preset environment configuration and executes the corresponding business message in the message queue; The step of determining the operating environment of the business message according to the message queue configuration information provided by the configuration server and the data verification result provided by the data verification server, and forwarding the business message to the message queue in the corresponding environment server when forwarding is required includes: Determine whether the current environment is configured as a production environment according to a preset current environment variable. If the current environment is a production environment, continue to execute the step of obtaining the message queue configuration information provided by the configuration server; otherwise, end the business message forwarding; Obtaining message queue configuration information provided by the configuration server, the message queue configuration information including at least grayscale environment queue configuration information and pre-launch environment queue configuration information, the grayscale environment queue configuration information indicating the routing of the grayscale environment message queue, and the pre-launch environment queue configuration information indicating the routing of the pre-launch environment message queue; Obtaining the grayscale environment queue configuration information, and obtaining corresponding business data from the business message according to the grayscale environment queue configuration information, obtaining a data verification result from the data verification server according to the grayscale environment queue configuration information and the corresponding business data, and determining whether it is necessary to forward the business message to the grayscale environment server according to the data verification result. If so, forward it to the message queue in the grayscale environment server; otherwise, continuing to execute the step of obtaining the pre-transmission environment queue configuration information; Obtain the pre-launch environment queue configuration information, and obtain corresponding business data from the business message according to the pre-launch environment queue configuration information, obtain the data verification result from the data verification server according to the pre-launch environment queue configuration information and the corresponding business data, and determine whether it is necessary to forward the business message to the pre-launch environment server according to the data verification result. If necessary, forward it to the message queue in the pre-launch environment server; otherwise, end the business message forwarding.

6. The method according to claim 5, characterized in that Between the step of receiving a business message sent to the business subsystem during the business process and the step of determining whether the current environment is configured as a production environment based on preset current environment variables, the method further includes: The received business message is intercepted by the aspect-oriented programming (AOP) method, and whether a message environment judgment is required is determined based on the preset processing identifier in the business message. If necessary, the step of determining whether the current environment is configured as a production environment based on the preset current environment variables is executed.

7. A message queue routing method, characterized in that: The method includes: Receiving a business message sent to a business subsystem during a business process; the business subsystem includes one or more environment servers; Determine the operating environment of the business message based on the message queue configuration information provided by the configuration server and the data verification result provided by the data verification server, and forward the business message to the message queue in the corresponding environment server when forwarding is required; the message queue configuration information indicates the route of the message queue; The step of determining the operating environment of the business message according to the message queue configuration information provided by the configuration server and the data verification result provided by the data verification server, and forwarding the business message to the message queue in the corresponding environment server when forwarding is required includes: Determine whether the current environment is configured as a production environment according to a preset current environment variable. If the current environment is a production environment, continue to execute the step of obtaining the message queue configuration information provided by the configuration server; otherwise, end the business message forwarding; Obtaining message queue configuration information provided by the configuration server, the message queue configuration information including at least grayscale environment queue configuration information and pre-launch environment queue configuration information, the grayscale environment queue configuration information indicating the routing of the grayscale environment message queue, and the pre-launch environment queue configuration information indicating the routing of the pre-launch environment message queue; Obtaining the grayscale environment queue configuration information, and obtaining corresponding business data from the business message according to the grayscale environment queue configuration information, obtaining a data verification result from the data verification server according to the grayscale environment queue configuration information and the corresponding business data, and determining whether it is necessary to forward the business message to the grayscale environment server according to the data verification result. If so, forward it to the message queue in the grayscale environment server; otherwise, continuing to execute the step of obtaining the pre-transmission environment queue configuration information; Obtain the pre-launch environment queue configuration information, and obtain corresponding business data from the business message according to the pre-launch environment queue configuration information, obtain the data verification result from the data verification server according to the pre-launch environment queue configuration information and the corresponding business data, and determine whether it is necessary to forward the business message to the pre-launch environment server according to the data verification result. If necessary, forward it to the message queue in the pre-launch environment server; otherwise, end the business message forwarding.

8. The method according to claim 7, characterized in that Between the step of receiving a business message sent to the business subsystem during the business process and the step of determining whether the current environment is configured as a production environment based on preset current environment variables, the method further includes: The received business message is intercepted by the aspect-oriented programming (AOP) method, and whether a message environment judgment is required is determined based on the preset processing identifier in the business message. If necessary, the step of determining whether the current environment is configured as a production environment based on the preset current environment variables is executed.

9. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instructions are executed by a processor, the steps in the message queue routing method according to claim 7 or 8 can be implemented.

10. An electronic device for message queue routing, characterized in that: The electronic device includes: processor; a memory for storing instructions executable by the processor; The processor is configured to read the executable instructions from the memory and execute the instructions to implement the steps in the message queue routing method according to any one of claims 7 or 8.

Citation Information

Patent Citations

  • Routing method and device in grayscale publishing scenario

    CN108881030A

  • Cross-environment receipt message processing method and system

    CN110022260A