Gray release method and device of business system, equipment, medium and product
By detecting the grayscale publishing function status in the service system and determining the request identification, refined routing control for business requests is achieved, and the problem of insufficient efficiency and accuracy of grayscale publishing in the prior art is solved, and the degree of refined grayscale publishing is improved.
Patent Information
- Application Number
- CN202411522709.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-10-29
Smart Images

Figure CN119629248A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of computer technology, and in particular, to a method, device, equipment, medium, and product for grayscale release of a business system. Background Art
[0002] With the rapid development of Internet technology, the market has put forward higher requirements on the stability of scientific and technological systems, and grayscale release technology has become an important guarantee for the stability of application systems.
[0003] At present, the grayscale release function is usually implemented by the gateway layer. In the prior art, the gateway layer usually implements grayscale release in the following two ways: First, regular judgment is performed on the Uniform Resource Identifier (URI): the URI path of the request is matched by a regular expression to decide whether to route the traffic to the new version. This method is suitable for scenarios where grayscale releases are distinguished according to specific interface paths. Second, the gateway layer makes judgments based on regional traffic: based on the source region of the request (such as the Internet Protocol (IP) address, geographic location, etc.), new versions are gradually opened to users in different regions. This is suitable for grayscale release requirements related to geographic location, such as gradually launching new features in different countries or regions. However, these two grayscale release methods have not achieved the goal of refined control, and their efficiency and accuracy are poor. Summary of the invention
[0004] The embodiments of the present invention provide a method, device, equipment, medium and product for grayscale release of a business system, which can realize refined control of routing information of business requests, and can not only improve the efficiency of routing matching, but also improve the accuracy of routing matching.
[0005] In a first aspect, an embodiment of the present invention provides a method for grayscale publishing of a business system, the method being applied to a configuration service node for managing grayscale publishing components, the method comprising:
[0006] When it is detected that the phased release function of the business system is in an enabled state, determining a request identifier of the business request received by the business system;
[0007] Determine a routing matching channel corresponding to the request identifier, and match the service request based on the routing matching channel to obtain corresponding routing information;
[0008] Determine the target system environment corresponding to the service request based on the system environment identifier in the routing information;
[0009] Forwarding the service request to the corresponding request service node based on the load balancing address in the routing information;
[0010] The request service node responds to the service request in the target system environment to obtain a processing result of the service request.
[0011] In a second aspect, an embodiment of the present invention further provides a phased release device of a business system, the device being integrated into a configuration service node for managing phased release components, the device comprising:
[0012] A request identifier determination module, used to determine the request identifier of the business request received by the business system when it is detected that the grayscale release function of the business system is in an enabled state;
[0013] A routing information matching module, used to determine a routing matching channel corresponding to the request identifier, and to match the service request based on the routing matching channel to obtain corresponding routing information;
[0014] A system environment determination module, used to determine a target system environment corresponding to the service request based on the system environment identifier in the routing information;
[0015] A service node determination module, configured to forward the service request to a corresponding request service node based on the load balancing address in the routing information;
[0016] The processing result determination module is used to respond to the service request in the target system environment through the request service node to obtain the processing result of the service request.
[0017] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a grayscale release method for a business system as described in any one of the embodiments of the present invention is implemented.
[0018] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method for grayscale release of a business system as described in any one of the embodiments of the present invention.
[0019] In a fifth aspect, an embodiment of the present invention further provides a computer program product, including a computer program, which, when executed by a processor, implements the grayscale release method of a business system as described in any one of the embodiments of the present invention.
[0020] In an embodiment of the present invention, when it is detected that the grayscale publishing function of the business system is in an on state, the request identifier of the business request received by the business system is determined; the routing matching channel corresponding to the request identifier is determined, and the business request is matched based on the routing matching channel to obtain the corresponding routing information; the target system environment corresponding to the business request is determined based on the system environment identifier in the routing information; the business request is forwarded to the corresponding request service node based on the load balancing address in the routing information; the business request is responded to by the request service node in the target system environment, and the processing result of the business request is obtained. Execution of this method can bring the following beneficial effects: when the business system receives a business request initiated by a user or a device module, the configuration service node first detects whether the grayscale publishing function is in an on state, and when the grayscale publishing function is in an on state, the request identifier of the business request is determined. Different request identifiers correspond to different routing matching channels, and the corresponding routing information is matched based on the routing matching channel corresponding to the request identifier, so that the routing information of the business request can be finely controlled, and a more refined grayscale publishing strategy can be implemented. Furthermore, the present application determines whether the service request is forwarded to the grayscale environment or continues to use the existing environment based on the system environment identifier; based on the load balancing address, the service request is routed to the request service node of the new system version or the request service node of the existing system version, and then responds to the service request. The present application can not only improve the efficiency of route matching, but also improve the accuracy of route matching. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 A schematic diagram of a first process of a method for grayscale release of a business system provided in an embodiment of the present application;
[0023] Figure 2 A second flow diagram of a method for phased release of a business system provided in an embodiment of the present application;
[0024] Figure 3 A schematic diagram of the structure of a grayscale publishing device for a business system provided in an embodiment of the present application;
[0025] Figure 4 It is a block diagram of an electronic device used to implement a grayscale release method of a business system in an embodiment of the present application. DETAILED DESCRIPTION
[0026] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0027] It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. At the same time, in the description of the present invention, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance. The acquisition, storage, use, processing, etc. of data in the technical solution of this application comply with the relevant provisions of national laws and regulations. It should be noted that in the embodiments of this application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. The purpose is only to illustrate the feasibility of the implementation of the technical solution of this application, but it does not mean that the applicant has or must use the relevant content of the solution.
[0028] Figure 1 The first flow chart of the grayscale release method of a business system provided in an embodiment of the present application is applicable to the case of grayscale release of a business system. The grayscale release method of a business system provided in this embodiment can be executed by the grayscale release device of the business system provided in an embodiment of the present application, and the device can be implemented by software and / or hardware and integrated in the electronic device executing the method. The method is applied to the configuration service node for managing the grayscale release component.
[0029] See also Figure 1 The method of this embodiment includes but is not limited to the following steps:
[0030] S110: When it is detected that the grayscale publishing function of the business system is in an enabled state, determine a request identifier of the business request received by the business system.
[0031] Among them, the business system can be a sales and trading platform for enterprises to bring products to the market, or it can be a service management platform for an organization to serve users. The business system can be in the form of an application or a mini-program. The grayscale release function refers to the simulation or pre-release function used by the business system before the official release of a new software version, function or system update. A business request is a business-related request initiated by a user or a device module in a business system. Business requests depend on the business system, and the specific content of business requests corresponding to different business systems will be different. The request identifier is used to distinguish the division of routing matching methods for business requests. The division method of the request identifier can be determined based on the business module corresponding to the business request in a certain business system.
[0032] For example, if the business system is a financial system, the request identifier of the business request may include investment business, agency business, settlement business, loan business, etc. Different request identifiers correspond to different routing matching methods. The advantage of this setting is that the routing information corresponding to the business request can be determined according to the different request identifiers, and the routing information of the business request can be finely controlled, which can not only improve the efficiency of routing matching, but also improve the accuracy of routing matching.
[0033] In an embodiment of the present application, a main switch may be included in the configuration items of the configuration service node, and the main switch may be used to control whether the grayscale publishing function of the entire business system is enabled or not. The main switch may report the current state to the configuration service node in real time or when the state changes, and the state may include an on state and a off state. When the business system receives a business request initiated by a user or a device module, the microprocessor of the configuration service node actively detects whether the grayscale publishing function is in the on state, or the microprocessor obtains the state reported by the main switch from a preset storage unit. When the microprocessor determines that the grayscale publishing function of the business system is in the on state, it determines the request identifier of the business request received by the business system.
[0034] Preferably, the grayscale release component is integrated into the existing business system through a software development kit (SDK). This design enables grayscale functions to be independently developed and deployed in a modular manner, reducing invasive modifications to the main business code.
[0035] Preferably, in the specific implementation, the grayscale component is hosted by the Spring framework, and the configuration service node is implemented through the Spring bean container. With the help of Spring's dependency injection mechanism, the grayscale component can easily collaborate with other modules in the system to achieve a high degree of decoupling and scalability. In addition, the configuration service node is connected to the grayscale release component through the preset interface implementation class, which helps developers to directly call the grayscale release service to achieve the management of the grayscale release component. For example, the preset interface implementation class can be DefaultGrayDeploymentImpl.
[0036] S120: Determine a routing matching channel corresponding to the request identifier, and match the service request based on the routing matching channel to obtain corresponding routing information.
[0037] Among them, the route matching channel is used to distinguish the route matching methods of business requests with different request identifiers. The route matching channel can include the model identification channel and the field identification channel, and other route matching channels can also be set according to actual application requirements. Routing information refers to the path information of the business request from the source address to the destination address, that is, the request service node of the new system version or the request service node of the existing system version. Optionally, the routing information can be stored in the routing table, which is the basis for network devices to perform route selection.
[0038] In the embodiment of the present application, when a service request is received, if the service request message does not carry a request identifier that does not use machine learning matching, then the route matching is performed by default according to the trained strategy. If the message carries an identifier that does not use machine learning matching, then the route matching process in the configuration item (i.e., the field identification channel) in the configuration service node is executed.
[0039] In an achievable embodiment, when the route matching channel is a model identification channel, the business request is matched based on the route matching channel to obtain corresponding routing information, including: the microprocessor obtains a pre-trained policy matching model, the policy matching model is obtained based on pre-training of different features in the business request; the microprocessor first determines the category of the business request through the policy matching model, and then outputs the routing information for responding to the business request.
[0040] For example, taking features such as customer number, account number and region number in a business request as an example, machine learning algorithms (such as clustering, decision trees, etc.) will train these features into different categories, and each category corresponds to a routing matching strategy.
[0041] In another feasible embodiment, when the routing matching channel is a field identification channel, the service request is matched based on the routing matching channel to obtain the corresponding routing information, including: the microprocessor parses the message of the service request to obtain the key fields in the service request, the key fields including at least one of the user identification number, the account identification number and the regional identification number; the routing information for responding to the service request is determined according to the key fields and the preset routing policy list.
[0042] When the main switch of the grayscale release function is turned on, the microprocessor will determine whether to forward the business request to the request service node of the new system version based on the key fields in the message corresponding to the business request (such as customer number, regional information or other custom identifiers). This ensures that only qualified business requests will enter the grayscale release process, and other requests will continue to be processed according to the logic corresponding to the original system version.
[0043] Optionally, the routing policy list is pre-configured in the configuration service node. The grayscale release method of the business system of the present application also includes: determining the current routing rules according to the real-time application requirements of the grayscale release function; adjusting the routing policy based on the current routing rules to obtain a new routing policy; and updating the routing policy list based on the new routing policy.
[0044] Among them, real-time application requirements refer to application requirements that have changing requirements during the grayscale release process of the business system. Routing rules refer to the criteria for transmitting and forwarding business requests in the network. Routing rules can be divided into two categories: grouping rules and filtering rules. Grouping rules are used to quickly reduce the range of channels. Common grouping conditions include transaction type, card type, bank, etc. The filtering rule is that after the channel is grouped, a more detailed screening is required in the remaining channels. The filtering rules may include the lowest cost first. The setting and sorting of filtering rules can further reduce the number of optional channels and ultimately determine the optimal channel. The routing strategy is determined based on the routing rules, including grayscale strategy, traffic allocation ratio or request service node allocation strategy.
[0045] The configuration service node supports dynamic update of configuration (such as routing policy list), and the configuration changes can take effect without restarting the service. Dynamically adjust the grayscale strategy, traffic distribution ratio or target service node according to real-time application needs. The configuration service node pushes these updates to each request service node in real time to ensure that the system always runs according to the latest routing policy. By configuring the service node, different routing paths can be configured for different customer groups, request types or regions, and multiple load balancing strategies can be set to ensure efficient use of system resources and high availability of services.
[0046] Optionally, the routing strategy list is used to record the routing strategies configured when the key fields correspond to different key values. The routing strategy list is configured in the form of key-value pairs and provides flexible parameter adjustment options so that developers can fine-tune the behavior of the grayscale release component.
[0047] S130: Determine a target system environment corresponding to the service request based on the system environment identifier in the routing information.
[0048] The system environment identifier is an identifier in the routing information, which is used to indicate whether the service request should be forwarded to the grayscale environment or continue to use the existing environment.
[0049] In an embodiment of the present application, if the system environment identifier is a first identifier for indicating a grayscale environment, then the microprocessor can determine that the target system environment corresponding to the business request is a grayscale environment. If the system environment identifier is a second identifier for indicating an existing environment, then the microprocessor can determine that the target system environment corresponding to the business request is an existing environment, also known as a production environment. Among them, the existing environment refers to a stable application environment before the business system is grayed out, and the grayscale environment is a test environment used before the official release of a new software version, function, or system update.
[0050] S140. Forward the service request to the corresponding request service node based on the load balancing address in the routing information.
[0051] The load balancing address refers to a network address used to distribute the network traffic of business requests to multiple request service nodes. By distributing business requests to multiple request service nodes, the high availability and performance of the business system can be ensured.
[0052] In an embodiment of the present application, after receiving the load balancing address in the routing information, a decision will be made based on the load balancing address. If the system environment is identified as a grayscale environment, indicating that the business request needs to be forwarded, the grayscale release component will route the business request to the request service node of the specified new system version through the load balancer; if the system environment is identified as an existing environment, indicating that the business request does not need to be forwarded, the business request will be executed according to the existing business logic processing flow, and the load balancer will route the business request to the request service node of the existing system version. Through this mechanism, the system can flexibly and accurately control the processing path of each business request, thereby realizing a more refined grayscale release strategy.
[0053] S150: Requesting the service node to respond to the service request in the target system environment to obtain a processing result of the service request.
[0054] In an embodiment of the present application, after determining whether the business request corresponds to an existing environment or a grayscale environment, and the request service node corresponding to the business request, the microcontroller sends a processing instruction to the request service node so that the request service node responds to the business request in the target system environment and obtains the processing result of the business request.
[0055] Furthermore, before obtaining the processing result of the business request by requesting the service node to respond to the business request in the target system environment, it also includes: obtaining the total response time of the matching process of routing information and the forwarding process of the business request; when the total response time exceeds the preset time, the target system environment is determined to be the existing environment, and the requesting service node is determined to be the first service node configured with the existing system version, the existing environment is a stable application environment before the business system is grayed out, and the existing system version is a stable system version before the business system is grayed out; accordingly, obtaining the processing result of the business request by requesting the service node to respond to the business request in the target system environment includes: obtaining the processing result of the business request by responding to the business request in the existing environment through the first service node.
[0056] The configuration items of the configuration service node can include some technical parameter switches, such as the total response time of the response request. These technical configuration options enable the business system to flexibly adjust the behavior of the grayscale release component in response to different network environments and load conditions to ensure the stability and response speed of the business system. By adjusting these configuration items, developers can easily customize the grayscale release strategy to meet the needs of different business scenarios.
[0057] The technical solution provided in this embodiment, when it is detected that the grayscale release function of the business system is in the on state, determines the request identifier of the business request received by the business system; determines the routing matching channel corresponding to the request identifier, matches the business request based on the routing matching channel to obtain the corresponding routing information; determines the target system environment corresponding to the business request based on the system environment identifier in the routing information; forwards the business request to the corresponding request service node based on the load balancing address in the routing information; and obtains the processing result of the business request by requesting the service node to respond to the business request in the target system environment. In this application, when the business system receives a business request initiated by a user or a device module, the configuration service node first detects whether the grayscale release function is in the on state, and then determines the request identifier of the business request when the grayscale release function is in the on state. Different request identifiers correspond to different routing matching channels. The corresponding routing information is matched based on the routing matching channel corresponding to the request identifier, which can achieve refined control of the routing information of the business request and implement a more refined grayscale release strategy. Furthermore, the present application determines whether the service request is forwarded to the grayscale environment or continues to use the existing environment based on the system environment identifier; based on the load balancing address, the service request is routed to the request service node of the new system version or the request service node of the existing system version, and then responds to the service request. The present application can not only improve the efficiency of route matching, but also improve the accuracy of route matching.
[0058] The following further describes the grayscale release method of the business system provided by the embodiment of the present application. Figure 2 A second flow chart of a grayscale release method of a business system provided in an embodiment of the present application. The present embodiment of the present application is optimized on the basis of the above embodiments, and the specific optimization is as follows: the present embodiment explains in detail the processing process of the version rollback request of the business system.
[0059] See also Figure 2 The method of this embodiment includes but is not limited to the following steps:
[0060] S210: When the grayscale release task of the business system fails, a version rollback request for the business system is received.
[0061] In an optional embodiment, when the target system environment is a grayscale environment, the grayscale release method of the business system of the present application also includes: determining performance indicators of the business system, the performance indicators may include response time, throughput and system resource utilization, the system resource utilization may include central processing unit (CPU) utilization and memory utilization; if the performance indicators meet the preset performance standards, it can be determined that the grayscale release task of the business system is successful, if the performance indicators cannot meet the preset performance standards, it can be determined that the grayscale release task of the business system has failed.
[0062] In an embodiment of the present application, when the grayscale release task of the business system fails, the business system generates a prompt message for confirming whether to roll back to the old version. The user makes a choice based on the prompt message. If the user chooses to roll back the business system to the old version, a version rollback request is sent, and the microprocessor receives the version rollback request for the business system.
[0063] S220: Parse the version rollback request to obtain the rollback version number in the version rollback request.
[0064] The version rollback request message includes the rollback version number of the business system. The system version corresponding to the rollback version number is a more stable version.
[0065] In an embodiment of the present application, if you want to roll back to a specified version, you need to know the unique identifier of the version, that is, the rollback version number. After the microprocessor receives the version rollback request for the business system, it parses the message corresponding to the version rollback request to obtain the rollback version number in the version rollback request. Optionally, the version control system (such as Git) can also record all submitted historical version numbers. The process of extracting the version number can be: first, use the command or graphical interface tool of the version control system to view the submission history. For example, in Git, you can use the git log command to view all submission records. Then, select a suitable version from the history as the rollback target. This version should be stable and have no known problems. Finally, record the version number of the target version (such as commit hash in Git), which will be used for subsequent rollback operations.
[0066] S230. Determine the system parameters corresponding to the rollback version based on the rollback version number.
[0067] In an embodiment of the present application, a database is queried according to the rollback version number to obtain relevant system parameters of the rollback version so that the system parameters of the application can be updated.
[0068] Furthermore, before performing a version rollback, be sure to perform a complete backup of the business system data, including databases, configuration files, and important business data. In this way, even if an unexpected situation occurs during the rollback process, the backup data can be used for recovery to avoid data loss. Therefore, before determining the system parameters corresponding to the rollback version based on the rollback version number, it also includes: testing whether the version rollback request will affect the key data in the business system through a preset trained system rollback model; if it will not affect the key data in the business system, then performing the operation of determining the system parameters corresponding to the rollback version based on the rollback version number.
[0069] Optionally, you also need to carefully evaluate the risks that may be caused by version rollback, such as loss of functionality, data inconsistency, system instability, etc. Determine the necessity and urgency of the rollback, as well as the remedial measures that may need to be taken after the rollback.
[0070] S240. Update the business system using system parameters to obtain a business system corresponding to the rollback version.
[0071] In an embodiment of the present application, after the business system rolls back to a specified version, it may be necessary to update the configuration parameters of the application to ensure that the application can run normally. This process involves the following steps: First, query the database according to the rolled back version number to obtain the relevant configuration parameters of the version; these parameters may include API keys, database connection strings, log levels, etc. Then, update the obtained configuration parameters to the configuration file or environment variables of the application. Make sure that all necessary parameters are set correctly. Finally, after updating the parameters, restart the application and test it to ensure that the application can run normally under the rolled back version.
[0072] The technical solution provided in this embodiment is to receive a version rollback request for the business system when the grayscale release task of the business system fails; parse the version rollback request to obtain the rollback version number in the version rollback request; determine the system parameters corresponding to the rollback version based on the rollback version number; and use the system parameters to update the business system to obtain the business system corresponding to the rollback version. This application determines whether the grayscale release task of the business system is successful based on the performance indicators of the business system. When the release fails, the business system can be rolled back to a stable historical version, which can ensure the high availability and business performance of the business system.
[0073] Figure 3 A schematic diagram of the structure of a grayscale publishing device of a business system provided in an embodiment of the present application is shown in FIG. Figure 3 As shown, the device 300 is integrated in a configuration service node for managing a grayscale release component, and the device 300 may include:
[0074] The request identifier determination module 310 is used to determine the request identifier of the business request received by the business system when it is detected that the phased release function of the business system is in an enabled state;
[0075] A routing information matching module 320 is used to determine a routing matching channel corresponding to the request identifier, and match the service request based on the routing matching channel to obtain corresponding routing information;
[0076] A system environment determination module 330, configured to determine a target system environment corresponding to the service request based on the system environment identifier in the routing information;
[0077] A service node determination module 340, configured to forward the service request to a corresponding request service node based on the load balancing address in the routing information;
[0078] The processing result determination module 350 is used to respond to the service request in the target system environment through the request service node to obtain the processing result of the service request.
[0079] Furthermore, the above-mentioned routing information matching module 320 can be specifically used for: when the routing matching channel is a model identification channel, matching the business request based on the routing matching channel to obtain corresponding routing information, obtaining a pre-trained policy matching model, and the policy matching model is based on training different features in the business request; determining the routing information used to respond to the business request through the policy matching model.
[0080] Furthermore, the above-mentioned routing information matching module 320 can be specifically used for: when the routing matching channel is a field identification channel, matching the service request based on the routing matching channel to obtain corresponding routing information, parsing the message of the service request to obtain key fields in the service request, and the key fields at least include at least one of a user identification number, an account identification number and a regional identification number; determining the routing information used to respond to the service request according to the key fields and a preset routing strategy list.
[0081] In one embodiment, the routing policy list is pre-configured in the configuration service node;
[0082] Furthermore, the grayscale publishing device of the above business system may also include: a list determination module;
[0083] The list determination module is used to determine the current routing rules according to the real-time application requirements of the grayscale publishing function; adjust the routing strategy based on the current routing rules to obtain a new routing strategy; and update the routing strategy list based on the new routing strategy.
[0084] In one embodiment, the routing strategy list is used to record the routing strategies configured when the key fields correspond to different key values, and the routing strategy list is configured in the form of key-value pairs.
[0085] Furthermore, the grayscale release device of the above business system may also include: a system version rollback module;
[0086] The system version rollback module is used to receive a version rollback request for the business system when the grayscale release task of the business system fails; parse the version rollback request to obtain the rollback version number in the version rollback request; determine the system parameters corresponding to the rollback version based on the rollback version number; and use the system parameters to update the business system to obtain the business system corresponding to the rollback version.
[0087] Furthermore, the system version rollback module is also used to test whether the version rollback request will affect the key data in the business system through a preset trained system rollback model before determining the system parameters corresponding to the rollback version based on the rollback version number; if it will not affect the key data, the operation of determining the system parameters corresponding to the rollback version based on the rollback version number is performed.
[0088] Furthermore, the processing result determination module 350 can also be specifically used to obtain the total response time of the matching process of the routing information and the forwarding process of the business request; when the total response time exceeds the preset time, the target system environment is determined to be the existing environment, and the request service node is determined to be the first service node configured with the existing system version, the existing environment is a stable application environment before the business system is grayed out, and the existing system version is a stable system version before the business system is grayed out; the first service node responds to the business request in the existing environment to obtain the processing result of the business request.
[0089] Furthermore, the grayscale publishing device of the above business system may also include: a publishing task detection module;
[0090] The release task detection module is used to determine the performance index of the business system when the target system environment is a grayscale environment; and determine whether the grayscale release task of the business system is successful based on the performance index.
[0091] In one embodiment, the phased release component is integrated into the business system via a software development kit (SDK).
[0092] In one embodiment, the configuration service node is implemented through a Spring bean container, and is connected to the grayscale publishing component through a preset interface implementation class to achieve management of the grayscale publishing component.
[0093] The grayscale publishing device for the business system provided in this embodiment can be applied to the grayscale publishing method for the business system provided in any of the above embodiments, and has corresponding functions and beneficial effects.
[0094] Figure 4It is a block diagram of an electronic device for implementing a grayscale publishing method of a business system of an embodiment of the present application. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.
[0095] like Figure 4 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0096] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0097] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 11 executes the various methods and processes described above, such as a grayscale release method for a business system.
[0098] In some embodiments, the grayscale release method of the business system may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the grayscale release method of the business system described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the grayscale release method of the business system in any other appropriate manner (e.g., by means of firmware).
[0099] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0100] Computer programs for implementing the methods of the present application may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0101] In the context of the present application, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, 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), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0102] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0103] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server) or a computing system that includes middleware components (e.g., an application server) or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein) or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0104] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0105] An embodiment of the present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements the grayscale release method of the business system provided in any embodiment of the present application.
[0106] In the process of implementation, the computer program product can be written in one or more programming languages or a combination thereof to perform the computer program code of the present invention, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).
[0107] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A method for grayscale release of a business system, characterized in that: The method is applied to a configuration service node for managing a grayscale release component, and includes: When it is detected that the phased release function of the business system is in an enabled state, determining a request identifier of the business request received by the business system; Determine a routing matching channel corresponding to the request identifier, and match the service request based on the routing matching channel to obtain corresponding routing information; Determine the target system environment corresponding to the service request based on the system environment identifier in the routing information; Forwarding the service request to the corresponding request service node based on the load balancing address in the routing information; The request service node responds to the service request in the target system environment to obtain a processing result of the service request.
2. The method according to claim 1, characterized in that When the routing matching channel is a model identification channel, matching the service request based on the routing matching channel to obtain corresponding routing information includes: Obtain a pre-trained policy matching model, where the policy matching model is obtained by training different features in the service request; The routing information for responding to the service request is determined through the policy matching model.
3. The method according to claim 1, characterized in that When the routing matching channel is a field identification channel, matching the service request based on the routing matching channel to obtain corresponding routing information includes: Parsing the message of the service request to obtain key fields in the service request, wherein the key fields include at least one of a user identification number, an account identification number, and a region identification number; The routing information for responding to the service request is determined according to the key field and a preset routing strategy list.
4. The method according to claim 3, characterized in that The routing policy list is pre-configured in the configuration service node, and the method further includes: Determine the current routing rule according to the real-time application requirements of the grayscale release function; Adjust the routing strategy based on the current routing rule to obtain a new routing strategy; The routing policy list is updated based on the new routing policy.
5. The method according to claim 3, characterized in that: The routing strategy list is used to record the routing strategies configured when the key fields correspond to different key values, and the routing strategy list is configured in the form of key-value pairs.
6. The method according to claim 1, characterized in that The method further comprises: When the phased release task of the business system fails, receiving a version rollback request for the business system; Parsing the version rollback request to obtain the rollback version number in the version rollback request; Determine the system parameters corresponding to the rollback version based on the rollback version number; The business system is updated using the system parameters to obtain the business system corresponding to the rollback version.
7. The method according to claim 6, characterized in that Before determining the system parameter corresponding to the rollback version based on the rollback version number, the method further includes: Testing whether the version rollback request will affect key data in the business system through a preset trained system rollback model; If there is no impact, an operation of determining the system parameters corresponding to the rollback version based on the rollback version number is performed.
8. The method according to claim 1, characterized in that Before the request service node responds to the service request in the target system environment to obtain the processing result of the service request, the method further includes: Obtaining the total response time of the matching process of the routing information and the forwarding process of the service request; When the total response time exceeds a preset time, the target system environment is determined to be an existing environment, and the request service node is determined to be a first service node configured with an existing system version, wherein the existing environment is a stable application environment before the business system is released in a phased manner, and the existing system version is a stable system version before the business system is released in a phased manner; Correspondingly, the request service node responds to the service request in the target system environment to obtain a processing result of the service request, including: The first service node responds to the service request in the existing environment to obtain a processing result of the service request.
9. The method according to claim 1, characterized in that: When the target system environment is a grayscale environment, the method further includes: Determining performance indicators of the business system; Determine whether the phased release task of the business system is successful based on the performance indicator.
10. The method according to claim 1, characterized in that The grayscale release component is integrated into the business system through the software development kit SDK.
11. The method according to claim 1, characterized in that: The configuration service node is implemented through the Spring bean container, and the class is connected to the grayscale release component through a preset interface to achieve management of the grayscale release component.
12. A grayscale release device for a business system, characterized in that: The device is integrated into a configuration service node for managing a grayscale release component, and includes: A request identifier determination module, used to determine the request identifier of the business request received by the business system when it is detected that the grayscale release function of the business system is in an enabled state; A routing information matching module, used to determine a routing matching channel corresponding to the request identifier, and to match the service request based on the routing matching channel to obtain corresponding routing information; A system environment determination module, used to determine a target system environment corresponding to the service request based on the system environment identifier in the routing information; A service node determination module, configured to forward the service request to a corresponding request service node based on the load balancing address in the routing information; The processing result determination module is used to respond to the service request in the target system environment through the request service node to obtain the processing result of the service request.
13. An electronic device, characterized in that: It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the grayscale release method of the business system as described in any one of claims 1 to 11 when executing the computer program.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the grayscale release method of the business system as described in any one of claims 1 to 11 is implemented.
15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method for phased release of a business system according to any one of claims 1 to 11 is implemented.
Citation Information
Patent Citations
Service release system and method, equipment and storage medium
CN108376118A
Service gray release control method and device and computer equipment
CN112000348A
Multi-tenant service gray release method and device, computer equipment and storage medium
CN112118565A
PaaS platform service scheduling method and device and PaaS platform
CN113452776A
Information processing method and apparatus, and computer device and storage medium
WO2022267175A1
Cited By
Grayscale routing method and system based on IP network segment and URL subpath routing strategy
CN121396888A