WO2019019670A1 - Application accessing method and device, computer apparatus, and storage medium - Google Patents
Application accessing method and device, computer apparatus, and storage medium Download PDFInfo
- Publication number
- WO2019019670A1 WO2019019670A1 PCT/CN2018/079978 CN2018079978W WO2019019670A1 WO 2019019670 A1 WO2019019670 A1 WO 2019019670A1 CN 2018079978 W CN2018079978 W CN 2018079978W WO 2019019670 A1 WO2019019670 A1 WO 2019019670A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- application
- domain name
- address
- container
- extracted
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/60—Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/45—Network directories; Name-to-address mapping
- H04L61/4505—Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
- H04L61/4511—Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/50—Address allocation
- H04L61/5061—Pools of addresses
Definitions
- the present application relates to the field of communications technologies, and in particular, to an application access method, apparatus, computer device, and storage medium.
- Each application in the application container has a corresponding application address, and the user terminal can access an application in the application container according to the application address, so the user terminal must obtain an accurate application address, so as to implement the application in the application container. access.
- the application address is easily changed during the running process of the application, so that the user terminal cannot accurately obtain the application address, and the access efficiency to the application in the application container is reduced.
- an application access method, apparatus, computer device, and non-transitory computer readable storage medium are provided.
- An application access method, applied to a domain name resolution container includes:
- An application access device comprising:
- An access request receiving module configured to receive an application access request sent by the terminal
- the application address query module is configured to query, in the domain name resolution address pool, an application address corresponding to the extracted application domain name;
- the application address sending module is configured to send the queried application address to the terminal, so that the terminal obtains matching application data from the application container according to the queried application address.
- a computer device comprising a memory, a processor, and computer instructions stored on the memory and operative on the processor, the processor executing the computer instructions to:
- a non-transitory computer readable storage medium having stored thereon computer instructions that, when executed by a processor, implement the following steps:
- FIG. 1 is an application environment diagram of an application access method in accordance with one or more embodiments
- FIG. 2 is a structural block diagram of a server in an application access system in accordance with one or more embodiments
- FIG. 3 is a flow diagram of an application access method in accordance with one or more embodiments.
- FIG. 4 is a schematic flow chart of steps of obtaining an application domain name and an application address according to one or more embodiments
- FIG. 5 is a schematic flowchart of a step of updating an application address in a domain name resolution pool according to one or more embodiments
- FIG. 6 is a flow diagram showing the steps of monitoring an application container in accordance with one or more embodiments
- FIG. 7 is a structural block diagram of an application access device in accordance with one or more embodiments.
- FIG. 8 is a structural block diagram of an application access device in another embodiment
- Figure 9 is a block diagram showing the structure of an application access device in still another embodiment.
- FIG. 1 is an application environment diagram of an application access method in an embodiment.
- the application access method is applied to an application access system.
- the application access system includes a terminal 110 and a server 120.
- the terminal 110 is connected to the server 120 through a network.
- the server 120 may be a single server or a server cluster.
- the domain name resolution container 122 and the application container 124 are deployed on the server 120.
- the domain name resolution container 122 is configured to apply the domain name for parsing to obtain an application address corresponding to the application domain name, and the application container 124 can deploy at least one application and the application container deployed on the server 120. Can be one or more.
- the terminal 110 can access the domain name resolution container 122 through the server 120, and the terminal 110 can also access the application in the application container 124 through the server 120.
- the terminal 110 may be a fixed terminal or a mobile terminal, and the fixed terminal may specifically be at least one of a printer, a scanner, and a monitor, and the mobile terminal may specifically be at least one of a tablet computer, a smart phone, a personal data assistant, and a digital camera.
- the domain name resolution container is an application container configured with domain name resolution function; the application container is a virtual application container that can provide services of multiple applications, and the application container can be Docker.
- FIG. 2 is a schematic diagram showing the internal structure of the server 120 in the application access system of FIG. 1 in an embodiment.
- the server 120 includes a processor, memory, and network interface connected by a system bus.
- the processor of server 120 is used to provide computing and control capabilities to support the operation of the entire server 120, the memory for storing data, code instructions, etc., and the network interface for network communication with terminal 110.
- At least one computer instruction is stored on the memory, and the computer instruction can be executed by the processor to implement the application access method applicable to the server 120 provided in the embodiment of the present application.
- the memory may include a non-volatile computer readable storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
- a memory includes a non-transitory computer readable storage medium and an internal memory; the non-transitory computer readable storage medium stores an operating system and computer instructions executable by the processor to implement The above application access method; the internal memory provides a cached operating environment for an operating system and computer instructions in a non-transitory computer readable storage medium.
- FIG. 2 is only a schematic diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the server to which the solution of the present application is applied.
- the specific server may include More or fewer components are shown in Figure 2, or some components are combined, or have different component arrangements.
- an application access method is provided.
- the method is applied to the domain name resolution container 122 deployed on the server 120 for example, and specifically includes the following contents:
- a browser is installed in the terminal 110, and the user inputs the application domain name corresponding to the application to be accessed in the browser through the terminal 110.
- the terminal 110 acquires the application domain name input by the user, and generates an application access request according to the application domain name.
- the application access request may include at least one of the authentication information of the terminal 110, the terminal identifier, and the valid time.
- the terminal 110 transmits an application access request to the domain name resolution container 122 in the server 120.
- the domain name resolution container 122 receives the application access request transmitted by the terminal 110 through the server 120.
- the application domain name is the unique access identifier of the application on the Internet.
- an application is installed in the terminal 110.
- the terminal 110 acquires an application of the clicked application according to the triggered application access instruction when the application access instruction is triggered.
- the domain name generates an application access request according to the obtained application domain name.
- the domain name resolution container 122 parses the application access request and extracts the application domain name in the application access request by parsing.
- the application address is a virtual network address of an application deployed in an application container, and each application corresponds to at least one virtual network address.
- the domain name resolution container 122 is configured with a domain name resolution address pool, and the domain name resolution address pool includes an application domain name and an application address.
- the domain name resolution container 122 stores the application domain name and the application address in the domain name resolution address pool.
- the domain name resolution address pool may further include a container identifier, where the container identifier is a unique identifier of the application container deployed on the server 120, and the domain name resolution container 122 may further associate the container identifier with an application deployed in the application container corresponding to the container identifier.
- the application domain name corresponds to the storage.
- the domain name resolution container 122 After the domain name resolution container 122 extracts the application domain name, the application address corresponding to the extracted application domain name is queried in the domain name resolution address pool, and the queried application address is the application address corresponding to the application to be accessed.
- the domain name resolution container 122 extracts the terminal identifier in the application access request, and sends the queried application address to the terminal 110 corresponding to the application access request through the server 120 according to the terminal identifier. After receiving the application address queried by the domain name resolution container 122, the terminal 110 accesses the application in the application container according to the queried application address, and acquires corresponding application data. The terminal 110 displays the acquired application data in an application page.
- the domain name resolution container and the application container are obtained by configuring the Docker container. Docker is an open source, portable application container. Developers can package their applications or dependencies into Docker, provide application services to users through Docker, and deploy multiple applications in a Docker.
- the application access request sent by the terminal is received, and the domain name is resolved in the domain name resolution address pool according to the application domain name in the application access request, and the application address corresponding to the application domain name in the application access request is queried through the domain name resolution query.
- the queried application address is sent to the terminal, and the terminal can obtain matching application data from the application container according to the received application address, thereby implementing access to the application in the application container.
- the terminal In the process of accessing the application in the application container, the terminal only needs to obtain the application domain name of the application to be accessed, and the application domain name is fixed.
- the domain name resolution pool can resolve the application domain name to obtain an accurate application address, according to an accurate The application address can successfully access the application in the application container, which improves the access efficiency of the application in the application container.
- the method before S302, the method further includes the steps of: acquiring an application domain name and an application address, where the step specifically includes the following:
- multiple application containers are deployed on the server 120, and no at least one application is disposed in the no application container.
- the domain name resolution container 122 obtains an application deployment record of each application container, and extracts an application domain name and an application address corresponding to the application deployed in the application container from the application deployment record.
- the domain name resolution container 122 sends a snoop notification to each application container.
- the application container 124 extracts the container identifier of the domain name resolution container in the monitoring notification, and sends the application domain name and the application address corresponding to the deployed application to the domain name resolution container 122 according to the extracted container identifier.
- the domain name resolution container 122 after obtaining the application domain name and the application address corresponding to the application running in each application container, the domain name resolution container 122 obtains the container identifier of the application container matched by the running application, and the domain name resolution container 122 identifies the container identifier.
- the application domain name and application address are stored in the domain name resolution pool.
- the domain name resolution container 122 can store the container identifier, the application domain name, and the application address in the domain name resolution table in the domain name resolution pool.
- the domain name resolution container can obtain the application domain name and the application address corresponding to the application running in each application container, and store the obtained application domain name and application address in the domain name resolution pool to ensure the application domain name in the domain name resolution pool.
- the application address is accurate, so that the domain name resolution pool can accurately resolve the application domain name to obtain an accurate application address.
- the application access method specifically includes the step of updating an application address in the domain name resolution pool, and the step specifically includes the following content:
- the application container 124 after detecting the change of the application address corresponding to the running application, the application container 124 obtains the application domain name and the changed application address of the application, and generates an application address according to the obtained application domain name and the changed application address.
- the change notification the application container 124 sends the generated application address change notification to the domain name resolution container 122.
- the domain name resolution container 122 receives the application address change notification sent by the application container 124.
- the domain name resolution container 122 parses the received application address change notification, and extracts the application domain name and the application address in the application address change notification by parsing.
- the extracted application domain name is an application domain name corresponding to the application that has changed the application address, and the extracted application address is the changed application address.
- the domain name resolution container 122 queries the application address corresponding to the extracted application domain name in the domain name resolution pool, and replaces the queried application address with the changed application address, thereby updating the application address in the domain name resolution pool.
- the application address change notification sent by the application container is received, and the application domain name and the application address in the application address change notification are applied to the application address in the domain name resolution pool.
- the update is performed to ensure the accuracy of the application address in the domain name resolution pool, and the resolution accuracy of the domain name resolution pool for the application domain name is improved.
- the application access method specifically includes the step of monitoring an application container, and the step specifically includes the following:
- the domain name resolution container 122 listens for the presence or absence of a container operation event, which is an operational event triggered by the user operating through the terminal 110 to the application container on the server 120.
- the container operation event may be an operation event of deploying an application in an application container, or may be a time to delete an already deployed application in an application container, and the container operation event may also be to delete, enable, create, and pause the application container. At least one operation corresponds to an operational event.
- the domain name resolution container 122 parses the listened container operation event when the container operation event is intercepted, and parses the container operation type and the container identifier in the container operation event by parsing.
- the container operation type may include at least one of an application creation type, an application deletion, a container creation, a container enablement, a container deletion, and a container suspension operation.
- the extracted application container corresponding to the container identifier is the operation object of the container operation event.
- the domain name resolution container 122 stores an address pool update mode corresponding to the container operation type, and the address pool update mode includes at least one of address deletion, address addition, and address replacement. After the domain name parsing container 122 extracts the container operation type from the container operation event, the domain name retrieving container 122 queries the address pool update mode corresponding to the extracted container operation type.
- the domain name resolution container 122 obtains the application domain name and the application address to be added, and stores the application domain name and the application address to be added in the domain name resolution address pool. If the address pool update mode is the address deletion, the domain name resolution container 122 obtains the application domain name and the application address corresponding to the deleted application, and queries the obtained application domain name and application address in the domain name resolution address pool and deletes the application domain name and the application address. If the address pool update mode is address replacement, the domain name resolution container 122 obtains the application domain name and the changed application address corresponding to the application whose application address is changed, and queries the application address corresponding to the obtained application domain name in the domain name resolution address pool, and the query is performed. The applied application address is replaced with the changed application address.
- the address pool update mode corresponding to the container operation type is an address addition
- the domain name resolution container obtains an application domain name corresponding to the application running on the created or enabled container.
- the application address and the application address are stored in the domain name resolution address pool.
- the address pool corresponding to the container operation type is the address deletion mode
- the application domain name and the application address corresponding to the application on the container that is deleted or suspended are obtained, and the domain name resolution address is obtained. Delete the obtained application domain name and application address in the pool.
- the method further includes the steps of: recording an execution time of the container operation event; and generating a monitoring log according to the execution time of the record, the extracted container operation type, and the extracted container identifier.
- the domain name resolution container 122 records the execution time of the container operation event, and generates a listen log based on the execution time of the record, the extracted container operation type, and the extracted container identifier.
- the application container records the operation time of the corresponding container operation operation event, records the container operation type and operation information, and the application container sends the recorded operation time, the container operation type, the operation information, and the container identifier to the domain name resolution container. 122.
- the domain name resolution container 122 generates a monitoring log corresponding to the container identifier according to the operation time, the container operation type, the operation information, and the container identifier.
- the user with authority utilizes the terminal 110 to query the monitoring log through the server 120.
- the corresponding address pool update mode can be determined, and the domain name resolution address pool is updated according to the determined address pool update mode, so that the application domain name and the application address stored in the domain name resolution pool are successfully accessed.
- the application domain name and application address corresponding to the application improve the accuracy of the application domain name and the application address, thereby improving the access success rate of the application.
- FIGS. 3-6 are sequentially displayed as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Except as explicitly stated herein, the execution of these steps is not strictly limited, and the steps may be performed in other orders. Moreover, at least some of the steps in FIGS. 3-6 may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, these sub-steps or stages The order of execution is not necessarily performed sequentially, but may be performed alternately or alternately with at least a portion of other steps or sub-steps or stages of other steps.
- an application access device 700 is provided.
- the device specifically includes an access request receiving module 702 , an application domain name extraction module 704 , an application address query module 706 , and an application address sending module 708 .
- the access request receiving module 702 is configured to receive an application access request sent by the terminal.
- the application domain name extraction module 704 is configured to extract an application domain name in the application access request.
- the application address querying module 706 is configured to query, in the domain name resolution address pool, an application address corresponding to the extracted application domain name.
- the application address sending module 708 is configured to send the queried application address to the terminal, so that the terminal obtains the matched application data from the application container according to the queried application address.
- the application access request sent by the terminal is received, and the domain name is resolved in the domain name resolution address pool according to the application domain name in the application access request, and the application address corresponding to the application domain name in the application access request is queried through the domain name resolution query.
- the queried application address is sent to the terminal, and the terminal can obtain matching application data from the application container according to the received application address, thereby implementing access to the application in the application container.
- the terminal In the process of accessing the application in the application container, the terminal only needs to obtain the application domain name of the application to be accessed, and the application domain name is fixed.
- the domain name resolution pool can resolve the application domain name to obtain an accurate application address, according to an accurate The application address can successfully access the application in the application container, which improves the access efficiency of the application in the application container.
- the application access device 700 further includes an application address obtaining module 710 , an application address storage module 712 , a change notification receiving module 714 , a domain name address extraction module 716 , and an application address update module 718 .
- the application address obtaining module 710 is configured to obtain an application domain name and an application address corresponding to the application running in each application container.
- the application address storage module 712 is configured to store the obtained application domain name and application address in the domain name resolution pool.
- the change notification receiving module 714 is configured to receive an application address change notification sent by the application container.
- the domain name address extraction module 716 is configured to extract an application domain name and an application address in the application address change notification.
- the application address update module 718 is configured to update an application address corresponding to the extracted application domain name in the domain name resolution pool according to the extracted application address.
- the application address change notification sent by the application container is received, and the application domain name and the application address in the application address change notification are applied to the application address in the domain name resolution pool.
- the update is performed to ensure the accuracy of the application address in the domain name resolution pool, and the resolution accuracy of the domain name resolution pool for the application domain name is improved.
- the application access device 700 specifically includes a snoop log generation module.
- the listener log generation module is used to record the execution time of the container operation event; the listener log is generated according to the execution time of the record, the extracted container operation type, and the extracted container identifier.
- the application access device 700 specifically includes an operation instruction monitoring module 720 , an operation instruction analysis module 722 , an update mode determination module 724 , and an address pool update module 726 .
- the operation instruction monitoring module 720 is configured to monitor a container operation event.
- the operation instruction parsing module 722 is configured to extract the container operation type and the container identifier in the monitored container operation event.
- the update mode determining module 724 is configured to determine an address pool update mode according to the extracted container operation type.
- the address pool update module 726 is configured to update the application domain name and the application address in the domain name resolution address pool according to the determined address pool update manner.
- the corresponding address pool update mode can be determined, and the domain name resolution address pool is updated according to the determined address pool update mode, so that the application domain name and the application address stored in the domain name resolution pool are successfully accessed.
- the application domain name and application address corresponding to the application improve the accuracy of the application domain name and the application address, thereby improving the access success rate of the application.
- the various modules in the application access device described above may be implemented in whole or in part by software, hardware, and combinations thereof.
- the network interface may be an Ethernet card or a wireless network card.
- the above modules may be embedded in the hardware in the terminal or in the memory in the terminal, or may be stored in the memory in the terminal in a software form, so that the processor calls the execution of the operations corresponding to the above modules.
- the processor can be a central processing unit (CPU), a microprocessor, a microcontroller, or the like.
- a computer device comprising a memory, a processor, and computer instructions stored on the memory and operable on the processor, the processor executing the computer instructions to: receive an application access request sent by the terminal; and extract an application access request
- the application domain name in the domain name resolution address pool is searched for the application address corresponding to the extracted application domain name; the queried application address is sent to the terminal, so that the terminal obtains the matched application data from the application container according to the queried application address.
- the method before receiving the application access request sent by the terminal, the method further includes: acquiring an application domain name and an application address corresponding to the application running in each application container; and storing the obtained application domain name and the application address in the domain name resolution pool. in.
- the processor further implements the following steps: receiving an application address change notification sent by the application container; extracting an application domain name and an application address in the application address change notification; and updating the domain name resolution pool according to the extracted application address.
- the application address corresponding to the extracted application domain name.
- the processor further implements the following steps: listening for a container operation event; extracting a container operation type and a container identifier in the monitored container operation event; and determining an address pool update manner according to the extracted container operation type. Update the application domain name and application address in the domain name resolution address pool according to the determined address pool update mode.
- the method further includes: recording an execution time of the container operation event; according to the execution time of the record, the extracted container operation type, and the extracted The container ID generates a listening log.
- the application access request sent by the terminal is received, and the domain name is resolved in the domain name resolution address pool according to the application domain name in the application access request, and the application address corresponding to the application domain name in the application access request is queried through the domain name resolution query.
- the queried application address is sent to the terminal, and the terminal can obtain matching application data from the application container according to the received application address, thereby implementing access to the application in the application container.
- the terminal In the process of accessing the application in the application container, the terminal only needs to obtain the application domain name of the application to be accessed, and the application domain name is fixed.
- the domain name resolution pool can resolve the application domain name to obtain an accurate application address, according to an accurate The application address can successfully access the application in the application container, which improves the access efficiency of the application in the application container.
- a non-transitory computer readable storage medium having stored thereon computer instructions, the computer instructions being executed by a processor to: receive an application access request sent by a terminal; extract an application domain name in an application access request; The application address corresponding to the extracted application domain name is queried in the domain name resolution address pool; the queried application address is sent to the terminal, so that the terminal obtains the matched application data from the application container according to the queried application address.
- the method before receiving the application access request sent by the terminal, the method further includes: acquiring an application domain name and an application address corresponding to the application running in each application container; and storing the obtained application domain name and the application address in the domain name resolution pool. in.
- the processor further performs the steps of: receiving an application address change notification sent by the application container; extracting an application domain name and an application address in the application address change notification; and updating the domain name resolution pool according to the extracted application address and extracting The application address corresponding to the application domain name.
- the processor further performs the steps of: listening for a container operation event; extracting a container operation type and a container identifier in the monitored container operation event; determining an address pool update manner according to the extracted container operation type; The address pool update mode updates the application domain name and application address in the domain name resolution address pool.
- the method further includes: recording an execution time of the container operation event; according to the execution time of the record, the extracted container operation type, and the extracted The container ID generates a listening log.
- the application access request sent by the terminal is received, and the domain name is resolved in the domain name resolution address pool according to the application domain name in the application access request, and the application address corresponding to the application domain name in the application access request is queried through the domain name resolution query.
- the queried application address is sent to the terminal, and the terminal can obtain matching application data from the application container according to the received application address, thereby implementing access to the application in the application container.
- the terminal In the process of accessing the application in the application container, the terminal only needs to obtain the application domain name of the application to be accessed, and the application domain name is fixed.
- the domain name resolution pool can resolve the application domain name to obtain an accurate application address, according to an accurate The application address can successfully access the application in the application container, which improves the access efficiency of the application in the application container.
- the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or the like.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Stored Programmes (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
一种应用访问方法,所述方法包括:接收终端发送的应用访问请求;提取应用访问请求中的应用域名;在域名解析地址池中查询与提取到的应用域名对应的应用地址;将查询到的应用地址发送至终端,使终端根据查询到的应用地址从应用容器中获取匹配的应用数据。An application access method, the method includes: receiving an application access request sent by the terminal; extracting an application domain name in the application access request; and querying, in the domain name resolution address pool, an application address corresponding to the extracted application domain name; The application address is sent to the terminal, so that the terminal obtains matching application data from the application container according to the queried application address.
Description
本申请要求于2017年7月24日提交中国专利局、申请号为2017106080605、发明名称为“应用访问方法、装置、计算机设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese Patent Application, filed on July 24, 2017, filed on Jan. In this application.
本申请涉及通信技术领域,特别是涉及一种应用访问方法、装置、计算机设备和存储介质。The present application relates to the field of communications technologies, and in particular, to an application access method, apparatus, computer device, and storage medium.
随着通信技术和计算机技术的发展,各种新型的应用技术层出不穷,其中应用容器的出现为通信技术和计算机技术发展的产物。With the development of communication technology and computer technology, various new application technologies emerge one after another, among which the emergence of application containers is the product of the development of communication technology and computer technology.
在应用容器中可以部署多个应用,用户终端可以对应用容器中部署的应用进行访问。在应用容器中每个应用都有对应的应用地址,用户终端根据应用地址可以实现对应用容器中某个应用的访问,故用户终端必须获取准确的应用地址,才能实现对应用容器中的应用进行访问。而应用地址在应用的运行过程中容易改变,使得用户终端不能够准确获取到的应用地址,降低了对应用容器中应用的访问效率。Multiple applications can be deployed in the application container, and the user terminal can access the applications deployed in the application container. Each application in the application container has a corresponding application address, and the user terminal can access an application in the application container according to the application address, so the user terminal must obtain an accurate application address, so as to implement the application in the application container. access. The application address is easily changed during the running process of the application, so that the user terminal cannot accurately obtain the application address, and the access efficiency to the application in the application container is reduced.
发明内容Summary of the invention
根据本申请的各种实施例,提供一种应用访问方法、装置、计算机设备和非易失性计算机可读存储介质。According to various embodiments of the present application, an application access method, apparatus, computer device, and non-transitory computer readable storage medium are provided.
一种应用访问方法,应用于域名解析容器,包括:An application access method, applied to a domain name resolution container, includes:
接收终端发送的应用访问请求;Receiving an application access request sent by the terminal;
提取所述应用访问请求中的应用域名;Extracting an application domain name in the application access request;
在域名解析地址池中查询与提取到的应用域名对应的应用地址;及Query the application address corresponding to the extracted application domain name in the domain name resolution address pool; and
将查询到的应用地址发送至所述终端,使所述终端根据所述查询到的应用地址从应用容器中获取匹配的应用数据。Sending the queried application address to the terminal, so that the terminal acquires matching application data from the application container according to the queried application address.
一种应用访问装置,包括:An application access device comprising:
访问请求接收模块,用于接收终端发送的应用访问请求;An access request receiving module, configured to receive an application access request sent by the terminal;
应用域名提取模块,用于提取所述应用访问请求中的应用域名;Applying a domain name extraction module, configured to extract an application domain name in the application access request;
应用地址查询模块,用于在域名解析地址池中查询与提取到的应用域名对应的应用地址;及The application address query module is configured to query, in the domain name resolution address pool, an application address corresponding to the extracted application domain name; and
应用地址发送模块,用于将查询到的应用地址发送至所述终端,使所述终端根据所述 查询到的应用地址从应用容器中获取匹配的应用数据。The application address sending module is configured to send the queried application address to the terminal, so that the terminal obtains matching application data from the application container according to the queried application address.
一种计算机设备,所述计算机设备包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机指令,所述处理器执行所述计算机指令时实现以下步骤:A computer device comprising a memory, a processor, and computer instructions stored on the memory and operative on the processor, the processor executing the computer instructions to:
接收终端发送的应用访问请求;Receiving an application access request sent by the terminal;
提取所述应用访问请求中的应用域名;Extracting an application domain name in the application access request;
在域名解析地址池中查询与提取到的应用域名对应的应用地址;及Query the application address corresponding to the extracted application domain name in the domain name resolution address pool; and
将查询到的应用地址发送至所述终端,使所述终端根据所述查询到的应用地址从应用容器中获取匹配的应用数据。Sending the queried application address to the terminal, so that the terminal acquires matching application data from the application container according to the queried application address.
一种非易失性计算机可读存储介质,其上存储有计算机指令,所述计算机指令被处理器执行时实现以下步骤:A non-transitory computer readable storage medium having stored thereon computer instructions that, when executed by a processor, implement the following steps:
接收终端发送的应用访问请求;Receiving an application access request sent by the terminal;
提取所述应用访问请求中的应用域名;Extracting an application domain name in the application access request;
在域名解析地址池中查询与提取到的应用域名对应的应用地址;及Query the application address corresponding to the extracted application domain name in the domain name resolution address pool; and
将查询到的应用地址发送至所述终端,使所述终端根据所述查询到的应用地址从应用容器中获取匹配的应用数据。Sending the queried application address to the terminal, so that the terminal acquires matching application data from the application container according to the queried application address.
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征、目的和优点将从说明书、附图以及权利要求书变得明显。Details of one or more embodiments of the present application are set forth in the accompanying drawings and description below. Other features, objects, and advantages of the invention will be apparent from the description and appended claims.
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the embodiments or the prior art description will be briefly described below. Obviously, the drawings in the following description are only It is a certain embodiment of the present application, and other drawings can be obtained according to the drawings without any creative work for those skilled in the art.
图1为根据一个或多个实施例中应用访问方法的应用环境图;1 is an application environment diagram of an application access method in accordance with one or more embodiments;
图2为根据一个或多个实施例中应用访问系统中的服务器的结构框图;2 is a structural block diagram of a server in an application access system in accordance with one or more embodiments;
图3为根据一个或多个实施例中应用访问方法的流程示意图;3 is a flow diagram of an application access method in accordance with one or more embodiments;
图4为根据一个或多个实施例中获取应用域名和应用地址的步骤的流程示意图;4 is a schematic flow chart of steps of obtaining an application domain name and an application address according to one or more embodiments;
图5为根据一个或多个实施例中更新域名解析池中应用地址的步骤的流程示意图;FIG. 5 is a schematic flowchart of a step of updating an application address in a domain name resolution pool according to one or more embodiments;
图6为根据一个或多个实施例中对应用容器进行监控的步骤的流程示意图;6 is a flow diagram showing the steps of monitoring an application container in accordance with one or more embodiments;
图7为根据一个或多个实施例中应用访问装置的结构框图;7 is a structural block diagram of an application access device in accordance with one or more embodiments;
图8为另一个实施例中应用访问装置的结构框图;8 is a structural block diagram of an application access device in another embodiment;
图9为再一个实施例中应用访问装置的结构框图。Figure 9 is a block diagram showing the structure of an application access device in still another embodiment.
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the objects, technical solutions, and advantages of the present application more comprehensible, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the application and are not intended to be limiting.
图1为一个实施例中应用访问方法的应用环境图。参照图1,该应用访问方法应用于应用访问系统。应用访问系统包括终端110和服务器120,终端110通过网络与服务器120连接,服务器120可以是单个服务器,也可以是服务器集群。服务器120上部署有域名解析容器122和应用容器124,域名解析容器122用于应用域名进行解析得到应用域名对应的应用地址,应用容器124中可部署至少一个应用,部署在服务器120上的应用容器可以是一个或多个。终端110通过服务器120可以访问域名解析容器122,终端110通过服务器120还可以访问应用容器124中的应用。终端110可以是固定终端或移动终端,固定终端具体可以是打印机、扫描仪和监控器中的至少一种,移动终端具体可以是平板电脑、智能手机、个人数据助理和数码相机中的至少一种。域名解析容器为配置有域名解析功能的应用容器;应用容器为可以提供多个应用的服务的虚拟应用容器,应用容器可以是Docker。FIG. 1 is an application environment diagram of an application access method in an embodiment. Referring to Figure 1, the application access method is applied to an application access system. The application access system includes a
图2为一个实施例中图1应用访问系统中的服务器120的内部结构示意图。如图2所示,该服务器120包括通过系统总线连接的处理器、存储器和网络接口。服务器120的处理器用于提供计算和控制能力,支撑整个服务器120的运行,存储器用于存储数据、代码指令等,网络接口用于与终端110进行网络通信。存储器上存储有至少一个计算机指令,该计算机指令可被处理器执行,以实现本申请实施例中提供的适用于服务器120的应用访问方法。存储器可包括磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等非易失性计算机可读存储介质,或随机存储记忆体(Random Access Memory,RAM)等。例如,在一些实施例中,存储器包括非易失性计算机可读存储介质及内存储器;非易失性计算机可读存储介质存储有操作系统和计算机指令,该计算机指令可被处理器执行以实现上述的应用访问方法;内存储器为非易失性计算机可读存储介质中的操作系统及计算机指令提供高速缓存的运行环境。FIG. 2 is a schematic diagram showing the internal structure of the server 120 in the application access system of FIG. 1 in an embodiment. As shown in FIG. 2, the server 120 includes a processor, memory, and network interface connected by a system bus. The processor of server 120 is used to provide computing and control capabilities to support the operation of the entire server 120, the memory for storing data, code instructions, etc., and the network interface for network communication with
本领域技术人员可以理解,图2中示出的结构,仅仅是与本申请方案相关的部分结构的示意图,并不构成对本申请方案所应用于其上的服务器的限定,具体的服务器可以包括比图2中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。It will be understood by those skilled in the art that the structure shown in FIG. 2 is only a schematic diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the server to which the solution of the present application is applied. The specific server may include More or fewer components are shown in Figure 2, or some components are combined, or have different component arrangements.
如图3所示,在一些实施例中,提供一种应用访问方法,本实施例以该方法应用于部署在服务器120上的域名解析容器122上来举例说明,具体包括以下内容:As shown in FIG. 3, in some embodiments, an application access method is provided. The method is applied to the domain
S302,接收终端发送的应用访问请求。S302. Receive an application access request sent by the terminal.
在一些实施例中,终端110中安装有浏览器,用户通过终端110在浏览器中输入所要访问的应用所对应的应用域名。终端110在检测到用户通过输入设备触发的应用访问指令时,获取用户输入的应用域名,根据应用域名生成应用访问请求。应用访问请求中可以包 括终端110的身份验证信息、终端标识和有效时间中的至少一种。终端110将应用访问请求发送至服务器120中的域名解析容器122。域名解析容器122通过服务器120接收终端110发送的应用访问请求。应用域名为应用在互联网中的唯一访问标识。In some embodiments, a browser is installed in the terminal 110, and the user inputs the application domain name corresponding to the application to be accessed in the browser through the terminal 110. When detecting the application access instruction triggered by the user through the input device, the terminal 110 acquires the application domain name input by the user, and generates an application access request according to the application domain name. The application access request may include at least one of the authentication information of the terminal 110, the terminal identifier, and the valid time. The terminal 110 transmits an application access request to the domain
在一些实施例中,终端110中安装有应用,终端110在检测到用户通过输入设备点击终端110中安装的应用时,则触发应用访问指令时,根据触发的应用访问指令获取所点击应用的应用域名,根据获取到的应用域名生成应用访问请求。In some embodiments, an application is installed in the
S304,提取应用访问请求中的应用域名。S304. Extract an application domain name in the application access request.
在一些实施例中,域名解析容器122在接收到应用访问请求后,对应用访问请求进行解析,通过解析提取应用访问请求中的应用域名。In some embodiments, after receiving the application access request, the domain
S306,在域名解析地址池中查询与提取到的应用域名对应的应用地址。S306. Query, in the domain name resolution address pool, an application address corresponding to the extracted application domain name.
在一些实施例中,应用地址为部署在应用容器中的应用所虚拟的网络地址,每个应用对应至少一个虚拟的网络地址。域名解析容器122中设置有域名解析地址池,域名解析地址池中包括应用域名和应用地址。域名解析容器122将应用域名和应用地址对应存储在域名解析地址池中。域名解析地址池中还可以包括容器标识,容器标识为部署在服务器120上的应用容器的唯一标识,域名解析容器122还可以将容器标识与部署在容器标识对应的应用容器中的应用所对应的应用域名对应存储。In some embodiments, the application address is a virtual network address of an application deployed in an application container, and each application corresponds to at least one virtual network address. The domain
域名解析容器122在提取到应用域名后,在域名解析地址池中查询与提取到的应用域名对应的应用地址,查询到的应用地址为所要访问的应用所对应的应用地址。After the domain
S308,将查询到的应用地址发送至终端,使终端根据查询到的应用地址从应用容器中获取匹配的应用数据。S308. Send the queried application address to the terminal, so that the terminal obtains the matched application data from the application container according to the queried application address.
在一些实施例中,域名解析容器122提取应用访问请求中的终端标识,根据终端标识将查询到的应用地址通过服务器120发送至应用访问请求所对应的终端110。终端110在接收到域名解析容器122查询到的应用地址后,根据查询到的应用地址访问应用容器中的应用,并获取相应的应用数据。终端110在应用页面中展示获取到的应用数据。其中,域名解析容器和应用容器通过对Docker容器配置得到的。Docker为一种开源的可移植的应用容器,开发者可以打包其开发的应用或依赖包到Docker中,通过Docker向用户提供应用服务,一个Docker中可以布置多个应用。In some embodiments, the domain
本实施例中,接收到终端发送的应用访问请求,根据应用访问请求中的应用域名在域名解析地址池中进行域名解析,通过域名解析查询与应用访问请求中的应用域名对应的应用地址,将查询到的应用地址发送至终端,终端根据接收到的应用地址可从应用容器中获取匹配的应用数据,从而实现对应用容器中应用的访问。在对应用容器中应用的访问过程中,终端只需获取要访问应用的应用域名,应用域名为固定不变的,通过域名解析池对应用域名的解析即可得到准确的应用地址,根据准确的应用地址可成功访问应用容器中应用,从而提高了对应用容器中应用的访问效率。In this embodiment, the application access request sent by the terminal is received, and the domain name is resolved in the domain name resolution address pool according to the application domain name in the application access request, and the application address corresponding to the application domain name in the application access request is queried through the domain name resolution query. The queried application address is sent to the terminal, and the terminal can obtain matching application data from the application container according to the received application address, thereby implementing access to the application in the application container. In the process of accessing the application in the application container, the terminal only needs to obtain the application domain name of the application to be accessed, and the application domain name is fixed. The domain name resolution pool can resolve the application domain name to obtain an accurate application address, according to an accurate The application address can successfully access the application in the application container, which improves the access efficiency of the application in the application container.
如图4所示,在一些实施例中,S302之前具体还包括获取应用域名和应用地址的步 骤,该步骤具体包括以下内容:As shown in FIG. 4, in some embodiments, before S302, the method further includes the steps of: acquiring an application domain name and an application address, where the step specifically includes the following:
S402,获取各应用容器中运行的应用所对应的应用域名和应用地址。S402. Acquire an application domain name and an application address corresponding to an application running in each application container.
在一些实施例中,服务器120上部署了多个应用容器,没有应用容器中都设置有至少一个应用。域名解析容器122获取每个应用容器的应用部署记录,从应用部署记录中提取部署在该应用容器中的应用所对应的应用域名和应用地址。In some embodiments, multiple application containers are deployed on the server 120, and no at least one application is disposed in the no application container. The domain
在一些实施例中,域名解析容器122向各应用容器发送监听通知。应用容器124在接收到监听通知后,提取监听通知中域名解析容器的容器标识,根据提取到的容器标识,将已经部署的应用所对应的应用域名和应用地址发送至域名解析容器122。In some embodiments, the domain
S404,将获取到的应用域名和应用地址对应存储到域名解析池中。S404: The obtained application domain name and the application address are correspondingly stored in the domain name resolution pool.
在一些实施例中,域名解析容器122在获取到各应用容器中运行的应用所对应的应用域名和应用地址后,获取运行的应用所匹配的应用容器的容器标识,域名解析容器122将容器标识、应用域名和应用地址对应存储在域名解析池中。域名解析容器122可将容器标识、应用域名和应用地址对应存储在域名解析池中的域名解析表中。In some embodiments, after obtaining the application domain name and the application address corresponding to the application running in each application container, the domain
本实施例中,域名解析容器可获取各应用容器中运行的应用所对应的应用域名和应用地址,将获取到的应用域名和应用地址存储至域名解析池中,保证域名解析池中的应用域名和应用地址准确,使得域名解析池可以对应用域名进行准确解析得到准确的应用地址。In this embodiment, the domain name resolution container can obtain the application domain name and the application address corresponding to the application running in each application container, and store the obtained application domain name and application address in the domain name resolution pool to ensure the application domain name in the domain name resolution pool. The application address is accurate, so that the domain name resolution pool can accurately resolve the application domain name to obtain an accurate application address.
如图5所示,在一些实施例中,应用访问方法具体还包括更新域名解析池中应用地址的步骤,该步骤具体包括以下内容:As shown in FIG. 5, in some embodiments, the application access method specifically includes the step of updating an application address in the domain name resolution pool, and the step specifically includes the following content:
S502,接收应用容器发送的应用地址变更通知。S502. Receive an application address change notification sent by the application container.
在一些实施例中,应用容器124在检测到运行的应用所对应的应用地址变更后,获取该应用的应用域名和变更后的应用地址,根据获取的应用域名和变更后的应用地址生成应用地址变更通知,应用容器124将生成的应用地址变更通知发送至域名解析容器122。域名解析容器122接收应用容器124发送的应用地址变更通知。In some embodiments, after detecting the change of the application address corresponding to the running application, the
S504,提取应用地址变更通知中的应用域名和应用地址。S504. Extract an application domain name and an application address in the application address change notification.
在一些实施例中,域名解析容器122对接收到的应用地址变更通知进行解析,通过解析提取应用地址变更通知中的应用域名和应用地址。其中,提取到的应用域名为发生应用地址变更的应用所对应的应用域名,提取到的应用地址为变更后的应用地址。In some embodiments, the domain
S506,根据提取到的应用地址更新域名解析池中与提取到的应用域名对应的应用地址。S506. Update an application address corresponding to the extracted application domain name in the domain name resolution pool according to the extracted application address.
在一些实施例中,域名解析容器122在域名解析池中查询与提取到的应用域名对应的应用地址,将查询到的应用地址替换为变更后的应用地址,从而更新域名解析池中的应用地址。In some embodiments, the domain
本实施例中,应用容器中的应用所对应的应用地址变更后,会接收到应用容器发送的应用地址变更通知,根据应用地址变更通知中的应用域名和应用地址对域名解析池中的应用地址进行更新,保证域名解析池中的应用地址的准确性,提高了域名解析池对应用域名 的解析准确性。In this embodiment, after the application address corresponding to the application in the application container is changed, the application address change notification sent by the application container is received, and the application domain name and the application address in the application address change notification are applied to the application address in the domain name resolution pool. The update is performed to ensure the accuracy of the application address in the domain name resolution pool, and the resolution accuracy of the domain name resolution pool for the application domain name is improved.
如图6所示,在一些实施例中,应用访问方法具体还包括对应用容器进行监控的步骤,该步骤具体包括以下内容:As shown in FIG. 6, in some embodiments, the application access method specifically includes the step of monitoring an application container, and the step specifically includes the following:
S602,监听容器操作事件。S602, listening for a container operation event.
在一些实施例中,域名解析容器122监听是否存在容器操作事件,容器操作事件为用户通过终端110对部署与服务器120上的应用容器进行操作所触发的操作事件。容器操作事件可以是在应用容器中部署应用的操作事件,也可以是在应用容器中删除已经部署的应用的时间,容器操作事件还可以是对应用容器进行删除、启用、创建和暂停运行中的至少一种操作对应的操作事件。In some embodiments, the domain
S604,提取监听到的容器操作事件中的容器操作类型和容器标识。S604. Extract the container operation type and the container identifier in the monitored container operation event.
在一些实施例中,域名解析容器122在监听到容器操作事件时,对监听到的容器操作事件进行解析,通过解析提取容器操作事件中的容器操作类型和容器标识。容器操作类型可以包括应用创建、应用删除、容器创建、容器启用、容器删除和容器暂停运行中的至少一种操作类型。提取到的容器标识对应的应用容器为容器操作事件的操作对象。In some embodiments, the domain
S606,根据提取到的容器操作类型确定地址池更新方式。S606. Determine an address pool update manner according to the extracted container operation type.
在一些实施例中,域名解析容器122中存储着容器操作类型所对应的地址池更新方式,地址池更新方式包括地址删除、地址添加和地址替换中的至少一种。域名解析容器122在从容器操作事件中提取到容器操作类型后,查询提取到的容器操作类型对应的地址池更新方式。In some embodiments, the domain
S608,根据确定的地址池更新方式更新域名解析地址池中的应用域名和应用地址。S608. Update the application domain name and the application address in the domain name resolution address pool according to the determined address pool update mode.
在一些实施例中,若地址池更新方式为地址添加,域名解析容器122获取待添加的应用域名和应用地址,将待添加的应用域名和应用地址对应存储在域名解析地址池中。若地址池更新方式为地址删除,域名解析容器122获取删除的应用所对应的应用域名和应用地址,在域名解析地址池中查询获取到的应用域名和应用地址并删除。若地址池更新方式为地址替换,域名解析容器122获取应用地址变更的应用所对应的应用域名和变更后的应用地址,在域名解析地址池中查询获取到的应用域名对应的应用地址,将查询到的应用地址替换为变更后的应用地址。In some embodiments, if the address pool update mode is an address addition, the domain
在一些实施例中,若容器操作事件为容器创建或容器启用,则容器操作类型对应的地址池更新方式为地址添加,域名解析容器获取创建或启用的容器上运行的应用所对应的应用域名和应用地址,将获取到的应用域名和应用地址对应存储在域名解析地址池中。若容器操作时间为容器删除或容器暂停运行,则容器操作类型对应的地址池更新方式为地址删除,则获取删除或暂停运行的容器上的应用所对应的应用域名和应用地址,从域名解析地址池中删除获取到的应用域名和应用地址。In some embodiments, if the container operation event is a container creation or a container, the address pool update mode corresponding to the container operation type is an address addition, and the domain name resolution container obtains an application domain name corresponding to the application running on the created or enabled container. The application address and the application address are stored in the domain name resolution address pool. If the container operation time is the container deletion or the container is suspended, the address pool corresponding to the container operation type is the address deletion mode, and the application domain name and the application address corresponding to the application on the container that is deleted or suspended are obtained, and the domain name resolution address is obtained. Delete the obtained application domain name and application address in the pool.
在一些实施例中,S608之后还包括以下步骤:记录容器操作事件的执行时间;根据记录的执行时间、提取到的容器操作类型和提取到的容器标识生成监听日志。In some embodiments, after S608, the method further includes the steps of: recording an execution time of the container operation event; and generating a monitoring log according to the execution time of the record, the extracted container operation type, and the extracted container identifier.
在一些实施例中,域名解析容器122记录容器操作事件的执行时间,将记录的执行时间、提取到的容器操作类型和提取到的容器标识生成监听日志。In some embodiments, the domain
在一些实施例中,应用容器记录对应的容器操作操作事件的操作时间,记录容器操作类型和操作信息,应用容器将记录的被操作时间、容器操作类型、操作信息和容器标识发送至域名解析容器122。域名解析容器122根据操作时间、容器操作类型、操作信息和容器标识生成容器标识对应的监听日志。具有权限的用户利用终端110通过服务器120查询监听日志。In some embodiments, the application container records the operation time of the corresponding container operation operation event, records the container operation type and operation information, and the application container sends the recorded operation time, the container operation type, the operation information, and the container identifier to the domain name resolution container. 122. The domain
本实施例中,通过监听容器操作事件,可以确定对应的地址池更新方式,根据确定的地址池更新方式更新域名解析地址池,保证域名解析池中存储的应用域名和应用地址为可以成功访问的应用所对应的应用域名和应用地址,提高了应用域名和应用地址的准确性,从而提高了对应用的访问成功率。In this embodiment, by monitoring the container operation event, the corresponding address pool update mode can be determined, and the domain name resolution address pool is updated according to the determined address pool update mode, so that the application domain name and the application address stored in the domain name resolution pool are successfully accessed. The application domain name and application address corresponding to the application improve the accuracy of the application domain name and the application address, thereby improving the access success rate of the application.
应该理解的是,虽然图3-6的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图3-6中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the various steps in the flowcharts of FIGS. 3-6 are sequentially displayed as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Except as explicitly stated herein, the execution of these steps is not strictly limited, and the steps may be performed in other orders. Moreover, at least some of the steps in FIGS. 3-6 may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, these sub-steps or stages The order of execution is not necessarily performed sequentially, but may be performed alternately or alternately with at least a portion of other steps or sub-steps or stages of other steps.
如图7所示,在一些实施例中,提供一种应用访问装置700,该装置具体包括:访问请求接收模块702、应用域名提取模块704、应用地址查询模块706和应用地址发送模块708。As shown in FIG. 7 , in some embodiments, an application access device 700 is provided. The device specifically includes an access
访问请求接收模块702,用于接收终端发送的应用访问请求。The access
应用域名提取模块704,用于提取应用访问请求中的应用域名。The application domain
应用地址查询模块706,用于在域名解析地址池中查询与提取到的应用域名对应的应用地址。The application
应用地址发送模块708,用于将查询到的应用地址发送至终端,使终端根据查询到的应用地址从应用容器中获取匹配的应用数据。The application
本实施例中,接收到终端发送的应用访问请求,根据应用访问请求中的应用域名在域名解析地址池中进行域名解析,通过域名解析查询与应用访问请求中的应用域名对应的应用地址,将查询到的应用地址发送至终端,终端根据接收到的应用地址可从应用容器中获取匹配的应用数据,从而实现对应用容器中应用的访问。在对应用容器中应用的访问过程中,终端只需获取要访问应用的应用域名,应用域名为固定不变的,通过域名解析池对应用域名的解析即可得到准确的应用地址,根据准确的应用地址可成功访问应用容器中应用,从而提高了对应用容器中应用的访问效率。In this embodiment, the application access request sent by the terminal is received, and the domain name is resolved in the domain name resolution address pool according to the application domain name in the application access request, and the application address corresponding to the application domain name in the application access request is queried through the domain name resolution query. The queried application address is sent to the terminal, and the terminal can obtain matching application data from the application container according to the received application address, thereby implementing access to the application in the application container. In the process of accessing the application in the application container, the terminal only needs to obtain the application domain name of the application to be accessed, and the application domain name is fixed. The domain name resolution pool can resolve the application domain name to obtain an accurate application address, according to an accurate The application address can successfully access the application in the application container, which improves the access efficiency of the application in the application container.
如图8所示,在一些实施例中,应用访问装置700具体还包括:应用地址获取模块 710、应用地址存储模块712、变更通知接收模块714、域名地址提取模块716和应用地址更新模块718。As shown in FIG. 8 , in some embodiments, the application access device 700 further includes an application address obtaining module 710 , an application
应用地址获取模块710,用于获取各应用容器中运行的应用所对应的应用域名和应用地址。The application address obtaining module 710 is configured to obtain an application domain name and an application address corresponding to the application running in each application container.
应用地址存储模块712,用于将获取到的应用域名和应用地址对应存储到域名解析池中。The application
变更通知接收模块714,用于接收应用容器发送的应用地址变更通知。The change
域名地址提取模块716,用于提取应用地址变更通知中的应用域名和应用地址。The domain name
应用地址更新模块718,用于根据提取到的应用地址更新域名解析池中与提取到的应用域名对应的应用地址。The application
本实施例中,应用容器中的应用所对应的应用地址变更后,会接收到应用容器发送的应用地址变更通知,根据应用地址变更通知中的应用域名和应用地址对域名解析池中的应用地址进行更新,保证域名解析池中的应用地址的准确性,提高了域名解析池对应用域名的解析准确性。In this embodiment, after the application address corresponding to the application in the application container is changed, the application address change notification sent by the application container is received, and the application domain name and the application address in the application address change notification are applied to the application address in the domain name resolution pool. The update is performed to ensure the accuracy of the application address in the domain name resolution pool, and the resolution accuracy of the domain name resolution pool for the application domain name is improved.
在一些实施例中,应用访问装置700具体包括监听日志生成模块。In some embodiments, the application access device 700 specifically includes a snoop log generation module.
监听日志生成模块用于记录容器操作事件的执行时间;根据记录的执行时间、提取到的容器操作类型和提取到的容器标识生成监听日志。The listener log generation module is used to record the execution time of the container operation event; the listener log is generated according to the execution time of the record, the extracted container operation type, and the extracted container identifier.
如图9所示,在一些实施例中,应用访问装置700具体还包括:操作指令监听模块720、操作指令解析模块722、更新方式确定模块724和地址池更新模块726。As shown in FIG. 9 , in some embodiments, the application access device 700 specifically includes an operation
操作指令监听模块720,用于监听容器操作事件。The operation
操作指令解析模块722,用于提取监听到的容器操作事件中的容器操作类型和容器标识。The operation
更新方式确定模块724,用于根据提取到的容器操作类型确定地址池更新方式。The update
地址池更新模块726,用于根据确定的地址池更新方式更新域名解析地址池中的应用域名和应用地址。The address
本实施例中,通过监听容器操作事件,可以确定对应的地址池更新方式,根据确定的地址池更新方式更新域名解析地址池,保证域名解析池中存储的应用域名和应用地址为可以成功访问的应用所对应的应用域名和应用地址,提高了应用域名和应用地址的准确性,从而提高了对应用的访问成功率。In this embodiment, by monitoring the container operation event, the corresponding address pool update mode can be determined, and the domain name resolution address pool is updated according to the determined address pool update mode, so that the application domain name and the application address stored in the domain name resolution pool are successfully accessed. The application domain name and application address corresponding to the application improve the accuracy of the application domain name and the application address, thereby improving the access success rate of the application.
关于应用访问装置的具体限定可以参见上文中对于应用访问方法的限定,在此不再赘述。上述应用访问装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。其中,网络接口可以是以太网卡或无线网卡等。上述各模块可以硬件形式内嵌于或独立于终端中的处理器中,也可以以软件形式存储于终端中的存储器中,以便于处理器调用执行以上各个模块对应的操作。该处理器可以为中央处理单元(CPU)、微处理器、单片机等。For specific definitions of the application access device, reference may be made to the above definition of the application access method, and details are not described herein again. The various modules in the application access device described above may be implemented in whole or in part by software, hardware, and combinations thereof. The network interface may be an Ethernet card or a wireless network card. The above modules may be embedded in the hardware in the terminal or in the memory in the terminal, or may be stored in the memory in the terminal in a software form, so that the processor calls the execution of the operations corresponding to the above modules. The processor can be a central processing unit (CPU), a microprocessor, a microcontroller, or the like.
一种计算机设备,计算机设备包括存储器、处理器及存储在存储器上并可在处理器上 运行的计算机指令,处理器执行计算机指令时实现以下步骤:接收终端发送的应用访问请求;提取应用访问请求中的应用域名;在域名解析地址池中查询与提取到的应用域名对应的应用地址;将查询到的应用地址发送至终端,使终端根据查询到的应用地址从应用容器中获取匹配的应用数据。A computer device comprising a memory, a processor, and computer instructions stored on the memory and operable on the processor, the processor executing the computer instructions to: receive an application access request sent by the terminal; and extract an application access request The application domain name in the domain name resolution address pool is searched for the application address corresponding to the extracted application domain name; the queried application address is sent to the terminal, so that the terminal obtains the matched application data from the application container according to the queried application address. .
在一些实施例中,接收终端发送的应用访问请求之前,还包括:获取各应用容器中运行的应用所对应的应用域名和应用地址;将获取到的应用域名和应用地址对应存储到域名解析池中。In some embodiments, before receiving the application access request sent by the terminal, the method further includes: acquiring an application domain name and an application address corresponding to the application running in each application container; and storing the obtained application domain name and the application address in the domain name resolution pool. in.
在一些实施例中,处理器执行计算机指令时还实现以下步骤:接收应用容器发送的应用地址变更通知;提取应用地址变更通知中的应用域名和应用地址;根据提取到的应用地址更新域名解析池中与提取到的应用域名对应的应用地址。In some embodiments, the processor further implements the following steps: receiving an application address change notification sent by the application container; extracting an application domain name and an application address in the application address change notification; and updating the domain name resolution pool according to the extracted application address. The application address corresponding to the extracted application domain name.
在一些实施例中,处理器执行计算机指令时还实现以下步骤:监听容器操作事件;提取监听到的容器操作事件中的容器操作类型和容器标识;根据提取到的容器操作类型确定地址池更新方式;根据确定的地址池更新方式更新域名解析地址池中的应用域名和应用地址。In some embodiments, the processor further implements the following steps: listening for a container operation event; extracting a container operation type and a container identifier in the monitored container operation event; and determining an address pool update manner according to the extracted container operation type. Update the application domain name and application address in the domain name resolution address pool according to the determined address pool update mode.
在一些实施例中,提取监听到的容器操作事件中的容器操作类型和容器标识之后,还包括:记录容器操作事件的执行时间;根据记录的执行时间、提取到的容器操作类型和提取到的容器标识生成监听日志。In some embodiments, after extracting the container operation type and the container identifier in the monitored container operation event, the method further includes: recording an execution time of the container operation event; according to the execution time of the record, the extracted container operation type, and the extracted The container ID generates a listening log.
本实施例中,接收到终端发送的应用访问请求,根据应用访问请求中的应用域名在域名解析地址池中进行域名解析,通过域名解析查询与应用访问请求中的应用域名对应的应用地址,将查询到的应用地址发送至终端,终端根据接收到的应用地址可从应用容器中获取匹配的应用数据,从而实现对应用容器中应用的访问。在对应用容器中应用的访问过程中,终端只需获取要访问应用的应用域名,应用域名为固定不变的,通过域名解析池对应用域名的解析即可得到准确的应用地址,根据准确的应用地址可成功访问应用容器中应用,从而提高了对应用容器中应用的访问效率。In this embodiment, the application access request sent by the terminal is received, and the domain name is resolved in the domain name resolution address pool according to the application domain name in the application access request, and the application address corresponding to the application domain name in the application access request is queried through the domain name resolution query. The queried application address is sent to the terminal, and the terminal can obtain matching application data from the application container according to the received application address, thereby implementing access to the application in the application container. In the process of accessing the application in the application container, the terminal only needs to obtain the application domain name of the application to be accessed, and the application domain name is fixed. The domain name resolution pool can resolve the application domain name to obtain an accurate application address, according to an accurate The application address can successfully access the application in the application container, which improves the access efficiency of the application in the application container.
一种非易失性计算机可读存储介质,其上存储有计算机指令,所述计算机指令被处理器执行时实现以下步骤:接收终端发送的应用访问请求;提取应用访问请求中的应用域名;在域名解析地址池中查询与提取到的应用域名对应的应用地址;将查询到的应用地址发送至终端,使终端根据查询到的应用地址从应用容器中获取匹配的应用数据。A non-transitory computer readable storage medium having stored thereon computer instructions, the computer instructions being executed by a processor to: receive an application access request sent by a terminal; extract an application domain name in an application access request; The application address corresponding to the extracted application domain name is queried in the domain name resolution address pool; the queried application address is sent to the terminal, so that the terminal obtains the matched application data from the application container according to the queried application address.
在一些实施例中,接收终端发送的应用访问请求之前,还包括:获取各应用容器中运行的应用所对应的应用域名和应用地址;将获取到的应用域名和应用地址对应存储到域名解析池中。In some embodiments, before receiving the application access request sent by the terminal, the method further includes: acquiring an application domain name and an application address corresponding to the application running in each application container; and storing the obtained application domain name and the application address in the domain name resolution pool. in.
在一些实施例中,处理器还执行以下步骤:接收应用容器发送的应用地址变更通知;提取应用地址变更通知中的应用域名和应用地址;根据提取到的应用地址更新域名解析池中与提取到的应用域名对应的应用地址。In some embodiments, the processor further performs the steps of: receiving an application address change notification sent by the application container; extracting an application domain name and an application address in the application address change notification; and updating the domain name resolution pool according to the extracted application address and extracting The application address corresponding to the application domain name.
在一些实施例中,处理器还执行以下步骤:监听容器操作事件;提取监听到的容器操作事件中的容器操作类型和容器标识;根据提取到的容器操作类型确定地址池更新方式;根据确定的地址池更新方式更新域名解析地址池中的应用域名和应用地址。In some embodiments, the processor further performs the steps of: listening for a container operation event; extracting a container operation type and a container identifier in the monitored container operation event; determining an address pool update manner according to the extracted container operation type; The address pool update mode updates the application domain name and application address in the domain name resolution address pool.
在一些实施例中,提取监听到的容器操作事件中的容器操作类型和容器标识之后,还包括:记录容器操作事件的执行时间;根据记录的执行时间、提取到的容器操作类型和提取到的容器标识生成监听日志。In some embodiments, after extracting the container operation type and the container identifier in the monitored container operation event, the method further includes: recording an execution time of the container operation event; according to the execution time of the record, the extracted container operation type, and the extracted The container ID generates a listening log.
本实施例中,接收到终端发送的应用访问请求,根据应用访问请求中的应用域名在域名解析地址池中进行域名解析,通过域名解析查询与应用访问请求中的应用域名对应的应用地址,将查询到的应用地址发送至终端,终端根据接收到的应用地址可从应用容器中获取匹配的应用数据,从而实现对应用容器中应用的访问。在对应用容器中应用的访问过程中,终端只需获取要访问应用的应用域名,应用域名为固定不变的,通过域名解析池对应用域名的解析即可得到准确的应用地址,根据准确的应用地址可成功访问应用容器中应用,从而提高了对应用容器中应用的访问效率。In this embodiment, the application access request sent by the terminal is received, and the domain name is resolved in the domain name resolution address pool according to the application domain name in the application access request, and the application address corresponding to the application domain name in the application access request is queried through the domain name resolution query. The queried application address is sent to the terminal, and the terminal can obtain matching application data from the application container according to the received application address, thereby implementing access to the application in the application container. In the process of accessing the application in the application container, the terminal only needs to obtain the application domain name of the application to be accessed, and the application domain name is fixed. The domain name resolution pool can resolve the application domain name to obtain an accurate application address, according to an accurate The application address can successfully access the application in the application container, which improves the access efficiency of the application in the application container.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机指令来指令相关的硬件来完成,所述的程序可存储于一非易失性计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等。One of ordinary skill in the art can understand that all or part of the process of implementing the above embodiments can be completed by computer instructions to instruct related hardware, and the program can be stored in a non-volatile computer readable storage medium. Wherein, the program, when executed, may include the flow of an embodiment of the methods as described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or the like.
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above-described embodiments may be arbitrarily combined. For the sake of brevity of description, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction between the combinations of these technical features, All should be considered as the scope of this manual.
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above-mentioned embodiments are merely illustrative of several embodiments of the present application, and the description thereof is more specific and detailed, but is not to be construed as limiting the scope of the invention. It should be noted that a number of variations and modifications may be made by those skilled in the art without departing from the spirit and scope of the present application. Therefore, the scope of the invention should be determined by the appended claims.
Claims (20)
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710608060.5A CN107707607A (en) | 2017-07-24 | 2017-07-24 | Using access method, device, computer equipment and storage medium |
| CN201710608060.5 | 2017-07-24 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2019019670A1 true WO2019019670A1 (en) | 2019-01-31 |
Family
ID=61170751
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2018/079978 Ceased WO2019019670A1 (en) | 2017-07-24 | 2018-03-22 | Application accessing method and device, computer apparatus, and storage medium |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN107707607A (en) |
| WO (1) | WO2019019670A1 (en) |
Families Citing this family (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107707607A (en) * | 2017-07-24 | 2018-02-16 | 上海壹账通金融科技有限公司 | Using access method, device, computer equipment and storage medium |
| CN109495464B (en) * | 2018-11-05 | 2021-05-28 | 创新先进技术有限公司 | Method, device, equipment and system for tracking application access |
| CN112311904A (en) * | 2019-07-25 | 2021-02-02 | 北京中关村科金技术有限公司 | Method, device, storage medium and domain name management system for updating domain name record |
| CN111200595B (en) * | 2019-12-20 | 2022-04-29 | 北京淇瑀信息科技有限公司 | Authority management method and device for accessing container and electronic equipment |
| CN111090823B (en) * | 2019-12-23 | 2024-02-09 | 广州市百果园信息技术有限公司 | Page application integration system, application access method, device and equipment |
| CN111182089B (en) * | 2019-12-31 | 2022-09-20 | 北京金山云网络技术有限公司 | Container cluster system, method and device for accessing big data assembly and server |
| CN113760442B (en) * | 2020-10-19 | 2024-12-03 | 北京沃东天骏信息技术有限公司 | A method, device and equipment for running and accessing an application |
| CN114489951A (en) * | 2022-01-27 | 2022-05-13 | 北京高途云集教育科技有限公司 | Container management method and device for target application, electronic equipment and storage medium |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN201682522U (en) * | 2010-02-08 | 2010-12-22 | 阿里巴巴集团控股有限公司 | Conversation information storage system and application server |
| CN102611762A (en) * | 2011-01-21 | 2012-07-25 | 中国电信股份有限公司 | Uniform domain name service system and method |
| US8898329B1 (en) * | 2009-04-29 | 2014-11-25 | RangeCast Technologies, Inc | Network audio distribution system and method |
| CN106130990A (en) * | 2016-06-29 | 2016-11-16 | 中国联合网络通信集团有限公司 | The control method of container access and device |
| CN106341438A (en) * | 2015-07-10 | 2017-01-18 | 阿里巴巴集团控股有限公司 | Request processing method and device |
| CN107707607A (en) * | 2017-07-24 | 2018-02-16 | 上海壹账通金融科技有限公司 | Using access method, device, computer equipment and storage medium |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103685604B (en) * | 2013-12-20 | 2017-07-11 | 北京奇安信科技有限公司 | A kind of domain name pre-parsed method and device |
| US10218633B2 (en) * | 2014-03-28 | 2019-02-26 | Amazon Technologies, Inc. | Implementation of a service that coordinates the placement and execution of containers |
| CN106302771A (en) * | 2016-08-23 | 2017-01-04 | 浪潮电子信息产业股份有限公司 | Domain name configuration method of application created based on Docker container |
-
2017
- 2017-07-24 CN CN201710608060.5A patent/CN107707607A/en active Pending
-
2018
- 2018-03-22 WO PCT/CN2018/079978 patent/WO2019019670A1/en not_active Ceased
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8898329B1 (en) * | 2009-04-29 | 2014-11-25 | RangeCast Technologies, Inc | Network audio distribution system and method |
| CN201682522U (en) * | 2010-02-08 | 2010-12-22 | 阿里巴巴集团控股有限公司 | Conversation information storage system and application server |
| CN102611762A (en) * | 2011-01-21 | 2012-07-25 | 中国电信股份有限公司 | Uniform domain name service system and method |
| CN106341438A (en) * | 2015-07-10 | 2017-01-18 | 阿里巴巴集团控股有限公司 | Request processing method and device |
| CN106130990A (en) * | 2016-06-29 | 2016-11-16 | 中国联合网络通信集团有限公司 | The control method of container access and device |
| CN107707607A (en) * | 2017-07-24 | 2018-02-16 | 上海壹账通金融科技有限公司 | Using access method, device, computer equipment and storage medium |
Also Published As
| Publication number | Publication date |
|---|---|
| CN107707607A (en) | 2018-02-16 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2019019670A1 (en) | Application accessing method and device, computer apparatus, and storage medium | |
| CN107665233B (en) | Database data processing method and device, computer equipment and storage medium | |
| US10740299B2 (en) | Systems and methods for providing continuing access to a remote computer program | |
| CN110971655B (en) | Offline client playback and synchronization | |
| US11580294B2 (en) | Techniques for web framework detection | |
| CN104703125B (en) | Information recommendation method, device and terminal based on instant messaging | |
| CN109359237B (en) | Method and equipment for searching hosted program | |
| WO2019019642A1 (en) | Application information pushing method and apparatus, and computer device and storage medium | |
| WO2020228038A1 (en) | Domain name processing method, apparatus, electronic device, and storage medium | |
| CN104767775A (en) | Web application message push method and system | |
| US20180124109A1 (en) | Techniques for classifying a web page based upon functions used to render the web page | |
| CN110417919A (en) | Method and device for traffic hijacking | |
| CN103294565B (en) | Method, device and equipment for detecting installed application | |
| CN108255898B (en) | Page display method and device | |
| CN111865905A (en) | A Ukey-based communication method, device and storage medium | |
| CN114089997A (en) | Method and device for processing page stack, storage medium and electronic device | |
| US9917738B2 (en) | Intelligent device data router | |
| US12026508B2 (en) | Methods for automated configuration management in platform-as-a-service environments and devices thereof | |
| CN116800738A (en) | A data processing method, device, equipment and storage medium | |
| WO2018217406A1 (en) | Providing instant preview of cloud based file | |
| CN104519137B (en) | Host file management method, device and system | |
| US20180046656A1 (en) | Constructing filterable hierarchy based on multidimensional key | |
| CN114675871A (en) | Resource updating method and device, electronic equipment, server and storage medium | |
| US10659543B2 (en) | System and methods for tracking the usage of digital services | |
| CN119556945B (en) | Detachable microservice architecture determination method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 18838880 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 18838880 Country of ref document: EP Kind code of ref document: A1 |
|
| 32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 28/05/2020) |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 18838880 Country of ref document: EP Kind code of ref document: A1 |