Vehicle service processing method and system, vehicle and storage medium
Through the intelligent dynamic routing mechanism, the grayscale identification information in the service request is identified and routed to the grayscale service instance, the problem of low vehicle service processing efficiency is solved, and the efficiency and stability of grayscale release is achieved.
Patent Information
- Application Number
- CN202411273376.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-11
- Publication Date
- 2025-02-28
AI Technical Summary
In the prior art, vehicle service processing efficiency is low, especially in high concurrency scenarios, resulting in an extended request processing time.
By introducing an intelligent dynamic routing mechanism, the client's service request is obtained and the routing policy is called to identify the identification information in the service request. If the identification information is grayscale identification information, determine the corresponding grayscale service instance, route the service request to the grayscale service instance, and realize grayscale publishing.
Reduce request processing time, avoid overload caused by excessive requests from the new version of the service, and improve the efficiency and stability of vehicle service release.
Smart Images

Figure CN119544604A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of autonomous driving and data services, and in particular to a vehicle service processing method, system, vehicle and storage medium. Background Art
[0002] At present, with the development of intelligent transportation systems, vehicles are also gradually developing in the direction of intelligence and interconnection. With the popularization of microservice architecture, the dependencies between services are becoming more and more complex, and a reliable technical solution is needed to achieve full-link grayscale release. Introducing grayscale release technology in vehicles can ensure the stability and safety of vehicles and realize the gradual launch of new services. Through grayscale release technology, vehicle manufacturers can better manage the service update process of vehicles and improve the performance and efficiency of vehicles. Therefore, how to perform grayscale release is very important.
[0003] In the grayscale release process of related technologies, the flexibility and efficiency of dynamic routing selection are crucial to control the guidance and management of traffic. Dynamic routing selection usually involves a series of calculation and judgment operations, including parsing request headers, querying routing rules, interacting with service discovery, etc. These operations require processing and judgment of service requests to determine which version or instance the service request should be routed to. However, the above dynamic routing process is very cumbersome and will have a certain impact on the processing time of service requests. Especially in high-concurrency scenarios, these additional calculations and judgment logic may have a certain impact on the request processing time, which may lead to increased delays. Therefore, there is still a technical problem of low service processing efficiency for vehicles.
[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0005] Embodiments of the present invention provide a vehicle service processing method, system, vehicle and storage medium to at least solve the technical problem of low vehicle service processing efficiency.
[0006] According to one aspect of an embodiment of the present invention, a vehicle service processing method is provided, comprising: obtaining a service request from a client, wherein the service request is used to request allocation of an application service of the vehicle to the client; calling a routing strategy to identify identification information in the service request, wherein the routing strategy is used to represent a rule for routing the service request, and the identification information is used to identify a service instance of the application service; in response to the identification information being grayscale identification information, determining a grayscale service instance corresponding to the grayscale identification information, wherein the grayscale service instance is used to represent a service instance of the application service to be published; and routing the service request to the grayscale service instance to publish the grayscale service instance to the client.
[0007] Optionally, in response to the identification information being grayscale identification information, determining the grayscale service instance corresponding to the grayscale identification information includes: in response to the identification information being grayscale identification information, calling an interceptor to add routing information to the service request; and determining the grayscale service instance pointed to by the routing information.
[0008] Optionally, the routing information includes target address information, and the target address information is used to represent the address of the grayscale service instance. In response to the identification information being grayscale identification information, the interceptor is called to add routing information to the service request, including: in response to the identification information being grayscale identification information, the interceptor is called to modify the initial address information in the service request to obtain the target address information.
[0009] Optionally, routing the service request to the grayscale service instance includes: using the grayscale identification information to call the load balancing strategy, determining the performance indicator of the grayscale service instance, wherein the performance indicator is used to represent the performance status of the grayscale service instance; in response to the performance indicator satisfying the performance indicator threshold, routing the service request to the grayscale service instance.
[0010] Optionally, calling a routing policy to identify identification information in a service request includes: calling a routing policy from a routing decision engine to identify identification information in a service request, wherein the routing policy is set by the routing decision engine based on grayscale configuration information of an application service, and the grayscale configuration information is used to represent publishing rules for grayscale service instances.
[0011] Optionally, the method further includes: adjusting the grayscale configuration information in response to the information adjustment instruction; and controlling the routing decision engine to adjust the routing strategy according to the adjusted grayscale configuration information.
[0012] Optionally, the method further includes: monitoring the publishing process of the grayscale service instance to obtain a publishing indicator, wherein the publishing indicator is used to represent the performance of the grayscale service instance during the publishing process; using the publishing indicator, adjusting the grayscale service instance, wherein the performance of the adjusted grayscale service instance is higher than the performance of the grayscale service instance before the adjustment; and / or, the method further includes: in response to the publishing indicator being lower than a publishing indicator threshold, routing the service request to a service instance in a normal state in the application service.
[0013] Optionally, the method also includes: determining a target authentication mode that matches the grayscale service instance among multiple authentication modes, wherein different authentication modes are used to represent the rules for authenticating the publishing process of different service instances of the application service; authenticating the publishing process of the grayscale service instance according to the target authentication mode to obtain an authentication result.
[0014] According to another aspect of an embodiment of the present invention, a service processing system for a vehicle is also provided, including: a client, used to send a service request, wherein the service request is used to request allocation of the vehicle's application service to the server client in the entire link; a server, used to call a routing strategy, identify identification information in the service request, wherein the routing strategy is used to represent a rule for routing the service request, and the identification information is used to identify a service instance of the application service; in response to the identification information being grayscale identification information, determining a grayscale service instance corresponding to the grayscale identification information, wherein the grayscale service instance is used to represent a service instance to be published for the application service; routing the service request to the grayscale service instance to publish the grayscale service instance to the client.
[0015] According to another aspect of an embodiment of the present invention, a service processing device for a vehicle is also provided, including: an acquisition unit, used to acquire a service request from a client, wherein the service request is used to request allocation of an application service of the vehicle to the client; an identification unit, used to call a routing strategy to identify identification information in the service request, wherein the routing strategy is used to represent a rule for routing the service request, and the identification information is used to identify a service instance of the application service; a determination unit, used to determine, in response to the identification information being grayscale identification information, a grayscale service instance corresponding to the grayscale identification information, wherein the grayscale service instance is used to represent a service instance to be published of the application service; and a publishing unit, used to route the service request to the grayscale service instance to publish the grayscale service instance to the client.
[0016] Optionally, the determination unit may include: a calling module, used to call the interceptor to add routing information to the service request in response to the identification information being grayscale identification information; and a first determination module, used to determine the grayscale service instance pointed to by the routing information.
[0017] Optionally, the first calling module may include: a calling submodule, configured to call an interceptor to modify initial address information in the service request in response to the identification information being grayscale identification information, so as to obtain target address information.
[0018] Optionally, the publishing unit may include: a second determination module, used to call the load balancing strategy using the grayscale identification information to determine the performance indicator of the grayscale service instance, wherein the performance indicator is used to represent the performance status of the grayscale service instance; a routing module, used to route the service request to the grayscale service instance in response to the performance indicator satisfying the performance indicator threshold.
[0019] Optionally, the identification unit may include: an identification module, used to call the routing policy from the routing decision engine and identify the identification information in the service request, wherein the routing policy is set by the routing decision engine based on the grayscale configuration information of the application service, and the grayscale configuration information is used to represent the publishing rules of the grayscale service instance.
[0020] Optionally, the device may further include: a first adjustment unit, configured to adjust the grayscale configuration information in response to the information adjustment instruction; and a control unit, configured to control the routing decision engine to adjust the routing strategy according to the adjusted grayscale configuration information.
[0021] Optionally, the device may also include: a monitoring unit, used to monitor the publishing process of the grayscale service instance and obtain a publishing indicator, wherein the publishing indicator is used to represent the performance of the grayscale service instance during the publishing process; a second adjustment unit, used to adjust the grayscale service instance using the publishing indicator, wherein the performance of the adjusted grayscale service instance is higher than the performance of the grayscale service instance before the adjustment; and / or; a routing unit, used to route the service request to a service instance in a normal state in the application service in response to the publishing indicator being lower than a publishing indicator threshold.
[0022] Optionally, the device may also include: a first determination unit, used to determine a target authentication mode that matches the grayscale service instance among multiple authentication modes, wherein different authentication modes are used to represent the rules for authenticating the publishing process of different service instances of the application service; an authentication unit, used to authenticate the publishing process of the grayscale service instance according to the target authentication mode to obtain an authentication result.
[0023] According to another aspect of an embodiment of the present invention, a vehicle is provided, including: a memory storing an executable program; and a processor for running the program, wherein the program executes any one of the above methods when running.
[0024] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium including a stored executable program, wherein when the executable program runs, the device where the storage medium is located is controlled to execute any one of the above methods.
[0025] According to another aspect of an embodiment of the present invention, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, any one of the above methods is implemented.
[0026] In an embodiment of the present invention, an intelligent dynamic routing mechanism is proposed to carry out the service processing process of the vehicle, and the grayscale publishing function is realized. The service request of the client can be obtained, and the identification information in the service request can be identified by calling the routing strategy to determine the routing rules for the service request. These routing rules can guide how the service request is routed to the corresponding service instance. According to the grayscale identification information in the service request, the corresponding grayscale service instance, that is, the new version service instance to be released is determined, which helps to reduce the request processing time and avoid the new version service from being overloaded due to too many requests. Finally, the service request can be routed to the grayscale service instance to realize the process of publishing the new version of the service to the client. Through the intelligent dynamic routing mechanism, the grayscale service instance can be intelligently selected according to the grayscale identification information, thereby improving the efficiency of the entire grayscale publishing process. In this embodiment, an intelligent dynamic routing mechanism is introduced, and the intelligent selection and routing of the grayscale service instance is realized through the flexible setting of the routing strategy and grayscale identification information. The above mechanism helps to reduce the request processing time, avoid the occurrence of request overload, and improve the efficiency and stability of vehicle service publishing. Compared with related technologies, this embodiment is more intelligent and flexible, and can dynamically adjust the grayscale release strategy according to actual conditions to improve the reliability and performance of the vehicle, thereby achieving the technical effect of improving the service processing efficiency of the vehicle and solving the technical problem of low service processing efficiency of the vehicle. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0028] Figure 1 is a flow chart of a vehicle service processing method according to an embodiment of the present invention;
[0029] Figure 2 is a flowchart of a full-link grayscale method based on Feign according to an embodiment of the present invention;
[0030] Figure 3 is a schematic diagram of a vehicle service processing system according to an embodiment of the present invention;
[0031] Figure 4 is a structural block diagram of a vehicle service processing device according to an embodiment of the present invention;
[0032] Figure 5 is a structural block diagram of an autonomous driving vehicle according to an embodiment of the present invention. DETAILED DESCRIPTION
[0033] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0034] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0035] According to an embodiment of the present invention, a method embodiment of vehicle service processing is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0036] Figure 1 FIG. 1 is a flow chart of a vehicle service processing method according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:
[0037] Step S102: obtaining a service request from the client.
[0038] In the technical solution provided in the above step S102 of the present invention, the service request can be used to request the application service of the vehicle to be allocated to the client. The service request is a request issued by the client to the server of the vehicle to obtain specific services or functions of the vehicle. In vehicle applications, the service request can be a request issued by the user through an application. For example, the service request is used to request the allocation of a vehicle, obtain vehicle information, control vehicle driving, etc. A service request may also be referred to as a user request. An application service refers to a software service that provides services for specific business needs or functions. In the vehicle field, application services may include vehicle control services (also referred to as vehicle control services) and management services (also referred to as vehicle management services) to achieve control, monitoring and management of vehicles.
[0039] Optionally, the above-mentioned vehicle control service refers to a service used to control vehicle behavior and functions, and may be responsible for the vehicle remote control function. For example, the vehicle control service may be used to remotely lock, unlock, start, and other operations on the vehicle. The vehicle management service refers to a service used to manage vehicle information and operating status, and may be responsible for vehicle information management and scheduling. For example, the vehicle management service may be used to query the vehicle's location, driving record, maintenance information, and the like. It should be noted that the above-mentioned vehicle control service and vehicle management service are for illustrative purposes only and are not specifically limited here.
[0040] In this embodiment, the server can obtain a service request from the client. Optionally, the user of the client may initiate a request through a terminal device, such as a mobile application, a web page, etc., requesting the allocation of corresponding application services in the vehicle, such as vehicle control services and vehicle management services. The client constructs a service request according to the specific needs of the user, which may include information such as the purpose of the request, the type of vehicle required, time, and location. The service request can be constructed through the Hypertext Transfer Protocol (HTTP), including a request method, a request header, and a request body.
[0041] Optionally, the client sends the constructed service request to the server via the network. The above process usually sends the HTTP request to a specific endpoint or Application Programming Interface (API) interface of the server for processing the service request transmitted by the client.
[0042] Step S104: calling the routing strategy to identify the identification information in the service request.
[0043] In the technical solution provided in the above step S104 of the present invention, the routing strategy can be used to represent the rules for routing service requests, and the routing rules can be freely defined according to business needs, and can also be called a gray release strategy or routing decision. That is, the gray release strategy can be a special routing strategy for managing the process of gradually releasing a new version of the service in a production environment. The gray release strategy distributes requests to gray version or full version service instances according to preset rules to ensure the stability and reliability of new functions. Routing rules can be freely defined according to business needs. Through the routing strategy, it can be determined to which service instance the service request is routed to realize service distribution of different functions, versions or gray environments. The identification information can be used to identify the service instance of the application service. In the gray release or routing strategy, the identification information can be a unique identifier used to distinguish different service instances, such as a version number, a gray identifier, an environment identifier, etc., which is only used as an example here without specific limitation.
[0044] Optionally, by identifying the identification information, it can be determined which specific service instance to route the service request to in order to implement grayscale release or other routing strategies. A service instance can be a service unit that is deployed on a server and can run independently. In a microservice architecture, an application is usually split into multiple independent services, each of which is a service instance responsible for performing a specific function or service. Each service instance has a corresponding address and port number and can be deployed and run independently.
[0045] In this embodiment, after obtaining the service request from the client, the routing strategy may be called to identify the identification information in the service request.
[0046] Optionally, a predefined routing strategy is called. After the routing strategy is called, the identification information in the service request can be analyzed. By identifying the identification information, the characteristics of the service request can be determined so that subsequent processing can be performed according to the predefined routing strategy. Once the identification information in the service request is identified, the routing direction of the request can be determined based on the identification information and the routing strategy.
[0047] Optionally, by identifying the identification information in the service request and routing it according to the routing policy, grayscale release, load balancing and other functions can be implemented. Grayscale release can ensure that the new version of the service is gradually tested in a part of the traffic, and load balancing can evenly distribute requests to different service instances to improve the performance and stability of the system used for grayscale release management.
[0048] In an embodiment of the present invention, by calling the routing strategy and identifying the identification information in the service request, the request can be intelligently routed to the appropriate service instance or version according to predefined rules, realizing routing management operations such as grayscale release and load balancing, thereby improving the flexibility and reliability of the system.
[0049] Step S106: in response to the identification information being grayscale identification information, determining a grayscale service instance corresponding to the grayscale identification information.
[0050] In the technical solution provided in the above step S106 of the present invention, the grayscale identification information can be information used to identify a specific request or service instance in the grayscale release. The grayscale identification information is usually a mark or identifier used to identify which part of the grayscale release range the request belongs to, and to identify whether the request should be routed to the grayscale version or the full version of the service instance. By identifying the grayscale identification information, the processing method of the request can be determined to achieve the purpose of grayscale release. In this embodiment, the identification information is grayscale identification information, and the service request corresponding to the identification information can be a grayscale request.
[0051] Optionally, a grayscale service instance can be used to represent a service instance to be released for an application service, and can also be referred to as a grayscale version of a service instance. A grayscale service instance refers to an instance or version of a service used for grayscale release. During the grayscale release process, a new version of a service is usually first deployed on a grayscale service instance. Grayscale service instances can be used to test whether new features are stable, evaluate performance and user experience, and ensure the reliability and quality of the new version of the service. A grayscale service instance can be viewed as a service instance to be released, and can also be referred to as a grayscale version of a service instance or a new version of a service. By routing requests to grayscale service instances, new versions of services can be gradually introduced, reducing risks during the release process and ensuring system stability.
[0052] In this embodiment, after determining that the identification information is grayscale identification information, the grayscale service instance corresponding to the grayscale identification information may be determined.
[0053] Optionally, in the process of identifying and determining that the identification information in the service request is grayscale identification information, specific identification information in the identification information in the service request can be checked and identified to determine whether the request is part of the grayscale release scope. Once the identification information is confirmed to be grayscale identification information, the grayscale service instance corresponding to the grayscale identification information can be determined according to the preset grayscale release strategy. Grayscale service instances are usually new version service instances to be released, which are used to test and verify the stability and performance of new functions in a grayscale environment.
[0054] In an embodiment of the present invention, by identifying the identification information as grayscale identification information, the request can be routed to the corresponding grayscale service instance according to the preset grayscale release strategy. The above-mentioned precise routing control can realize a flexible grayscale release strategy, route specific requests to the grayscale environment as needed, and effectively manage and control the release process of new functions. Determining the grayscale service instance corresponding to the grayscale identification information can help gradually verify the stability and performance of the new function. By routing the request to the grayscale service instance, the new function can be tested in a real environment, feedback and data can be collected, the reliability and user experience of the new function can be evaluated, and sufficient testing and verification can be ensured before full release. Gradually routing the request to the grayscale service instance during the grayscale release process helps to reduce the risk of releasing new functions. By testing the new function in the grayscale environment, potential problems can be discovered early and handled in time, minimizing the impact on the entire system and ensuring the stability and reliability of the system. By routing the request to the grayscale service instance, the system can improve the user experience. After verifying the new function in the grayscale environment, the new function can be gradually released to users to ensure that users can obtain a stable and high-quality service experience, improve user satisfaction and system quality.
[0055] In summary, in this embodiment, determining the grayscale service instance corresponding to the grayscale identification information has important technical effects in the grayscale release process, including flexibility and precise control, step-by-step verification of new functions, risk control and stability, and user experience optimization. By effectively managing and controlling the grayscale release process, new functions can be introduced more safely and reliably, improving the quality of the system and user satisfaction.
[0056] Step S108: Routing the service request to the grayscale service instance to publish the grayscale service instance to the client.
[0057] In the technical solution provided in the above step S108 of the present invention, after the grayscale service instance corresponding to the grayscale identification information is determined, the service request can be routed to the grayscale service instance to publish the grayscale service instance to the client.
[0058] Optionally, based on the determined grayscale service instance, the service request can be intelligently routed to the corresponding grayscale service instance. This can be achieved through routing strategy or load balancing strategy to ensure that the request is correctly distributed to the grayscale service instance.
[0059] Optionally, once the request is routed to the grayscale service instance, the new version of the service can be tested and verified. The reliability and user experience of new features can be evaluated by monitoring and collecting performance and feedback data of the grayscale service instance. By routing requests to the grayscale service instance, new features can be released gradually, reducing the risk in the release process. Once the new feature is verified in the grayscale environment, the traffic can be gradually increased and the new version of the service can be released to the full version to achieve a complete new version release.
[0060] Through the above method, the grayscale identification information can be determined according to the identification information and the request can be routed to the corresponding grayscale service instance, so as to realize the request processing and new function release in the grayscale release process. The above method helps to ensure the stability and reliability of new functions while minimizing the impact on the system.
[0061] Optionally, confirm the grayscale identification information contained in the service request to determine that the request needs to be routed to the grayscale service instance. Determine which grayscale service instance to route the request to based on the preset routing strategy or grayscale release strategy. Confirm that the grayscale service instance is ready and can provide services to the outside world. By routing the service request to the grayscale service instance, the request sent by the client is eventually responded to, and the corresponding data is returned from the grayscale service instance to the client. The client receives the response data from the grayscale service instance and performs corresponding processing based on the response content, such as displaying page information, performing operations, etc. This is only an example and is not specifically limited.
[0062] Through the above method, service requests can be effectively routed to grayscale service instances, and grayscale service instances can be published to clients. This process helps to gradually introduce new features or services, reduce risks, optimize user experience, and ensure system stability and reliability.
[0063] In the above steps S102 to S108 of the present application, an intelligent dynamic routing mechanism is proposed to carry out the service processing process of the vehicle and realize the grayscale publishing function. The service request of the client can be obtained, and the identification information in the service request can be identified by calling the routing strategy to determine the routing rules for the service request. These routing rules can guide how the service request is routed to the corresponding service instance. According to the grayscale identification information in the service request, the corresponding grayscale service instance, that is, the new version service instance to be released is determined, which helps to reduce the request processing time and avoid the new version service from being overloaded due to too many requests. Finally, the service request is routed to the grayscale service instance to realize the process of publishing the new version of the service to the client. Through the intelligent dynamic routing mechanism, the grayscale service instance can be intelligently selected according to the grayscale identification information, thereby improving the efficiency of the entire grayscale publishing process. In this embodiment, an intelligent dynamic routing mechanism is introduced, and the intelligent selection and routing of the grayscale service instance is realized through the flexible setting of the routing strategy and grayscale identification information. The above mechanism helps to reduce the request processing time, avoid overload, and improve the efficiency and stability of vehicle service publishing. Compared with related technologies, the intelligent dynamic routing mechanism in this embodiment is more intelligent and flexible, and can dynamically adjust the grayscale release strategy according to actual conditions to improve the reliability and performance of the vehicle, thereby achieving the technical effect of improving the service processing efficiency of the vehicle and solving the technical problem of low service processing efficiency of the vehicle.
[0064] The following further describes a method for determining a grayscale service instance corresponding to grayscale identification information when the identification information is grayscale identification information in this embodiment.
[0065] As an optional implementation method, step S106, in response to the identification information being grayscale identification information, determines the grayscale service instance corresponding to the grayscale identification information, including: in response to the identification information being grayscale identification information, calling the interceptor to add routing information to the service request; determining the grayscale service instance pointed to by the routing information.
[0066] In an embodiment, when the identification information is grayscale identification information and the grayscale service instance corresponding to the grayscale identification information is determined, an interceptor can be called to add routing information to the service request to determine the grayscale service instance pointed to by the routing information, wherein the interceptor can also be called a request interceptor (Request Interceptor), for example, it can be a rewritten Feign interceptor. The routing information can be a routing instruction or a label, which is information used to indicate which service instance or version the request should be routed to. In the process of rewriting the Feign interceptor, the request header or other identification information is parsed according to preset rules, and specific routing instructions or labels can be dynamically added to the request.
[0067] Optionally, in the process of determining the grayscale service instance corresponding to the grayscale identification information, it is first necessary to identify the identification information as grayscale identification information. Once the identification information is determined to be grayscale identification information, it is necessary to call an interceptor to add routing information to the service request. The interceptor can intercept the request before or after the request is sent and process the request. In this case, the interceptor can dynamically add routing instructions or labels to the request based on the content of the identification information. The routing information can be a routing instruction or a label that indicates which specific service instance or version the request should be routed to. By adding routing information, it is possible to select a specific grayscale service instance based on the grayscale identification information. In this way, the request can be routed to a service instance that meets the requirements of the grayscale identification information.
[0068] Optionally, use an overridden Feign interceptor to implement the above functionality. Feign can be a declarative HTTP client for defining and calling Hypertext Transfer Protocol Application Programming Interfaces (HTTP APIs). By overriding the Feign interceptor, you can process the request before it is sent, including adding routing information. By parsing the request header or other identification information, you can dynamically determine which routing instructions or tags should be added to route the request to the correct grayscale service instance.
[0069] In summary, by calling the interceptor to add routing information to the service request, the grayscale service instance pointed to by the routing information can be determined, so that the request can be routed to the service instance that meets the grayscale identification information requirements. In this way, functions such as grayscale release or grayscale testing can be implemented, improving the stability and reliability of the system.
[0070] Optionally, adding risk handling logic to the request interceptor that rewrites Feign is an important security measure that can help the system respond and handle potential risks in a timely manner when they are detected. In the request interceptor that rewrites Feign, detection logic can be set to identify abnormal requests, such as checking whether the data in the request is legal, whether the request frequency is abnormal, whether the request source is suspicious, etc. The above detection logic can be customized according to the specific situation and security requirements of the system. When the interceptor detects a potential risk, appropriate measures need to be taken immediately to deal with the risk. This may include blocking suspicious requests, denying access, triggering alarm notifications, etc. By responding in a timely manner, the impact of potential risks on the system can be effectively reduced. During the risk handling process, a logging function can be added to the interceptor to record the detected abnormal request information, including the source, content, and processing results of the request. These logs can be used to analyze and track the source of potential risks in order to further enhance the security of the system.
[0071] It should be noted that the risk handling process and method in the above-mentioned rewriting of the Feign interceptor are only for illustration and are not specifically limited here.
[0072] In an embodiment of the present invention, by adding risk handling logic to the request interceptor that rewrites Feign, the security and stability of the system can be effectively improved. The risk handling logic can respond immediately when a potential risk is detected, and promptly block malicious requests or abnormal behaviors to avoid damage to the system. Through abnormal request detection and risk response, the system can strengthen the ability to identify and handle potential risks and improve the overall security of the system. The logging function can monitor the security status of the system, promptly discover and respond to potential risks, and thus ensure the normal operation of the system. In summary, by adding risk handling logic to the request interceptor that rewrites Feign, the security and stability of the system can be effectively improved, providing important guarantees for the normal operation of the system.
[0073] The following further describes the process of how to call the interceptor to modify the initial address information in the service request when the identification information is grayscale identification information in this embodiment.
[0074] As an optional implementation method, the routing information includes target address information, and the target address information is used to represent the address of the grayscale service instance. In response to the identification information being the grayscale identification information, the interceptor is called to add routing information to the service request, including: in response to the identification information being the grayscale identification information, the interceptor is called to modify the initial address information in the service request to obtain the target address information.
[0075] In an embodiment, in the process of calling an interceptor to add routing information to a service request, the interceptor can be called to modify the initial address information in the service request to obtain the target address information, wherein the initial address information can be a uniform resource locator (URL), which can be the original address of the service request. The target address information can be a target URL. Specific routing instructions can be added according to the grayscale identifier carried by the request to indicate that the request should be routed to the grayscale service instance, for example, it can be a URL, which is the specific address or endpoint to which the request is sent. The target URL can contain information such as a port number, a host name, and a path to determine the target resource or service of the request. By modifying the target URL, the request can be dynamically routed to different service instances or versions. The addition and parsing process of routing instructions or tags can affect the final modification of the target URL, thereby realizing dynamic routing to different service instances or versions. Through this mechanism, the routing of requests and the selection of target services can be flexibly controlled.
[0076] Optionally, the addition and parsing process of routing instructions or tags can affect the final modification of the target URL, thereby achieving dynamic routing to different service instances or versions. Through this mechanism, the routing of requests and the selection of target services can be flexibly controlled.
[0077] Optionally, rewriting Feign's request interceptor is a key technical means to achieve grayscale release in a microservice architecture. By rewriting the interceptor, you can insert logic before the request is sent, parse the request header or other identification information according to preset rules, and dynamically add specific routing instructions or tags to the request, thereby achieving routing selection of grayscale service instances.
[0078] Optionally, for the method of implementing the Request I nterceptor interface, you may first need to write a class to implement Feign's Request I nterceptor interface, which has a method intercept for processing before the request is sent. You can obtain specific identification information in the request, such as grayscale identification, user (Identity, referred to as ID), etc. This information can be obtained from the request header, a small text file (such as Cookie) or other places. According to the preset rules, determine whether the request carries a specific grayscale identification. If the request carries a grayscale identification, it means that the request needs to be routed to the grayscale service instance. At this time, the target URL of the request can be modified according to the grayscale identification to point it to the grayscale service instance. The processed request will be sent to the target service instance, thereby realizing the routing selection of grayscale release.
[0079] By rewriting Feign's request interceptor, you can dynamically select service instances based on specific identification information in the request to achieve route control for grayscale release. The above method is flexible and efficient, and can meet the requirements for request routing during grayscale release, ensuring the stability and reliability of the system during grayscale release.
[0080] Optionally, dynamic routing control can be achieved by rewriting Feign's request interceptor. The interceptor can modify the target URL of the request based on specific identification information carried in the request, such as the grayscale identifier, and point it to the specified grayscale service instance. This dynamic routing control can dynamically select a service instance based on specific conditions before the request is sent, improving the flexibility and scalability of the system. By modifying the target URL of the request through the interceptor, grayscale publishing support can be implemented for specific requests. For example, when a request carries a grayscale identifier, the interceptor can route the request to the grayscale service instance for grayscale testing or release. This ensures that the system can accurately control the distribution of traffic during grayscale release and reduce release risks.
[0081] Optionally, rewriting Feign's request interceptor can also implement customized processing of requests. Based on the request header or other identification information, the request can be personalized, such as adding specific authentication information, logging, etc. This customized processing can meet the specific needs of different requests and improve the flexibility and maintainability of the system. Through the insertion logic of the interceptor, the request can be enhanced before it is sent, which can reduce the coupling of the system and enhance the scalability of the system.
[0082] In summary, rewriting Feign's request interceptor can achieve technical effects such as dynamic routing control, grayscale release support, request customization, and enhanced system scalability, thereby improving the flexibility, reliability, and maintainability of the system, and bringing better user experience and development efficiency.
[0083] The following further describes the process of how to route a service request to a grayscale service instance in this embodiment.
[0084] As an optional implementation method, step S108, routing the service request to the grayscale service instance, includes: using the grayscale identification information to call the load balancing strategy, determining the performance indicator of the grayscale service instance, wherein the performance indicator is used to represent the performance status of the grayscale service instance; in response to the performance indicator satisfying the performance indicator threshold, routing the service request to the grayscale service instance.
[0085] In an embodiment, in the process of routing a service request to a grayscale service instance, the grayscale identification information may be used to call a load balancing strategy to determine the performance index of the grayscale service instance. If the performance index can meet the performance index threshold, the service request may be routed to the grayscale service instance, wherein the load balancing strategy may be a custom load balancing strategy. The performance index may be used to indicate the performance status of the grayscale service instance, such as the health status of the grayscale service instance. The performance index threshold may be used to evaluate whether the grayscale service instance corresponding to the performance index is suitable or idle, that is, if the performance index meets the performance index threshold, it may be indicated that the performance of the corresponding grayscale service instance is suitable or idle.
[0086] Optionally, grayscale identification information is used in the routing process. This may be a specific identifier or tag to identify whether the request needs to be routed to a grayscale service instance. By calling the load balancing strategy, the appropriate service instance can be intelligently selected to process the request based on the grayscale identification information to ensure that the request can be correctly routed. During the routing process, the performance status of the grayscale service instance is evaluated based on its performance indicators. Performance indicators may include information such as the health status, load status, response time, etc. of the service instance, which are used to indicate the performance level of the grayscale service instance. These performance indicators can help evaluate the operating status of the service instance and thus decide whether to route the request to the instance.
[0087] Optionally, a performance indicator threshold can be set according to the performance indicator. When the performance indicator of the grayscale service instance meets or exceeds the performance indicator threshold, it means that the performance of the instance is good and can process the request. In this case, the service request can be routed to the grayscale service instance to ensure that the request can be processed efficiently.
[0088] Through the above method, we can intelligently select the routing service request to the grayscale service instance according to the grayscale identification information, load balancing strategy and performance indicators, realize grayscale release, performance optimization and traffic control, and improve the flexibility, stability and performance of the system. This flexible grayscale service instance routing mechanism can achieve more intelligent load balancing and performance optimization.
[0089] Optionally, custom load balancing strategies play a vital role in grayscale release scenarios. Traditional load balancing algorithms are usually based on polling or random strategies. Such simple strategies are difficult to meet the needs of grayscale releases. Therefore, it is necessary to rewrite the load balancing rules (Load Balancing Rules, referred to as I Rules) of the load balancer (for example, Ribbon), or integrate with another load balancer (for example, Spring Cloud Load Balancer) to achieve intelligent selection of service instances based on grayscale strategies.
[0090] Optionally, you can implement a custom load balancing strategy by rewriting the Ribbon I Rule. You can select service instances based on a specific grayscale strategy, rather than simply in a round-robin or random manner. This allows for more precise control of traffic distribution, ensuring that grayscale service instances receive the right amount of traffic. Integrating with Spring Cloud Load Balancer is also a way to implement a custom load balancing strategy. Spring Cloud Load Balancer is a load balancer provided in Spring Cloud that supports custom load balancing strategies and is integrated with load balancing components such as Ribbon. By integrating with Spring Cloud Load Balancer, you can define grayscale strategies more flexibly, taking into account factors such as grayscale identification, the health of service instances, and traffic weight distribution.
[0091] Optionally, when implementing a custom load balancing strategy, you can set a load balancing strategy that preferentially allocates grayscale traffic to service instances with suitable performance or idleness. This ensures that grayscale service instances can withstand more traffic and provide better performance and stability. By fine-tuning the load balancing strategy, you can effectively control traffic distribution during grayscale release and ensure system stability and reliability.
[0092] In the embodiment of the present invention, the automatic discovery and efficient load balancing of grayscale service instances can be ensured by customizing the load balancing strategy, and the distribution of traffic can be more flexibly controlled during the grayscale release process, thereby improving the performance and reliability of the system. The intelligent selection of service instances by this grayscale strategy is a key link in realizing the intelligent dynamic routing mechanism.
[0093] Optionally, in a custom load balancing strategy, risk management is crucial and can help system administrators effectively manage and control potential risks and ensure the stability and reliability of the system. The load balancing strategy should include a health check mechanism to regularly detect the health of service instances and ensure that requests are only routed to healthy and available service instances. When the load balancing strategy detects problems or anomalies with a service instance, it should be able to take timely action, such as suspending request routing, reducing the weight of the instance, etc., to avoid affecting the stability of the overall system. The load balancing strategy needs to have the ability to fail over. When a service instance fails, it can quickly transfer traffic to other healthy instances to ensure service continuity and availability.
[0094] In an embodiment of the present invention, through a health check mechanism and exception handling, a load balancing strategy can help the system to promptly detect and handle problems with service instances, thereby improving the stability and reliability of the system. The failover capability of the load balancing strategy can help the system quickly respond to service instance failures, reduce the impact of failures on the system, and ensure the normal operation of the system. Through effective risk management, the system can avoid routing requests to unhealthy or problematic service instances, thereby improving the user's access experience and service quality. In summary, risk management plays a very important role in custom load balancing strategies, which can help the system promptly detect and handle potential risks, thereby improving the stability and reliability of the system. Through measures such as health checks, exception handling, and failover, the system can effectively respond to problems with service instances, ensure the normal operation of the system, and improve the user's access experience.
[0095] In this embodiment, the persistent coloring strategy is very important in grayscale release, which can ensure the consistent experience of users or devices in the grayscale version. Through the persistent coloring strategy, once a user or device is assigned to the grayscale version, the system will remember the user's or device's choice and continue to route it to the same version in subsequent requests, without randomly or polling to select the version again, thereby ensuring the consistency of user experience.
[0096] Optionally, the key to implementing a persistent coloring strategy is to add session persistence logic to an interceptor or load balancing strategy. Specifically, the persistent coloring strategy can be implemented in the following way: When a user or device is first assigned to a grayscale version, the system generates a unique identifier for it, which can be a cookie or a user identifier. Associate the above identifier with the version selected by the user or device and record it in the system. In the interceptor or load balancing strategy, decide to route the request to the corresponding version by checking whether the request carries this identifier. For each subsequent request, the system will route the request to the same version based on the version information remembered by the identifier, rather than reselecting the version.
[0097] The continuous coloring strategy can ensure the consistent experience of users or devices in grayscale releases, avoiding the instability of user experience caused by frequent switching between different versions. This strategy can improve user satisfaction and is also beneficial to the stability and reliability of the system. In summary, the continuous coloring strategy is a very important part of grayscale releases. By adding session persistence logic to the interceptor or load balancing strategy, the system can remember the user or device's choice and continue to route it to the same version, ensuring the consistency of the user experience and improving the stability and reliability of the system.
[0098] Optionally, risk mitigation in the continuous dyeing strategy is very important, which can help the system smoothly transition when abnormal situations occur, and ensure the user experience and system stability. The session persistence logic in the continuous dyeing strategy should include an exception handling mechanism to deal with possible abnormal situations, such as user identity loss, service instance unavailability, etc. The exception handling mechanism should be able to achieve a smooth transition. When an abnormal situation occurs, the system can correctly handle and ensure the correct routing of user requests to avoid affecting the user experience and the normal operation of the system.
[0099] In an embodiment of the present invention, through the risk mitigation exception handling mechanism, the system can respond in time when an abnormal situation occurs, ensure the stability and reliability of the system, and ensure that the user request can be correctly routed to the target service instance. The smooth transition of the exception handling mechanism can avoid the decline in user experience due to abnormal situations, ensure that users can access and use the system normally, and improve user satisfaction. Through session persistence logic and exception handling mechanism, the system can avoid data loss caused by loss of user identification or unavailability of service instances, and ensure data integrity and security. In summary, risk mitigation plays an important role in the continuous dyeing strategy, which can help the system to smoothly transition when abnormal situations occur, and ensure user experience and system stability. Through the reasonable design and implementation of the exception handling mechanism, the system can effectively respond to abnormal situations and ensure the normal operation of the system and user satisfaction.
[0100] In this embodiment, the dynamic configuration center is a very important component that can help achieve flexible configuration management and fast grayscale release strategy adjustment.
[0101] Optionally, the dynamic configuration center is a centralized service for storing and managing system configuration information. By centrally managing configuration information, it is possible to avoid the configuration being stored in various services, improving configuration consistency and management efficiency. Operation and maintenance personnel can use the center to uniformly manage the configuration of all services, making it easier to update and adjust the configuration. The dynamic configuration center supports real-time updates of Feign client configuration information, including routing rules, grayscale ratios, service addresses, and more. This means that when the configuration of the configuration center changes, the Feign client can obtain the latest configuration information in a timely manner, thereby dynamically adjusting the behavior of the system. This ability to update configuration in real time can help the system quickly adapt to changing needs during runtime.
[0102] Optionally, the dynamic configuration center allows operators to adjust the grayscale release strategy according to actual needs without restarting the service. Through the configuration center, operators can flexibly adjust parameters such as grayscale ratio and routing rules to control the traffic distribution of grayscale release. This flexibility can speed up the iteration of the system, help quickly respond to business needs and optimize system performance. The dynamic configuration center can improve the maintainability and reliability of the system. By centrally managing configuration information, configuration errors and inconsistencies can be reduced, reducing the risk of system errors. At the same time, real-time updates of configuration information can help the system quickly adapt to changes and ensure the stability and reliability of the system.
[0103] In summary, the setting of the dynamic configuration center can help the system achieve flexible configuration management and fast grayscale release strategy adjustment. By centrally managing configuration information and updating the configuration of the Feign client in real time, the flexibility, maintainability and reliability of the system can be improved, the iteration speed of the system can be accelerated, and the overall performance and user experience of the system can be improved.
[0104] Optionally, the dynamic configuration center can not only update the configuration information in real time, but also have a monitoring function to track the effect of configuration changes in real time, discover potential risks in time and take corresponding measures, that is, to conduct risk monitoring. The configuration center should have a monitoring function that can monitor the changes of configuration information in real time. When the configuration information changes, the latest configuration status can be learned in time, such as routing rules, grayscale ratio, service address, etc., which can help administrators better understand the operation status of the system and discover the possible impact of configuration changes in time. The monitoring function can also discover potential risks. For example, if a configuration change causes system performance to degrade or an abnormal situation occurs, the monitoring system can issue an alarm in time to prompt the administrator of potential risks. Through the above methods, you can respond quickly and take measures to prevent potential risks from turning into actual problems. The dynamic configuration center can also provide an effective rollback mechanism. When it is found that the configuration change causes system abnormality or instability, the administrator can quickly roll back the configuration and restore it to the previous normal state. The rollback mechanism is an important part of risk monitoring, which can help the system recover quickly when unexpected situations occur and reduce system losses and impacts.
[0105] In an embodiment of the present invention, by monitoring configuration changes, potential risks caused by configuration can be discovered in a timely manner, helping administrators to take timely measures to improve the stability and reliability of the system. The real-time and accuracy of the monitoring function can help administrators quickly discover problems and take corresponding measures, improve operation and maintenance efficiency, and shorten fault recovery time. By discovering potential risks in advance through the monitoring function, the cost of the system being exposed to risks can be reduced, and major impacts on the system caused by problems caused by configuration changes can be avoided. In summary, risk monitoring is a vital part of the dynamic configuration center, which can discover potential risks in a timely manner and take corresponding measures to improve the stability and security of the system and reduce risks and losses during system operation.
[0106] The following further describes the process of how to call the routing policy to identify the identification information from the service request in this embodiment.
[0107] As an optional implementation method, step S104, calling the routing policy and identifying the identification information in the service request, includes: calling the routing policy from the routing decision engine, identifying the identification information in the service request, wherein the routing policy is set by the routing decision engine based on the grayscale configuration information of the application service, and the grayscale configuration information is used to represent the publishing rules of the grayscale service instance.
[0108] In an embodiment, in the process of calling a routing policy and identifying identification information in a service request, the routing policy can be called from a routing decision engine to identify identification information in a service request, wherein the routing decision engine can be a pluggable routing decision engine, or a highly modular and configurable routing decision engine, so that it can intelligently select a suitable service instance based on the metadata of the request (e.g., a specific identifier in the request header, a user ID, cookie information, etc.). This engine has a high degree of flexibility and allows routing rules to be freely defined according to specific business needs. The routing policy can be set by the grayscale configuration information based on the application service in the routing policy engine. Grayscale configuration information can be used to represent the publishing rules of grayscale service instances, such as grayscale ratios, routing rules, and publishing requirements, etc. This is only for example and is not specifically limited.
[0109] Optionally, the pluggable routing decision engine is modular, meaning it can be broken down into multiple independent components or modules, each responsible for different functions. This modular setup allows the above engine to be customized and extended as needed, increasing flexibility and configurability. The engine can support dynamic selection of service instances based on request metadata instead of fixed routing rules. Through specific identifiers in the request header, user ID or cookie information, etc., the engine can intelligently decide which service instance the request should be routed to to meet the needs of different scenarios.
[0110] Optionally, the engine can provide a flexible rule definition mechanism, allowing developers to freely define routing rules based on specific business needs. This means that multiple routing rules can be defined, including rules based on different conditions such as user identity, request type, geographic location, etc., to achieve more precise routing decisions. The engine can have good scalability, allowing the introduction of new routing rules or modules to meet changing business needs. Developers should be able to easily extend the functionality of the engine without affecting existing functions and rules.
[0111] In the embodiment of the present invention, by building a pluggable routing decision engine, a service instance can be intelligently selected based on the metadata of the request, improving the flexibility and configurability of the system to better meet complex business needs and scenarios. This design pattern makes the system's routing decisions more intelligent and dynamic, providing a more flexible and reliable solution for full-link grayscale release.
[0112] Optionally, the above engine also has a flexible plug-in mechanism, which allows routing strategies to be dynamically loaded or unloaded at runtime. This means that in the routing decision engine, different routing strategies can be implemented through plug-ins, and these plug-ins can be dynamically loaded or unloaded as needed when the system is running, thereby achieving real-time routing strategy updates and switching.
[0113] In an embodiment of the present invention, a variety of different routing strategies can be supported through a plug-in mechanism, for example, routing decisions can be made based on different metadata such as request headers and user information. This flexibility allows the system to select appropriate routing strategies based on specific business needs and scenarios, thereby improving the performance and efficiency of the system. Dynamic loading or unloading of routing strategies means that the system can update and switch routing strategies in real time during runtime without stopping the system or restarting. This dynamism can help the system cope with real-time changing task requirements and environmental changes, and maintain the high availability and flexibility of the system. In summary, having a flexible plug-in mechanism that allows dynamic loading or unloading of routing strategies at runtime is a technical means that can enhance the flexibility, dynamism and scalability of the system, and can help the system better adapt to complex and changing task requirements and environments, and improve the performance and stability of the system.
[0114] Optionally, the highly modular and configurable nature of the engine makes the system architecture more flexible and scalable. By using the routing decision engine as a separate module, developers can customize and configure it according to specific business needs without having to modify the code of the entire system. This modular and configurable feature makes the system easier to maintain and upgrade, while also reducing the degree of coupling in the system. The engine is able to intelligently select the appropriate service instance based on the metadata of the request, such as specific identifiers, user IDs, cookie information, etc. This allows for dynamic adjustment of routing policies based on different attributes of the request, improving the flexibility and adaptability of the system. For example, routing requests to specific service instances based on user IDs can provide personalized services. The flexibility of the engine requires that developers be able to freely define routing rules based on business needs. This means that developers can define their own routing policies based on specific business scenarios and needs to better meet business needs. This ability to customize routing rules can help the system better adapt to different business scenarios and improve the customizability and scalability of the system.
[0115] In summary, the technical effects of the pluggable routing decision engine are mainly reflected in the flexibility, intelligence and customizability of the system. Through the high modularity and configurability of the engine, the system can adjust the routing strategy more flexibly; at the same time, intelligent selection of service instances based on the metadata of the request can improve the performance and efficiency of the system; and support for custom routing rules can meet different business needs and make the system more adaptable to diverse application scenarios. These effects will help improve the maintainability, scalability and user experience of the system.
[0116] Optionally, in the intelligent dynamic routing mechanism in the embodiment of the present invention, the routing decision engine also has the ability to identify potential risk factors, so as to timely discover and respond to possible security risks, and ensure the stable operation of the system and the security of data. In practical applications, risk identification may include the following aspects: malicious request identification, abnormal wandering detection, and security checks. For example, in terms of malicious request identification, the engine can analyze the data in the request, identify possible malicious requests and malicious traffic or attack behaviors. By identifying malicious requests, the system can make corresponding processing in a timely manner to prevent security vulnerabilities from being exploited and protect the security of the system.
[0117] In the embodiment of the present invention, through the risk identification function of the engine, the system can monitor and identify potential security risks in real time, make corresponding treatments in a timely manner, and ensure the stable operation of the system and the security of data. At the same time, risk identification can also help the system prevent possible security threats in advance and reduce potential risks and losses. In summary, risk identification is a crucial part of the intelligent dynamic routing mechanism and plays an important role in ensuring the security and stability of the system.
[0118] The following further describes the process of how to control the routing decision engine to adjust the routing policy in this embodiment.
[0119] As an optional implementation manner, the method further includes: adjusting the grayscale configuration information in response to the information adjustment instruction; and controlling the routing decision engine to adjust the routing strategy according to the adjusted grayscale configuration information.
[0120] In an embodiment, the grayscale configuration information can be adjusted based on the information adjustment instruction, and the adjusted grayscale configuration information can be used to control the routing decision engine to adjust the routing strategy, wherein the information adjustment instruction can be a command or instruction for notifying the system to make specific configuration or parameter adjustments to achieve flexible routing strategy adjustments, which can include configuration parameter adjustments, recovery configuration information updates, and routing strategy instructions, etc. During the system operation, the grayscale configuration information and routing strategy can be adjusted and updated in real time to adapt to different business needs and system changes, ensuring that the system can flexibly respond to service routing needs in different situations. By responding to information adjustment instructions in a timely manner, the system can achieve dynamic routing adjustments and improve the flexibility and efficiency of the system.
[0121] It should be noted that the above information adjustment instructions are only for illustration and no specific limitation is made here.
[0122] Optionally, build a highly modular and configurable routing decision engine that can intelligently select service instances based on the metadata of the request. This means that the engine needs to be able to make intelligent routing decisions based on metadata such as specific identifiers, user IDs, cookie information, etc. in the request header to ensure that the request can be correctly routed to the target service instance. This requires the engine to be highly flexible, allowing developers to freely define routing rules based on business needs. In the process of flexibly adjusting the routing strategy, the grayscale configuration information can be adjusted in response to information adjustment instructions. This may involve adjustments to the configuration parameters, weight distribution, health status, and other information of the grayscale service instance. Based on the adjusted grayscale configuration information, the routing decision engine can be controlled to adjust the routing strategy to achieve flexible service routing.
[0123] In an embodiment of the present invention, flexible adjustment of routing policies can be achieved by constructing a pluggable routing decision engine and adjusting gray configuration information. Developers can customize routing rules according to specific business needs and make intelligent routing selections based on different request metadata, thereby improving the flexibility and adaptability of the system. Flexible adjustment of routing policies enables the system to dynamically adjust routing rules and configuration information according to actual conditions at runtime, and respond to business needs and system changes in a timely manner, thereby improving the dynamics and responsiveness of the system. By making intelligent routing selections based on requested metadata and adjusting routing policies based on gray configuration information, precise control and management of service instances can be achieved, improving the quality and performance of services. The technical effect of flexibly adjusting routing policies also includes the configurability of the system, so that the adjustment and configuration of routing policies can be simple and quick, meeting the requirements of different business scenarios and needs.
[0124] The following further describes how to adjust the grayscale service instance in this embodiment and under what circumstances the service request is routed to other service instances.
[0125] As an optional implementation manner, the method also includes: monitoring the publishing process of the grayscale service instance to obtain a publishing indicator, wherein the publishing indicator is used to represent the performance of the grayscale service instance during the publishing process; using the publishing indicator, adjusting the grayscale service instance, wherein the performance of the adjusted grayscale service instance is higher than the performance of the grayscale service instance before the adjustment; and / or, the method also includes: in response to the publishing indicator being lower than the publishing indicator threshold, routing the service request to a service instance in a normal state in the application service.
[0126] In an embodiment, the publishing process of the grayscale service instance can be monitored to obtain the publishing index, and the grayscale service instance can be adjusted using the publishing index. If the publishing index is lower than the publishing index threshold, the service request can be routed to the service instance in the normal state in the application service, wherein the publishing index can be used to represent the performance of the grayscale service instance in the publishing process, and can also be called a business index, for example, it can include the response time, success rate, error rate and performance index of the grayscale version, etc., which is only used as an example and is not specifically limited. The performance of the adjusted grayscale service instance is higher than that of the grayscale service instance before the adjustment, that is, the grayscale service instance before the adjustment performs troubleshooting and performance tuning to obtain the adjusted grayscale service instance. The publishing index threshold can be used to represent the effect of grayscale publishing, that is, if the publishing index is lower than the publishing index threshold, it can be said that the effect of grayscale publishing is poor, the current service instance has a problem or does not meet the requirements, and a rollback operation needs to be triggered. The service instance in normal state is the other spare service instance switched to by the rollback operation.
[0127] In an embodiment of the present invention, a unified monitoring and logging system may be provided, which is an overall monitoring and logging system for real-time collection, analysis and display of system performance indicators, log information and other data, so as to perform troubleshooting, performance optimization and monitoring of system operation status. The system may include an integrated monitoring tool, which refers to a specialized tool or software for monitoring various components, services and functions of the system, such as a monitoring tool for indicators such as the response time, success rate, and error rate of requests initiated by Feign. The integrated monitoring tool is responsible for real-time collection and analysis of performance data of specific components or services, so as to be able to keep abreast of system operation status and problems.
[0128] Optionally, the process of grayscale service instance release can be monitored through integrated monitoring tools. That is, through integrated monitoring tools, the response time, success rate, error rate and other indicators of each request initiated by Feign can be collected and analyzed in real time. These monitoring indicators can help the system monitor the performance and stability of the service, find problems in time and deal with them. Paying special attention to the performance of the grayscale version can help operation and maintenance personnel evaluate the effect of grayscale release, find potential problems and adjust the grayscale strategy in time.
[0129] Optionally, the unified monitoring and logging system should also provide detailed log records, recording the system's operating status, request processing, abnormal conditions, and other information. These log records are very important for troubleshooting, performance optimization, and system tuning. Through detailed log records, you can track the request processing flow, analyze the system's behavior, and help locate and solve problems.
[0130] Optionally, the monitoring indicators and log records provided by the unified monitoring and logging system can help the system quickly troubleshoot and optimize performance. By monitoring the performance of the system in real time through the monitoring tool, abnormal situations can be discovered and handled in a timely manner; and through detailed log records, the behavior of the system can be analyzed, the root cause of the problem can be located, and performance optimization and system tuning can be performed. The unified monitoring and logging system helps to improve the stability and reliability of the system. By monitoring the system's indicators in real time and recording the system's logs, problems can be discovered and solved in a timely manner, the risk of system failure can be reduced, and the stable operation of the system can be ensured. At the same time, by analyzing the monitoring data and log records, the performance and stability of the system can be continuously optimized and the reliability of the system can be improved. The monitoring indicators and log data collected by the unified monitoring and logging system can be analyzed for data to support business decisions. By analyzing the monitoring indicators and log data, potential trends, problems and opportunities can be discovered, providing strong data support for system optimization and development.
[0131] In summary, the unified monitoring and logging system plays an important role in the microservice architecture, helping the system to monitor performance in real time, discover and solve problems in a timely manner, optimize system performance, improve system stability and reliability, and provide data support for business decisions. The above system is of great significance for ensuring the normal operation of the system, improving user experience and the overall efficiency of the system.
[0132] Optionally, the unified monitoring and logging system also has an early warning function to provide risk warnings, and also has a market acceptance monitoring function to monitor user feedback and behavior data. Risk warning and market acceptance monitoring play a very important role in the unified monitoring and logging system, which can detect and solve problems in a timely manner and improve system performance and user experience.
[0133] Optionally, risk warning means that the monitoring system automatically triggers an alarm when an abnormal situation is detected, and provides detailed log records for troubleshooting and performance optimization. The monitoring system can help the system identify abnormal situations in a timely manner, such as request timeouts, excessive error rates, etc., by collecting and analyzing indicators such as the response time, success rate, and error rate of Feign requests in real time. Once the monitoring system detects an abnormal situation, it will automatically trigger an alarm to notify relevant personnel so that they can intervene in time to solve the problem. The monitoring system will record detailed log information, including the specific cause of the abnormal situation, the time of occurrence, the scope of impact, etc., which is helpful for troubleshooting and problem location. In an embodiment of the present invention, risk warning can help the system to discover and solve problems in a timely manner, reduce the impact of abnormal situations on the system, improve the stability and performance of the system, and at the same time reduce the fault recovery time and improve the user experience.
[0134] Optionally, market acceptance monitoring refers to increasing monitoring of user feedback and behavior data, evaluating the market acceptance of the grayscale version, and adjusting the grayscale strategy accordingly. The monitoring system collects and analyzes user feedback and behavior data, including user experience and satisfaction with the grayscale version, to evaluate market acceptance. Based on user feedback and behavior data, the market acceptance of the grayscale version can be evaluated to understand users' views on new features or changes. Based on the evaluation results of market acceptance, the grayscale strategy can be adjusted in a timely manner, including expanding or reducing the grayscale ratio, adjusting functional details, etc. In an embodiment of the present invention, market acceptance monitoring can help the system better understand user needs and market feedback, adjust the grayscale strategy in a timely manner, improve the acceptance of new features or changes, meet user needs to the greatest extent, and promote continuous optimization and improvement of products.
[0135] In summary, risk warning and market acceptance monitoring play an important role in the unified monitoring and log system. They can help the system detect and solve problems in a timely manner, improve system performance and user experience, and adjust the grayscale strategy according to market feedback to promote continuous improvement and optimization of products.
[0136] In an embodiment of the present invention, by integrating monitoring tools and providing real-time monitoring functions, the system can collect and analyze the response time, success rate, error rate and other indicators of each request initiated by Feign in real time. This real-time monitoring and analysis capability can help the system to find problems in time, respond quickly, and improve the stability and performance of the system. The unified monitoring and log system can pay special attention to the performance of the gray version, and evaluate and adjust the gray release according to the monitoring data. By monitoring the performance and stability of the gray version, problems in the gray release can be found in time, and the gray strategy can be adjusted when necessary to improve the effect of the gray release. Detailed log records are provided to facilitate troubleshooting and performance optimization. The system can track the request processing process, analyze abnormal situations, locate the root cause of the problem, and make corresponding optimizations and adjustments through log records, thereby improving the reliability and performance of the system. Through real-time monitoring and log records, the system can find and solve problems in time, reduce the risk of system failures, thereby improving the reliability of the system and ensuring the stable operation of the system. The collection and analysis of monitoring indicators and log data can provide support for business decisions. Through data analysis, the system can find potential problems, optimization directions and improvement opportunities, and provide decision-making basis for system performance improvement and business development.
[0137] In summary, the technical effects of the unified monitoring and log system are mainly reflected in real-time monitoring and analysis, flexible gray version monitoring, troubleshooting and optimization, system stability and reliability improvement, data analysis and decision support, etc. These effects help the system maintain high performance and high reliability, respond to problems in a timely manner and optimize the system, thereby improving user experience and overall system efficiency.
[0138] In this embodiment, grayscale evaluation refers to a strategy in which the functions or codes of a new version are first tested on a portion of users during the software release process, and the impact of the new version on system stability, performance indicators, etc. is monitored and evaluated before deciding whether to fully release the new version. Grayscale evaluation can help the development team reduce risks when releasing a new version, discover and solve potential problems in a timely manner, and ensure system stability and user experience.
[0139] For example, during the grayscale evaluation process, you can determine the objects or user ranges for grayscale release, which can be specific geographic locations, specific user groups, specific devices, etc. Deploy the new version to the objects for grayscale release and start the grayscale release. Evaluate the impact of the new version on the system by monitoring key indicators such as system stability, performance indicators, and error rates. Collect user feedback and problem reports in a timely manner and analyze the root causes of the problems. Based on monitoring data and user feedback, decide whether to continue to fully release the new version or perform a rollback.
[0140] In an embodiment of the present invention, grayscale evaluation can be used to timely discover and solve problems, reduce the risks that may be caused by the release of new versions, and improve the quality of release. Grayscale evaluation can make decisions quickly based on monitoring data and user feedback, provide a one-click rollback function, and reduce the cost and scope of rollback. Through grayscale release, new functions can be tested on a part of users, optimized based on user feedback, and the user experience can be improved and user satisfaction can be increased. In summary, grayscale evaluation is an effective release strategy that can help the team release new versions more safely and efficiently, and ensure the stability of the system and user experience.
[0141] In this embodiment, the rollback mechanism means that during the grayscale release process, when serious problems occur in the system or preset business indicators do not meet the requirements, the system can automatically trigger a rollback operation to restore the system to a previously stable version to ensure the stability and reliability of the system.
[0142] For example, in the rollback mechanism, you can continuously monitor the grayscale release version, collect data such as error rates and performance indicators, and judge the stability and effect of the version. When the grayscale version is monitored to have problems or fail to meet the preset business indicators, the rollback operation is automatically triggered. The grayscale release version can be automatically rolled back to the previous stable version, or switched to a backup version to restore the normal operation of the system. You can also perform post-rollback verification to ensure that the system is restored to a normal state and avoid new problems.
[0143] In the embodiment of the present invention, the rollback mechanism can effectively ensure the stability and availability of the system. When problems occur in the grayscale release, the system can be quickly restored to reduce the impact on users. At the same time, the rollback mechanism can also improve the automation of the system, reduce manual intervention, and reduce the risk of human error. By combining grayscale evaluation with the rollback mechanism, the reliability and stability of the system can be effectively improved, and the user experience can be improved.
[0144] Optionally, risk management plays a vital role in the grayscale evaluation and rollback mechanism. By establishing an automated evaluation system and risk management mechanism, the system can better evaluate the effects and potential risks of grayscale releases, and provide corresponding response strategies to ensure the stability and security of the system. The risk management evaluation system can include risk technology evaluation, security risk evaluation, and time acceptance risk evaluation. For technical risk evaluation, evaluate the technical risks that may exist in the grayscale release process, such as performance issues, compatibility issues, etc., to ensure the normal operation and service quality of the system. For security risk evaluation, evaluate the possible impact of grayscale release on system security, such as data leakage risk, security vulnerability risk, etc., to ensure the security and integrity of system data. For market acceptance risk evaluation, evaluate the possible impact of grayscale release on market acceptance, adjust the grayscale strategy based on user feedback and behavior data, and improve the market recognition of the product.
[0145] In an embodiment of the present invention, through the risk management mechanism, the system can timely identify potential technical, security and market acceptance risks, and help system administrators prepare for risks and take countermeasures in advance. The risk management mechanism can help system administrators formulate corresponding risk management and response strategies, reduce the occurrence and impact of risks, and ensure the stability and security of the system. Through the evaluation and control of risk management, the system can better ensure the stability of the system, avoid potential risks that may be brought about during the grayscale release process, and improve the reliability and performance of the system. In summary, risk management is of great significance in the grayscale evaluation and rollback mechanism, which can help the system identify and respond to potential risks in a timely manner and improve the stability and security of the system. By establishing a complete risk management mechanism, the system can better evaluate the effects and potential risks of grayscale releases, and provide corresponding response strategies to ensure that the system can remain stable and secure during the grayscale release process.
[0146] The following further describes how to authenticate the publishing process of the grayscale service instance in this embodiment.
[0147] As an optional implementation method, the method also includes: determining a target authentication mode that matches the grayscale service instance among multiple authentication modes, wherein different authentication modes are used to represent the rules for authenticating the publishing process of different service instances of the application service; authenticating the publishing process of the grayscale service instance according to the target authentication mode to obtain an authentication result.
[0148] In an embodiment, under multiple authentication modes, a target authentication mode that matches the grayscale service instance can be determined. The release process of the grayscale service instance is authenticated according to the target authentication mode to obtain a corresponding authentication result, wherein different authentication modes can be used to represent the rules for authenticating the release process of different service instances of the application service, which can be an authentication mode. The authentication mode refers to a method or strategy used by the system to verify the identity and authority of the user. Authentication refers to the process of confirming the identity of the user, that is, verifying whether the user is the user he claims to be. Different authentication modes are suitable for different scenarios and needs, and the most suitable authentication method can be selected according to the specific situation, that is, the target authentication mode is the most suitable authentication method for the current grayscale service instance. For example, the authentication mode can be an open authorization 2.0 (Open Authorization 2.0, referred to as OAuth2) mode, or a JSON Web Token (JSON Web Token, referred to as JWT) mode. It should be noted that the above-mentioned authentication mode is only for example and is not specifically limited here.
[0149] Optionally, by extending Feign's authentication mechanism, you can implement secure authentication and authorization for inter-service calls. As a client tool for communication between microservices, Feign can enhance the security of inter-service communication by extending its authentication mechanism, ensuring that only authorized services can communicate. By supporting multiple authentication modes, such as OAuth2, JWT, etc., a flexible security authentication solution can be provided for the system. Different authentication modes are suitable for different scenarios and needs. By selecting the appropriate authentication mode, different security requirements of the system can be met.
[0150] Optionally, during the grayscale release process, the security of calls between services of different versions is particularly important. By enhancing security performance, the system can ensure the security and controllability of calls between services during the grayscale release process, prevent unauthorized access, and protect the security of system data and resources. By extending Feign's authentication mechanism and supporting multiple authentication modes, the system can effectively prevent unauthorized access. Only authenticated and authorized services can communicate, ensuring the security and stability of the system and avoiding potential security risks and data leakage issues. Enhancing security performance can not only ensure the security of communication between services during the grayscale release process, but also improve the overall security of the system. By strengthening the authentication and authorization mechanism, the system can effectively prevent security threats, protect the system's data and user privacy, and improve the security and reliability of the system.
[0151] In summary, by enhancing security performance, expanding Feign's authentication mechanism, and supporting multiple authentication modes, we can ensure the security of inter-service communication during the grayscale release process, prevent unauthorized access, improve the overall security of the system, and ensure the security of system data and resources. These measures are of great significance to the security and stability of the system.
[0152] Optionally, security auditing can also be included in the enhanced security performance. Security auditing refers to the establishment of a security audit log to record all authentication operations and security events in order to track and analyze security events. In terms of enhancing security performance, security auditing is a very important part, which can help the system to ensure the security and integrity of data, timely detect potential security threats and take appropriate measures. The security audit log records all authentication operations, including user login, permission verification, access control, etc., to ensure that all authentication operations in the system are recorded. Security auditing can track security events, including abnormal access, unauthorized access attempts, permission changes, etc., to help system administrators promptly detect possible security threats. The security audit log can generate an audit report to evaluate and analyze the security performance of the system, promptly detect potential problems and take appropriate measures.
[0153] In an embodiment of the present invention, security auditing can help the system to promptly detect abnormal access and unauthorized access attempts, improve the security of the system, and prevent data leakage and malicious attacks. Through the security audit log, the system administrator can track the occurrence process and impact scope of security incidents, which helps to quickly locate and solve security problems. The security audit log can be used as a compliance and legal basis to record all authentication operations and security incidents in the system to ensure the integrity and traceability of the data. In summary, security auditing is a very important part of enhancing security performance. It can promptly detect and solve security problems and improve the security and stability of the system. Through security auditing, a complete security monitoring and auditing mechanism can be established to ensure the security and integrity of system data and enhance the system's ability to identify and respond to potential security threats.
[0154] In an embodiment of the present invention, an intelligent dynamic routing mechanism is proposed to carry out the service processing process of the vehicle, and the grayscale publishing function is realized. The service request of the client can be obtained, and the identification information in the service request can be identified by calling the routing strategy to determine the routing rules for the service request. These routing rules can guide how the service request is routed to the corresponding service instance. According to the grayscale identification information in the service request, the corresponding grayscale service instance, that is, the new version service instance to be released is determined, which helps to reduce the request processing time and avoid the new version service from being overloaded due to too many requests. Finally, the service request is routed to the grayscale service instance to realize the process of publishing the new version of the service to the client. Through the intelligent dynamic routing mechanism, the grayscale service instance can be intelligently selected according to the grayscale identification information, thereby improving the efficiency of the entire grayscale publishing process. In this embodiment, an intelligent dynamic routing mechanism is introduced, and the intelligent selection and routing of the grayscale service instance is realized through the flexible setting of the routing strategy and grayscale identification information. The above mechanism helps to reduce the request processing time, avoid overload, and improve the efficiency and stability of vehicle service publishing. Compared with related technologies, this embodiment is more intelligent and flexible, and can dynamically adjust the grayscale release strategy according to actual conditions to improve the reliability and performance of the vehicle, thereby achieving the technical effect of improving the service processing efficiency of the vehicle and solving the technical problem of low service processing efficiency of the vehicle.
[0155] The technical solution of the embodiment of the present invention is illustrated below in conjunction with preferred implementation modes.
[0156] At present, with the popularity of microservice architecture, the dependencies between services are becoming increasingly complex. This is because the microservice architecture splits a single application into multiple small independent services, each of which has its own functions and data storage, and these services need to collaborate and interact through network calls. This complex dependency makes the stability of the online system more fragile. Once a service has a problem, it may affect the normal operation of the entire system. Full-link grayscale release is a method of gradually releasing new features or updates in a production environment. By gradually introducing new versions of services into the online system, it can effectively reduce the risk of going online and ensure the stability of the system. The key technologies of full-link grayscale release include measures such as flow control, version management, monitoring and alarming.
[0157] In summary, full-link grayscale release is a key technology to ensure the stability of online systems and realize the gradual and safe launch of new functions. It can help enterprises update and maintain systems more safely and efficiently under the microservice architecture.
[0158] In the related technologies, Feign has problems in authentication processing, inflexible dynamic routing selection, incomplete monitoring and tracking performance, code maintenance and scalability in the full-link grayscale implementation.
[0159] Alternatively, when facing multiple backend services using different authentication methods, Feign is difficult to directly meet advanced authentication requirements. In a full-link grayscale environment, it is crucial to perform precise permission control on specific user groups. As a declarative HTTP client, Feign is often used to simplify communication between services. In practical applications, it is usually necessary to reasonably authenticate services to ensure that only authorized users can access specific services or resources. However, Feign may face some challenges when dealing with complex authentication mechanisms, mainly including the following points: Multiple backend services use different authentication methods: In a microservice architecture, different services may use different authentication methods, such as token-based authentication, OAuth authentication, role-based access control, etc. Feign has limitations in natively supporting these different authentication methods, and additional customized extensions may be required to support multiple authentication mechanisms; in full-link grayscale release, it may be necessary to perform precise permission control on specific user groups to ensure that different users have different access rights. It is difficult for Feign to directly meet such complex permission control requirements, and it may be necessary to combine other authentication solutions to achieve advanced permission control.
[0160] Optionally, in a microservice architecture, dynamic routing refers to deciding which specific service instance to route a request to based on the content of the request and some dynamic rules. Dynamic routing usually requires additional calculations and judgment logic, including parsing request headers, querying routing rules, and interacting with service discovery components. These operations may affect request processing time, especially in high-concurrency scenarios, which may cause a slight increase in latency.
[0161] Optionally, in a complex microservice architecture, monitoring and tracing are very important to ensure the stability, performance, and reliability of the system. Link tracing systems can help track the delivery path of requests between different services and identify potential performance bottlenecks or failure points. However, in a gray release environment, the comprehensiveness of monitoring and tracing performance may be subject to some challenges, especially for the case of Feign integrated link tracing systems. Specifically, in a gray release environment, since some traffic may be routed to different versions of services, the consistency and accuracy of tracing information between different versions may be affected. Feign integrated link tracing systems may have inconsistent cross-version tracing information, making it difficult to accurately trace the complete path of the request. Requests may jump between services of different gray versions, which can cause tracing information to be broken or confused. Especially when spanning multiple versions, it may cause inconsistency in tracing data, making it difficult to analyze the entire request processing flow. In a complex microservice architecture, it is a challenge to ensure that each link can correctly record and associate monitoring data. Feign integrated link tracing systems need to ensure the accuracy and completeness of monitoring data in order to fully analyze the performance and bottlenecks of the system.
[0162] Optionally, in a microservice architecture, Feign is used as a declarative HTTP client to simplify inter-service communication. However, as the grayscale strategy becomes more complex, the definition of Feign interfaces, request processing logic, and configuration management may become complicated, affecting the readability and maintainability of the code.
[0163] In summary, the related technology still has the technical problem of low efficiency in vehicle service processing.
[0164] However, the embodiment of the present invention proposes a full-link grayscale method based on Feign. The full-link grayscale release solution based on Feign can realize automatic grayscale release through intelligent routing strategy and dynamic configuration, which greatly improves the efficiency of grayscale release. At the same time, through the full-link monitoring and intelligent rollback mechanism, the stability and performance indicators of the system can be monitored in real time during the grayscale release process, and problems can be discovered and rolled back in time, reducing the system risks caused by the deployment of new functions and improving the security of the system. The full-link grayscale release solution based on Feign provides intelligent routing strategies and dynamic configuration capabilities, which can achieve smooth upgrades and seamless switching of services. Through traffic control and intelligent routing during grayscale release, it can ensure that the new version and the old version of the service can coexist, gradually switch traffic, and avoid the overall collapse of the system. At the same time, the comprehensive monitoring system can monitor the status and performance of the service in real time to ensure the stability and availability of the service during the switching process. It is suitable for microservice architecture, and the grayscale release strategy of the service can be flexibly configured to support rapid iteration and continuous delivery. Through flexible routing strategies and dynamic configuration, independent grayscale release of different services can be achieved, avoiding the risks of the overall system, and providing strong support for continuous delivery under the microservice architecture.
[0165] In summary, the full-link grayscale release solution based on Feign in this embodiment has obvious advantages over related grayscale release methods, can improve the efficiency and security of grayscale release, realize smooth upgrade and seamless switching of services, and support continuous delivery and rapid iteration under the microservice architecture. This achieves the technical effect of improving the service processing efficiency of vehicles and solves the technical problem of low service processing efficiency of vehicles.
[0166] In this embodiment, Figure 2 is a flowchart of a full-link grayscale method based on Feign according to an embodiment of the present invention, such as Figure 2 As shown, the method may include running and monitoring the background A and the business service B, and may include the following steps:
[0167] Step S201, obtaining a user request.
[0168] In this embodiment, the client sends the constructed user request to the server through the network. The above process usually sends the HTTP request to a specific endpoint or application programming interface (API) interface of the server for processing the user request transmitted by the client.
[0169] Step S202: parsing and distributing the user request.
[0170] In this embodiment, a specific identification field is added to the header information of the user request, which can be used to mark whether the request is a grayscale request. After receiving the service request, the identification field in the request header is parsed. If a specific grayscale identification exists, the request can be determined to be a grayscale request. Similar to the request header identification, the user can be required to add a specific identification parameter to the request parameters to indicate the grayscale status of the request. The request parameters are parsed to determine whether it is a grayscale request based on whether the grayscale identification parameter is included.
[0171] Optionally, whether it is a grayscale request can also be determined based on the user's identity information. The user's identity information, such as the user ID, can be parsed. If the user is marked as a user participating in the grayscale test, then his request can be regarded as a grayscale request. Determine whether it is a grayscale request based on the path information of the request. The system can set specific path rules or patterns. When the request path meets the rules of the grayscale request, it is regarded as a grayscale request. It is also possible to determine whether it is a grayscale request based on the specific content of the request. The content in the request body can be parsed to determine the grayscale status of the request based on the specific content or format.
[0172] Through the above methods, user requests can be parsed and judged whether they are grayscale requests based on specific rules or identifiers. The judgment of grayscale requests can be customized according to specific business needs and system design to achieve flexible grayscale release and control.
[0173] Step S203: determine the routing decision.
[0174] In this embodiment, a pluggable, highly modular and configurable routing decision engine is built to intelligently select service instances through requested metadata. The engine is required to be highly flexible and support developers to freely define routing rules according to business needs.
[0175] Optionally, the engine should be designed to be pluggable, that is, its functions can be flexibly replaced or extended as needed to adapt to different business scenarios and requirements. This design makes the system more flexible and scalable. The engine should have a highly modular feature, splitting the functions into independent modules for easy management and maintenance. At the same time, the engine should support configuration, allowing developers to dynamically adjust the behavior of the engine according to actual conditions to meet different needs. The engine should be able to intelligently select the appropriate service instance for request processing based on the metadata of the request, such as specific identifiers, user IDs, cookie information in the request header, etc. In this way, the appropriate service instance can be dynamically selected according to different request characteristics, improving the performance and flexibility of the system. In order to meet different business needs, the engine should support developers to freely define routing rules. This means that developers can customize routing rules according to specific business scenarios and needs to better control the routing and distribution of requests.
[0176] By building a pluggable, highly modular and configurable routing decision engine, the system can intelligently select service instances based on the metadata of the request and support custom routing rules, thereby achieving flexible request processing and routing control. This design can improve the flexibility, maintainability and scalability of the system, meet the routing requirements in different business scenarios, and improve the system performance and user experience.
[0177] Optionally, the routing decision engine also has a flexible plug-in mechanism that allows routing policies to be dynamically loaded or unloaded at runtime.
[0178] Optionally, the routing decision engine may also have risk identification capabilities to enhance the engine's identification capabilities so that it can not only identify grayscale identifiers, but also detect other potential risk factors in requests, such as malicious requests or abnormal traffic.
[0179] Step S204, determining whether it is a grayscale request.
[0180] In this embodiment, it can be determined whether the user request is a grayscale request. If so, step S205 can be executed, otherwise, step S209 can be executed.
[0181] Step S205: Perform Feign interception customization processing.
[0182] In this embodiment, the logic is inserted before the request is sent by rewriting Feign's request interceptor, parsing the request header or other identification information according to preset rules, and dynamically adding specific routing instructions or labels to the request.
[0183] Optionally, Feign is a Java HTTP client for making HTTP requests. By rewriting Feign's request interceptor, some processing can be done on the request before it is sent. This allows custom logic to be inserted before the request is initiated. With the request interceptor, custom logic can be inserted before the request is sent, thereby achieving dynamic processing of the request. In this case, the request header or other identification information can be parsed according to preset rules to determine whether the request requires special processing. With the request interceptor, the header information or other identification information in the request can be obtained and parsed according to preset rules. For example, it can be determined whether the request carries a specific grayscale identifier. If the request carries a specific grayscale identifier, the interceptor can dynamically modify the target URL of the request based on this identification information so that the request points to the grayscale service instance. This allows the request to be dynamically routed to the corresponding grayscale service instance when it is sent, achieving grayscale release or specific routing requirements.
[0184] Through the above method, rewriting Feign's request interceptor can realize dynamic request processing logic, dynamically modify the target URL of the request according to the request header or identification information, and thus realize flexible routing control. This method can help the system realize grayscale release, specific routing requirements and other functions, and improve the flexibility and scalability of the system.
[0185] Optionally, rewriting the Feign interceptor can also perform risk handling. Adding abnormal request handling logic to the interceptor can ensure timely response when potential risks are detected, for example, blocking requests or triggering alarms.
[0186] Step S206: adaptive load balancing.
[0187] In this embodiment, a custom load balancing strategy is used to ensure automatic discovery and efficient load balancing of grayscale service instances, as well as how to intelligently select service instances based on the grayscale strategy.
[0188] Optionally, Ribbon is a load balancer. Customized load balancing strategies can be implemented by rewriting Ribbon's I Rule interface or by integrating with Spring Cloud Load Balancer. The I Rule interface allows developers to define load balancing rules, and Spring Cloud Load Balancer is a load balancer component provided by the Spring Cloud project. Customized load balancing strategies can be used to intelligently select service instances based on grayscale strategies, rather than simple round-robin or random strategies. When selecting service instances, factors such as grayscale identification, instance health, and possible traffic weight distribution are considered. Customized load balancing strategies take into account a variety of factors, including grayscale identification, service instance health (e.g., load, response time, etc.), and traffic weight distribution. These factors will affect the priority and probability of a service instance being selected to process a request. An example is provided to illustrate that a strategy can be designed to prioritize grayscale traffic to service instances with suitable performance or idleness. This strategy can improve the performance and stability of the system and ensure that grayscale traffic can be processed efficiently.
[0189] Through custom load balancing strategies, the system can intelligently select appropriate service instances to handle requests based on the grayscale identification and specific conditions of the service instances, improving the flexibility and performance of the system while ensuring the smooth progress of grayscale releases. This flexible load balancing strategy can help the system better cope with complex traffic conditions and improve system stability and efficiency.
[0190] Optionally, the load balancing strategy also has risk management capabilities and can include health checking mechanisms to ensure that requests are not routed to service instances that are known to have problems.
[0191] Step S207, continuous dyeing strategy is implemented.
[0192] In this embodiment, the continuous coloring strategy ensures during the grayscale release process that after a user or device is assigned to a grayscale version, subsequent requests from the user are continuously routed to the same version to ensure consistency in the user experience.
[0193] Optionally, a persistent coloring strategy can ensure that users or devices are always routed to the same grayscale version during the grayscale release process to maintain a consistent user experience. This means that once a user or device is assigned to a specific version, the system will remember this assignment and continue to route its requests to the same version. To implement the persistent coloring strategy, session persistence logic can be added to the interceptor or load balancing strategy. This means that the system needs to record the version information that the user was first assigned to and use this information to route requests to the same version in subsequent requests. Session persistence logic can be implemented through methods such as cookies or user identifiers. To implement session persistence logic, cookies or user identifiers can be used to remember the version that the user was first assigned to. When a user is first assigned to a grayscale version, the system will record the user's version information and store it in a cookie, or it can be associated with the user's unique identifier. When subsequent requests arrive, the system will make routing decisions based on this information.
[0194] Through the continuous coloring strategy, the system can ensure that users or devices always stay on the same version during the grayscale release process, avoiding the instability of user experience caused by version switching. This strategy can improve the consistency of user experience and ensure that users receive stable and coherent services during the grayscale release process. By utilizing session retention logic and user identification information, the system can implement the continuous coloring strategy and provide users with a better service experience.
[0195] Optionally, the persistent dyeing strategy can also perform risk mitigation by ensuring that exception handling mechanisms are included in the session persistence logic to enable a smooth transition when the user identity is lost or the service instance is unavailable.
[0196] Step S208, dynamic configuration center control.
[0197] In this embodiment, a dynamic configuration center is built to centrally manage the configuration information of the service and support real-time updating of the Feign client configuration, including routing rules, grayscale ratio, service address, etc.
[0198] Optionally, by establishing a centralized configuration service center, the configuration information of the service can be managed uniformly, avoiding the configuration information being scattered in various services, and improving the efficiency and consistency of configuration management. The configuration center supports real-time updates of the configuration information of the Feign client, including routing rules, grayscale ratios, service addresses, etc. This means that operation and maintenance personnel can dynamically adjust the configuration of the service without restarting the service, thereby speeding up the configuration adjustment and reducing the impact on the system. Through the dynamic configuration center, operation and maintenance personnel can flexibly adjust the grayscale release strategy according to actual needs, including adjusting the grayscale ratio, modifying the grayscale traffic routing rules, etc., to adapt to different business scenarios and needs. The design of the dynamic configuration center can improve the flexibility and responsiveness of the system, allowing operation and maintenance personnel to adjust the configuration information faster, accelerate the iteration speed and deployment efficiency of the system, and thus respond to business needs and changes faster. By updating the Feign client configuration information in real time, the risk of service interruption caused by restarting the service due to configuration changes can be avoided, and the stability and availability of the system can be improved. Establish a monitoring mechanism and audit log to track the history and effects of configuration changes to ensure that the configuration changes meet expectations and can be rolled back in time.
[0199] By building a dynamic configuration center, the system can manage configuration information more flexibly and update the configuration of the Feign client in real time, thereby accelerating the iteration of services, reducing risks, and improving the flexibility and responsiveness of the system. This design can help the system better adapt to changing business needs and a rapidly iterating environment.
[0200] Optionally, the dynamic configuration center can also have monitoring capabilities, able to track the effects of configuration changes in real time, and through a rollback mechanism, to quickly recover when unexpected situations occur, and to adjust routing decisions in real time.
[0201] Step S209, real-time monitoring to enhance safety performance.
[0202] In this embodiment, a unified monitoring and logging system is established, and monitoring tools are integrated to collect and analyze request data initiated by Feign in real time, with special attention paid to the performance of the gray version, and detailed logging is provided for troubleshooting and performance optimization. By enhancing security performance, service calls in the gray version release process are ensured to be secure and controllable to prevent unauthorized access.
[0203] Optionally, by integrating monitoring tools, the system can collect and analyze key indicators of each request initiated by Feign in real time, such as response time, success rate, error rate, etc. This helps monitor the performance and stability of the system, find problems in time and optimize them. The monitoring system pays special attention to the performance of the gray version, that is, the performance and stability of the new version after the gray version is released. By monitoring the indicators of the gray version, the effect of the new version can be evaluated, problems can be found in time and measures can be taken. The system provides detailed log records to record the information and processing process of each request, including request content, response results, processing time, etc. This helps troubleshooting and performance optimization, helping developers to quickly locate and solve problems. Through monitoring and logging, the system can quickly troubleshoot and optimize performance. Locate the root cause of the problem, improve the performance and stability of the system, and improve the user experience. By analyzing monitoring data and logging, the system can obtain key indicators and trends to provide data support for decision-making. According to the results of data analysis, optimize the system architecture, adjust the gray strategy, and improve the efficiency and stability of the system. Monitoring and logging not only help the system to monitor and analyze in real time, but also provide a basis for continuous improvement of the system. Continuously optimize monitoring strategies and logging methods to improve the system's fault diagnosis and performance optimization capabilities.
[0204] By establishing a unified monitoring and logging system, the system can comprehensively monitor and analyze the performance of Feign requests, pay special attention to the effect of the grayscale version, and provide detailed log records for troubleshooting and performance optimization. This design helps improve the stability, reliability and performance of the system, ensure that the system can detect and handle problems in a timely manner, and continuously optimize the operation of the system.
[0205] Optionally, the unified monitoring and logging system can also have an early warning function, which can automatically trigger an alarm when an abnormal situation is detected, and provide detailed log records to facilitate troubleshooting and performance optimization.
[0206] Optionally, the unified monitoring and log system can also be equipped with market acceptance monitoring. By increasing the monitoring of user feedback and behavior data, the market acceptance of the grayscale version can be evaluated and the grayscale strategy can be adjusted accordingly.
[0207] Optionally, Feign is a Java HTTP client for making HTTP requests. By extending its authentication mechanism, you can implement secure authentication and authorization of requests to ensure that only authorized requests can access services. By extending Feign's authentication mechanism, you can support a variety of common authentication modes. Different authentication modes can provide different levels of security protection to ensure the legitimacy and security of requests. During the grayscale release process, different versions of services may run at the same time. In order to ensure that the calls are safe and controllable, appropriate security controls need to be performed on the calls between services. By enhancing Feign's authentication mechanism, you can ensure that the calls between grayscale versions are safe and prevent unauthorized access. By strengthening security performance and preventing unauthorized access, you can ensure the security of system data and services. Only authenticated and authorized requests can access services, ensuring the security and stable operation of the system. By enhancing security performance, you can improve the security of the system, reduce potential security risks, and protect the security of user data and system resources. This helps to improve the trust of the system and user satisfaction.
[0208] By extending Feign's authentication mechanism and supporting multiple authentication modes, the system can strengthen the security control of service calls during the grayscale release process, prevent unauthorized access, and improve the security and stability of the system. This security enhancement is crucial to protecting the security of the system and user data, and is an indispensable part of the grayscale release process.
[0209] Optionally, you can also create a security audit log to record authentication operations to facilitate security incident tracking.
[0210] Step S210, intelligent assessment data rollback.
[0211] In this embodiment, when implementing the gray release strategy, the gray release evaluation and rollback mechanism is a very important part. Through the automated evaluation system, the effect of gray release can be monitored in a timely manner, and evaluation can be performed according to preset business indicators, such as error rate, performance indicators, etc. If a problem is found in the gray version, a rollback operation can be performed in time to ensure the stability and reliability of the system.
[0212] Optionally, the key to implementing the grayscale evaluation and rollback mechanism is to establish a monitoring system that can collect, analyze, and display grayscale release data indicators in real time. During the evaluation process, thresholds or rules can be set. Once the preset threshold is exceeded, the system will trigger an automatic rollback operation and switch the traffic back to the stable version to avoid affecting users.
[0213] In addition, in order to improve the accuracy and real-time performance of the evaluation, the monitoring system can be combined with automated testing tools to achieve a comprehensive evaluation of the grayscale release effect. By continuously optimizing the evaluation rules and indicators, the stability of the system and the user experience can be continuously improved.
[0214] In short, grayscale evaluation and rollback mechanisms are important parts of grayscale release strategies. By establishing an automated evaluation system and rollback mechanism, the risks of grayscale release can be effectively reduced and the stability and reliability of the system can be guaranteed. Therefore, when designing a grayscale release plan, it is necessary to consider how to implement grayscale evaluation and rollback mechanisms to deal with possible problems and solve them in a timely manner.
[0215] Optionally, the grayscale assessment and rollback mechanism can also include risk management functions, which can evaluate technical risks, security risks, and time acceptance risks, and propose corresponding risk management and response strategies.
[0216] Step S211: conventional routing processing.
[0217] In this embodiment, if the user request is not a grayscale request, that is, there is no need to perform grayscale release processing, the system can perform conventional routing processing.
[0218] For example, the general routing process can be as follows: Parse the user request, including the request header, request body, URL parameters, etc., to obtain relevant information of the request. Verify the request, including identity verification, permission verification, parameter verification, etc., to ensure the legitimacy and security of the request. Based on the content and characteristics of the request, the system makes a routing decision to determine which processing module, service or instance to distribute the request to. If the system involves multiple service instances, the load balancing mechanism can be used to distribute the requests evenly to each instance to improve the performance and stability of the system. According to the routing decision, the request is sent to the corresponding processing module or service instance to execute the corresponding business logic. After processing the request, the system generates response data and returns an appropriate response based on business needs. The generated response data is returned to the user to complete the entire request processing process.
[0219] Through the above conventional routing processing steps, the system can process non-grayscale requests normally, ensuring that the requests can be smoothly routed to the corresponding processing module or service instance and correctly processed and responded to. This processing method ensures the normal operation and service quality of the system, and enables the system to distinguish between grayscale requests and non-grayscale requests, and adopt different routing processing strategies according to needs.
[0220] In the embodiment of the present invention, through the above comparison with the related technology, the method in the embodiment of the present invention has advantages in various aspects such as system stability, fast iteration speed, high flexibility and maintainability, and high user experience.
[0221] Optionally, in terms of system stability, the full-link grayscale release solution based on Feign in the embodiment of the present invention can gradually introduce the traffic of the new version into the system through refined traffic control and grayscale strategy, reducing the risk brought by the launch of the new version. During the grayscale release process, the system can monitor the stability and performance indicators of the new version in real time, discover problems in time and roll back to ensure business continuity. By reducing the system risks brought by grayscale release, the stability of the system is improved.
[0222] Optionally, in terms of iteration speed, the full-link grayscale release solution based on Feign in the embodiment of the present invention supports rapid deployment and verification of new functions, and can perform function verification while grayscale release, shortening the product iteration cycle. The development team can push new functions to the online environment faster, improve the market response speed of the product, and enable enterprises to adapt to market changes more quickly.
[0223] Optionally, in terms of high flexibility and maintainability, the embodiments of the present invention provide a highly configurable grayscale release process that can be flexibly configured according to different business requirements and release scenarios. The operation and maintenance team can adjust the grayscale strategy and traffic control rules according to specific circumstances, simplifying the operation and maintenance work. At the same time, the maintainability of the grayscale release solution is also enhanced, and the release process of the system can be better managed and maintained.
[0224] Optionally, through precise grayscale distribution in areas with high user experience, a small number of users can experience new features and collect their feedback without affecting the majority of users. This helps optimize the design and performance of new features and improve user experience. Through the grayscale release solution, the relationship between the launch of new features and user experience can be better balanced, improving user satisfaction and loyalty.
[0225] In the embodiment of the present invention, the following specific embodiment is provided.
[0226] Optionally, the background of the embodiment may be to assume that a grayscale release of “vehicle control service” and “vehicle management service” is being performed, with the purpose of testing the impact of new functions on system performance and user experience while ensuring the stability and security of the production environment.
[0227] Optionally, a method of implementing an intelligent dynamic routing mechanism in the vehicle control service and the vehicle management service can realize the grayscale release function through a pluggable routing decision engine and a customized load balancing strategy. Through the implementation of the intelligent dynamic routing mechanism, the vehicle control service and the vehicle management service can realize the control and routing of grayscale release, improving the flexibility, controllability and stability of the system. This grayscale release method can ensure the smooth launch of new functions while ensuring the stability of the system and user experience.
[0228] Optionally, the intelligent dynamic routing mechanism of the vehicle control service is implemented as follows: a pluggable routing decision engine, through which rules are set to intelligently route requests to grayscale versions of service instances based on specific version tags in user request headers (such as X-Version: gray). This approach can make routing decisions more flexible and intelligent, and dynamically select routing methods based on specific request header information. The Feign interceptor, through a rewritten Feign interceptor, detects a specific version tag in the request header before the request is sent. If a grayscale tag is detected, the target URL of the request is dynamically modified to ensure that the request is correctly directed to the grayscale environment. The above approach can implement control and routing of grayscale releases at the client level, improving the flexibility and controllability of the system.
[0229] Optionally, the intelligent dynamic routing mechanism of the vehicle management service implements: a custom load balancing strategy. For the vehicle management service, the interceptor checks whether the cookie contains a specific grayscale identifier (for example, gray_sess ion_id) before sending the request. If there is a grayscale identifier, a custom load balancing strategy is used to preferentially assign the request to the grayscale service instance. At the same time, the current load and health status of the instance are taken into account to avoid overload. This method can dynamically select the load balancing strategy based on the user's cookie information to achieve the effect of intelligent grayscale release. Considering the load and health status of the instance, when allocating requests to the grayscale service instance, the current load and health status of the instance are also taken into account. By comprehensively considering these factors, it is possible to avoid sending requests to overloaded or unhealthy service instances, ensuring the stability and performance of the system.
[0230] Optionally, the centralized configuration center is used to manage the grayscale release configuration of the vehicle control service and the vehicle management service, including grayscale ratio, routing rules, etc. Through the configuration center, the operation and maintenance team can centrally manage the grayscale release configuration of all services to achieve unified configuration management. The operation and maintenance team can dynamically adjust the grayscale ratio, routing rules and other configurations through the configuration center without restarting the service. For example, the proportion of grayscale users can be quickly adjusted from 10% to 30% to expand the test scope. This way of dynamically adjusting the configuration can improve flexibility and efficiency and reduce the impact on the system. To establish a centralized configuration center, you can use existing configuration management tools or develop a configuration center system yourself. The configuration center should have a good user interface and permission management functions to facilitate the operation and maintenance team to manage and adjust the configuration. Set the grayscale release configuration of the vehicle control service and the vehicle management service in the configuration center, including grayscale ratio, routing rules, grayscale user identification, etc. The configuration should be flexible and can be adjusted according to actual needs. The operation and maintenance team can dynamically adjust the configuration through the configuration center, such as modifying the grayscale ratio, adjusting the routing rules, etc. In this way, the grayscale release strategy can be adjusted in time according to the actual situation, improving flexibility and response speed.
[0231] In an embodiment of the present invention, a centralized configuration center simplifies the configuration management process, and the operation and maintenance team can centrally manage the configuration of all services to improve management efficiency. By dynamically adjusting the configuration, it is possible to quickly respond to changing needs, flexibly adjust the grayscale release strategy, and improve the flexibility and adaptability of the system. Dynamically adjusting the configuration does not require restarting the service, which can reduce the system risks caused by configuration adjustments and ensure the stability and reliability of the system. In summary, by establishing a centralized configuration center to implement dynamic configuration management, the flexibility and management efficiency of grayscale release can be improved, helping the operation and maintenance team to quickly adjust the grayscale release strategy, ensuring the smooth progress of grayscale release and reducing system risks.
[0232] Optionally, the above content describes a method for implementing a unified monitoring and logging system in vehicle control services and vehicle management services, which enables real-time monitoring, performance analysis, and troubleshooting of services through integrated monitoring tools and detailed logging.
[0233] Optionally, by integrating monitoring tools, all requests for vehicle control services and vehicle management services can be closely tracked, especially the response time, success rate, and error rate of the gray version. Monitoring tools can monitor the performance indicators of services in real time, helping the operation and maintenance team understand the system operation status, find problems in time, and deal with them accordingly. Monitoring tools provide real-time data analysis functions, which can quickly identify and solve performance bottlenecks or functional defects. By analyzing monitoring data, system configurations can be adjusted in time, code structures can be optimized, etc., to improve system performance and stability. Detailed logging can help the development team quickly locate problems when they occur, troubleshoot and repair them. By recording the processing process, key parameters, and exception information of each request, the development team can track the cause of the problem and debug and repair it in a targeted manner. In addition to troubleshooting, detailed logging can also help the development team perform performance tuning. By analyzing log data, potential performance problems can be found, code logic can be optimized, redundant operations can be reduced, and system performance and response speed can be improved.
[0234] In an embodiment of the present invention, by real-time monitoring of the system's performance indicators, problems can be discovered and responded to in a timely manner to ensure the stability and reliability of the system. Through detailed log records, the development team can quickly locate the root cause of the problem, shorten the troubleshooting time, and improve the maintainability of the system. Through monitoring and log analysis, the performance and stability of the system can be continuously optimized to improve user experience and service quality. In summary, by implementing a unified monitoring and logging system, vehicle control services and vehicle management services can be helped to achieve real-time monitoring, performance analysis, and troubleshooting, and improve the stability, maintainability, and performance of the system. This implementation method of the monitoring and logging system helps to improve service quality and ensure the normal operation of the system.
[0235] Optionally, methods to enhance security are implemented in the vehicle control service and vehicle management service. By extending the Feign client to support authentication methods such as OAuth2 and JWT, calls between services in the grayscale environment can be ensured to be secure and reliable.
[0236] Optionally, Feign client extensions support OAuth2 and JWT authentication. By supporting OAuth2 authentication, secure communication between services in a grayscale environment can be achieved. Before a request is initiated, the Feign client can obtain a valid access token and carry the token in the request to ensure the legitimacy of the request. By supporting JWT authentication, the Feign client can carry a JWT token in the request to verify the legitimacy of the request. The above method can ensure that calls between services in a grayscale environment are safe and reliable, preventing illegal access and data leakage.
[0237] Optionally, when the vehicle control service initiates a request to the vehicle management service, the Feign client first performs OAuth2 or JWT authentication to obtain a valid access token or JWT token. The token information, including authentication information and permissions, is carried in the request to ensure the legitimacy of the request. After receiving the request, the vehicle management service verifies the validity of the token, including operations such as token decryption and signature verification. After the verification is passed, data interaction between services can proceed normally, ensuring the security and reliability of communication.
[0238] In the embodiment of the present invention, by extending the Feign client to support OAuth2 and JWT authentication methods, the security and reliability of inter-service communication in the grayscale environment can be enhanced to ensure the security of the system and the protection of data. This security implementation scheme helps prevent malicious access and data leakage, and improves the security and stability of the system.
[0239] Optionally, a grayscale evaluation and rollback mechanism is implemented during the grayscale release process, an automated evaluation system is established and thresholds are set. Once abnormal indicators are detected, the system automatically triggers a rollback operation to ensure system stability. At the same time, a one-click rollback function is provided to allow operation and maintenance personnel to manually intervene when necessary to quickly restore service stability.
[0240] Optionally, during the grayscale release process, an automated evaluation system is established to set thresholds such as error rates exceeding 5% or response time significantly increased. These thresholds can be set according to actual conditions to monitor system performance and stability. The system continuously monitors the indicators of the grayscale release version. Once an abnormal indicator exceeds the set threshold, the system can automatically trigger a rollback mechanism to reroute affected users back to the stable version of the service.
[0241] Optionally, once the system detects abnormal indicators, the rollback mechanism is automatically triggered to reroute affected users back to the stable version of the service. This can effectively reduce the risks that may be brought about by grayscale releases and ensure the stability of the system. At the same time, a one-click rollback function is provided to operation and maintenance personnel, allowing them to manually intervene when the grayscale release is evaluated to be ineffective and quickly restore service stability. This manual rollback method allows operation and maintenance personnel to take quick action when necessary to reduce the scope of the system being affected.
[0242] In the embodiment of the present invention, by implementing the grayscale evaluation and rollback mechanism, the stability of the system can be improved, the operation and maintenance efficiency can be improved, and the user experience can be guaranteed. This mechanism helps to reduce system risks and ensure the smooth progress of grayscale releases, while providing a flexible manual intervention method to ensure the reliability and stability of the system.
[0243] In this embodiment, a grayscale evaluation and rollback mechanism is implemented during the grayscale release process, an automated evaluation system is established and thresholds are set. Once an abnormal indicator is detected, the system automatically triggers a rollback operation to ensure system stability. At the same time, a one-click rollback function is provided to allow operation and maintenance personnel to manually intervene when necessary to quickly restore service stability.
[0244] Optionally, routing based on Header or Cookie is a common grayscale release strategy. By using specific information in the request header or Cookie as a grayscale identifier, dynamic routing logic can be implemented in Feign's interceptor, thereby achieving grayscale release based on users or sessions.
[0245] Optionally, combining grayscale releases with an A / B testing framework is a powerful strategy that can help companies more effectively evaluate the effects of different versions, collect user feedback and performance data, and guide product decisions.
[0246] In the embodiment of the present invention, the full-link grayscale release solution based on Feign brings significant improvements in the efficiency and security of grayscale release, and reduces the system risks caused by the deployment of new functions. Through intelligent routing strategies, dynamic configuration capabilities and a comprehensive monitoring system, the smooth upgrade and seamless switching of services are ensured, providing an efficient and secure solution for continuous delivery and rapid iteration under the microservice architecture. Through intelligent routing strategies, requests can be dynamically routed to grayscale version service instances according to specific identifiers or rules, realizing precise control and management of grayscale release. The grayscale release strategy can be flexibly adjusted according to actual needs to adapt to different business scenarios and needs, thereby improving the flexibility and customizability of grayscale release. Through a comprehensive monitoring system, real-time monitoring of performance indicators, error rates and other data in the grayscale release process is realized, and abnormal situations can be discovered in time and corresponding measures can be taken to ensure the stability and reliability of the system. With the help of intelligent routing strategies and dynamic configuration capabilities, the solution realizes the smooth upgrade of services, gradually introduces new functions without interrupting existing services, reduces the risks that may be brought about by the launch of new functions, and ensures the stability of the system. Through flexible routing strategies and monitoring systems, the solution can achieve seamless switching, ensuring that the new and old versions of services can be switched correctly and quickly, ensuring user experience and service continuity.
[0247] In summary, the implementation of the full-link grayscale release solution based on Feign provides enterprises with an efficient and secure grayscale release solution, helping to improve the efficiency and security of grayscale releases, reduce the risk of new function deployment, and promote digital transformation and optimize service delivery. This achieves the technical effect of improving the service processing efficiency of vehicles and solves the technical problem of low service processing efficiency of vehicles.
[0248] According to another aspect of the embodiment of the present invention, corresponding to the embodiment of the vehicle service processing method, the present specification also provides a vehicle service processing system, Figure 3 is a structural block diagram of a vehicle service processing system according to an embodiment of the present invention. Figure 3 As shown, the vehicle service processing system 300 may include: a client 302 and a server 304 .
[0249] The client 302 is used to send a service request, wherein the service request is used to request allocation of a vehicle application service to a server client in the entire link.
[0250] Server 304 is used to call a routing strategy and identify identification information in a service request, wherein the routing strategy is used to represent a rule for routing a service request, and the identification information is used to identify a service instance of an application service; in response to the identification information being grayscale identification information, determine a grayscale service instance corresponding to the grayscale identification information, wherein the grayscale service instance is used to represent a service instance to be released by the application service; and route the service request to the grayscale service instance to release the grayscale service instance to a client.
[0251] In the service processing system of the vehicle of this embodiment, the service request of the client can be obtained, and the identification information in the service request can be identified by calling the routing strategy to determine the routing rules for the service request. These routing rules can guide how the service request is routed to the corresponding service instance. According to the grayscale identification information in the service request, the corresponding grayscale service instance, that is, the new version service instance to be released is determined, which helps to reduce the request processing time and avoid the new version service from being overloaded due to too many requests. Finally, the service request is routed to the grayscale service instance to realize the process of publishing the new version service to the client. Through the intelligent dynamic routing mechanism, the grayscale service instance can be intelligently selected according to the grayscale identification information, thereby improving the efficiency of the entire grayscale publishing process. In this embodiment, an intelligent dynamic routing mechanism is introduced, and the intelligent selection and routing of the grayscale service instance is realized through the flexible setting of the routing strategy and grayscale identification information. The above mechanism helps to reduce the request processing time, avoid overload, and improve the efficiency and stability of vehicle service publishing. Compared with related technologies, this embodiment is more intelligent and flexible, and can dynamically adjust the grayscale release strategy according to actual conditions to improve the reliability and performance of the vehicle, thereby achieving the technical effect of improving the service processing efficiency of the vehicle and solving the technical problem of low service processing efficiency of the vehicle.
[0252] According to another aspect of the embodiments of the present invention, corresponding to the embodiments of the vehicle service processing method, the present specification also provides a vehicle service processing device, Figure 4 is a structural block diagram of a vehicle service processing device according to an embodiment of the present invention. Figure 4 As shown, the service processing device 400 of the vehicle may include: an acquisition unit 402 , an identification unit 404 , a determination unit 406 and a publishing unit 408 .
[0253] The acquisition unit 402 is used to acquire a service request from a client, wherein the service request is used to request allocation of a vehicle application service to the client.
[0254] The identification unit 404 is used to call the routing strategy and identify the identification information in the service request, wherein the routing strategy is used to represent the rules for routing the service request, and the identification information is used to identify the service instance of the application service.
[0255] The determining unit 406 is configured to determine, in response to the identification information being the grayscale identification information, a grayscale service instance corresponding to the grayscale identification information, wherein the grayscale service instance is used to represent a service instance to be released by the application service.
[0256] The publishing unit 408 is used to route the service request to the grayscale service instance to publish the grayscale service instance to the client.
[0257] In this embodiment, the following units are provided in the service processing device of the vehicle: an acquisition unit, used to acquire the service request of the client, wherein the service request is used to request the allocation of the application service of the vehicle to the client; an identification unit, used to call the routing strategy, identify the identification information in the service request, wherein the routing strategy is used to represent the rules for routing the service request, and the identification information is used to identify the service instance of the application service; a determination unit, used to determine the grayscale service instance corresponding to the grayscale identification information in response to the identification information being grayscale identification information, wherein the grayscale service instance is used to represent the service instance to be published by the application service; a publishing unit, used to route the service request to the grayscale service instance, so as to publish the grayscale service instance to the client. Thus, the technical effect of improving the service processing efficiency of the vehicle is achieved, and the technical problem of low service processing efficiency of the vehicle is solved.
[0258] According to another aspect of an embodiment of the present invention, a vehicle is provided, which may be an autonomous driving vehicle, comprising: a memory storing an executable program; and a processor for running the program, wherein the program executes any one of the above methods when running.
[0259] Figure 5 is a structural block diagram of an automatic driving vehicle according to an embodiment of the present invention. Figure 5 As shown, the components of the autonomous driving vehicle 500 include but are not limited to a memory 510 and a processor 520. The processor 520 is connected to the memory 510 via a bus 530, and the database 550 is used to store data.
[0260] The autonomous vehicle 500 may also include an access device 540 that enables the autonomous vehicle 500 to communicate via one or more networks 550. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 540 may include one or more of any type of wired or wireless network interface (e.g., a network interface card (NIC)), such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a Worldwide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC) interface, and the like.
[0261] In one embodiment of the present disclosure, the above components of the autonomous driving vehicle 500 and Figure 5 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 5 The structure block diagram of the autonomous driving vehicle shown is for illustrative purposes only and is not intended to limit the scope of the present disclosure. Those skilled in the art may add or replace other components as needed.
[0262] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium including a stored executable program, wherein when the executable program runs, the device where the storage medium is located is controlled to execute any one of the above methods.
[0263] According to another aspect of an embodiment of the present invention, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, any one of the above methods is implemented.
[0264] It should be noted that the serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0265] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0266] In the several embodiments provided by the present invention, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic, for example, the division of units can be a logical function division, and there can be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0267] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed over multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0268] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0269] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the various embodiments of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, referred to as Read-Only Memory), random access memory (RAM, referred to as Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0270] The above are only preferred embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A vehicle service processing method, characterized in that: include: Obtaining a service request from a client, wherein the service request is used to request allocation of a vehicle application service to the client; Invoke a routing strategy to identify identification information in the service request, wherein the routing strategy is used to represent a rule for routing the service request, and the identification information is used to identify a service instance of the application service; In response to the identification information being grayscale identification information, determining a grayscale service instance corresponding to the grayscale identification information, wherein the grayscale service instance is used to represent a service instance of the application service to be released; The service request is routed to the grayscale service instance to publish the grayscale service instance to the client.
2. The method according to claim 1, characterized in that In response to the identification information being grayscale identification information, determining a grayscale service instance corresponding to the grayscale identification information includes: In response to the identification information being the grayscale identification information, calling an interceptor to add routing information to the service request; Determine the grayscale service instance pointed to by the routing information.
3. The method according to claim 2, characterized in that The routing information includes target address information, where the target address information is used to indicate the address of the grayscale service instance. In response to the identification information being the grayscale identification information, calling an interceptor to add routing information to the service request includes: In response to the identification information being the grayscale identification information, the interceptor is called to modify the initial address information in the service request to obtain the target address information.
4. The method according to claim 1, characterized in that Routing the service request to the grayscale service instance includes: Using the grayscale identification information to call a load balancing strategy, determine a performance indicator of the grayscale service instance, wherein the performance indicator is used to represent the performance status of the grayscale service instance; In response to the performance indicator satisfying a performance indicator threshold, routing the service request to the grayscale service instance.
5. The method according to claim 1, characterized in that Invoke the routing strategy to identify the identification information in the service request, including: The routing policy is called from a routing decision engine to identify the identification information in the service request, wherein the routing policy is set by the routing decision engine based on the grayscale configuration information of the application service, and the grayscale configuration information is used to represent the publishing rules of the grayscale service instance.
6. The method according to claim 5, characterized in that The method further comprises: In response to the information adjustment instruction, adjusting the grayscale configuration information; According to the adjusted grayscale configuration information, the routing decision engine is controlled to adjust the routing strategy.
7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: Monitoring the release process of the grayscale service instance to obtain a release index, wherein the release index is used to represent the performance of the grayscale service instance during the release process; Using the release indicator, adjusting the grayscale service instance, wherein the performance of the grayscale service instance after the adjustment is higher than the performance of the grayscale service instance before the adjustment; and / or, The method further includes: in response to the publishing indicator being lower than a publishing indicator threshold, routing the service request to a service instance in the application service that is in a normal state.
8. The method according to any one of claims 1 to 6, characterized in that The method further comprises: Determine a target authentication mode that matches the grayscale service instance among multiple authentication modes, wherein different authentication modes are used to represent rules for authenticating the publishing process of different service instances of the application service; According to the target authentication mode, the publishing process of the grayscale service instance is authenticated to obtain an authentication result.
9. A vehicle service processing system, characterized in that: include: A client, used to send a service request, wherein the service request is used to request allocation of a vehicle application service to the client of the server in the full link; The server is used to call a routing policy and identify identification information in the service request, wherein the routing policy is used to represent a rule for routing the service request, and the identification information is used to identify a service instance of the application service; in response to the identification information being grayscale identification information, determine a grayscale service instance corresponding to the grayscale identification information, wherein the grayscale service instance is used to represent a service instance of the application service to be published; and route the service request to the grayscale service instance to publish the grayscale service instance to the client.
10. A vehicle, characterized in that: include: A memory storing an executable program; A processor, configured to run the program, wherein the program executes the method according to any one of claims 1 to 8 when running.
Citation Information
Cited By
Multi-strategy flow distribution system and method
CN120746204A
Multi-strategy traffic allocation system and method
CN120746204B
Gray release device and method thereof
CN120849235A