Three-party joint debugging method and device under multiple environments, computer equipment and storage medium
By creating multiple service test environments in multiple environments and using proxy gateways and load balancers for request routing, the problem of inefficient three-party joint debugging is solved, and a fast switching and efficient test process is realized, reducing operation and maintenance costs and labor Error rate.
Patent Information
- Application Number
- CN202411148826.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2024-12-31
AI Technical Summary
In the process of three-party joint coordination in multiple environments, the existing technology has problems such as inefficiency, difficulty in coordination, high switching costs and high manual operation error rates, resulting in hindering the promotion of business processes and low testing efficiency.
By creating multiple business test environments and configuring the server entrance node to the proxy gateway, using load balancers and unified domain name public network to receive requests, and forwarding the requests to the corresponding test environment or third-party joint commissioning combined with preset request forwarding rules Address, realizes flexible routing and fast switching of requests, reducing the coordination needs of external systems.
It improves the efficiency of three-party joint coordination in multiple environments, reduces the coordination and configuration switching workload with external systems, speeds up the test cycle, reduces operation and maintenance costs and manual error rates, and ensures the stability and isolation of the test environment.
Smart Images

Figure CN119232793A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and in particular to a three-party joint debugging method, device, computer equipment and storage medium in multiple environments. Background Art
[0002] When developing a business system that involves external third-party system calls, such as Alipay, WeChat, third-party banks and insurance companies, and external institutions, a large amount of joint debugging and testing is often required to ensure the correctness of the business process and the consistency of business data.
[0003] There are a large number of parallel demand development scenarios in banking or insurance business systems. Team members usually develop and test simultaneously according to the granularity and independence of requirements. Therefore, a single business system needs to be supported by multiple test environments to ensure the overall throughput rate and online delivery efficiency of the requirements. However, external systems usually only open one test environment for debugging, which leads to problems such as difficulty in coordinating multiple environments when debugging with external systems and high switching costs.
[0004] Two methods are usually used. One is to manually arrange priorities according to importance and urgency. Urgent and important requirements that require external joint debugging are arranged in the main environment, and other joint debugging requirements are queued and blocked. Requirements that do not require joint debugging can be developed in parallel using a non-joint debugging test environment. This method requires additional manual scheduling costs, and pipeline switching and data maintenance require a large number of additional operations, which can easily become a bottleneck for project advancement and affect the team's demand throughput.
[0005] Second, the operation and maintenance personnel need to connect multiple environments to the third-party joint debugging environment through network operations, including domain name mapping, firewall activation, IP whitelist addition, etc. At the same time, when switching environments, they need to notify the external third-party systems to synchronize configuration switching to achieve multi-environment joint debugging. This method requires a lot of network and configuration changes, and requires coordination with external staff for synchronous configuration during switching. There are huge communication costs and manual operation error rates, which seriously affect delivery efficiency.
[0006] Therefore, how to solve the problem of low efficiency of three-party joint debugging in multiple environments has become a technical problem that needs to be solved urgently. Summary of the invention
[0007] The present application provides a three-party joint debugging method, apparatus, computer equipment and storage medium in multiple environments, aiming to improve the efficiency of three-party joint debugging in multiple environments.
[0008] In a first aspect, the present application provides a three-party joint debugging method in multiple environments, and the three-party joint debugging method in multiple environments comprises the following steps:
[0009] Based on the business testing requirements, create at least one business testing environment, and configure the server entry node of each business environment to the proxy gateway;
[0010] Based on the unified domain name public network bound to the load balancer, receiving the service request initiated by the service party, and forwarding the service request to the proxy gateway;
[0011] Based on the proxy gateway and preset request forwarding rules, the business request is forwarded to the business test environment and / or a third-party joint debugging address to obtain request response data.
[0012] In a second aspect, the present application further provides a three-party joint debugging device in multiple environments, and the three-party joint debugging device in multiple environments includes:
[0013] An environment creation module, used to create at least one set of business test environments based on business test requirements, and configure the server entry nodes of each of the business environments to the proxy gateway;
[0014] A service request receiving module, used to receive a service request initiated by a service party based on a unified domain name public network bound to a load balancer, and forward the service request to the proxy gateway;
[0015] The business joint debugging module is used to forward the business request to the business test environment and / or the third-party joint debugging address based on the proxy gateway and the preset request forwarding rules to obtain the request response data.
[0016] In a third aspect, the present application also provides a computer device, comprising a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the three-party joint debugging method under multiple environments as described above are implemented.
[0017] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, wherein when the computer program is executed by a processor, the steps of the three-party joint debugging method under multiple environments as described above are implemented.
[0018] The present application provides a three-party joint debugging method, device, computer equipment and storage medium in multiple environments. The method of the present application includes creating at least one set of business test environments based on business testing requirements, and configuring the server entry nodes of each of the business environments to a proxy gateway; receiving business requests initiated by the business party based on a unified domain name public network bound to a load balancer, and forwarding the business requests to the proxy gateway; based on the proxy gateway and a preset request forwarding rule, forwarding the business request to the business test environment and / or a third-party joint debugging address to obtain request response data. Through the above method, this application creates multiple independent business test environments according to business test requirements, which can ensure the isolation between different test requirements and realize the reuse of environmental resources; using a unified domain name public network as the access point for business requests makes the initiation of business requests more convenient; the load balancer can effectively distribute requests to different business test environments to improve processing capabilities and stability; the proxy gateway, combined with preset request forwarding rules, can flexibly route requests to different business test environments or third-party joint debugging addresses to adapt to different test scenarios. Since requests can be quickly switched between different test environments, the workload of coordinating configuration switching with external systems is reduced, the test cycle is accelerated, and the test efficiency is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0020] Figure 1 A flowchart of a first embodiment of a three-party joint debugging method in multiple environments provided by the present application;
[0021] Figure 2 A schematic diagram of the structure of a three-party joint debugging and adaptation system for multiple environments provided in an embodiment of the present application;
[0022] Figure 3 A flowchart of a second embodiment of a three-party joint debugging method in multiple environments provided by the present application;
[0023] Figure 4 It is a structural schematic diagram of a first embodiment of a three-party joint debugging device under multiple environments provided by the present application;
[0024] Figure 5 It is a schematic block diagram of the structure of a computer device provided in an embodiment of the present application.
[0025] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0026] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0027] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.
[0028] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0029] Please refer to Figure 1 , Figure 1 A flowchart of a first embodiment of a three-party joint debugging method under multiple environments provided by the present application.
[0030] like Figure 1 As shown, the three-party joint debugging method under multiple environments includes steps S101 to S103.
[0031] S101. Based on the business test requirements, create at least one business test environment, and configure the server entry node of each business environment to the proxy gateway;
[0032] In one embodiment, if Figure 2 As shown, the present application provides a three-party joint debugging and adaptation system for multiple environments, the components and modules of the system include but are not limited to the entry-side public network F5, the proxy service entry, the Mock server, the console and the proxy server exit.
[0033] Among them, the entrance side public network F5: bind the public network IP, and use the hardware load balancing device to forward the public network request to the "proxy service entrance".
[0034] Proxy service entry: A proxy gateway component that can configure routing policies. Currently, Kong gateway is used as the traffic entry proxy, which can import traffic into different test environments or mock servers according to the rules.
[0035] Mock server: As a mock component for external debugging, it can return preset response data based on request characteristics.
[0036] Console: The management console for proxy ingress and egress, mainly used to control traffic forwarding rules, maintain Mock rules and response data.
[0037] Proxy service export: a unified export for external calls in multiple environments. It also uses a gateway component with configurable routing to import traffic to a mock server or external third-party system according to the source request characteristics.
[0038] The three-party joint debugging and adaptation system for multiple environments provided in the embodiment of the present application can eliminate the project management and coordination costs brought about by demand orchestration, while reducing the operating costs and error rates of infrastructure and network configuration, and can also achieve solution transparency for third parties.
[0039] In one embodiment, when building the above-mentioned three-party joint debugging and adaptation system for multiple environments, F5 hardware load balancing, entry / exit proxy gateways, consoles and mock servers are built in sequence, and multiple business test environments are built according to the needs of the business party, and the server entry nodes of the multiple business environments are configured to the proxy gateway for receiving requests.
[0040] In one embodiment, the specific construction process of the three-party joint debugging and adaptation system for multiple environments described in the embodiment of the present application includes an overview of: configuring the F5 hardware load balancer and binding it to the public network IP; building the Kong gateway as the proxy service entrance and proxy service exit; configuring the management console for subsequent traffic management and rule configuration; deploying a Mock server to simulate the response of external services.
[0041] In one embodiment, after the components and modules of the three-party joint debugging and adaptation system for multiple environments are deployed, you can also: apply for a unified business domain name and configure it as the request domain name of the three-party system; point the domain name to the CDN node through DNS resolution, and then return the source from CDN to the F5 public network address; configure traffic forwarding rules in the management console, including matching rules for request path, source, HOST, Header, Cookie and other features; configure the joint debugging environment according to business needs, and configure the server entry node of the business environment to the proxy gateway; configure the request forwarding rules in the console to facilitate forwarding the request to the corresponding test environment or Mock server according to business needs; maintain the Mock rules and preset response data in the console to ensure that the Mock server can return the correct simulation response.
[0042] In one embodiment, request forwarding rules can be pre-configured through the console according to the needs of the business party, for example, business requests are uniformly forwarded to a certain business test environment or a mock server.
[0043] In one embodiment, F5 is a high-performance hardware load balancing device with the following features: capable of handling large-scale network traffic and providing efficient request distribution capabilities; supporting SSL encryption and decryption to ensure the security of data transmission; having advanced traffic management functions, including but not limited to intelligent DNS resolution, global server load balancing, etc.; and configurable public IP to realize the reception and forwarding of public network requests.
[0044] In one embodiment, a mock server is a software component used to simulate the response of an external service or API, and its features include: being able to return simulated response data based on preset request characteristics to support the development and testing process; supporting dynamic configuration of response data to adapt to different testing requirements and scenarios; being able to record request logs to provide developers with a basis for debugging and optimizing APIs.
[0045] In one embodiment, the business test environment is a test platform designed to simulate real business operations. Each business test environment may include: a set of servers that simulate real business scenarios for performing functional testing, integration testing, and performance testing; a configured database system for storing and managing test data and simulating database operations; a simulated user interface that allows testers to perform user operations and interactions to verify system behavior; a real-time monitoring system for monitoring the status, performance, and resource usage of the test environment; and automated testing tools and frameworks for automatically executing test scripts and generating test reports.
[0046] In one embodiment, after the establishment of a three-party joint debugging and adaptation system for multiple environments, a joint debugging test can be performed, and a request is sent through the proxy service entrance. According to the configured rules, the request is forwarded to the corresponding test environment or Mock server. Testers can monitor the routing and response of the request through the console to ensure the correctness of the joint debugging. When the business system needs to make an external request, the request is proxied through the export traffic gateway and forwarded to the Mock server for joint debugging testing according to the configured routing rules, or forwarded to an external three-party address. After the three-party service responds, the traffic returns to the request initiator through the original path.
[0047] In one embodiment, the operation and maintenance personnel can complete the switching process of multiple environments through the console, and notify the business party or third-party system to perform corresponding environment switching as needed.
[0048] In one embodiment, during the entire joint debugging test process, traffic and response data can be monitored and optimized according to the test results and business requirements. All configurations and changes during the joint debugging test process are recorded to ensure that there is complete documentation to support subsequent maintenance and troubleshooting.
[0049] In this embodiment, in the entire process, the third-party system no longer needs to perceive multiple internal environments, but the operation and maintenance personnel perform unified environment switching. When the networks and traffic gateways under multiple environments are in different areas, they only need to be connected internally once. If they are in the same area, there is no need to connect the network. The entire process only requires the configuration of the public IP whitelist on the F5 or third-party entrance side, without the need for additional firewall configuration. The operation and maintenance can complete the switching of multiple environments only through the console. From the perspective of project management, there is no need to perform special processing on external joint debugging requirements. Only the operation and maintenance can be notified to switch the joint debugging environment as needed. At the same time, if the environment that has not been jointly debugged needs to be debugged externally, it can also be simulated through Mock, which will not block the business process.
[0050] S102, receiving a service request initiated by a service party based on the unified domain name public network bound to the load balancer, and forwarding the service request to the proxy gateway;
[0051] In one embodiment, a unified business domain name can be applied as the request domain name of the third-party system. The multiple business test environments created in the embodiment of the present application can use the same public domain name. Therefore, the business test environment is transparent to the third-party system. The request is resolved to the CDN (Content Delivery Network) node through the DNS (Domain Name System) and returned to the F5 public network address. The F5 load balancer proxies the traffic to the inlet proxy gateway.
[0052] DNS is a global, distributed database system that converts human-readable domain names (such as www.example.com) into machine-readable IP addresses (such as 192.0.2.1). When a user enters a URL in a browser, the DNS resolution process first searches the local cache. If it cannot find the URL, it will send a query request to the DNS server and finally obtain the IP address corresponding to the domain name.
[0053] Among them, CDN node CDN is a distributed network system composed of server nodes distributed around the world. Its purpose is to improve content loading speed and reliability by caching content on servers closer to users. When a user requests a website or resource, CDN redirects the request to the nearest server node, thereby reducing data transmission delays and bandwidth consumption.
[0054] In this embodiment, DNS is used to resolve the unified business domain name to the CDN node, and the CDN node then returns the request to the F5 public network address. In this way, CDN can improve access speed and user experience, while the F5 load balancer can distribute traffic to the correct destination based on request characteristics, whether it is the actual business environment or the Mock server. This configuration helps to improve the scalability and flexibility of the system, while ensuring the transparency of the three-party system to the business test environment.
[0055] S103: Based on the proxy gateway and preset request forwarding rules, forward the service request to the service test environment and / or a third-party joint debugging address to obtain request response data.
[0056] In one embodiment, the request forwarding rules include but are not limited to one or more of routing rules based on request path, routing rules based on request source, routing rules based on request HOST, routing rules based on request Header, and routing rules based on request Cookie.
[0057] In one embodiment, the proxy gateway may include, but is not limited to, an ingress proxy gateway and an egress proxy gateway.
[0058] In one embodiment, the third-party joint debugging system includes a Mock server and / or an external third-party address.
[0059] Furthermore, based on the ingress proxy gateway and the request forwarding rule, the business request is forwarded to the business test environment or the Mock server to obtain the request response data.
[0060] In one embodiment, the entry proxy gateway performs request forwarding processing according to preset forwarding rules. For the Kong gateway, it can support routing according to request path, request source, request HOST, request Header, request Cookie, etc., and can forward business requests to a specific business environment or directly to the Mock server, and provide support for third-party Mock debugging according to preset response messages.
[0061] Furthermore, when the service request is an external demand request, based on the export proxy gateway and the request forwarding rule, the service request is forwarded to the third-party joint debugging address or the Mock server to obtain the request response data.
[0062] In one embodiment, when the business system needs to make an external request, the business request is uniformly passed through the export proxy gateway. The export proxy gateway decides to transfer the business request to the mock server for joint debugging mock testing or forward it to an external third-party address based on the export request routing rule configuration. After the third-party service responds, it can return along the original path.
[0063] In the three-party joint debugging and adaptation system for multiple environments provided by this embodiment, the third party is unaware of multiple business test environments, and the environment switching eliminates the cost of cross-institutional communication and collaboration, greatly reduces the workload of operation and maintenance, improves the efficiency of environment delivery, and reduces the rate of manual errors. The multi-environment switching can be completed through the console only after the internal system is connected to the network, saving the IP whitelist management, firewall activation, F5 hardware equipment application, network connectivity verification, etc. with the three-party system; by providing the Mock server forwarding capability, Mock processing can be performed on internal / external requests, which greatly facilitates the scenario where one party fails to complete the blocking of the other party during business joint debugging, improves the efficiency and quality of joint debugging, and at the same time, when the two parties are conducting internal stress testing, it will not affect their respective systems, ensuring the stability of the test environment.
[0064] This embodiment provides a three-party joint debugging method under multiple environments. The method of this application creates multiple independent business test environments according to business test requirements, which can ensure isolation between different test requirements and realize the reuse of environmental resources; using a unified domain name public network as an access point for business requests makes it more convenient to initiate business requests; the load balancer can effectively distribute requests to different business test environments to improve processing capabilities and stability; the proxy gateway can flexibly route requests to different business test environments or third-party joint debugging addresses in combination with preset request forwarding rules to adapt to different test scenarios. Since requests can be quickly switched between different test environments, the workload of coordinating configuration switching with external systems is reduced, the test cycle is accelerated, and the test efficiency is improved.
[0065] Please refer to Figure 3 , Figure 3 A flowchart of a second embodiment of a three-party joint debugging method under multiple environments provided by the present application.
[0066] In this embodiment, Figure 3 As shown, based on the above Figure 1 In the illustrated embodiment, after step S103, steps S201 to S203 are also included.
[0067] S201, based on a preset collection cycle, obtaining three-party joint debugging log data;
[0068] In one embodiment, the collection frequency and collection period of log data can be set according to user needs as a preset collection period, such as collecting once every 12 hours, once every other day, or once a week / month.
[0069] In one embodiment, the logs of each module and component in the three-party joint debugging and adaptation system for multiple environments, such as API interface, Mock server, proxy gateway, etc., can be recorded separately; the logs of the entire system can also be recorded.
[0070] In one embodiment, the three-party joint debugging log data may include information such as the request time, request ID, interface call address, request parameters, service type, response status, etc. of the service request.
[0071] S202: Based on a preset anomaly detection mechanism, detect whether there is abnormal joint debugging data in the three-party joint debugging log data;
[0072] In one embodiment, based on historical data in related technologies, it is possible to filter out log data under what circumstances will be regarded as abnormal joint debugging data, such as a sudden increase in error rate, excessively long response time, failed API calls, etc., and then set an abnormality detection mechanism based on possible abnormal joint debugging data, such as: setting a response time length threshold, setting an error rate threshold, etc.
[0073] In one embodiment, anomaly detection thresholds, anomaly data types, anomaly nodes, etc. may be constructed into a table or the like as an anomaly detection mechanism.
[0074] In one embodiment, key feature data, such as request frequency, error code, response time, etc., are screened from the three-party joint debugging log data, and then the key feature data are matched and screened through an abnormal detection mechanism. According to the thresholds of different abnormal joint debugging data types, when the key feature data in the three-party joint debugging log data exceeds the preset threshold, an abnormal alarm can be triggered to determine that there is abnormal joint debugging data in the three-party joint debugging log data.
[0075] S203: When the abnormal joint debugging data exists in the three-party joint debugging log data, generate an abnormal optimization plan based on the abnormal joint debugging data.
[0076] In one embodiment, all logs and monitoring information related to abnormal joint debugging data may be collected, including but not limited to time, frequency, etc.
[0077] Furthermore, based on a preset abnormality analysis table, the abnormal joint debugging data is matched and analyzed to determine abnormal nodes and abnormal causes; based on the abnormal nodes and the abnormal causes, the abnormal optimization plan is generated.
[0078] In one embodiment, an exception analysis table may be constructed based on historical exception data. The exception analysis table may include exception type, exception node, exception cause, exception data range, exception solution, etc.
[0079] In one embodiment, according to the data type and data node of the abnormal joint debugging data, the corresponding abnormal type is searched in the abnormal analysis table, and the abnormal node (such as a specific API, service module or component, etc.) and the abnormal cause of the abnormal joint debugging data are analyzed. Then, according to the abnormal node and the abnormal cause, the corresponding abnormal solution is found, so as to optimize and adjust the system according to the abnormal solution.
[0080] In one embodiment, an optimization plan may be formulated based on the cause of the exception and the impact assessment, including code repair, configuration adjustment, resource increase, etc.
[0081] Optionally, the generated optimization plan can be evaluated based on the professional knowledge of the relevant maintenance personnel to ensure its feasibility and effectiveness. Then, the optimization plan is deployed to the test environment to verify its effect, and the optimization plan is thoroughly tested in the test environment to ensure that it can solve the abnormal problem.
[0082] In one embodiment, after the optimization solution is implemented in the production environment, the logs and system performance can be continuously monitored to verify the optimization effect, and abnormal events, analysis processes and optimization solutions can be recorded to provide reference for subsequent abnormality handling.
[0083] This embodiment reduces the risk of system failures and interruptions and enhances overall stability through real-time monitoring and rapid response to anomalies; anomaly detection helps to promptly discover and correct data errors or inconsistencies, ensuring data accuracy and reliability.
[0084] See also Figure 4 , Figure 4 It is a structural schematic diagram of a first embodiment of a three-party joint debugging device under multiple environments provided by the present application. The three-party joint debugging device under multiple environments is used to execute the aforementioned three-party joint debugging method under multiple environments.
[0085] like Figure 4 As shown, the three-party joint debugging device 300 under multiple environments includes: an environment creation module 301, a business request receiving module 302 and a business joint debugging module 303.
[0086] The environment creation module 301 is used to create at least one set of business test environments based on business test requirements, and configure the server entry nodes of each business environment to the proxy gateway;
[0087] The service request receiving module 302 is used to receive the service request initiated by the service party based on the unified domain name public network bound to the load balancer, and forward the service request to the proxy gateway;
[0088] The business joint debugging module 303 is used to forward the business request to the business test environment and / or the third-party joint debugging address based on the proxy gateway and the preset request forwarding rule to obtain the request response data.
[0089] In one embodiment, the third-party joint debugging system includes a Mock server and / or an external third-party address.
[0090] In one embodiment, the proxy gateway comprises an ingress proxy gateway;
[0091] The business joint debugging module 303 includes:
[0092] The first business joint debugging unit is used to forward the business request to the business test environment or the Mock server based on the entry proxy gateway and the request forwarding rule to obtain the request response data.
[0093] In one embodiment, the proxy gateway comprises an egress proxy gateway;
[0094] The business joint debugging module 303 further includes:
[0095] The second business joint debugging unit is used to forward the business request to the third-party joint debugging address or the Mock server based on the export proxy gateway and the request forwarding rule when the business request is an external demand request, and obtain the request response data.
[0096] In one embodiment, the request forwarding rules include one or more of routing rules based on request paths, routing rules based on request sources, routing rules based on request hosts, routing rules based on request headers, and routing rules based on request cookies.
[0097] In one embodiment, the three-party joint debugging device 300 under multiple environments further includes a system optimization module, including:
[0098] A log data acquisition unit, used to acquire the three-party joint debugging log data based on a preset collection period;
[0099] An anomaly detection unit, used to detect whether there is abnormal joint debugging data in the three-party joint debugging log data based on a preset anomaly detection mechanism;
[0100] The abnormal optimization unit is used to generate an abnormal optimization plan based on the abnormal joint debugging data when the abnormal joint debugging data exists in the three-party joint debugging log data.
[0101] In one embodiment, the abnormal optimization unit includes:
[0102] The abnormality locating subunit is used to perform abnormal matching and analysis on the abnormal joint debugging data based on a preset abnormality analysis table to determine the abnormal node and the abnormal cause;
[0103] The optimization solution generating subunit is used to generate the abnormal optimization solution based on the abnormal node and the abnormal cause.
[0104] It should be noted that technical personnel in the relevant field can clearly understand that, for the convenience and conciseness of description, the specific working process of the above-described device and each module can refer to the corresponding process in the aforementioned three-party joint debugging method embodiment under multiple environments, and will not be repeated here.
[0105] The apparatus provided in the above embodiment may be implemented in the form of a computer program. The computer program may be Figure 5 Runs on the computer device shown.
[0106] See also Figure 5 , Figure 5 1 is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device may be a server.
[0107] See also Figure 5 The computer device includes a processor, a memory and a network interface connected through a system bus, wherein the memory may include a non-volatile storage medium and an internal memory.
[0108] The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute any three-party joint debugging method under multiple environments.
[0109] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.
[0110] The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor, the processor can execute any three-party joint debugging method under multiple environments.
[0111] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0112] It should be understood that the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0113] In one embodiment, the processor is used to run a computer program stored in the memory to implement the following steps:
[0114] Based on the business testing requirements, create at least one business testing environment, and configure the server entry node of each business environment to the proxy gateway;
[0115] Based on the unified domain name public network bound to the load balancer, receiving the service request initiated by the service party, and forwarding the service request to the proxy gateway;
[0116] Based on the proxy gateway and preset request forwarding rules, the business request is forwarded to the business test environment and / or a third-party joint debugging address to obtain request response data.
[0117] In one embodiment, the third-party joint debugging system includes a Mock server and / or an external third-party address.
[0118] In one embodiment, the proxy gateway comprises an ingress proxy gateway;
[0119] When the processor implements the forwarding of the service request to the service test environment and / or the third-party joint debugging address based on the proxy gateway and the preset request forwarding rule and obtains the request response data, it is used to implement:
[0120] Based on the ingress proxy gateway and the request forwarding rule, the business request is forwarded to the business test environment or the Mock server to obtain the request response data.
[0121] In one embodiment, the proxy gateway comprises an egress proxy gateway;
[0122] The processor implements the request forwarding rule based on the proxy gateway and the preset request forwarding rule, forwards the service request to the service test environment and / or the third-party joint debugging address, obtains the request response data, and is also used to implement:
[0123] When the service request is an external demand request, based on the export proxy gateway and the request forwarding rule, the service request is forwarded to the third-party joint debugging address or the Mock server to obtain the request response data.
[0124] In one embodiment, the request forwarding rules include one or more of routing rules based on request paths, routing rules based on request sources, routing rules based on request hosts, routing rules based on request headers, and routing rules based on request cookies.
[0125] In one embodiment, after implementing the request forwarding rule based on the proxy gateway and the preset request forwarding rule, forwarding the service request to the service test environment and / or the third-party joint debugging address, and obtaining the request response data, the processor is further used to implement:
[0126] Based on the preset collection cycle, obtain the three-party joint debugging log data;
[0127] Based on a preset anomaly detection mechanism, detect whether there is abnormal joint debugging data in the three-party joint debugging log data;
[0128] When the abnormal joint debugging data exists in the three-party joint debugging log data, an abnormal optimization plan is generated based on the abnormal joint debugging data.
[0129] In one embodiment, when the processor generates the abnormal optimization solution based on the abnormal joint debugging data, it is used to implement:
[0130] Based on the preset abnormal analysis table, the abnormal joint debugging data is matched and analyzed to determine the abnormal node and abnormal cause;
[0131] Based on the abnormal node and the abnormal cause, the abnormal optimization plan is generated.
[0132] A computer-readable storage medium is also provided in an embodiment of the present application, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and the processor executes the program instructions to implement any of the three-party joint debugging methods in multiple environments provided in the embodiments of the present application.
[0133] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc., equipped on the computer device.
[0134] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A three-party joint debugging method in multiple environments, characterized in that: The method comprises: Based on the business testing requirements, create at least one business testing environment, and configure the server entry node of each business environment to the proxy gateway; Based on the unified domain name public network bound to the load balancer, receiving the service request initiated by the service party, and forwarding the service request to the proxy gateway; Based on the proxy gateway and preset request forwarding rules, the business request is forwarded to the business test environment and / or a third-party joint debugging address to obtain request response data.
2. The three-party joint debugging method under multiple environments according to claim 1 is characterized in that: The third-party joint debugging system includes a Mock server and / or an external third-party address.
3. The three-party joint debugging method under multiple environments according to claim 2 is characterized in that: The proxy gateway comprises an entry proxy gateway; The process of forwarding the service request to the service test environment and / or a third-party joint debugging address based on the proxy gateway and a preset request forwarding rule to obtain request response data includes: Based on the ingress proxy gateway and the request forwarding rule, the business request is forwarded to the business test environment or the Mock server to obtain the request response data.
4. The three-party joint debugging method under multiple environments according to claim 2 is characterized in that: The proxy gateway includes an egress proxy gateway; The method of forwarding the service request to the service test environment and / or a third-party joint debugging address based on the proxy gateway and a preset request forwarding rule to obtain request response data also includes: When the service request is an external demand request, based on the export proxy gateway and the request forwarding rule, the service request is forwarded to the third-party joint debugging address or the Mock server to obtain the request response data.
5. The three-party joint debugging method under multiple environments according to claim 1 is characterized in that: The request forwarding rules include one or more of routing rules based on request path, routing rules based on request source, routing rules based on request HOST, routing rules based on request Header, and routing rules based on request Cookie.
6. The three-party joint debugging method under multiple environments according to claim 1 is characterized in that: The method further includes forwarding the service request to the service test environment and / or the third-party joint debugging address based on the proxy gateway and the preset request forwarding rule, and obtaining the request response data: Based on the preset collection cycle, obtain the three-party joint debugging log data; Based on a preset anomaly detection mechanism, detect whether there is abnormal joint debugging data in the three-party joint debugging log data; When the abnormal joint debugging data exists in the three-party joint debugging log data, an abnormal optimization plan is generated based on the abnormal joint debugging data.
7. The three-party joint debugging method under multiple environments according to claim 6 is characterized in that: The generating an abnormal optimization plan based on the abnormal joint debugging data includes: Based on the preset abnormal analysis table, the abnormal joint debugging data is matched and analyzed to determine the abnormal node and abnormal cause; Based on the abnormal node and the abnormal cause, the abnormal optimization plan is generated.
8. A three-party joint debugging device in multiple environments, characterized in that: The three-party joint debugging device under multiple environments includes: An environment creation module, used to create at least one set of business test environments based on business test requirements, and configure the server entry nodes of each of the business environments to the proxy gateway; A service request receiving module, used to receive a service request initiated by a service party based on a unified domain name public network bound to a load balancer, and forward the service request to the proxy gateway; The business joint debugging module is used to forward the business request to the business test environment and / or the third-party joint debugging address based on the proxy gateway and the preset request forwarding rules to obtain the request response data.
9. A computer device, characterized in that: The computer device includes a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the three-party joint debugging method under multiple environments as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the three-party joint debugging method under multiple environments as claimed in any one of claims 1 to 7 are implemented.
