CN110727499A - Resource data acquisition method and device, computer equipment and storage medium - Google Patents

Resource data acquisition method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN110727499A
CN110727499A CN201910881900.4A CN201910881900A CN110727499A CN 110727499 A CN110727499 A CN 110727499A CN 201910881900 A CN201910881900 A CN 201910881900A CN 110727499 A CN110727499 A CN 110727499A
Authority
CN
China
Prior art keywords
address
target
node instance
service server
service
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.)
Pending
Application number
CN201910881900.4A
Other languages
Chinese (zh)
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201910881900.4A priority Critical patent/CN110727499A/en
Publication of CN110727499A publication Critical patent/CN110727499A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements or network protocols for addressing or naming
    • H04L61/25Network arrangements or network protocols for addressing or naming mapping of addresses of the same type; address translation
    • H04L61/2503Internet protocol [IP] address translation
    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45595Network integration; Enabling network access in virtual machine instances

Abstract

The application relates to the technical field of cloud computing, and provides a method and a device for acquiring resource data, computer equipment and a storage medium. The method comprises the following steps: the method comprises the steps of receiving a first access request carrying a client source address and a target virtual IP address, determining a target node instance according to the target virtual IP address, obtaining a target service server corresponding to the target node instance, carrying out address mapping according to the target virtual IP address through the target node instance to obtain a service source address, sending a second access request carrying the service source address to the target service server, wherein the second access request is used for obtaining resource data from the target service server and sending the resource data to a terminal pointed by the client source address. By adopting the method, the accurate pushing of the resource data can be realized.

Description

Resource data acquisition method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of cloud computing technologies, and in particular, to a method and an apparatus for acquiring resource data, a computer device, and a storage medium.
Background
With the development of computer technology, cloud platforms have emerged. The cloud platform can provide sufficient computing resources and network resources for users, and the users can build a plurality of private networks on the cloud platform and access public service resources on the cloud platform, such as file storage, databases and the like, through the private networks.
However, since the cloud platform needs to provide services for all users and IP addresses overlap between private networks of the users, the cloud platform cannot identify the user virtual machine through an IP (Internet Protocol Address), which may result in that accurate resource data pushing cannot be implemented when the user virtual machine needs to obtain resource data.
Disclosure of Invention
In view of the foregoing, it is necessary to provide a method, an apparatus, a computer device, and a storage medium for resource data acquisition, which can realize accurate pushing of resource data.
A method of resource data acquisition, the method comprising:
receiving a first access request carrying a client source address and a target virtual IP address;
determining a target node instance according to the target virtual IP address, and acquiring a target service server corresponding to the target node instance;
performing address mapping according to the target virtual IP address through the target node instance to obtain a service source address;
sending a second access request carrying a service source address to a target service server, wherein the second access request is used for acquiring resource data from the target service server;
and sending the resource data to a terminal pointed by the source address of the client.
In one embodiment, before determining the target node instance according to the target virtual IP address, the method further includes:
receiving a request for creating a node instance, and determining the specification of the required node instance according to the proprietary network parameters in the request for creating the node instance;
a node instance is created according to the required node instance specification.
In one embodiment, performing, by the target node instance, address mapping according to the target virtual IP address, and obtaining the service source address includes:
obtaining an intranet IP address;
and (4) obtaining a service source address by the target node example and according to the intranet IP address, making fullnat on the target virtual IP address.
In one embodiment, acquiring a target service server corresponding to a target node instance includes:
inquiring a preset service table according to the resource data acquisition request in the first access request, and determining a service area;
determining a corresponding service server set according to the service area;
and determining a target service server corresponding to the target node instance in the service server set according to a preset relationship list, wherein the relationship list is used for describing the corresponding relationship between the node instance and the service server.
In one embodiment, before determining a target service server corresponding to a target node instance in a service server set according to a preset relationship list, the method further includes:
receiving a binding request;
determining a service server corresponding to each node instance according to the binding request;
acquiring IP address information of a service server;
and configuring IP information on each node instance according to the IP address information to obtain a relation list.
In one embodiment, determining a target service server corresponding to a target node instance in a service server set according to a preset relationship list includes:
determining a candidate service server set corresponding to the target node instance in the service server set according to a preset relation list;
the method comprises the steps of obtaining a client source address in a first access request, and obtaining a client address value according to the client source address and a preset Hash algorithm;
inquiring a preset address list according to the address value of the client;
when the corresponding target address value exists in the address list, determining a target service server corresponding to the target node instance according to the target address value;
and when the corresponding target address value does not exist in the address list, randomly selecting a service server from the candidate service server set as a target service server corresponding to the target node instance.
An apparatus for resource data acquisition, the apparatus comprising:
the receiving module is used for receiving a first access request carrying a client source address and a target virtual IP address;
the acquisition module is used for determining a target node instance according to the target virtual IP address and acquiring a target service server corresponding to the target node instance;
the address mapping module is used for carrying out address mapping according to the target virtual IP address through the target node instance to obtain a service source address;
the sending module is used for sending a second access request carrying a service source address to the target service server, and the second access request is used for acquiring resource data from the target service server;
and the pushing module is used for sending the resource data to the terminal pointed by the source address of the client.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
receiving a first access request carrying a client source address and a target virtual IP address;
determining a target node instance according to the target virtual IP address, and acquiring a target service server corresponding to the target node instance;
performing address mapping according to the target virtual IP address through the target node instance to obtain a service source address;
sending a second access request carrying a service source address to a target service server, wherein the second access request is used for acquiring resource data from the target service server;
and sending the resource data to a terminal pointed by the source address of the client.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
receiving a first access request carrying a client source address and a target virtual IP address;
determining a target node instance according to the target virtual IP address, and acquiring a target service server corresponding to the target node instance;
performing address mapping according to the target virtual IP address through the target node instance to obtain a service source address;
sending a second access request carrying a service source address to a target service server, wherein the second access request is used for acquiring resource data from the target service server;
and sending the resource data to a terminal pointed by the source address of the client.
According to the method, the device, the computer equipment and the storage medium for acquiring the resource data, the target virtual IP address is mapped to the service source address in an address mapping mode, so that a second access request carrying the service source address is sent to the target service server, the resource data are acquired from the target service server, and after the resource data are acquired, the acquired resource data are pushed to the client source address carried in the first access request, so that when a user accesses the target service server to acquire the resource data by sending the first access request, the user can be identified through the target virtual IP address, the service source address and the client source address, the resource data are fed back through the client source address, and accurate pushing of the resource data is achieved.
Drawings
FIG. 1 is a diagram illustrating an exemplary implementation of a method for resource data acquisition;
FIG. 2 is a flow diagram illustrating a method for resource data acquisition in one embodiment;
FIG. 3 is a schematic flow chart diagram illustrating a method for resource data acquisition in another embodiment;
FIG. 4 is a schematic flow chart diagram illustrating a method for resource data acquisition in yet another embodiment;
FIG. 5 is a schematic illustration of a sub-flow chart of step S204 in FIG. 2 according to an embodiment;
FIG. 6 is a schematic view of a sub-flow chart of step S204 in FIG. 2 according to another embodiment;
FIG. 7 is a schematic sub-flow chart illustrating step S506 in FIG. 5 according to an embodiment;
FIG. 8 is a block diagram of an apparatus for resource data acquisition in one embodiment;
FIG. 9 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The resource data acquisition method provided by the application can be applied to the application environment shown in fig. 1. The terminal 102 communicates with the server 104 through a network, and the server 104 communicates with the target service server 106 through the network. The server 104 receives a first access request which is sent by the terminal 102 and carries a client source address and a target virtual IP address, determines a target node instance according to the target virtual IP address, acquires a target service server 106 corresponding to the target node instance, performs address mapping according to the target virtual IP address through the target node instance to obtain a service source address, and sends a second access request carrying the service source address to the target service server 106, wherein the second access request is used for acquiring resource data from the target service server and sending the resource data to the terminal 102 to which the client source address points. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the server 104 may be implemented by an independent server or a server cluster formed by a plurality of servers.
In one embodiment, as shown in fig. 2, a method for resource data acquisition is provided, which is described by taking the method as an example applied to the server in fig. 1, and includes the following steps:
s202: receiving a first access request carrying a client source address and a target virtual IP address.
When a user wants to acquire resource data, a first access request is sent to a server through a client, and a target virtual IP address and a client source address are carried in the first access request. The client source address is an address corresponding to the client and sending the first access request, and the target virtual IP address is an address corresponding to the target node instance and receiving the first access request.
S204: and determining a target node instance according to the target virtual IP address, and acquiring a target service server corresponding to the target node instance.
The target node instance refers to a node instance corresponding to a target virtual IP address, a corresponding relation table of each node instance and a virtual private cloud (virtual IP address) in the server is recorded in a preset database, and the server searches the corresponding relation table according to the target virtual IP address to determine the target node instance. The node instance is actually a set of containers, and specification parameters (such as a Central Processing Unit (CPU), a memory, a hard disk, and the like) of the set of containers are configured in advance.
The first access request further includes a resource data acquisition request, the server queries a preset service table by analyzing the resource data acquisition request, and can determine a service area where the user wants to acquire the resource, and the service table stores a corresponding relationship between each resource data acquisition request and the service area. The service area comprises a service server set, and the server can determine a target service server corresponding to a target node instance in the service server set according to a preset relation list. The relationship list is used for describing the corresponding relationship between the node instance and the service server.
S206: and performing address mapping according to the target virtual IP address through the target node instance to obtain a service source address.
Address mapping refers to address translation, i.e. address translation between a target virtual IP address and a service source address in the present application. The target virtual IP address is an address which is carried by the first access request, is in the same network segment with the client source address and is used for pointing to the target node instance, in order to acquire resource data, the server needs to perform address mapping according to the target virtual IP address through the target node instance to convert the target virtual IP address into a service source address, the service source address refers to an intranet IP address of the server, specifically, the intranet IP address of the server and the IP address of the target service server are also in the same network segment, after the address conversion is completed, the server sends a second access request carrying the service source address to the target service server to request for acquiring the resource data, and the target service server can accurately feed back the resource data to the server according to the service source address because the address conversion is performed at the position.
S208: and sending a second access request carrying the service source address to the target service server, wherein the second access request is used for acquiring resource data from the target service server.
The service source address refers to an intranet IP address of the server, after the target service server is determined and address mapping is completed, the server sends a second access request carrying the service source address to the target service server, and the second access request is used for acquiring resource data from the target service server. When the target service server receives the second access request, the resource data is fed back to the server according to the service source address carried in the second access request.
S210: and sending the resource data to a terminal pointed by the source address of the client.
After receiving the resource data fed back by the target service server, the server sends the obtained resource data to the terminal pointed by the client source address carried in the first access request. The source address of the client can be used for positioning the terminal of the user, and by the method, the accurate pushing of the resource data can be realized, namely, the server can accurately send the resource data to the terminal of the user.
According to the method for acquiring the resource data, the target virtual IP address is mapped to the service source address in an address mapping mode, so that a second access request carrying the service source address is sent to the target service server, the resource data are acquired from the target service server, and after the resource data are acquired, the acquired resource data are pushed to the client source address carried in the first access request, so that when a user accesses the target service server to acquire the resource data by sending the first access request, the user can be identified through the target virtual IP address, the service source address and the client source address, the resource data are fed back through the client source address, and accurate pushing of the resource data is achieved.
In one embodiment, as shown in fig. 3, before S204, the method further includes:
s302: receiving a request for creating a node instance, and determining the specification of the required node instance according to the proprietary network parameters in the request for creating the node instance;
s304: a node instance is created according to the required node instance specification.
The server comprises a preset physical machine cluster, the node instance is actually a group of containers, and specification parameters (such as CPU, memory, hard disk and the like) of the group of containers are configured in the physical machine cluster in advance. The create node instance request includes a private network parameter including a private network ID (Identity document) and an IP address within the private network. When the server receives a request for creating the node instance, the specification of the required node instance is determined according to the proprietary network parameters, so that a group of containers is pulled up on the physical machine cluster according to the rule of the required node instance, and the corresponding relation between the node instance and an IP address in the proprietary network is recorded in a corresponding relation table of a preset database.
Specifically, because the private network parameter includes an IP address in the private network, when the user sends the first access request from the client, the target virtual IP address is an IP address belonging to the same network segment as the source address of the client, so that the user feels that the node instance and the service for acquiring the resource data are shared, and the user experience is improved. Furthermore, a physical machine cluster is built by adopting a plurality of physical machines, so that the condition that other standby physical machines can work when one physical machine fails can be ensured. The server creates a node instance for the user's private network according to the create node instance request, the node instance is embodied as a group of containers on a preset physical machine cluster, and the containers belong to the private network and are isolated from the containers of other private networks. The container is in an all active mode so as to realize high throughput between the virtual machine and the service server.
According to the embodiment, the required node instance specification is determined according to the node instance creating request, the node instance is created according to the required node instance specification, and the creation of the node instance is realized.
In one embodiment, as shown in fig. 4, S206 includes:
s402: obtaining an intranet IP address;
s404: and (4) obtaining a service source address by the target node example and according to the intranet IP address, making fullnat on the target virtual IP address.
In a conventional NAT (Network Address Translation) mode, there is an inevitable problem that a LVS (Linux Virtual Server) and a service Server must be in the same VLAN (Virtual Local Area Network), otherwise the LVS cannot be used as a gateway of the service Server, which may cause that a service Server across VLANs cannot be accessed, and horizontal extension of the LVS is limited. By adopting the fullnat mode, the problem that the LVS and the service server cross the VLAN can be solved, after the problem of the cross VLAN is solved, the LVS and the service server do not have the subordination relation on the VLAN any more, a plurality of LVS can correspond to a plurality of service servers, and the problem of horizontal capacity expansion can be solved.
The IP addresses are divided into two types in the target node instance, a target virtual IP address and a service source address. The target virtual IP address is communicated with the private network (namely the client source address) of the user, is exposed to the user and belongs to the same network segment with the private network of the user. The service source address is communicated with a target service server in a service area, and specifically, the service source address is an intranet IP address of the server. The address mapping translation is implemented by the LVS fullnat. When a user needs to access a service, a first access request carrying a target virtual IP address is sent to a server through a client, the server modifies the target address of the first access request into the IP address of a target service server through a target node instance, the source address is changed into a service source address (namely the own intranet IP address), a second access request carrying the service source address is sent to the target service server, after resource data fed back by the target service server are received, the target address is changed into the client source address, the source address is changed into the own IP address, and the obtained resource data are pushed to the client source address.
In the embodiment, the intranet IP address is obtained, and the target virtual IP address is fullnat according to the intranet IP address through the target node instance to obtain the service source address, so that the service source address is obtained.
In one embodiment, as shown in fig. 5, S204 includes:
s502: inquiring a preset service table according to the resource data acquisition request in the first access request, and determining a service area;
s504: determining a corresponding service server set according to the service area;
s506: and determining a target service server corresponding to the target node instance in the service server set according to a preset relationship list, wherein the relationship list is used for describing the corresponding relationship between the node instance and the service server.
The server inquires a preset service area according to the resource data acquisition request in the first access request, and determines a service area, wherein the corresponding relation between each resource data acquisition request and the service area is stored in the service area. And after the service areas are determined, the server can determine a corresponding service server set according to the service areas, and further determine a target service server corresponding to the target node instance in the service server set according to a preset relation list. The preset relationship list is used for describing the corresponding relationship between the node instances and the service servers, and the plurality of node instances and the plurality of service servers respectively correspond to each other in the relationship list.
In the embodiment, the service area is determined according to the resource data acquisition request in the first access request, and the target service server corresponding to the target node instance is determined according to the service area and the preset relationship list, so that the target service server corresponding to the target node instance is determined.
In one embodiment, as shown in fig. 6, before S506, the method further includes:
s602: receiving a binding request;
s604: determining a service server corresponding to each node instance according to the binding request;
s606: acquiring IP address information of a service server;
s608: and configuring IP information on each node instance according to the IP address information to obtain a relation list.
The binding request refers to a request for binding each node instance and each service server requested by a user. After receiving the binding request, the server firstly determines the service purchased by the user according to the binding request, thereby determining a service area corresponding to the service, acquiring the IP address information of the service area, determining an unbound IP address set in the service area, then randomly selecting an IP address from the unbound IP address set as the IP address of the service server corresponding to each node instance, acquiring the IP address information of the service server, and configuring the IP information on each node instance according to the IP address information to obtain a relationship list.
In the embodiment, the service server corresponding to each node instance is determined according to the binding request, the IP address information of the service server is obtained, and the IP information is configured on each node instance according to the IP address information to obtain the relationship list, so that the obtaining of the relationship list is realized.
In one embodiment, as shown in fig. 7, S506 includes:
s702: determining a candidate service server set corresponding to the target node instance in the service server set according to a preset relation list;
s704: the method comprises the steps of obtaining a client source address in a first access request, and obtaining a client address value according to the client source address and a preset Hash algorithm;
s706: inquiring a preset address list according to the address value of the client;
s708: when the corresponding target address value exists in the address list, determining a target service server corresponding to the target node instance according to the target address value;
s710: and when the corresponding target address value does not exist in the address list, randomly selecting a service server from the candidate service server set as a target service server corresponding to the target node instance.
Since one node instance corresponds to a plurality of service servers, the server can determine a candidate service server set corresponding to the target node instance in the service server set according to a preset relationship list. And each service server in the candidate service server set can receive the second access request and feed back corresponding resource data, the server needs to further select a target service server in the candidate service server set, at the moment, the server can obtain a client source address in the first access request, a client address value is obtained according to the client source address and a preset Hash algorithm, a preset address list is inquired according to the client address value, when the corresponding target address value exists in the address list, the target service server corresponding to the target node instance is determined according to the target address value, and when the corresponding target address value does not exist in the address list, the service server is randomly selected from the candidate service server set to serve as the target service server corresponding to the target node instance.
The preset hash algorithm can be set according to the requirement. According to the address value of the client, the preset address list is inquired so as to fixedly distribute the second access request corresponding to the same client to the same service server, namely the server supports session maintenance service of source address hashing. If the client ever sends a first access request to the server to acquire resource data before, the server obtains a corresponding relation between the client and the service server according to a source address of the client and an IP address of a target service server, and stores the corresponding relation into an address list.
In the embodiment, the address value of the client is obtained according to the source address of the client and the preset hash algorithm, the preset address list is queried according to the address value of the client, and the target service server is further determined according to the query condition and the candidate service server set, so that the target service server is determined.
It should be understood that although the various steps in the flow charts of fig. 2-7 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-7 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 8, there is provided an apparatus for resource data acquisition, including: a receiving module 802, an obtaining module 804, an address mapping module 806, a sending module 808, and a pushing module 810, wherein:
a receiving module 802, configured to receive a first access request carrying a client source address and a target virtual IP address;
an obtaining module 804, configured to determine a target node instance according to the target virtual IP address, and obtain a target service server corresponding to the target node instance;
an address mapping module 806, configured to perform address mapping according to the target virtual IP address by using the target node instance to obtain a service source address;
a sending module 808, configured to send a second access request carrying a service source address to a target service server, where the second access request is used to obtain resource data from the target service server;
and the pushing module 810 is configured to send the resource data to the terminal pointed by the client source address.
According to the resource data acquisition device, the target virtual IP address is mapped to the service source address in an address mapping mode, so that a second access request carrying the service source address is sent to the target service server, the resource data are acquired from the target service server, and after the resource data are acquired, the acquired resource data are pushed to the client source address carried in the first access request, so that when a user accesses the target service server to acquire the resource data by sending the first access request, the user can be identified through the target virtual IP address, the service source address and the client source address, the resource data are fed back through the client source address, and accurate pushing of the resource data is achieved.
In one embodiment, the apparatus for resource data acquisition further includes a creating module, where the creating module is configured to receive a request for creating a node instance, determine a specification of a required node instance according to a proprietary network parameter in the request for creating a node instance, and create a node instance according to the specification of the required node instance.
In one embodiment, the address mapping module is further configured to obtain an intranet IP address, and perform fullnat on the target virtual IP address according to the intranet IP address through the target node instance to obtain the service source address.
In one embodiment, the obtaining module is further configured to query a preset service table according to the resource data obtaining request in the first access request, determine a service area, determine a corresponding service server set according to the service area, and determine a target service server corresponding to the target node instance in the service server set according to a preset relationship list, where the relationship list is used to describe a corresponding relationship between the node instance and the service server.
In one embodiment, the obtaining module is further configured to receive the binding request, determine, according to the binding request, a service server corresponding to each node instance, obtain IP address information of the service server, and configure, according to the IP address information, IP information on each node instance to obtain the relationship list.
In one embodiment, the obtaining module is further configured to determine, according to a preset relationship list, a candidate service server set corresponding to the target node instance in the service server set, obtain a client source address in the first access request, obtain a client address value according to the client source address and a preset hash algorithm, query the preset address list according to the client address value, determine, according to the target address value, a target service server corresponding to the target node instance when the corresponding target address value exists in the address list, and randomly select, when the corresponding target address value does not exist in the address list, a service server from the candidate service server set as the target service server corresponding to the target node instance.
For specific limitations of the resource data acquisition device, reference may be made to the above limitations of the resource data acquisition method, which are not described herein again. The modules in the resource data acquisition device can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 9. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing a business service table and a relation list. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of resource data acquisition.
Those skilled in the art will appreciate that the architecture shown in fig. 9 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, there is provided a computer device comprising a memory storing a computer program and a processor implementing the following steps when the processor executes the computer program:
receiving a first access request carrying a client source address and a target virtual IP address;
determining a target node instance according to the target virtual IP address, and acquiring a target service server corresponding to the target node instance;
performing address mapping according to the target virtual IP address through the target node instance to obtain a service source address;
sending a second access request carrying a service source address to a target service server, wherein the second access request is used for acquiring resource data from the target service server;
and sending the resource data to a terminal pointed by the source address of the client.
The computer equipment for acquiring the resource data maps the target virtual IP address into the service source address in an address mapping mode, so that a second access request carrying the service source address is sent to the target service server, the resource data is acquired from the target service server, and after the resource data is acquired, the acquired resource data is pushed to the client source address carried in the first access request, so that when a user accesses the target service server to acquire the resource data by sending the first access request, the user can be identified by the target virtual IP address, the service source address and the client source address, and the resource data is fed back by the client source address, so that the accurate pushing of the resource data is realized.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
receiving a request for creating a node instance, and determining the specification of the required node instance according to the proprietary network parameters in the request for creating the node instance;
a node instance is created according to the required node instance specification.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
obtaining an intranet IP address;
and (4) obtaining a service source address by the target node example and according to the intranet IP address, making fullnat on the target virtual IP address.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
inquiring a preset service table according to the resource data acquisition request in the first access request, and determining a service area;
determining a corresponding service server set according to the service area;
and determining a target service server corresponding to the target node instance in the service server set according to a preset relationship list, wherein the relationship list is used for describing the corresponding relationship between the node instance and the service server.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
receiving a binding request;
determining a service server corresponding to each node instance according to the binding request;
acquiring IP address information of a service server;
and configuring IP information on each node instance according to the IP address information to obtain a relation list.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
determining a candidate service server set corresponding to the target node instance in the service server set according to a preset relation list;
the method comprises the steps of obtaining a client source address in a first access request, and obtaining a client address value according to the client source address and a preset Hash algorithm;
inquiring a preset address list according to the address value of the client;
when the corresponding target address value exists in the address list, determining a target service server corresponding to the target node instance according to the target address value;
and when the corresponding target address value does not exist in the address list, randomly selecting a service server from the candidate service server set as a target service server corresponding to the target node instance.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
receiving a first access request carrying a client source address and a target virtual IP address;
determining a target node instance according to the target virtual IP address, and acquiring a target service server corresponding to the target node instance;
performing address mapping according to the target virtual IP address through the target node instance to obtain a service source address;
sending a second access request carrying a service source address to a target service server, wherein the second access request is used for acquiring resource data from the target service server;
and sending the resource data to a terminal pointed by the source address of the client.
The storage medium for acquiring the resource data maps the target virtual IP address into the service source address in an address mapping mode, so that a second access request carrying the service source address is sent to the target service server, the resource data is acquired from the target service server, and after the resource data is acquired, the acquired resource data is pushed to the client source address carried in the first access request, so that when a user accesses the target service server to acquire the resource data by sending the first access request, the user can be identified by the target virtual IP address, the service source address and the client source address, and the resource data is fed back by the client source address, thereby realizing accurate pushing of the resource data.
In one embodiment, the computer program when executed by the processor further performs the steps of:
receiving a request for creating a node instance, and determining the specification of the required node instance according to the proprietary network parameters in the request for creating the node instance;
a node instance is created according to the required node instance specification.
In one embodiment, the computer program when executed by the processor further performs the steps of:
obtaining an intranet IP address;
and (4) obtaining a service source address by the target node example and according to the intranet IP address, making fullnat on the target virtual IP address.
In one embodiment, the computer program when executed by the processor further performs the steps of:
inquiring a preset service table according to the resource data acquisition request in the first access request, and determining a service area;
determining a corresponding service server set according to the service area;
and determining a target service server corresponding to the target node instance in the service server set according to a preset relationship list, wherein the relationship list is used for describing the corresponding relationship between the node instance and the service server.
In one embodiment, the computer program when executed by the processor further performs the steps of:
receiving a binding request;
determining a service server corresponding to each node instance according to the binding request;
acquiring IP address information of a service server;
and configuring IP information on each node instance according to the IP address information to obtain a relation list.
In one embodiment, the computer program when executed by the processor further performs the steps of:
determining a candidate service server set corresponding to the target node instance in the service server set according to a preset relation list;
the method comprises the steps of obtaining a client source address in a first access request, and obtaining a client address value according to the client source address and a preset Hash algorithm;
inquiring a preset address list according to the address value of the client;
when the corresponding target address value exists in the address list, determining a target service server corresponding to the target node instance according to the target address value;
and when the corresponding target address value does not exist in the address list, randomly selecting a service server from the candidate service server set as a target service server corresponding to the target node instance.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method of resource data acquisition, the method comprising:
receiving a first access request carrying a client source address and a target virtual IP address;
determining a target node instance according to the target virtual IP address, and acquiring a target service server corresponding to the target node instance; performing address mapping according to the target virtual IP address through the target node instance to obtain a service source address;
sending a second access request carrying the service source address to the target service server, wherein the second access request is used for acquiring resource data from the target service server;
and sending the resource data to a terminal pointed by the source address of the client.
2. The method of claim 1, wherein prior to determining a target node instance based on the target virtual IP address, further comprising:
receiving a request for creating a node instance, and determining the specification of the required node instance according to the proprietary network parameters in the request for creating the node instance;
and creating a node instance according to the required node instance specification.
3. The method of claim 1, wherein the performing, by the target node instance, address mapping according to the target virtual IP address to obtain a service source address comprises:
obtaining an intranet IP address;
and performing fullnat on the target virtual IP address according to the intranet IP address through the target node example to obtain a service source address.
4. The method of claim 1, wherein the obtaining a target service server corresponding to the target node instance comprises:
inquiring a preset service table according to the resource data acquisition request in the first access request, and determining a service area;
determining a corresponding service server set according to the service area;
and determining a target service server corresponding to the target node instance in the service server set according to a preset relationship list, wherein the relationship list is used for describing the corresponding relationship between the node instance and the service server.
5. The method according to claim 4, wherein before determining a target service server corresponding to the target node instance in the service server set according to a preset relationship list, the method further comprises:
receiving a binding request;
determining a service server corresponding to each node instance according to the binding request;
acquiring IP address information of the service server;
and configuring IP information on each node instance according to the IP address information to obtain a relation list.
6. The method according to claim 4, wherein the determining, according to a preset relationship list, a target service server in the service server set corresponding to the target node instance comprises:
determining a candidate service server set corresponding to the target node instance in the service server set according to a preset relation list;
acquiring a client source address in the first access request, and acquiring a client address value according to the client source address and a preset hash algorithm;
inquiring a preset address list according to the client address value;
when the corresponding target address value exists in the address list, determining a target service server corresponding to the target node instance according to the target address value;
and when the corresponding target address value does not exist in the address list, randomly selecting a service server from the candidate service server set as a target service server corresponding to the target node instance.
7. An apparatus for resource data acquisition, the apparatus comprising:
the receiving module is used for receiving a first access request carrying a client source address and a target virtual IP address;
the acquisition module is used for determining a target node instance according to the target virtual IP address and acquiring a target service server corresponding to the target node instance;
the address mapping module is used for carrying out address mapping according to the target virtual IP address through the target node instance to obtain a service source address;
a sending module, configured to send a second access request carrying the service source address to the target service server, where the second access request is used to obtain resource data from the target service server;
and the pushing module is used for sending the resource data to a terminal pointed by the client source address.
8. The method of claim 7, wherein the receiving module is further configured to receive a create node instance request, determine a required node instance specification according to proprietary network parameters in the create node instance request, and create a node instance according to the required node instance specification.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
CN201910881900.4A 2019-09-18 2019-09-18 Resource data acquisition method and device, computer equipment and storage medium Pending CN110727499A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910881900.4A CN110727499A (en) 2019-09-18 2019-09-18 Resource data acquisition method and device, computer equipment and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910881900.4A CN110727499A (en) 2019-09-18 2019-09-18 Resource data acquisition method and device, computer equipment and storage medium
PCT/CN2020/093609 WO2021051880A1 (en) 2019-09-18 2020-05-30 Resource data acquisition method and apparatus, computer device and storage medium

Publications (1)

Publication Number Publication Date
CN110727499A true CN110727499A (en) 2020-01-24

Family

ID=69219224

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910881900.4A Pending CN110727499A (en) 2019-09-18 2019-09-18 Resource data acquisition method and device, computer equipment and storage medium

Country Status (2)

Country Link
CN (1) CN110727499A (en)
WO (1) WO2021051880A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111935083A (en) * 2020-06-29 2020-11-13 飞诺门阵(北京)科技有限公司 Business processing method and device, electronic equipment and storage medium
WO2021051880A1 (en) * 2019-09-18 2021-03-25 平安科技(深圳)有限公司 Resource data acquisition method and apparatus, computer device and storage medium
CN113160010A (en) * 2021-04-22 2021-07-23 北京润尼尔网络科技有限公司 Method and device for acquiring virtual resources and electronic equipment
CN113301005A (en) * 2020-09-29 2021-08-24 阿里云计算有限公司 Data acquisition method and device
WO2022111027A1 (en) * 2020-11-25 2022-06-02 上海连尚网络科技有限公司 Video acquisition method, electronic device, and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106302225B (en) * 2016-10-18 2019-05-03 优刻得科技股份有限公司 A kind of method and apparatus of server load balancing
JP6852495B2 (en) * 2017-03-23 2021-03-31 富士通株式会社 Address translation device, information processing system, and control method of information processing system
CN109831468A (en) * 2017-11-23 2019-05-31 北京金山云网络技术有限公司 Load-balancing method, device, electronic equipment and storage medium
CN107995324B (en) * 2017-12-04 2021-01-01 奇安信科技集团股份有限公司 Tunnel mode-based cloud protection method and device
CN108093094B (en) * 2017-12-08 2021-05-28 腾讯科技(深圳)有限公司 Database instance access method, device, system, storage medium and equipment
CN110727499A (en) * 2019-09-18 2020-01-24 平安科技(深圳)有限公司 Resource data acquisition method and device, computer equipment and storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021051880A1 (en) * 2019-09-18 2021-03-25 平安科技(深圳)有限公司 Resource data acquisition method and apparatus, computer device and storage medium
CN111935083A (en) * 2020-06-29 2020-11-13 飞诺门阵(北京)科技有限公司 Business processing method and device, electronic equipment and storage medium
CN113301005A (en) * 2020-09-29 2021-08-24 阿里云计算有限公司 Data acquisition method and device
WO2022111027A1 (en) * 2020-11-25 2022-06-02 上海连尚网络科技有限公司 Video acquisition method, electronic device, and storage medium
CN113160010A (en) * 2021-04-22 2021-07-23 北京润尼尔网络科技有限公司 Method and device for acquiring virtual resources and electronic equipment

Also Published As

Publication number Publication date
WO2021051880A1 (en) 2021-03-25

Similar Documents

Publication Publication Date Title
CN110727499A (en) Resource data acquisition method and device, computer equipment and storage medium
CN108093094B (en) Database instance access method, device, system, storage medium and equipment
WO2019095577A1 (en) Method and device for processing data request, computer apparatus, and storage medium
US20150213134A1 (en) Data query method and system and storage medium
CN111092816B (en) Gateway dynamic routing method, gateway dynamic routing device, computer equipment and storage medium
CN108256114B (en) Document online preview method and device, computer equipment and storage medium
CN110602168B (en) Data synchronization method and device, computer equipment and storage medium
CN113301005A (en) Data acquisition method and device
WO2019075978A1 (en) Data transmission method and apparatus, computer device, and storage medium
CN111813826A (en) WHOIS query method, system and storage medium
CN111209061A (en) Method and device for filling in user information, computer equipment and storage medium
CN113726918A (en) Domain name resolution method based on cloud computing network and related system and device
WO2019075773A1 (en) Data processing method and apparatus, computer device and storage medium
CN109743357B (en) Method and device for realizing service access continuity
CN110602169A (en) Service calling method and device, computer equipment and storage medium
CN111107176A (en) Data transmission method and device, computer equipment and storage medium
US20160344681A1 (en) Apparatus and Methods for Assigning Internetwork Addresses
CN107786594B (en) Service request processing method and device
CN110213392B (en) Data distribution method and device, computer equipment and storage medium
CN112911617A (en) Data transmission method and device, computer equipment and storage medium
CN108595280B (en) Interface adaptation method and device, computer equipment and storage medium
CN107135242B (en) Mongodb cluster access method, device and system
CN109921929B (en) Network upgrading method, device, equipment and medium
US9378140B2 (en) Least disruptive cache assignment
CN109614188B (en) Page online help method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40020268

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination