Gray release method, device and equipment of business system, medium and product
By determining the request identifier and system environment identifier of the business request, and using the load balancing address to achieve fine-grained canary release, the problem of insufficient routing matching efficiency and accuracy in the existing technology is solved, and the efficiency and accuracy of canary release are improved.
Patent Information
- Application Number
- CN202411522709.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2044-10-29
AI Technical Summary
Existing canary deployment technology cannot achieve fine-grained control, resulting in poor routing matching efficiency and accuracy.
By determining the request identifier of the business request, matching the routing channel and system environment identifier, and using the load balancing address, the request is forwarded to the target service node, thus realizing a refined canary release strategy.
It improves the efficiency and accuracy of route matching, ensuring that business requests are routed to the target system environment on demand, and enabling more efficient canary releases.
Smart Images

Figure CN119629248B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of computer technology, and in particular to a gray release method and device for a business system, equipment, medium and product. BACKGROUND
[0002] With the rapid development of Internet technology, the market has put forward higher requirements for the stability of technology systems, and gray release technology has become an important guarantee for the stability of application systems.
[0003] Currently, the gray release function is usually implemented by relying on the gateway layer. In the prior art, the gateway layer usually adopts the following two ways to implement gray release: first, regular judgment is performed on the uniform resource identifier (URI): the URI path of the request is matched by using a regular expression to determine whether to route the traffic to a new version. This method is suitable for scenarios where gray release is differentiated according to specific interface paths. Second, the gateway layer judges the regional traffic: according to the source region (such as the Internet Protocol (IP) address, geographic location, etc.) of the request, the new version is gradually opened to users in different regions. This is suitable for gray release requirements related to geographic location, such as gradually rolling out new functions in different countries or regions. However, these two gray release methods do not achieve the goal of fine-grained control, and the efficiency and accuracy are poor. SUMMARY
[0004] Embodiments of the present application provide a gray release method, device, equipment, medium and product for a business system, which can achieve fine-grained control of the routing information of business requests, not only improving the efficiency of route matching, but also improving the accuracy of route matching.
[0005] In a first aspect, embodiments of the present application provide a gray release method for a business system, which is applied to a configuration service node for managing a gray release component, and the method comprises:
[0006] When it is detected that the gray release function of the business system is in an open state, determining the request identifier of a business request received by the business system;
[0007] Determining the routing matching channel corresponding to the request identifier, and matching the business request based on the routing matching channel to obtain corresponding routing information;
[0008] Determining the target system environment corresponding to the business request based on the system environment identifier in the routing information;
[0009] Forwarding the business request to the corresponding request service node based on the load balancing address in the routing information;
[0010] obtaining a processing result of the service request by the request service node responding to the service request in the target system environment.
[0011] In a second aspect, an embodiment of the present application further provides a gray release device of a service system, which is integrated into a configuration service node for managing a gray release component, and the device comprises:
[0012] a request identifier determination module configured to determine a request identifier of a service request received by the service system when detecting that a gray release function of the service system is in an open state;
[0013] a routing information matching module configured 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;
[0014] a system environment determination module configured to determine a target system environment corresponding to the service request based on a 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 a load balancing address in the routing information;
[0016] a processing result determination module configured to obtain a processing result of the service request by the request service node responding to the service request in the target system environment.
[0017] In a third aspect, an embodiment of the present application further provides an electronic device, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the gray release method of the service system according to any of the embodiments of the present application when executing the program.
[0018] In a fourth aspect, an embodiment of the present application further provides a computer readable storage medium, which stores a computer program, and the program is executable on a processor to implement the gray release method of the service system according to any of the embodiments of the present application.
[0019] In a fifth aspect, an embodiment of the present application further provides a computer program product, which comprises a computer program, and the computer program is executable on a processor to implement the gray release method of the service system according to any of the embodiments of the present application.
[0020] In this embodiment of the invention, when the canary release function of the business system is detected to be enabled, 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; and the processing result of the business request is obtained by the request service node responding to the business request in the target system environment. Executing 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 checks whether the canary release function is enabled. If the canary release function is enabled, the request identifier of the business request is then determined. Different request identifiers correspond to different routing matching channels. Matching the corresponding routing information based on the routing matching channel corresponding to the request identifier can achieve fine-grained control of the routing information of business requests, and realize a more refined canary release strategy. Furthermore, this application determines whether a business request is forwarded to a gray-scale environment or continues to use the existing environment based on the system environment identifier; it routes the business request to the request service node of the new system version or the request service node of the existing system version based on the load balancing address, and then responds to the business request. This application can not only improve the efficiency of route matching, but also improve the accuracy of route matching. Attached Figure Description
[0021] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 A first flowchart illustrating a canary release method for a business system provided in this application embodiment;
[0023] Figure 2 This application provides a second flowchart illustrating a canary release method for a business system, as illustrated in an embodiment of the present application.
[0024] Figure 3 A schematic diagram of the structure of a grayscale release device for a business system provided in this application embodiment;
[0025] Figure 4 This is a block diagram of an electronic device used to implement a canary release method for a business system according to an embodiment of this application. Detailed Implementation
[0026] The application will be described in further detail below with reference to the drawings and embodiments. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not to be used to limit the application. It is also to be understood that, for the purpose of description, only the parts related to the application are shown in the drawings rather than all the structures.
[0027] It should be noted that similar reference numerals and letters refer to like items in the following drawings, and thus, once an item is defined in one drawing, it is not necessary to further define and explain it in subsequent drawings. Meanwhile, in the description of the application, the terms "first", "second", and the like are merely used to distinguish descriptions and cannot be understood as indicating or implying relative importance. The acquisition, storage, use, processing, and the like of data in the technical solutions of the present application comply with relevant provisions of national laws and regulations. It should be noted that in the embodiments of the present application, some industry existing solutions, components, models, and the like may be mentioned, which should be considered as exemplary, and the purpose is only to illustrate the feasibility of the implementation of the technical solutions of the present application, but it does not mean that the applicant has or will necessarily use the related content of the solution.
[0028] Figure 1 A first flowchart of a service system gray release method provided by the embodiments of the present application, the embodiments of the present application can be applicable to the case of gray release of the service system. The service system gray release method provided by the embodiments of the present application can be executed by the service system gray release device provided by the embodiments of the present application. The device can be realized by software and / or hardware, and integrated in an electronic device executing the method. The method is applied to a configuration service node for managing a gray release component.
[0029] Referring to Figure 1 The method of the embodiments includes but is not limited to the following steps:
[0030] S110, when it is detected that the gray release function of the service system is in an open state, determining the request identifier of the service request received by the service system.
[0031] The service system can be a sales transaction platform for enterprises to push products to the market, or a service management platform for an institution to serve users. The form of the service system can be an application program or a mini program. The gray release function refers to a simulation or pre-release function used by the service system before the formal release of a new software version, function or system update. The service request is a request related to the business initiated by a user or a device module in the service system. The service request varies with the service system, and the specific content of the service request corresponding to different service systems will be different. The request identifier is used to distinguish the routing matching mode of the service request. The division method of the request identifier can be determined according to the business module corresponding to the service request in a certain service system.
[0032] For example, if the business system is a financial system, the request identifier of the business request can include investment business, agency business, settlement business, loan business, and the like. Different request identifiers correspond to different routing matching modes. This setting has the advantage that the routing information corresponding to the business request can be determined according to the difference of the request identifier, the routing information of the business request can be precisely controlled, the routing matching efficiency can be improved, and the routing matching accuracy can be improved.
[0033] In the embodiment of the present application, a total switch can be included in the configuration item of the configuration service node, and the total switch can be used to control whether the gray release function of the entire business system is enabled. The total switch can report the state at the current time to the configuration service node in real time or when the state changes. The state can include an open state and a closed state. When the business system receives a business request initiated by a user or a certain device module, the microprocessor of the configuration service node actively detects whether the gray release function is in the open state, or the microprocessor obtains the state reported by the total switch from the preset storage unit. When the microprocessor determines that the gray release function of the business system is in the open state, the request identifier of the business request received by the business system is determined.
[0034] Preferably, the gray release component is integrated in the existing business system through a software development kit (SDK). This design enables the gray function to be developed and deployed independently in a modular manner, reducing the invasive modification of the main business code.
[0035] Further preferably, in specific implementation, the gray component is hosted by a Spring framework, and the configuration service node is implemented through a bean container of the Spring. With the dependency injection mechanism of the Spring, the gray component can easily cooperate with other modules in the system, achieving high decoupling and scalability. Moreover, the configuration service node is connected with the gray release component through a preset interface implementation class, helping developers to directly call the gray release service to manage the gray release component. For example, the preset interface implementation class can be DefaultGrayDeploymentImpl.
[0036] S120, determining a routing matching channel corresponding to the request identifier, and matching the business request based on the routing matching channel to obtain corresponding routing information.
[0037] The routing matching channel is a routing matching mode used to distinguish different service requests according to different request identifiers. The routing matching channel can include a model identification channel and a field identification channel, and other routing matching channels can also be set according to actual application requirements. The routing information refers to path information of a service request from a source address to a destination address, that is, a request service node of a new system version or a request service node of an existing system version. Optionally, the routing information can be stored in a routing table, which is the basis for network equipment to make routing selection.
[0038] In the embodiment of the present application, when a service request is received, if the message of the service request does not carry a request identifier that does not use machine learning matching, the routing matching is performed according to the trained strategy by default. If the message carries the identifier that does not use machine learning matching, the routing matching process in the configuration item (i.e., the field identification channel) in the configuration service node is executed.
[0039] In an implementable embodiment, when the routing matching channel is the model identification channel, the corresponding routing information is obtained by matching the service request based on the routing matching channel, including: the microprocessor acquires a pre-trained strategy matching model, and the strategy matching model is obtained based on pre-training of different features in the service request; the microprocessor determines the category of the service request through the strategy matching model, and then outputs the routing information used to respond to the service request.
[0040] For example, the customer number, account number and region number in the service request are trained into different categories by using machine learning algorithms (such as clustering, decision tree, etc.), and each category corresponds to a routing matching strategy.
[0041] In another implementable embodiment, when the routing matching channel is the field identification channel, the corresponding routing information is obtained by matching the service request based on the routing matching channel, including: the microprocessor parses 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 identifier, an account identifier and a region identifier; and the routing information used to respond to the service request is determined according to the key fields and a pre-set routing strategy list.
[0042] When the total switch of the gray release function is in the on state, the microprocessor will determine whether the service request needs to be forwarded to the request service node of the new system version according to the key fields (such as customer number, region information or other custom identifiers) in the message corresponding to the service request. In this way, it can be ensured that only the service requests that meet the conditions will enter the gray release process, and other requests will continue to be processed according to the logic corresponding to the original system version.
[0043] Optionally, the routing strategy list is pre-configured in the configuration service node, and the gray release method of the business system of the application further includes: determining a current routing rule according to real-time application requirements of the gray release function; adjusting the routing strategy based on the current routing rule to obtain a new routing strategy; and updating the routing strategy list based on the new routing strategy.
[0044] The real-time application requirement refers to an application requirement of the business system that changes during the gray release process. The routing rule refers to a criterion for transmission and forwarding of a business request in a network, and the routing rule can be divided into two categories: grouping rules and screening rules. The grouping rule is used to quickly reduce the channel range, and common grouping conditions include transaction type, card type, bank, etc. The screening rule is a more detailed screening in the remaining channels after the channel grouping. The screening rule can include a lowest cost priority, etc. The setting and sorting of the screening rule can further reduce the number of optional channels, and finally determine the optimal channel. The routing strategy is determined according to the routing rule, and includes a gray strategy, a traffic distribution ratio, or a request service node distribution strategy, etc.
[0045] The configuration service node supports dynamic updating of configuration (such as the routing strategy list), and changes in the configuration can take effect without restarting the service. The gray strategy, the traffic distribution ratio, or the target service node is dynamically adjusted according to the real-time application requirement. The configuration service node pushes these updates to each request service node in real time, ensuring that the system always operates according to the latest routing strategy. Through the configuration 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 strategy configured when the key field corresponds to different key values, and the routing strategy list is configured in the form of key-value pair, providing flexible parameter adjustment options to enable developers to finely control the behavior of the gray release component.
[0047] S130, determining a target system environment corresponding to the business request based on the system environment identifier in the routing information.
[0048] The system environment identifier is an identifier in the routing information, used to indicate whether the business request should be forwarded to the gray environment or continue to use the existing environment.
[0049] In the embodiment of the present application, if the system environment identifier is the first identifier used to represent the gray-scale environment, the microprocessor can determine that the target system environment corresponding to the service request is the gray-scale environment. If the system environment identifier is the second identifier used to represent the existing environment, the microprocessor can determine that the target system environment corresponding to the service request is the existing environment, also referred to as the production environment. The existing environment refers to a stable application environment before the service system is gray-scale published, and the gray-scale environment is a test environment used before a new software version, function or system update is officially published.
[0050] S140, forwarding 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 network traffic of the service request to multiple request service nodes. By distributing the service request to multiple request service nodes, the high availability and performance of the service system can be ensured.
[0052] In the embodiment of the present application, after receiving the load balancing address in the routing information, a decision is made according to the load balancing address. If the system environment identifier is the gray-scale environment, it indicates that the service request needs to be forwarded, and the gray-scale publishing component will route the service request to the request service node of the specified new system version through the load balancer. If the system environment identifier is the existing environment, it indicates that the service request does not need to be forwarded, and the service request will be executed according to the existing business logic processing flow. The load balancer will route the service 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 service request, thereby realizing a more refined gray-scale publishing strategy.
[0053] S150, responding to the service request in the target system environment through the request service node to obtain a processing result of the service request.
[0054] In the embodiment of the present application, after determining whether the service request corresponds to the existing environment or the gray-scale environment and the request service node corresponding to the service request, the microcontroller sends a processing instruction to the request service node to make the request service node respond to the service request in the target system environment and obtain a processing result of the service request.
[0055] Further, before the processing result of the service request is obtained by the requesting service node responding to the service request in the target system environment, the total response time of the matching process of the routing information and the forwarding process of the service request is obtained; when the total response time exceeds a preset time, the target system environment is determined as an existing environment, and the requesting service node is determined as a first service node configured with an existing system version, the existing environment being a stable application environment before the service system is released in a gray scale, and the existing system version being a stable system version before the service system is released in a gray scale; correspondingly, the processing result of the service request is obtained by the first service node responding to the service request in the existing environment.
[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 gray release component in response to different network environments and load conditions, ensuring the stability and response speed of the business system. By adjusting these configuration items, developers can easily customize the gray release strategy to meet the needs of different business scenarios.
[0057] The technical scheme provided by the embodiment of the present application, when the gray release function of the business system is detected to be in an open state, determines the request identifier of the service request received by the business system; determines the routing matching channel corresponding to the request identifier, and matches the service request based on the routing matching channel to obtain corresponding routing information; determines the target system environment corresponding to the service request based on the system environment identifier in the routing information; forwards the service request to the corresponding requesting service node based on the load balancing address in the routing information; and obtains the processing result of the service request by the requesting service node responding to the service request in the target system environment. When the business system receives a service request initiated by a user or a certain device module, the configuration service node first detects whether the gray release function is in an open state, and then determines the request identifier of the service request when the gray release function is in an open state. 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, which can realize fine control of the routing information of the service request and realize a more fine gray release strategy. Moreover, the application determines whether the service request is forwarded to the gray environment or continues to use the existing environment based on the system environment identifier; and routes the service request to the requesting service node of the new system version or the requesting service node of the existing system version based on the load balancing address, and then responds to the service request. The application not only improves the efficiency of routing matching, but also improves the accuracy of routing matching.
[0058] The gray release method of the business system provided by the embodiment of the present application will be further described below,Figure 2 A second flowchart of a gray release method of a service system is provided in the embodiments of the present application. The embodiments of the present application are optimized on the basis of the above-mentioned embodiments, and the specific optimization is that the embodiments explain the processing procedure of the version rollback request of the service system in detail.
[0059] Referring to Figure 2 The method of the embodiments of the present application includes but is not limited to the following steps:
[0060] S210, when the gray release task of the service system fails, receiving a version rollback request for the service system.
[0061] In an optional embodiment, when the target system environment is a gray environment, the gray release method of the service system of the present application further includes: determining the performance indicators of the service system, the performance indicators can include response time, throughput and system resource utilization, the system resource utilization can include CPU utilization and memory utilization; if the performance indicators meet the preset performance standard, it can be determined that the gray release task of the service system is successful, and if the performance indicators cannot meet the preset performance standard, it can be determined that the gray release task of the service system fails.
[0062] In the embodiments of the present application, when the gray release task of the service system fails, the service system generates prompt information for confirming whether to rollback to the old version. The user selects according to the prompt information, if the user selects to rollback the service system to the old version, a version rollback request is sent, and the microprocessor receives the version rollback request for the service system.
[0063] S220, analyzing the version rollback request to obtain the rollback version number in the version rollback request.
[0064] The message of the version rollback request includes the rollback version number of the service system. The system version corresponding to the rollback version number is a more stable version.
[0065] In the embodiments of the present application, if the specified version is to be rolled back, the unique identifier of the version, i.e., the rollback version number, needs to be known. After the microprocessor receives the version rollback request for the business system, the message corresponding to the version rollback request is parsed to obtain the rollback version number in the version rollback request. Optionally, the version control system (such as Git) can also record all the submitted historical version numbers. The process of extracting the version number can be as follows: first, the commit history record is viewed using the command or graphical interface tool of the version control system. For example, in Git, the git log command can be used to view all the commit records. Then, a suitable version is selected from the history record as the rollback target. This version should be stable and have no known problems. Finally, the version number (such as the commit hash in Git) of the target version is recorded, which will be used for subsequent rollback operations.
[0066] S230, determining the system parameters corresponding to the rollback version based on the rollback version number.
[0067] In the embodiments of the present application, the database is queried according to the rollback version number to obtain the related system parameters of the rollback version, so that the system parameters of the application can be updated.
[0068] Further, before the version rollback, the data of the business system, including the database, configuration file and important business data, etc., is backed up completely. In this way, even if an unexpected situation occurs during the rollback process, the data can be recovered through the backup data to avoid data loss. Therefore, before the system parameters corresponding to the rollback version are determined based on the rollback version number, the system rollback model trained in advance is used to test whether the version rollback request will affect the key data in the business system; if not, the operation of determining the system parameters corresponding to the rollback version based on the rollback version number is performed.
[0069] Optionally, the risks that may be brought by the version rollback, such as loss of function, inconsistency of data, instability of system, etc., also need to be carefully evaluated. The necessity and urgency of rollback are determined, and the remedial measures that may need to be taken after rollback are determined.
[0070] S240, updating the business system using the system parameters to obtain the business system corresponding to the rollback version.
[0071] In the embodiments of the present application, after the business system is rolled back to the 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 version number of the rollback 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 variable of the application. Ensure that all necessary parameters have been correctly set. Finally, after updating the parameters, restart the application and test it to ensure that the application can run normally under the rollback version.
[0072] The technical scheme provided by the embodiments of the present application, when the gray release task of the business system fails, a version rollback request for the business system is received; the version rollback request is analyzed to obtain the rollback version number in the version rollback request; the system parameters corresponding to the rollback version are determined 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. According to the performance indicators of the business system, the present application determines whether the gray release task of the business system is successful, and 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 structural diagram of a gray release device for a business system provided by the embodiments of the present application is shown in Figure 3 The device 300 is integrated into a configuration service node for managing a gray release component, and the device 300 can include:
[0074] The request identifier determination module 310 is configured to determine the request identifier of the business request received by the business system when it is detected that the gray release function of the business system is in an enabled state.
[0075] The routing information matching module 320 is configured to determine the routing matching channel corresponding to the request identifier, and match the business request based on the routing matching channel to obtain the corresponding routing information.
[0076] The system environment determination module 330 is configured to determine the target system environment corresponding to the business request based on the system environment identifier in the routing information.
[0077] The service node determination module 340 is configured to forward the business request to the corresponding request service node based on the load balancing address in the routing information.
[0078] The processing result determination module 350 is configured to respond to the business request in the target system environment through the request service node to obtain the processing result of the business request.
[0079] Further, the route information matching module 320 can be specifically configured to: when the route matching channel is a model recognition channel, match the service request based on the route matching channel to obtain corresponding route information, obtain a pre-trained strategy matching model, and determine the route information for responding to the service request by using the strategy matching model, wherein the strategy matching model is obtained based on training different features in the service request.
[0080] Further, the route information matching module 320 can be specifically configured to: when the route matching channel is a field recognition channel, match the service request based on the route matching channel to obtain corresponding route information, parse a message of the service request to obtain a key field in the service request, and determine the route information for responding to the service request according to the key field and a preset route strategy list, wherein the key field at least includes at least one of a user identification number, an account identification number, and a region identification number.
[0081] In an embodiment, the route strategy list is preconfigured in the configuration service node.
[0082] Further, the gray release device of the business system can further include a list determining module.
[0083] The list determining module is configured to determine a current route rule according to real-time application requirements of the gray release function, adjust a route strategy based on the current route rule to obtain a new route strategy, and update the route strategy list based on the new route strategy.
[0084] In an embodiment, the route strategy list is used to record the configured route strategy when the key field corresponds to different key values, and the route strategy list is configured in a key-value pair form.
[0085] Further, the gray release device of the business system can further include a system version rollback module.
[0086] The system version rollback module is configured to receive a version rollback request for the business system when a gray release task of the business system fails, parse the version rollback request to obtain a rollback version number in the version rollback request, determine a system parameter corresponding to a rollback version based on the rollback version number, and update the business system by using the system parameter to obtain a business system corresponding to the rollback version.
[0087] Further, the system version rollback module is further configured to test, before determining the system parameters corresponding to the rollback version based on the rollback version number, whether the version rollback request will affect the key data in the business system by using a pre-trained system rollback model; and if not, perform the operation of determining the system parameters corresponding to the rollback version based on the rollback version number.
[0088] Further, the processing result determination module 350 can be specifically configured to acquire a total response duration of a matching process of the routing information and a forwarding process of the business request; when the total response duration exceeds a preset duration, determine the target system environment as an existing environment, and determine the request service node as a first service node configured with an existing system version, the existing environment being a stable application environment before the business system is gray published, and the existing system version being a stable system version before the business system is gray published; and obtain a processing result of the business request by responding to the business request in the existing environment through the first service node.
[0089] Further, the gray publishing device of the business system can further include a publishing task detection module.
[0090] The publishing task detection module is configured to determine a performance index of the business system when the target system environment is a gray environment; and determine whether a gray publishing task of the business system is successful based on the performance index.
[0091] In an embodiment, the gray publishing component is integrated in the business system through a software development kit (SDK).
[0092] In an embodiment, the configuration service node is implemented through a bean container of Spring, and a preset interface implementation class is used to connect the gray publishing component to implement management of the gray publishing component.
[0093] The gray publishing device of the business system provided in this embodiment can be applied to the gray publishing method of the business system provided in any of the above embodiments, and has corresponding functions and advantages.
[0094] Figure 4is a block diagram of an electronic device that implements a method for gray release of a service system according to an embodiment of the present application. The electronic device 10 is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular telephones, smartphones, wearable devices (e.g., headsets, glasses, watches, etc.), and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application described and / or claimed in this document.
[0095] As shown in Figure 4 The electronic device 10 includes at least one processor 11, and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., connected to the at least one processor 11 in communication, where the memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer programs stored in the read-only memory (ROM) 12 or loaded into the random access memory (RAM) 13 from the storage unit 18. 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] Various 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 magnetic 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 telecommunications networks.
[0097] The processor 11 can be various general and / or special-purpose 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 special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs various methods and processes described above, such as the method for gray release of a service system.
[0098] In some embodiments, the grey release method of a business system can be implemented as a computer program tangibly embodied in a computer readable storage medium, e.g., storage unit 18. In some embodiments, parts or all of the computer program can be loaded and / or installed onto electronic device 10 via, e.g., ROM 12 and / or communication unit 19. When the computer program is loaded onto RAM 13 and executed by processor 11, one or more steps of the grey release method of a business system as described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the grey release method of a business system by other means, e.g., with the aid of firmware.
[0099] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a programmable logic device (PLD), a computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0100] Computer programs used to implement the methods of the present application can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the computer program, when executed by the processor, implements the functions / acts specified in the flowcharts and / or block diagrams. The computer program can be executed entirely on a machine, partially on a machine, partially on a machine as part of a standalone software package, partially on a machine and partially on a remote machine or entirely on a remote machine or server.
[0101] In the context of this application, a computer readable storage medium can be a tangible medium that can contain or store computer programs for use by or in connection with an instruction execution system, apparatus, or device. Computer readable storage media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer readable storage medium can be a machine readable signal medium. More specific examples of a machine readable storage medium will include one or more lines of a program of instructions in a transitory signal form, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0102] To provide for interaction with a user, the systems and techniques described here can 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 a trackball) by which the user can provide input to the electronic device. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0103] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end 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), blockchain networks, and the Internet.
[0104] The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can 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 large management difficulty and weak business scalability in traditional physical host and VPS service.
[0105] The embodiment of the present application further provides a computer program product comprising a computer program which, when executed by a processor, implements the gray release method of the business system as provided in any embodiment of the present application.
[0106] The computer program product can be written in one or more programming languages or combinations of languages including object-oriented languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server. In the latter scenario, 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 the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0107] Note that the above only describes the preferred embodiments of the present application and the technical principles applied. Those skilled in the art will understand that the present application is not limited to the specific embodiments herein, and those skilled in the art can make various obvious changes, readjustments and substitutions without departing from the scope of the present application. Therefore, although the present application has been described in more detail through the above embodiments, the present application is not limited to the above embodiments, and can include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the appended claims.
Claims
1. A gray release method of a service system, characterized by, The method is applied to a configuration service node for managing a gray release component, and comprises the following steps: When it is detected that a gray release function of a business system is in an open state, determining a request identifier of a business request received by the business system; Determining a route matching channel corresponding to the request identifier, and matching the business request based on the route matching channel to obtain corresponding route information, wherein the route matching channel is a route matching mode used to distinguish different request identifiers of the business request; Determining a target system environment corresponding to the business request based on a system environment identifier in the route information; Forwarding the business request to a corresponding request service node based on a load balancing address in the route information; Responding to the business request in the target system environment through the request service node to obtain a processing result of the business request; Before the step of responding to the business request in the target system environment through the request service node to obtain the processing result of the business request, the method further comprises the following steps: Obtaining a total response time length of a matching process of the route information and a forwarding process of the business request; When the total response time length exceeds a preset time length, determining the target system environment as an existing environment and determining the request service node as a first service node configured with an existing system version, wherein the existing environment is a stable application environment before the business system performs gray release, and the existing system version is a stable system version before the business system performs gray release; Correspondingly, the step of responding to the business request in the target system environment through the request service node to obtain the processing result of the business request comprises the following step: Responding to the business request in the existing environment through the first service node to obtain the processing result of the business request.
2. The method of claim 1, wherein, When the route matching channel is a model identification channel, the step of matching the business request based on the route matching channel to obtain corresponding route information comprises the following steps: Obtaining a pre-trained policy matching model, wherein the policy matching model is obtained based on training of different features in a business request; Determining route information used to respond to the business request through the policy matching model.
3. The method of claim 1, wherein, When the route matching channel is a field identification channel, the step of matching the business request based on the route matching channel to obtain corresponding route information comprises the following steps: Analyzing a message of the business request to obtain a key field in the business request, wherein the key field comprises at least one of a user identifier, an account identifier, and a region identifier; Determining route information used to respond to the business request according to the key field and a preset route strategy list.
4. The method of claim 3, wherein, The route strategy list is preconfigured in the configuration service node, and the method further comprises the following steps: Determining a current route rule according to real-time application requirements of the gray release function; Adjusting a route strategy based on the current route rule to obtain a new route strategy; Updating the route strategy list based on the new route strategy.
5. The method of claim 3, wherein, The routing strategy list is configured in the form of key-value pairs.
6. The method of claim 1, wherein, The method further comprises: When the gray release task of the business system fails, receiving a version rollback request for the business system; Analyzing the version rollback request to obtain a rollback version number in the version rollback request; Determining system parameters corresponding to the rollback version based on the rollback version number; Updating the business system using the system parameters to obtain a business system corresponding to the rollback version.
7. The method of claim 6, wherein, Before determining the system parameters corresponding to the rollback version based on the rollback version number, the method further comprises: Testing whether the version rollback request will affect the key data in the business system through a pre-trained system rollback model; If not, performing the operation of determining the system parameters corresponding to the rollback version based on the rollback version number.
8. The method of claim 1, wherein, When the target system environment is a gray environment, the method further comprises: Determining a performance indicator of the business system; Determining whether the gray release task of the business system is successful based on the performance indicator.
9. The method of claim 1, wherein, The gray release component is integrated in the business system through a software development kit (SDK).
10. The method of claim 1, wherein, The configuration service node is implemented through a bean container of Spring, and a preset interface implementation class is connected with the gray release component to manage the gray release component.
11. A gray release apparatus of a service system, characterized by, The device is integrated in a configuration service node for managing a gray release component, comprising: A request identifier determination module configured to determine a request identifier of a service request received by a business system when detecting that a gray release function of the business system is in an enabled state; A routing information matching module configured to determine a routing matching channel corresponding to the request identifier, match the service request based on the routing matching channel to obtain corresponding routing information, and distinguish different request identifiers of the service request in a routing matching manner; A system environment determination module configured to determine a target system environment corresponding to the service request based on a 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 a load balancing address in the routing information; A processing result determination module configured to respond to the service request in the target system environment through the request service node to obtain a processing result of the service request. The processing result determination module is further configured to acquire a total response time length of a matching process of the routing information and a forwarding process of the service request; when the total response time length exceeds a preset time length, determine the target system environment as an existing environment, and determine the request service node as a first service node configured with an existing system version, the existing environment being a stable application environment before the service system is released in a gray scale manner, and the existing system version being a stable system version before the service system is released in a gray scale manner; and obtain a processing result of the service request by responding to the service request in the existing environment through the first service node.
12. An electronic device, comprising: The computer program is stored in the memory and executable by the processor, and when the processor executes the computer program, the gray scale release method of the service system is implemented.
13. A computer readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the gray scale release method of the service system as claimed in any one of claims 1 to 10.
14. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the gray scale release method of the service system as claimed in any one of claims 1 to 10.
Citation Information
Patent Citations
Service gray release control method and device and computer equipment
CN112000348A
PaaS platform service scheduling method and device and PaaS platform
CN113452776A