CN109769030B - Method and apparatus for controlling access of applications - Google Patents

Method and apparatus for controlling access of applications Download PDF

Info

Publication number
CN109769030B
CN109769030B CN201910106724.7A CN201910106724A CN109769030B CN 109769030 B CN109769030 B CN 109769030B CN 201910106724 A CN201910106724 A CN 201910106724A CN 109769030 B CN109769030 B CN 109769030B
Authority
CN
China
Prior art keywords
information
application
list
configuration information
new configuration
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.)
Active
Application number
CN201910106724.7A
Other languages
Chinese (zh)
Other versions
CN109769030A (en
Inventor
周子江
曹高晋
何军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jingdong Technology Holding Co Ltd
Original Assignee
Jingdong Technology Holding Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Jingdong Technology Holding Co Ltd filed Critical Jingdong Technology Holding Co Ltd
Priority to CN201910106724.7A priority Critical patent/CN109769030B/en
Publication of CN109769030A publication Critical patent/CN109769030A/en
Application granted granted Critical
Publication of CN109769030B publication Critical patent/CN109769030B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The embodiment of the application discloses a method for controlling access of an application. One embodiment of the method comprises: receiving access request information which is sent by a client and used for accessing an application, wherein the access request information comprises configuration information of the application, and the configuration information comprises application name information of the application; searching an Internet Protocol (IP) information list associated with the application name information according to the application name information; in response to the found IP information list associated with the application name information, modifying the configuration information according to the found IP information list to generate new configuration information; and controlling the target server to allocate resources to the application according to the new configuration information. This embodiment may enable an application to have a fixed IP address each time it accesses a target server.

Description

Method and apparatus for controlling access of applications
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a method and a device for controlling access of an application.
Background
An Application (Application) generally refers to a computer program that is developed to run on top of an operating system in order to accomplish a certain task or tasks. In the related art, when a client requests to access an application to a target server, a control server needs to allocate an IP (Internet Protocol) address to the application that needs to be accessed, so that the application can run on the target server.
Disclosure of Invention
The embodiment of the application provides a method and a device for controlling access of an application.
In a first aspect, an embodiment of the present application provides a method for controlling access of an application, where the method includes: receiving access request information which is sent by a client and used for accessing an application, wherein the access request information comprises configuration information of the application, and the configuration information comprises application name information of the application; searching an IP information list associated with the application name information according to the application name information; in response to the found IP information list associated with the application name information, modifying the configuration information according to the found IP information list to generate new configuration information; and controlling the target server to allocate resources to the application according to the new configuration information.
In some embodiments, the IP information in the IP information list includes: IP addresses and occupancy status information for IP addresses.
In some embodiments, modifying the configuration information according to the found IP information list to generate new configuration information, including: selecting IP information with occupation state information as first state information from the IP information list, wherein the first state information is used for representing that the corresponding IP address is in an idle state at present; and writing the list name information of the IP information list and the IP address in the selected IP information into the configuration information to obtain new configuration information.
In some embodiments, after obtaining the new configuration information, the method further comprises: and modifying the occupation state information in the selected IP information into second state information, wherein the second state information is used for representing that the corresponding IP address is in the occupation state at present.
In some embodiments, the method further comprises: receiving deletion request information which is sent by a client and used for deleting the application, wherein the deletion request information comprises application name information of the application; according to the application name information, new configuration information comprising the application name information is searched; deleting the new configuration information, and controlling the target server to recycle resources allocated to the application.
In some embodiments, prior to deleting the new configuration information, the method further comprises: acquiring list name information and IP addresses in the new configuration information; searching an IP information list according to the acquired list name information, and searching IP information in the IP information list according to the IP address; and modifying the found occupation state information in the IP information into first state information.
In some embodiments, the configuration information further includes a quantity parameter; and the method further comprises: responding to the IP information list which is not found and is associated with the application name information, distributing a set number of IP addresses according to the quantity parameter in the configuration information, and generating an IP information list for recording the IP information of the set number of IP addresses, wherein the set number is matched with the quantity parameter; and storing the application name information and the IP information list in an associated manner.
In a second aspect, an embodiment of the present application provides an apparatus for controlling access of an application, where the apparatus includes: the access receiving unit is configured to receive access request information sent by a client for accessing the application, wherein the access request information comprises configuration information of the application, and the configuration information comprises application name information of the application; a list search unit configured to search an IP information list associated with the application name information according to the application name information; the configuration generation unit is configured to respond to the searched IP information list associated with the application name information, modify the configuration information according to the searched IP information list and generate new configuration information; and the resource allocation unit is configured to control the target server to allocate the resources to the application according to the new configuration information.
In some embodiments, the IP information in the IP information list includes: IP addresses and occupancy status information for IP addresses.
In some embodiments, modifying the configuration information according to the found IP information list to generate new configuration information, including: selecting IP information with occupation state information as first state information from the IP information list, wherein the first state information is used for representing that the corresponding IP address is in an idle state at present; and writing the list name information of the IP information list and the IP address in the selected IP information into the configuration information to obtain new configuration information.
In some embodiments, the apparatus further comprises: and the occupation setting unit is configured to modify the occupation state information in the selected IP information into second state information, and the second state information is used for representing that the corresponding IP address is in the occupation state currently.
In some embodiments, the apparatus further comprises: a deletion receiving unit configured to receive deletion request information for deleting the application sent by the client, the deletion request information including application name information of the application; the configuration searching unit is configured to search new configuration information comprising the application name information according to the application name information; and a configuration deleting unit configured to delete the new configuration information, and control the target server to reclaim the resources allocated to the application.
In some embodiments, the apparatus further comprises: an information obtaining unit configured to obtain list name information and an IP address in the new configuration information; the idle setting unit is configured to find the IP information list according to the acquired list name information and find the IP information in the IP information list according to the IP address; and modifying the found occupation state information in the IP information into first state information.
In some embodiments, the configuration information further includes a quantity parameter; and the apparatus further comprises: a list generating unit configured to, in response to not finding the IP information list associated with the application name information, allocate a set number of IP addresses according to the quantity parameter in the configuration information, and generate an IP information list for recording IP information of the set number of IP addresses, where the set number matches the quantity parameter; and the list storage unit is configured to store the application name information and the IP information list in an associated manner.
In a third aspect, an embodiment of the present application provides a server, where the server includes: one or more processors; a storage device having one or more programs stored thereon, which when executed by one or more processors, cause the one or more processors to implement the method as described in any of the implementations of the first aspect.
In a fourth aspect, the present application provides a computer-readable medium, on which a computer program is stored, which when executed by a processor implements the method described in any implementation manner of the first aspect.
The method and the device for controlling the application access provided by the embodiment of the application can receive the access request information sent by the client for accessing the application. The access request information comprises configuration information of the application, and the configuration information comprises application name information of the application. And then, searching an IP information list associated with the application name information according to the application name information. And then, responding to the searched IP information list associated with the application name information, modifying the configuration information according to the searched IP information list, and generating new configuration information. And finally, controlling the target server to allocate resources to the application according to the new configuration information. According to the method and the device, the configuration information during application access is modified by adopting the IP information list associated with the application, so that the target server can allocate resources to the application by adopting the modified new configuration information, the application accessed to the target server is realized, and after updating or restarting is carried out, the fixed IP address in the IP information list is always corresponding to the application.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is an exemplary system architecture diagram in which one embodiment of the present application may be applied;
FIG. 2 is a flow diagram of one embodiment of a method for controlling access of an application, in accordance with the present application;
FIG. 3 is a schematic diagram of an application scenario of a method for controlling access of an application according to an embodiment of the application;
FIG. 4 is a flow diagram of yet another embodiment of a method for controlling access of an application according to the present application;
FIG. 5 is a schematic block diagram illustrating one embodiment of an apparatus for controlling access to an application in accordance with the present application;
FIG. 6 is a schematic block diagram of a computer system suitable for use in implementing a server according to embodiments of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 illustrates an exemplary system architecture 100 to which the method for controlling access of an application or the apparatus for controlling access of an application of the embodiments of the present application may be applied.
As shown in fig. 1, the system architecture 100 may include a client 101, a control server 102, a target server 103, and networks 104, 105. The networks 104, 105 serve to provide a medium of communication links between the client 101, the control server 102 and the target server 103. The networks 104, 105 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The client 101 may interact with the control server 102 via the network 104 to receive information or to send information or the like. Various applications, such as browsing-type applications, searching-type applications, etc., may be installed on the client.
The client 101 may be hardware or software. When the client 101 is hardware, it may be various electronic devices having a display screen and supporting user information input, including but not limited to tablet computers, laptop portable computers, desktop computers, and the like. When the client 101 is software, it can be installed in the electronic devices listed above. It may be implemented as multiple pieces of software or software modules (e.g., to provide distributed services) or as a single piece of software or software module. And is not particularly limited herein.
The control server 102 may interact with the client 101 and the target server 103 via networks 104, 105 to receive or transmit information and the like. The control server 102 may be a server that provides various services. For example, a control server that controls access of an application to the target server 103. The control server may, when receiving access request information for accessing an application sent by the client 101, search an IP information list associated with the application name information according to the application name information in the access request information, modify configuration information according to the searched IP information list, and generate new configuration information; and controlling the target server 103 to allocate resources to the application according to the new configuration information.
The target server 103 may interact with the control server 102 through the network 105 to receive or transmit information or the like. The target server 103 may be a server that provides various services. For example, a target server that allocates resources to an application according to control instructions of the control server 102. The target server may allocate resources to the application upon receiving the associated control instructions of the control server.
It should be noted that the method for controlling access to an application provided in the embodiment of the present application is generally executed by the control server 102, and accordingly, the apparatus for controlling access to an application is generally disposed in the control server 102. It should be noted that the method for controlling access of the application provided by the embodiment of the present application does not depend on the target server 103, and thus, the target server 103 may not exist in fig. 1.
It should be understood that the number of clients, control servers, target servers, and networks in fig. 1 is merely illustrative. There may be any number of clients, control servers, target servers, and networks, as desired for implementation.
With continued reference to fig. 2, a flow 200 of one embodiment of a method for controlling access of an application in accordance with the present application is shown. The method for controlling access of an application comprises the following steps:
step 201, receiving access request information for accessing an application sent by a client.
In this embodiment, an execution subject of the method for controlling access to an application (e.g., the control server 102 shown in fig. 1) may receive access request information for accessing an application, which is sent by a client connected in communication, through a wired connection manner or a wireless connection manner. The access request information may be various information for requesting access. The access request information may include configuration information of the application. The configuration information includes application name information of the application. Optionally, the configuration information may further include various information preset by a technician to enable the application to be accessed to the target server.
Step 202, according to the application name information, searching an IP information list associated with the application name information.
In this embodiment, the execution subject may use application name information of the application to search the IP information list associated with the application name information from the storage device. The storage device may be various storage devices having a storage function preset by a technician. As an example, the storage device may be a database server communicatively connected to the execution main. The IP information in the above IP information list may be various information including an IP address. The IP information in the IP information list may be used to enable access to the accessed application.
Optionally, the IP information in the IP information list includes: IP addresses and occupancy status information for IP addresses. As an example, if information of three IP addresses, A, B and C respectively, is recorded in the IP information list, the IP information corresponding to a is (address 1, state 1), the IP information corresponding to B is (address 2, state 2), and the IP information corresponding to C is (address 3, state 3), the generated IP information list may be [ (address 1, state 1), (address 2, state 2), (address 3, state 3) ].
In some optional implementations of this embodiment, the configuration information may further include a quantity parameter; and the method of the embodiment may further include: responding to the IP information list which is not found and is associated with the application name information, distributing a set number of IP addresses according to the quantity parameter in the configuration information, and generating an IP information list for recording the IP information of the set number of IP addresses; and storing the application name information and the IP information list in an associated manner.
In this embodiment, when the application is requested to access the target server for the first time, the storage device does not yet store the IP information list associated with the application name information. At this time, the execution body may obtain the IP information list associated with the application name information by:
first, allocating a set number of IP addresses according to the quantity parameter in the configuration information. In this embodiment, the execution body may allocate a set number of IP addresses to the application to be accessed to the target server by using the quantity parameter in the configuration information. Wherein the set number matches the quantity parameter. Here, the set number may be equal to the parameter value of the quantity parameter. As an example, if the parameter value of the quantity parameter is 3, then at this time, the set number is 3. It should be noted that the parameter value of the quantity parameter may be any value preset by the skilled person. The parameter value of the number parameter may be 1 or 2, and this embodiment is not limited. Among them, the target server may be various servers that can be controlled by the control server. In this embodiment, accessing the application to the target server means that the application is issued to the target server to run.
And secondly, generating an IP information list for recording information of a set number of IP addresses. In this embodiment, after allocating the set number of IP addresses to the application, the execution main body may further generate an IP information list for recording information of the set number of IP addresses to the allocated set number of IP addresses.
And thirdly, storing the application name information and the IP information list in an associated manner.
Step 203, in response to finding the IP information list associated with the application name information, modifying the configuration information according to the found IP information list, and generating new configuration information.
In this embodiment, after finding the IP information list associated with the application name information, the execution main body may obtain new configuration information in the following manner: first, one IP information is randomly selected from the searched IP information list. Then, the selected IP information is written into the configuration information, thereby obtaining new configuration information.
The execution subject may also obtain new configuration information by: first, one IP information selected the least number of times is selected from the searched IP information list. Then, the selected IP information is written into the configuration information, thereby obtaining new configuration information.
In some optional implementation manners of this embodiment, the execution subject may further obtain new configuration information by:
the first step is to select the IP information with the occupation state information as the first state information from the IP information list. The first state information is used for representing that the corresponding IP address is in an idle state currently. In this embodiment, the first state information may be any information for representing that the corresponding IP address is currently in an idle state. As an example, the first state information may be a number "0" for characterizing that the corresponding IP address is currently in an idle state. As another example, the first status information may also be a character group "free" for characterizing that the corresponding IP address is currently in an idle state.
And secondly, writing the list name information of the IP information list and the IP address in the selected IP information into the configuration information to obtain new configuration information. In the present embodiment, each IP information list has list name information. The list name information may be various information for identifying the identity of the IP information list. As an example, the list name information may be a character group "test 1" for identifying the identity of the IP information list.
In some optional implementation manners of this embodiment, after obtaining the new configuration information, the execution main body may further modify the occupation state information in the selected IP information to be the second state information. And the second state information is used for representing that the corresponding IP address is in the occupied state currently.
In this embodiment, the second status information may be any information for representing that the corresponding IP address is currently in an occupied status. As an example, the second status information may be a number "1" for characterizing that the corresponding IP address is currently in an occupied status. As another example, the second status information may also be a character set "busy" used to characterize that the corresponding IP address is currently in an occupied status. Here, it should be noted that the occupation state information in the selected IP information is modified into the second state information, which aims to update the IP information list and can ensure the accuracy and validity of the IP information in the IP information list.
And step 204, controlling the target server to allocate resources to the application according to the new configuration information.
In this embodiment, the execution subject may send, to the target server, an instruction for allocating resources to the accessed application by using the new configuration information, so as to control the target server to allocate resources to the application. The allocated resources may include, but are not limited to, CPU resources, memory resources, network resources, and the like. It should be noted that the target server may only realize that the application runs on the target server after allocating resources to the application.
In addition, in this embodiment, the list name information of the IP information list and the IP address in the selected IP information are written into the configuration information, and the purpose is that the execution agent can control the target server to use the IP address in the new configuration information as the IP address of the application. Therefore, the application accessed to the target server can be realized, and the fixed IP address in the IP information list is always corresponding to the application after updating or restarting.
With continued reference to fig. 3, fig. 3 is a schematic diagram of an application scenario of the method for controlling access of an application according to the present embodiment. The control server may be various servers installed with kubernets, and the target server may be various servers managed by kubernets and installed with Docker. It should be noted that Docker is an open-source application container engine, and a developer may integrate an application and a dependency package of the application into a portable container and then publish the container to any target server on which Docker is installed to run. Kubernetes is an open source container orchestration engine that manages containers that are accessed on target servers. Kubernetes is recognized as a de facto industry standard for large-scale deployment of containerized applications in scenarios such as public, private, and hybrid clouds.
In the application scenario 300 of fig. 3, first, a user 301 sends access request information for accessing an application to kubernets 303 through a browser on a client terminal 302. The access request information comprises configuration information of the application, and the configuration information comprises application name information of the application. Second, kubernets 303 receives the access request information. Thereafter, kubernets 303 searches an IP information list associated with the application name information from etcd (distributed key value storage system) 304 according to the application name information. And then, responding to the searched IP information list associated with the application name information, modifying the configuration information according to the searched IP information list, and generating new configuration information. And finally, controlling the target server to allocate resources to the application according to the new configuration information.
The method for controlling access of an application provided by the above embodiments of the present application may receive access request information sent by a client for accessing the application. The access request information comprises configuration information of the application, and the configuration information comprises application name information of the application. And then, searching an IP information list associated with the application name information according to the application name information. And then, responding to the searched IP information list associated with the application name information, modifying the configuration information according to the searched IP information list, and generating new configuration information. And finally, controlling the target server to allocate resources to the application according to the new configuration information. According to the method and the device, the configuration information during application access is modified by adopting the IP information list associated with the application, so that the target server can allocate resources to the application by adopting the modified new configuration information, the application accessed to the target server is realized, and after updating or restarting is carried out, the fixed IP address in the IP information list is always corresponding to the application.
With further reference to fig. 4, a flow 400 of yet another embodiment of a method for controlling access of an application is shown. The flow 400 of the method for controlling access of an application comprises the steps of:
step 401, receiving access request information for accessing an application sent by a client.
Step 402, according to the application name information, searching an IP information list associated with the application name information.
Step 403, in response to finding the IP information list associated with the application name information, modifying the configuration information according to the found IP information list, generating new configuration information, and storing the new configuration information in the storage device.
In this embodiment, the execution subject may further obtain new configuration information by:
the first step is to select the IP information with the occupation state information as the first state information from the IP information list. The first state information is used for representing that the corresponding IP address is in an idle state currently. In this embodiment, the first state information may be any information for representing that the corresponding IP address is currently in an idle state. As an example, the first state information may be a number "0" for characterizing that the corresponding IP address is currently in an idle state. As another example, the first status information may also be a character group "free" for characterizing that the corresponding IP address is currently in an idle state.
And secondly, writing the list name information of the IP information list and the IP address in the selected IP information into the configuration information to obtain new configuration information. In the present embodiment, each IP information list has list name information. The list name information may be various information for identifying the identity of the IP information list. As an example, the list name information may be a character group "test 1" for identifying the identity of the IP information list.
And step 404, controlling the target server to allocate resources to the application according to the new configuration information.
In the embodiment, the specific operations of steps 401, 402, 404 are substantially the same as the operations of steps 201, 202, 204 in the embodiment shown in fig. 2, and are not repeated herein.
Step 405, receiving deletion request information for deleting the application sent by the client, where the deletion request information includes application name information of the application.
In this embodiment, the execution main body may receive, by a wired connection manner or a wireless connection manner, deletion request information for deleting the application, which is sent by the client connected in communication. The deletion request information may be various information for requesting deletion of the accessed application. Wherein the deletion request information includes application name information of the application.
Step 406, finding new configuration information including the application name information according to the application name information.
In this embodiment, since the new configuration information stored in the storage device includes the application name information, the execution subject may find the new configuration information including the application name information by using the application name information.
Step 407, obtaining list name information and IP address in the new configuration information.
In this embodiment, since the execution main body in step 403 obtains the new configuration information by writing the list name information and the IP address into the configuration information, and then stores the obtained new configuration information in the storage device. The execution agent may acquire the list name information and the IP address from the new configuration information stored in the storage device.
Step 408, finding an IP information list according to the obtained list name information, and finding the IP information in the IP information list according to the IP address; and modifying the found occupation state information in the IP information into first state information.
In this embodiment, execution may employ list name information to find the IP information list from the storage device. Then, the IP information in the IP information list is searched by adopting the IP address. And finally, modifying the found occupation state information in the IP information into first state information for representing that the corresponding IP address is in an idle state.
Step 409, delete the new configuration information and control the target server to reclaim the resources allocated to the application.
In this embodiment, when the application requests to delete access (quit access), the execution principal may delete the new configuration information. In addition, after the new configuration information is deleted, the execution main body sends an instruction for recovering the allocated resources to the target server, and the target server is controlled to recover the resources allocated to the application. In addition, the execution main body can also modify the found occupation state information in the IP information into first state information used for representing that the corresponding IP address is in an idle state, and can ensure that the application always corresponds to a fixed IP address in an IP information list when accessing next time.
As can be seen from fig. 4, compared with the embodiment corresponding to fig. 2, the flow 400 of the method for controlling access of an application in this embodiment embodies a step of deleting an accessed application, a step of recovering an allocated resource, and a step of modifying occupation state information in IP information in an IP information list associated with application name information in a storage device. Therefore, the scheme described in this embodiment may help to ensure that the application always corresponds to a fixed IP address in the IP information list when accessing next time.
With further reference to fig. 5, as an implementation of the methods shown in the above-mentioned figures, the present application provides an embodiment of an apparatus for controlling access of an application, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus may be specifically applied to various servers.
As shown in fig. 5, the apparatus 500 for controlling access of an application of the present embodiment includes: an access receiving unit 501 configured to receive access request information sent by a client for accessing an application. The access request information comprises configuration information of the application, and the configuration information comprises application name information of the application. A list searching unit 502 configured to search an IP information list associated with the application name information according to the application name information. The configuration generating unit 503 is configured to, in response to finding the IP information list associated with the application name information, modify the configuration information according to the found IP information list, and generate new configuration information. A resource allocation unit 504 configured to control the target server to allocate resources to the application according to the new configuration information.
In some optional implementations of this embodiment, the IP information in the IP information list may include: IP addresses and occupancy status information for IP addresses.
In some optional implementation manners of this embodiment, modifying the configuration information according to the found IP information list, and generating new configuration information includes: selecting IP information with occupation state information as first state information from the IP information list, wherein the first state information is used for representing that the corresponding IP address is in an idle state at present; and writing the list name information of the IP information list and the IP address in the selected IP information into the configuration information to obtain new configuration information.
In some optional implementations of this embodiment, the apparatus may further include an occupancy setting unit (not shown in the figure). The occupation setting unit may be configured to modify occupation state information in the selected IP information into second state information, where the second state information is used to represent that the corresponding IP address is currently in an occupation state.
In some optional implementations of this embodiment, the apparatus may further include a deletion receiving unit, a configuration searching unit, and a configuration deleting unit (not shown in the figure). The deletion receiving unit may be configured to receive deletion request information for deleting the application, which is sent by the client, and the deletion request information includes application name information of the application. The configuration finding unit may be configured to find new configuration information including the application name information according to the application name information. And a configuration deleting unit which can be configured to delete the new configuration information and control the target server to recycle the resource allocated to the application.
In some optional implementations of this embodiment, the apparatus may further include an information obtaining unit and an idle setting unit (not shown in the figure). Wherein the information acquiring unit may be configured to acquire the list name information and the IP address in the new configuration information. The idle setting unit may be configured to find the IP information list according to the acquired list name information, and find the IP information in the IP information list according to the IP address; and modifying the found occupation state information in the IP information into first state information.
In some optional implementations of this embodiment, the configuration information further includes a quantity parameter; and the apparatus may further include a list generation unit and a list storage unit (not shown in the figure). Wherein the list generating unit may be configured to, in response to not finding the IP information list associated with the application name information, allocate a set number of IP addresses according to the quantity parameter in the configuration information, and generate an IP information list for recording IP information of the set number of IP addresses, wherein the set number matches the quantity parameter. The list storage unit may be configured to store the application name information in association with the IP information list.
In the apparatus provided by the foregoing embodiment of the present application, the access receiving unit 501 receives access request information for accessing an application, which is sent by a client. The access request information comprises configuration information of the application, and the configuration information comprises application name information of the application. The list search unit 502 searches an IP information list associated with the application name information according to the application name information. In response to finding the IP information list associated with the application name information, the configuration generating unit 503 modifies the configuration information according to the found IP information list to generate new configuration information. The resource allocation unit 504 controls the target server to allocate resources to the application according to the new configuration information. In the device of this embodiment, the IP information list associated with the application is used to modify the configuration information when the application is accessed, so that the target server can allocate resources to the application by using the modified new configuration information, thereby implementing the application accessed to the target server, and after the update or the restart, the application always corresponds to the fixed IP address in the IP information list.
Referring now to FIG. 6, shown is a block diagram of a computer system 600 suitable for use in implementing a server according to embodiments of the present application. The server shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU)601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the system 600 are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program performs the above-described functions defined in the method of the present application when executed by a Central Processing Unit (CPU) 601. It should be noted that the computer readable medium of the present application can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes an access receiving unit, a list lookup unit, a configuration generation unit, and a resource allocation unit. The names of these units do not form a limitation on the unit itself in some cases, for example, the access receiving unit may also be described as a "unit that receives access request information for accessing an application sent by a client".
As another aspect, the present application also provides a computer-readable medium, which may be contained in the apparatus described in the above embodiments; or may be present separately and not assembled into the device. The computer readable medium carries one or more programs which, when executed by the apparatus, cause the apparatus to: receiving access request information which is sent by a client and used for accessing an application, wherein the access request information comprises configuration information of the application, and the configuration information comprises application name information of the application; searching an IP information list associated with the application name information according to the application name information; in response to the found IP information list associated with the application name information, modifying the configuration information according to the found IP information list to generate new configuration information; and controlling the target server to allocate resources to the application according to the new configuration information.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the invention. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (16)

1. A method for controlling access of an application, comprising:
receiving access request information sent by a client and used for accessing an application, wherein the access request information comprises configuration information of the application, the configuration information comprises application name information of the application, and the access application is used for representing that the application is issued to a target server to run;
searching an Internet Protocol (IP) information list associated with the application name information according to the application name information;
in response to the found IP information list associated with the application name information, modifying the configuration information according to the found IP information list to generate new configuration information, wherein the new configuration information comprises IP information and the application name information of the application;
and controlling the target server to allocate resources to the application according to the new configuration information.
2. The method of claim 1, wherein the IP information in the list of IP information comprises:
IP addresses and occupancy status information for IP addresses.
3. The method according to claim 2, wherein the modifying the configuration information according to the found IP information list to generate new configuration information includes:
selecting IP information with occupation state information as first state information from the IP information list, wherein the first state information is used for representing that the corresponding IP address is in an idle state at present;
and writing the list name information of the IP information list and the IP address in the selected IP information into the configuration information to obtain new configuration information.
4. The method of claim 3, wherein after said deriving new configuration information, the method further comprises:
and modifying the occupation state information in the selected IP information into second state information, wherein the second state information is used for representing that the corresponding IP address is in the occupation state at present.
5. The method of claim 4, wherein the method further comprises:
receiving deletion request information which is sent by the client and used for deleting the application, wherein the deletion request information comprises application name information of the application;
according to the application name information, finding the new configuration information comprising the application name information;
and deleting the new configuration information, and controlling the target server to recycle the resources allocated to the application.
6. The method of claim 5, wherein prior to said deleting the new configuration information, the method further comprises:
acquiring list name information and IP addresses in the new configuration information;
searching an IP information list according to the acquired list name information, and searching the IP information in the IP information list according to the IP address; and modifying the found occupation state information in the IP information into first state information.
7. The method according to one of claims 1-6, wherein the configuration information further comprises a quantity parameter; and
the method further comprises the following steps:
responding to the IP information list which is not found and is associated with the application name information, distributing a set number of IP addresses according to the quantity parameter in the configuration information, and generating an IP information list for recording the IP information of the set number of IP addresses, wherein the set number is matched with the quantity parameter;
and storing the application name information and the IP information list in an associated manner.
8. An apparatus for controlling access of an application, comprising:
the access receiving unit is configured to receive access request information sent by a client for accessing an application, wherein the access request information comprises configuration information of the application, the configuration information comprises application name information of the application, and the access application is used for representing that the application is issued to a target server to run;
a list searching unit configured to search an Internet Protocol (IP) information list associated with the application name information according to the application name information;
a configuration generating unit configured to, in response to finding the IP information list associated with the application name information, modify the configuration information according to the found IP information list, and generate new configuration information, where the new configuration information includes IP information and application name information of the application;
and the resource allocation unit is configured to control the target server to allocate resources to the application according to the new configuration information.
9. The apparatus of claim 8, wherein the IP information in the list of IP information comprises:
IP addresses and occupancy status information for IP addresses.
10. The apparatus according to claim 9, wherein the modifying the configuration information according to the found IP information list to generate new configuration information includes:
selecting IP information with occupation state information as first state information from the IP information list, wherein the first state information is used for representing that the corresponding IP address is in an idle state at present;
and writing the list name information of the IP information list and the IP address in the selected IP information into the configuration information to obtain new configuration information.
11. The apparatus of claim 10, wherein the apparatus further comprises:
and the occupation setting unit is configured to modify the occupation state information in the selected IP information into second state information, wherein the second state information is used for representing that the corresponding IP address is in the occupation state currently.
12. The apparatus of claim 11, wherein the apparatus further comprises:
a deletion receiving unit configured to receive deletion request information for deleting the application sent by the client, the deletion request information including application name information of the application;
a configuration searching unit configured to search the new configuration information including the application name information according to the application name information;
a configuration deleting unit configured to delete the new configuration information and control the target server to reclaim resources allocated to the application.
13. The apparatus of claim 12, wherein the apparatus further comprises:
an information obtaining unit configured to obtain list name information and an IP address in the new configuration information;
the idle setting unit is configured to find the IP information list according to the acquired list name information and find the IP information in the IP information list according to the IP address; and modifying the found occupation state information in the IP information into first state information.
14. The apparatus according to one of claims 8-13, wherein the configuration information further comprises a quantity parameter; and
the device further comprises:
a list generating unit configured to, in response to not finding the IP information list associated with the application name information, allocate a set number of IP addresses according to a quantity parameter in the configuration information, and generate an IP information list for recording IP information of the set number of IP addresses, where the set number matches the quantity parameter;
a list storage unit configured to store the application name information in association with the IP information list.
15. A server, comprising:
one or more processors;
a storage device having one or more programs stored thereon,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-7.
16. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN201910106724.7A 2019-02-02 2019-02-02 Method and apparatus for controlling access of applications Active CN109769030B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910106724.7A CN109769030B (en) 2019-02-02 2019-02-02 Method and apparatus for controlling access of applications

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910106724.7A CN109769030B (en) 2019-02-02 2019-02-02 Method and apparatus for controlling access of applications

Publications (2)

Publication Number Publication Date
CN109769030A CN109769030A (en) 2019-05-17
CN109769030B true CN109769030B (en) 2022-01-11

Family

ID=66456101

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910106724.7A Active CN109769030B (en) 2019-02-02 2019-02-02 Method and apparatus for controlling access of applications

Country Status (1)

Country Link
CN (1) CN109769030B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101127727A (en) * 2007-09-28 2008-02-20 电信科学技术研究院 IP address configuration and mobile detection method for mobile IP
CN102075571A (en) * 2010-12-31 2011-05-25 成都市华为赛门铁克科技有限公司 Method, equipment and system for executing application program
CN104378456A (en) * 2014-11-20 2015-02-25 无锡悟莘科技有限公司 Allocation optimization method for IP addresses in local area network
CN104852937A (en) * 2014-02-14 2015-08-19 腾讯科技(北京)有限公司 Network access method and device for mobile application
CN104936177A (en) * 2014-03-20 2015-09-23 中国移动通信集团广东有限公司 Access authentication method and access authentication system
EP3047661A1 (en) * 2013-09-17 2016-07-27 Interdigital Patent Holdings, Inc. Connectivity augmented services architecture, discovery and connection
CN108040085A (en) * 2017-11-20 2018-05-15 广州华多网络科技有限公司 Method for network access, device and server
CN109274584A (en) * 2018-09-28 2019-01-25 乐蜜有限公司 Cut-in method, device, client device and the storage medium of access server

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101410619B1 (en) * 2007-09-28 2014-06-23 삼성전자주식회사 Zigbee network system and method for assigning ip address of client device in zigbee network system
CN104993953B (en) * 2015-06-19 2019-02-26 北京奇虎科技有限公司 The method and apparatus for detecting network service state
CN107306255A (en) * 2016-04-21 2017-10-31 阿里巴巴集团控股有限公司 Defend flow attacking method, the presets list generation method, device and cleaning equipment
CN109005096B (en) * 2017-06-14 2021-03-30 北京小米移动软件有限公司 Application interaction method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101127727A (en) * 2007-09-28 2008-02-20 电信科学技术研究院 IP address configuration and mobile detection method for mobile IP
CN102075571A (en) * 2010-12-31 2011-05-25 成都市华为赛门铁克科技有限公司 Method, equipment and system for executing application program
EP3047661A1 (en) * 2013-09-17 2016-07-27 Interdigital Patent Holdings, Inc. Connectivity augmented services architecture, discovery and connection
CN104852937A (en) * 2014-02-14 2015-08-19 腾讯科技(北京)有限公司 Network access method and device for mobile application
CN104936177A (en) * 2014-03-20 2015-09-23 中国移动通信集团广东有限公司 Access authentication method and access authentication system
CN104378456A (en) * 2014-11-20 2015-02-25 无锡悟莘科技有限公司 Allocation optimization method for IP addresses in local area network
CN108040085A (en) * 2017-11-20 2018-05-15 广州华多网络科技有限公司 Method for network access, device and server
CN109274584A (en) * 2018-09-28 2019-01-25 乐蜜有限公司 Cut-in method, device, client device and the storage medium of access server

Also Published As

Publication number Publication date
CN109769030A (en) 2019-05-17

Similar Documents

Publication Publication Date Title
CN109150978B (en) Method and device for debugging micro service
US10977062B2 (en) System for starting virtual machine using mirror image file stored in units of a distributed block storage system mapped to units of a logical volume
US9525592B2 (en) Client/server network environment setup method and system
EP3667500B1 (en) Using a container orchestration service for dynamic routing
CN108282529B (en) System, method and device for publishing and subscribing data
CN109388626B (en) Method and apparatus for assigning numbers to services
CN110995826B (en) Communication processing method and device, computer readable medium and electronic equipment
JP7446332B2 (en) Software program management
CN108011949B (en) Method and apparatus for acquiring data
CN109542862B (en) Method, device and system for controlling mounting of file system
CN113037529B (en) Reserved bandwidth allocation method, device, equipment and storage medium
US20110264627A1 (en) System and method for providing automatic update
CN111756711A (en) Flow control method, device, system and storage medium
CN109271193B (en) Data processing method, device, equipment and storage medium
CN111062572A (en) Task allocation method and device
CN109150927B (en) File issuing method and device for file storage system
CN109582487B (en) Method and apparatus for transmitting information
CN107918617B (en) Data query method and device
CN107045452B (en) Virtual machine scheduling method and device
CN109769030B (en) Method and apparatus for controlling access of applications
CN108696557B (en) Information processing system, method and device
CN112491940A (en) Request forwarding method and device of proxy server, storage medium and electronic equipment
US11876729B2 (en) Method and system for a proactive assignment of virtual network functions in local data systems
WO2021232860A1 (en) Communication method, apparatus and system
CN112839071B (en) Training system, training data access method and device, electronic equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40006422

Country of ref document: HK

CB02 Change of applicant information

Address after: Room 221, 2nd floor, Block C, 18 Kechuang 11th Street, Daxing Economic and Technological Development Zone, Beijing, 100176

Applicant after: Jingdong Technology Holding Co.,Ltd.

Address before: Room 221, 2nd floor, Block C, 18 Kechuang 11th Street, Daxing Economic and Technological Development Zone, Beijing, 100176

Applicant before: Jingdong Digital Technology Holding Co.,Ltd.

Address after: Room 221, 2nd floor, Block C, 18 Kechuang 11th Street, Daxing Economic and Technological Development Zone, Beijing, 100176

Applicant after: Jingdong Digital Technology Holding Co.,Ltd.

Address before: Room 221, 2nd floor, Block C, 18 Kechuang 11th Street, Daxing Economic and Technological Development Zone, Beijing, 100176

Applicant before: JINGDONG DIGITAL TECHNOLOGY HOLDINGS Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant