Method for realizing reverse proxy of bank draft system and related device
By merging containers and configuring target Nginx mirrors in the investment bank draft system, the reverse proxy for WPS preview editing requests is realized, solving the problems of high system complexity and poor stability, and improving the overall stability of the investment bank draft system.
Patent Information
- Application Number
- CN202411383617.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-01-14
AI Technical Summary
There are two reverse agents in the investment bank's draft system, resulting in high complexity and poor stability of the system. It is necessary to merge and optimize to reduce complexity and improve stability.
Create a container for the development environment, integration environment and user experience environment on the K8S container cloud, and add its IP address to the cross-region whitelist of the investment bank's draft system, configure the Docker engine running environment, create a target Nginx image, and deploy it to the container In the cloud, the WPS cloud document is connected to the system to determine that the WPS access of the bank's intranet is forwarded by the preset port of the target Nginx container.
By integrating Nginx containers and unified WEB proxy rules, the target Nginx containers are used to realize reverse proxy for WPS preview editing requests and other requests from OA network users, reducing the complexity of the investment bank's draft system and improving the stability of the system .
Smart Images

Figure CN119316477A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of computer network proxy services, and in particular to a method and related apparatus for implementing a reverse proxy for an investment bank manuscript system. Background Art
[0002] The investment banking working papers system is an electronic management system for investment banking business working papers. The system is mainly used for electronic management of working papers generated during the investment banking project establishment, due diligence, issuance and underwriting, and subsequent management processes.
[0003] The application of the investment bank's manuscript system is deployed in the Internet APP area. OA network users (Office Automation users, users of office automation systems) use a unified WEB integration platform as a reverse proxy to forward business traffic to the backend application.
[0004] Bank staff often need to use WPS to preview and edit files stored in the investment bank's manuscript system. Currently, WPS preview and editing requests are forwarded to the WPS document center through the Nginx container. Therefore, in the bank's front-end office area, there are two reverse proxies: the Nginx container and the unified WEB integration platform. In order to reduce system complexity and improve system stability, it is necessary to merge and optimize the reverse proxies in the front-end office area of the investment bank's manuscript system. Summary of the invention
[0005] Based on the above problems, the present application provides a method for implementing the reverse proxy of the investment banking draft system, which merges the two reverse proxies in the bank's office front area in the traditional solution into a target Nginx container, and implements the reverse proxy through the target Nginx container, thereby reducing the complexity of the investment banking draft system and improving the stability of the investment banking draft system.
[0006] The embodiments of the present application disclose the following technical solutions:
[0007] The first aspect of the present application provides a method for implementing a reverse proxy for an investment bank manuscript system, comprising:
[0008] Create three containers on the K8S container cloud; the three containers include a container corresponding to the development environment, a container corresponding to the integration environment, and a container corresponding to the user experience environment;
[0009] Add the IP address of each container to the cross-region whitelist of the investment bank's manuscript system; and resolve the domain name of the WPS application to the IP address of each container;
[0010] Configure the Docker engine operating environment, and create a target Nginx image corresponding to the investment bank manuscript system based on the Docker engine operating environment;
[0011] Deploy the target Nginx image to the container of the K8S container cloud as the target Nginx container, and connect the WPS cloud document to the development environment, integration environment and user experience environment of the investment bank manuscript system;
[0012] Determine that the WPS access to the bank's intranet is forwarded by the preset port of the target Nginx container.
[0013] In an optional implementation, creating a target Nginx image corresponding to the investment bank manuscript system based on the Docker engine operating environment includes:
[0014] Get the Redhat7.9 image as the system image;
[0015] In the Docker engine operating environment, creating an initial Nginx image corresponding to the investment bank manuscript system based on the system image;
[0016] Verifying the initial Nginx image based on preset verification conditions;
[0017] If the initial Nginx image is verified, the initial Nginx image is used as the target Nginx image.
[0018] In an optional implementation, the verification condition includes a first verification condition, a second verification condition and a third verification condition; the first verification condition is that when the container corresponding to the initial Nginx image is started, the Nginx service starts automatically; the second verification condition is that the Reload operation of the Nginx service will not cause the container corresponding to the initial Nginx image to crash; the third verification condition is that when the Nginx service as the root process of the container is terminated, the container crashes, but the Nginx configuration is updated through the Reload operation to ensure the continuous operation of the container.
[0019] In an optional implementation, creating an initial Nginx image corresponding to the investment bank manuscript system based on the system image in the Docker engine operating environment includes:
[0020] Create a Dockerfile and set the Nginx service as the main process of the container;
[0021] Start the system image and obtain the initial Nginx file from the user experience environment;
[0022] Edit the initial Nginx file based on the configuration of the investment bank manuscript system to obtain a target Nginx file;
[0023] The target Nginx file is saved in the container to obtain the initial Nginx image.
[0024] A second aspect of the present application provides a device for implementing a reverse proxy for an investment bank manuscript system, the device comprising:
[0025] A container creation module is used to create three containers on the K8S container cloud; the three containers include a container corresponding to the development environment, a container corresponding to the integration environment, and a container corresponding to the user experience environment;
[0026] An information association module, used to add the IP address of each container to the cross-region whitelist of the investment bank manuscript system; and resolve the domain name of the WPS application to the IP address of each container;
[0027] An image creation module, used to configure the Docker engine operating environment, and create a target Nginx image corresponding to the investment bank manuscript system based on the Docker engine operating environment;
[0028] A container generation module, used to deploy the target Nginx image to the container of the K8S container cloud as the target Nginx container, and connect the WPS cloud document to the development environment, integration environment and user experience environment of the investment bank manuscript system;
[0029] The redirection module is used to ensure that the WPS access of the bank's intranet is forwarded by the preset port of the target Nginx container.
[0030] In an optional implementation, the image creation module includes:
[0031] The system image acquisition unit is used to acquire the Redhat7.9 image as the system image;
[0032] An initial image building unit, used to create an initial Nginx image corresponding to the investment bank manuscript system based on the system image in the Docker engine operating environment;
[0033] A verification unit, used to verify the initial Nginx image based on a preset verification condition;
[0034] The target image generation unit is used to use the initial Nginx image as the target Nginx image if the initial Nginx image is verified.
[0035] In an optional implementation, the initial image building unit includes:
[0036] The main process setting subunit is used to create a Dockerfile and set the Nginx service as the main process of the container;
[0037] An Nginx file extraction subunit is used to start the system image and obtain an initial Nginx file from a user experience environment;
[0038] An Nginx file editing subunit, configured to edit the initial Nginx file based on the configuration of the investment bank manuscript system to obtain a target Nginx file;
[0039] The initial image acquisition subunit is used to save the target Nginx file into a container to obtain the initial Nginx image.
[0040] A third aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method introduced in any implementation manner of the first aspect.
[0041] A fourth aspect of the present application provides an electronic device, including:
[0042] a memory having a computer program stored thereon;
[0043] A processor is used to execute the computer program in the memory to implement the steps of the method introduced in any implementation manner of the first aspect.
[0044] A fifth aspect of the present application provides a computer program product, including a computer program, characterized in that when the computer program is executed by a processor, the steps of any one of the methods described in the first aspect are implemented.
[0045] Compared with the prior art, this application has the following beneficial effects:
[0046] The present application discloses a method for realizing reverse proxy of an investment banking draft system, comprising: developing containers corresponding to an environment, an integration environment, and a user experience environment on a K8S container cloud; adding the IP address of each container to a cross-region whitelist of the investment banking draft system; and resolving the domain name of a WPS application to the IP address of each container; configuring a Docker engine operating environment, and creating a target Nginx image corresponding to the investment banking draft system based on the Docker engine operating environment; deploying the target Nginx image to the K8S container cloud as an Nginx container, and connecting the WPS cloud document to the development environment, integration environment, and user experience environment of the investment banking draft system; and ensuring that WPS access to the bank's intranet is forwarded by a preset port of the Nginx container.
[0047] In this way, by integrating the Nginx container in the traditional solution and the proxy rules of the unified WEB proxy platform into the target Nginx container, and using the target Nginx container to implement the reverse proxy method for WPS preview editing requests and other requests from OA network users, the complexity of the investment banking draft system is reduced and the stability of the investment banking draft system is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0049] Figure 1 A schematic diagram of a network architecture of an investment bank manuscript system office front area is provided for an embodiment of the present application;
[0050] Figure 2 A flowchart of a method for implementing a reverse proxy for an investment bank manuscript system provided in an embodiment of the present application;
[0051] Figure 3 A schematic diagram of a code for self-configuring a Docker engine operating environment provided in an embodiment of the present application;
[0052] Figure 4 A schematic diagram of a code for creating a target Nginx image corresponding to an investment bank draft system provided in an embodiment of the present application;
[0053] Figure 5 A schematic diagram of a code for deploying a target Nginx image to a K8S container cloud provided in an embodiment of the present application;
[0054] Figure 6 A schematic diagram of another network architecture of an investment bank manuscript system office front area is provided for the embodiment of the present application;
[0055] Figure 7 A schematic diagram of the structure of a device for implementing a reverse proxy for investment bank manuscripts provided in an embodiment of the present application. DETAILED DESCRIPTION
[0056] The investment banking working papers system is an electronic management system for investment banking business working papers. The system is mainly used for electronic management of working papers generated during the investment banking project establishment, due diligence, issuance and underwriting, and subsequent management processes.
[0057] Figure 1A schematic diagram of a network architecture of an investment bank manuscript system office front area is provided for an embodiment of the present application. The application program of the investment bank manuscript system is deployed in the Internet APP area. Figure 1 The network architectures of Region A and Region B are exactly the same. The same network architecture is deployed in two regions to prevent the computer room in one region from failing in the event of force majeure, while the computer room in the other region can still provide services. For ease of understanding, the network architecture in Region A is used to illustrate the relevant content.
[0058] Combination Figure 1 As shown in the figure, number 1 in area A is the unified WEB integration platform, and number 2 is the K8S container cloud. Bank staff often need to use WPS to preview and edit files stored in the investment bank's manuscript system. In order to be compatible with WPS, that is, to be able to respond to WPS preview and edit requests, Figure 1 In the example above, Nginx container is added to K8S container cloud. The WPS preview and editing request sent by OA network users is sent to container cloud. Nginx container in K8S container cloud acts as a reverse proxy to forward the request to WPS document middle platform to obtain file details. Other requests from OA network users are forwarded to the backend application through the unified WEB integration platform as a reverse proxy. Therefore, in the bank's front office area, there are two reverse proxies, Nginx container and unified WEB integration platform. In order to reduce system complexity and improve system stability, it is necessary to merge and optimize the reverse proxy in the front office area of the investment bank's manuscript system.
[0059] Based on the above problems, the present application discloses a method for realizing reverse proxy of investment bank draft system, including: developing containers corresponding to the environment, containers corresponding to the integration environment and containers corresponding to the user experience environment on K8S container cloud; adding the IP address of each container to the cross-region whitelist of the investment bank draft system; and resolving the domain name of the WPS application to the IP address of each container; configuring the Docker engine operating environment, and creating the target Nginx image corresponding to the investment bank draft system based on the Docker engine operating environment; deploying the target Nginx image to the K8S container cloud as an Nginx container, and connecting the WPS cloud document to the development environment, integration environment and user experience environment of the investment bank draft system; and determining that the WPS access of the bank's intranet is forwarded by the preset port of the Nginx container. In this way, by integrating the Nginx container in the traditional solution and the proxy rules of the unified WEB proxy platform into the target Nginx container, and using the target Nginx container to realize the reverse proxy method for WPS preview editing requests and other requests of OA network users, the complexity of the investment bank draft system is reduced and the stability of the investment bank draft system is improved.
[0060] To facilitate understanding of the technical solution of the present application, the technical terms in the present application are first explained.
[0061] The Internet APP zone refers to an area or platform dedicated to the deployment and provision of various application (APP) services in the Internet environment. These applications can include various types of software, such as financial services, social entertainment, online education, etc., which provide services to users through the Internet.
[0062] The WEB integration platform, also known as the unified WEB integration platform, is an enterprise-level solution based on WEB technology. It integrates multiple different WEB applications, services or systems into a unified interface to provide a more convenient and efficient user experience and management method.
[0063] Container technology is a lightweight virtualization technology that allows users to package applications and their dependencies into an independent, portable image and then run these applications in the container. Compared with traditional virtualization technologies (such as virtual machines), container technology has higher resource utilization, faster startup speed and better portability.
[0064] K8S Container Cloud is a containerized application management platform based on Kubernetes (K8S for short), which provides the ability to automatically deploy, scale and manage containerized applications. Currently, many cloud service providers provide platform services based on K8S Container Cloud, including but not limited to Alibaba Cloud Container Service ACK (Alibaba Cloud Container Service for Kubernetes), Tencent Cloud Container Service TKE (Tencent Kubernetes Engine) and Huawei Cloud Container Service CCE (Cloud Container Engine).
[0065] Nginx container refers to packaging the Nginx server and its configuration, dependencies, etc. into an independent container image, and running an instance of the Nginx service in the container. By deploying Nginx in a container, you can easily implement load balancing, SSL termination, caching and other functions, while supporting multiple protocols (such as HTTP, HTTPS, WebSocket, etc.) and complex routing rules.
[0066] 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 only 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.
[0067] Figure 2 A flowchart of a method for implementing a reverse proxy for an investment bank manuscript system provided in an embodiment of the present application. Figure 2 As shown, the method for implementing the reverse proxy of the investment bank manuscript system disclosed in the present application includes:
[0068] S201, create three containers on the K8S container cloud; the three containers include a container corresponding to the development environment, a container corresponding to the integration environment, and a container corresponding to the user experience environment.
[0069] Each container has corresponding hardware resources and IP addresses.
[0070] It is understandable that different K8S container cloud service platforms have different methods for creating containers. Those skilled in the art can refer to the instructions for using the specific K8S container cloud service platform, such as the instructions for using Alibaba Cloud Container Service ACK and Tencent Cloud Container Service TKE, to build containers corresponding to the development environment, the integration environment, and the user experience environment in this step.
[0071] S202, adding the IP address of each container to the cross-region whitelist of the investment bank's manuscript system; and resolving the domain name of the WPS application to the IP address of each container.
[0072] Since investment bank draft systems usually contain sensitive business data, financial information and other important materials, in order to prevent unauthorized IP addresses from accessing the investment bank draft system, the system is configured with a whitelist mechanism. Only IP addresses included in the whitelist are considered feasible and verified IP addresses that can access the investment bank draft system.
[0073] In order to establish a connection between each container in the K8S container and the investment banking draft system, the IP address of each container in S201 is added to the cross-regional whitelist of the investment banking draft system in this application. Specifically, the IP address of each container is added to the cross-regional whitelist corresponding to the integrated environment of the investment banking draft system and the cross-regional whitelist corresponding to the user experience environment.
[0074] After adding the IP address of each container to the cross-region whitelist of the investment bank's draft system, the domain name of the WPS application needs to be resolved to the IP address of each container.
[0075] Exemplarily, you can initiate a service and add the following domain name; and resolve the domain name of the WPS application to the IP address of each container through the local Hosts file.
[0076] The code and newly added domain name are as follows:
[0077] #Edit the local hosts file
[0078] C:\Windows\System32\drivers\etc\hosts
[0079] 12.99.250.41ibdmoadev.nb.cn
[0080] 12.99.250.41app.ibdmoadev.nb
[0081] 12.99.250.41ibdmoasit.nb.cn
[0082] 12.99.250.41app.ibdmoasit.nb
[0083] 12.103.83.220ibdmoauat.nb.cn
[0084] 12.103.83.220app.ibdmoauat.nb
[0085] S203, configuring the Docker engine operating environment, and creating a target Nginx image corresponding to the investment bank manuscript system based on the Docker engine operating environment.
[0086] It should be noted that you can directly obtain Docker version 20 or later and configure the Docker engine operating environment; you can also configure the Docker engine operating environment yourself.
[0087] For ease of understanding, in this application Figure 3 A code example of configuring the Docker engine operating environment by yourself is given in Figure 3 As shown in the figure, the process of configuring the Docker engine operating environment by yourself can be summarized as follows: apply for a Redhat 7.9 server on the cloud server management platform; upload the Docker manual installation package to the data directory; create a Docker service; start the Docker service and set it to start automatically at boot.
[0088] After configuring the Docker engine operating environment, you can create a target Nginx image corresponding to the investment bank draft system based on the Docker engine operating environment. Figure 4 A schematic diagram of a code for creating a target Nginx image corresponding to an investment bank draft system provided in an embodiment of the present application. Figure 4 (a) is the code for creating the initial Nginx image; Figure 4 (b) optimizes and conditions the initial Nginx image code to obtain the target Nginx image code. Figure 4 As shown, the process includes the following steps:
[0089] The first step is to obtain the Redhat7.9 image as the system image.
[0090] You can go to the official Red Hat website, select "RHEL" (Red Hat Enterprise Linux) as the product, and search for version 7.9; after confirming the system version (such as 7.9) and architecture (such as x86_64), download the corresponding ISO image file as the system image.
[0091] The second step is to create an initial Nginx image corresponding to the investment bank manuscript system based on the system image in the Docker engine running environment.
[0092] The process of creating the initial Nginx image is: create a Dockerfile and set the Nginx service as the main process of the container; start the system image and obtain the initial Nginx file from the user experience environment; edit the initial Nginx file based on the configuration of the investment bank's draft system, that is, delete the useless content of the initial Nginx, and merge the Nginx image in the traditional solution and the proxy rules of the unified WEB integration platform into the initial Nginx file to obtain the target Nginx file; save the target Nginx file in the container to obtain the initial Nginx image.
[0093] The third step is to verify the initial Nginx image based on the preset verification conditions; if the initial Nginx image is verified, the initial Nginx image is used as the target Nginx image.
[0094] The verification conditions include the first verification condition, the second verification condition and the third verification condition. The first verification condition is that when the container corresponding to the initial Nginx image is started, the Nginx service starts automatically; the second verification condition is that the Reload operation of the Nginx service will not cause the container corresponding to the initial Nginx image to crash; the third verification condition is that when the Nginx service as the root process of the container is terminated, the container crashes, but the Nginx configuration is updated through the Reload operation to ensure that the container continues to run.
[0095] S204, deploy the target Nginx image to the container of the K8S container cloud as the target Nginx container, and connect the WPS cloud document to the development environment, integration environment and user experience environment of the investment bank draft system.
[0096] Figure 5 A schematic diagram of a code for deploying a target Nginx image to a K8S container cloud provided in an embodiment of the present application. Figure 5As shown, you can choose to manually package or push the image to deploy the target Nginx image to the K8S container cloud. Specifically, after the K8S container cloud, such as Huawei Cloud Container Service CCE, select the target Nginx image (ibdm-nginx:v0.3 image) and set the load balancing method, add ports, log in to the container cloud console and verify the Nginx service, and finally obtain the target Nginx container.
[0097] After obtaining the target Nginx container, connect the WPS cloud document to the development environment, integration environment, and user experience environment of the investment bank's draft system.
[0098] S205, determining that the WPS access to the bank's intranet is forwarded by the preset port of the target Nginx container.
[0099] In this application, port 80 is used as the default port. Intranet WPS access will be redirected to Nginx container cloud port 80 forwarding.
[0100] Figure 6 A schematic diagram of an optimized network architecture of an investment bank manuscript system front-office area for use with the method disclosed in this application. Figure 6 The target Nginx container in the K8S container cloud with sequence number 1 is a container obtained by merging the Nginx container in the traditional solution and the proxy rules of the unified WEB proxy platform. Through the target Nginx container in the K8S container cloud, the WPS preview editing request of the OA network user and other requests other than this request can be reverse proxied, which reduces the complexity of the investment bank's manuscript system and improves the stability of the investment bank's manuscript system.
[0101] In summary, the present application discloses a method for realizing reverse proxy of investment bank draft system, including: developing containers corresponding to the environment, containers corresponding to the integration environment and containers corresponding to the user experience environment on K8S container cloud; adding the IP address of each container to the cross-region whitelist of the investment bank draft system; and resolving the domain name of the WPS application to the IP address of each container; configuring the Docker engine operating environment, and creating the target Nginx image corresponding to the investment bank draft system based on the Docker engine operating environment; deploying the target Nginx image to the K8S container cloud as an Nginx container, and connecting the WPS cloud document to the development environment, integration environment and user experience environment of the investment bank draft system; and determining that the WPS access of the bank's intranet is forwarded by the preset port of the Nginx container. In this way, by integrating the Nginx container in the traditional solution and the proxy rules of the unified WEB proxy platform into the target Nginx container, and using the target Nginx container to realize the reverse proxy method for WPS preview editing requests and other requests of OA network users, the complexity of the investment bank draft system is reduced and the stability of the investment bank draft system is improved.
[0102] Furthermore, the present application also discloses a device for implementing a reverse proxy for an investment bank manuscript system. Figure 7 A schematic diagram of the structure of a device for implementing a reverse proxy for investment bank manuscripts provided in an embodiment of the present application. Figure 7 As shown, the device 700 for implementing the reverse proxy of investment bank manuscripts in the present application includes:
[0103] The container creation module 701 is used to create three containers on the K8S container cloud; the three containers include a container corresponding to the development environment, a container corresponding to the integration environment, and a container corresponding to the user experience environment;
[0104] The information association module 702 is used to add the IP address of each container to the cross-region whitelist of the investment bank manuscript system; and resolve the domain name of the WPS application to the IP address of each container;
[0105] An image creation module 703 is used to configure a Docker engine operating environment and create a target Nginx image corresponding to the investment bank manuscript system based on the Docker engine operating environment;
[0106] The container generation module 704 is used to deploy the target Nginx image to the container of the K8S container cloud as the target Nginx container, and connect the WPS cloud document to the development environment, integration environment and user experience environment of the investment bank manuscript system;
[0107] The redirection module 705 is used to determine that the WPS access of the bank's intranet is forwarded by the preset port of the target Nginx container.
[0108] In an optional implementation, the image creation module 703 includes:
[0109] The system image acquisition unit is used to acquire the Redhat7.9 image as the system image;
[0110] An initial image building unit, used to create an initial Nginx image corresponding to the investment bank manuscript system based on the system image in the Docker engine operating environment;
[0111] A verification unit, used to verify the initial Nginx image based on a preset verification condition;
[0112] The target image generation unit is used to use the initial Nginx image as the target Nginx image if the initial Nginx image is verified.
[0113] In an optional implementation, the initial image building unit includes:
[0114] The main process setting subunit is used to create a Dockerfile and set the Nginx service as the main process of the container;
[0115] An Nginx file extraction subunit is used to start the system image and obtain an initial Nginx file from a user experience environment;
[0116] An Nginx file editing subunit, configured to edit the initial Nginx file based on the configuration of the investment bank manuscript system to obtain a target Nginx file;
[0117] The initial image acquisition subunit is used to save the target Nginx file into a container to obtain the initial Nginx image.
[0118] Based on the method and device for implementing the reverse proxy of the investment banking manuscript system provided in the aforementioned embodiments, the present application also provides a computer-readable storage medium on which a computer program is stored, which, when executed by a processor, implements some or all of the steps in the method for implementing the reverse proxy of the investment banking manuscript system mentioned above.
[0119] Based on the method and device for implementing the reverse proxy of the investment bank manuscript system provided in the above embodiments, the present application further provides an electronic device, including:
[0120] a memory having a computer program stored thereon;
[0121] A processor is used to execute the computer program in the memory to implement part or all of the steps in the method for implementing the reverse proxy of the investment bank manuscript system provided in the above embodiment.
[0122] Based on the method and device for implementing the reverse proxy of the investment banking manuscript system provided in the aforementioned embodiments, the present application also provides a computer program product, including a computer program, characterized in that when the computer program is executed by a processor, it implements part or all of the steps in the method for implementing the reverse proxy of the investment banking manuscript system.
[0123] It should be noted that each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device embodiment described above is merely schematic, in which the unit described as a separate component may or may not be physically separated, and the component prompted as a unit may or may not be a physical unit, that is, it may be located in one place, or it may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative work.
[0124] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for implementing a reverse proxy for an investment bank manuscript system, characterized in that: The method comprises: Create three containers on the K8S container cloud; the three containers include a container corresponding to the development environment, a container corresponding to the integration environment, and a container corresponding to the user experience environment; Add the IP address of each container to the cross-region whitelist of the investment bank's manuscript system; and resolve the domain name of the WPS application to the IP address of each container; Configure the Docker engine operating environment, and create a target Nginx image corresponding to the investment bank manuscript system based on the Docker engine operating environment; Deploy the target Nginx image to the container of the K8S container cloud as the target Nginx container, and connect the WPS cloud document to the development environment, integration environment and user experience environment of the investment bank manuscript system; Determine that the WPS access to the bank's intranet is forwarded by the preset port of the target Nginx container.
2. The method according to claim 1, characterized in that The step of creating a target Nginx image corresponding to the investment bank manuscript system based on the Docker engine operating environment includes: Get the Redhat7.9 image as the system image; In the Docker engine operating environment, creating an initial Nginx image corresponding to the investment bank manuscript system based on the system image; Verifying the initial Nginx image based on preset verification conditions; If the initial Nginx image is verified, the initial Nginx image is used as the target Nginx image.
3. The method according to claim 2, characterized in that The verification conditions include a first verification condition, a second verification condition and a third verification condition; the first verification condition is that when the container corresponding to the initial Nginx image is started, the Nginx service starts automatically; the second verification condition is that the Reload operation of the Nginx service will not cause the container corresponding to the initial Nginx image to crash; the third verification condition is that when the Nginx service as the root process of the container is terminated, the container crashes, but the Nginx configuration is updated through the Reload operation to ensure the continuous operation of the container.
4. The method according to claim 2, characterized in that: The step of creating an initial Nginx image corresponding to the investment bank manuscript system based on the system image in the Docker engine operating environment includes: Create a Dockerfile and set the Nginx service as the main process of the container; Start the system image and obtain the initial Nginx file from the user experience environment; Edit the initial Nginx file based on the configuration of the investment bank manuscript system to obtain a target Nginx file; The target Nginx file is saved in the container to obtain the initial Nginx image.
5. A device for implementing a reverse proxy for an investment bank manuscript system, characterized in that: The device comprises: A container creation module is used to create three containers on the K8S container cloud; the three containers include a container corresponding to the development environment, a container corresponding to the integration environment, and a container corresponding to the user experience environment; An information association module, used to add the IP address of each container to the cross-region whitelist of the investment bank manuscript system; and resolve the domain name of the WPS application to the IP address of each container; An image creation module, used to configure the Docker engine operating environment, and create a target Nginx image corresponding to the investment bank manuscript system based on the Docker engine operating environment; A container generation module, used to deploy the target Nginx image to the container of the K8S container cloud as the target Nginx container, and connect the WPS cloud document to the development environment, integration environment and user experience environment of the investment bank manuscript system; The redirection module is used to ensure that the WPS access of the bank's intranet is forwarded by the preset port of the target Nginx container.
6. The device according to claim 5, characterized in that The image creation module includes: The system image acquisition unit is used to acquire the Redhat7.9 image as the system image; An initial image building unit, used to create an initial Nginx image corresponding to the investment bank manuscript system based on the system image in the Docker engine operating environment; A verification unit, used to verify the initial Nginx image based on a preset verification condition; The target image generation unit is used to use the initial Nginx image as the target Nginx image if the initial Nginx image is verified.
7. The method according to claim 6, characterized in that The initial image building unit includes: The main process setting subunit is used to create a Dockerfile and set the Nginx service as the main process of the container; An Nginx file extraction subunit is used to start the system image and obtain an initial Nginx file from a user experience environment; An Nginx file editing subunit, configured to edit the initial Nginx file based on the configuration of the investment bank manuscript system to obtain a target Nginx file; The initial image acquisition subunit is used to save the target Nginx file into a container to obtain the initial Nginx image.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method described in any one of claims 1 to 4 are implemented.
9. An electronic device, characterized in that: include: a memory having a computer program stored thereon; A processor, configured to execute the computer program in the memory to implement the steps of the method according to any one of claims 1 to 4.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.