CN107404527B - Resource access and control method and device - Google Patents

Resource access and control method and device Download PDF

Info

Publication number
CN107404527B
CN107404527B CN201710617867.5A CN201710617867A CN107404527B CN 107404527 B CN107404527 B CN 107404527B CN 201710617867 A CN201710617867 A CN 201710617867A CN 107404527 B CN107404527 B CN 107404527B
Authority
CN
China
Prior art keywords
data center
resource access
resource
data
access request
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
CN201710617867.5A
Other languages
Chinese (zh)
Other versions
CN107404527A (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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information Technology 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201710617867.5A priority Critical patent/CN107404527B/en
Publication of CN107404527A publication Critical patent/CN107404527A/en
Application granted granted Critical
Publication of CN107404527B publication Critical patent/CN107404527B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1021Server selection for load balancing based on client or server locations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes

Abstract

The embodiment of the invention discloses a resource access and control method, which comprises the following steps: acquiring a resource access request through a resource access portal User Interface (UI); determining a data center issued by the resource access request according to the timestamp; and performing resource access operation in the determined resource pool of the data center. The embodiment of the invention also discloses a resource access and control device.

Description

Resource access and control method and device
Technical Field
The embodiment of the invention relates to a cloud data processing technology, in particular to a resource access and control method and device.
Background
In recent years, cloud computing and big data technology are developed at a high speed, the scale of a cloud data center is continuously enlarged, and multi-data center management is gradually a concern. How to ensure the consistency of resources in each data center under multiple data centers, meet the consistency requirement of terminal users on resource access control requirements, provide efficient and stable resource access service for users, and gradually become an important index for measuring the stability of cloud computing operating systems to the management functions of multiple data centers. The existing multi-data center management method and practice do not consider resource data synchronization among the multi-data centers or consider imperfectly, and therefore the efficiency of multi-data center resource management is reduced.
Disclosure of Invention
In order to solve the above technical problems, embodiments of the present invention provide a method and an apparatus for resource access and control, which can select an optimal resource pool of a data center to perform resource access operation, and ensure consistency of resources in multiple data centers.
To achieve the object of the embodiment of the present invention, an embodiment of the present invention provides a resource access and control method, including:
acquiring a resource access request through a resource access portal User Interface (UI);
determining a data center issued by the resource access request according to the timestamp;
and performing resource access operation in the determined resource pool of the data center.
Optionally, determining, according to the timestamp, a data center to which the resource access request is issued includes:
acquiring the latest timestamp recorded by each data center in the plurality of data centers, wherein the timestamp was accessed by the resource;
comparing the obtained time lengths of the plurality of latest timestamps to the current time;
when the time lengths of the latest timestamps from the current time are different, determining the data center corresponding to the latest timestamp with the shortest time length from the current time in the latest timestamps as the data center issued by the resource access request;
and when the time lengths of the latest timestamps are the same as the time length of the current time, acquiring the region to which each data center belongs, and determining the data center, which is the same as or closest to the region to which the client side which provides the resource access request belongs, in the acquired regions as the data center issued by the resource access request.
Optionally, the method further comprises: and synchronizing the resource data of the data centers except the first data center in the plurality of data centers according to the determined resource data of the first data center.
Optionally, the method further comprises: and when the resource access operation is performed in the determined resource pool of the data center, recording the log information of the resource access operation.
Optionally, multiple data centers have the same access rights.
In order to achieve the object of the embodiment of the present invention, an embodiment of the present invention further provides a resource access and control apparatus, including: the system comprises an acquisition module, a determination module and an access module;
the acquisition module is used for acquiring a resource access request through a resource access portal User Interface (UI);
the determining module is used for determining the data center issued by the resource access request according to the timestamp;
and the access module is used for performing resource access operation in the determined resource pool of the data center.
Optionally, the determining, by the determining module, the data center issued by the resource access request according to the timestamp includes:
acquiring the latest timestamp recorded by each data center in the plurality of data centers, wherein the timestamp was accessed by the resource;
comparing the obtained time lengths of the plurality of latest timestamps to the current time;
when the time lengths of the latest timestamps from the current time are different, determining the data center corresponding to the latest timestamp with the shortest time length from the current time in the latest timestamps as the data center issued by the resource access request;
and when the time lengths of the latest timestamps are the same as the time length of the current time, acquiring the region to which each data center belongs, and determining the data center, which is the same as or closest to the region to which the client side which provides the resource access request belongs, in the acquired regions as the data center issued by the resource access request.
Optionally, the apparatus further comprises: a synchronization module;
and the synchronization module is used for synchronizing the resource data of the data centers except the first data center in the plurality of data centers according to the determined resource data of the first data center.
Optionally, the apparatus further comprises: a recording module;
and the recording module is used for recording the log information of the resource access operation when the resource access operation is performed in the determined resource pool of the data center.
Optionally, multiple data centers have the same access rights.
The embodiment of the invention comprises the following steps: acquiring a resource access request through a resource access portal User Interface (UI); determining a data center issued by the resource access request according to the timestamp; and performing resource access operation in the determined resource pool of the data center. Through the embodiment, the optimal data center resource pool can be selected for resource access operation.
Additional features and advantages of embodiments of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of embodiments of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
The accompanying drawings are included to provide a further understanding of the embodiments of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the examples of the application do not constitute a limitation of the embodiments of the invention.
FIG. 1 is a flow diagram of a method for resource access and control according to an embodiment of the present invention;
fig. 2 is a block diagram of a resource access and control apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that the embodiments and features of the embodiments in the present application may be arbitrarily combined with each other without conflict.
The steps illustrated in the flow charts of the figures may be performed in a computer system such as a set of computer-executable instructions. Also, while a logical order is shown in the flow diagrams, in some cases, the steps shown or described may be performed in an order different than here.
To achieve the object of the embodiment of the present invention, an embodiment of the present invention provides a resource access and control method, as shown in fig. 1, the method includes S101-S103:
s101, acquiring a resource access request through a resource access portal UI.
In the embodiment of the invention, a uniform resource access portal UI (user interface) provides a uniform portal entrance for resource access requests in multiple data centers, and resource access (such as read-write) requests provided by terminal users can be acquired through the uniform portal entrance.
And S102, determining the data center issued by the resource access request according to the time stamp.
Optionally, multiple data centers have the same access rights.
In the embodiment of the invention, unified authority control is provided for resource access control of multiple data centers, and consistency control of resource access authority is ensured.
Optionally, determining, according to the timestamp, the data center to which the resource access request is issued may include S201 to S204:
s201, acquiring the latest timestamp recorded by each of the plurality of data centers and accessed by the resource.
In the embodiment of the present invention, before implementing the scheme of the embodiment of the present invention, it is necessary to perform consistent deployment on data of all data centers first, so that the data of all data centers are completely consistent. After the initial deployment is finished, after the issued resource access request is obtained, the resource access operation performed by the resource access necessarily forms the latest data information, and the data consistency processing among a plurality of data centers can be performed according to the latest data information, so that the resource consistency in the multiple data centers is realized, the resource access consistency under the multiple data centers is realized, and the consistency of resource access control under the multiple data centers is ensured.
In the embodiment of the present invention, based on the above idea, it is necessary to obtain the data center that is accessed recently through a timestamp, specifically, a latest timestamp, where data in the data center that is accessed recently is necessarily the latest data, so that data consistency processing among multiple data centers can be performed according to the latest data. It is therefore necessary to first obtain the latest timestamp recorded by each data center that was accessed by the resource.
S202, comparing the time length of the obtained plurality of latest timestamps to the current time.
In the embodiment of the present invention, which data center is the data center that is accessed most recently can be compared by obtaining the time length of the latest timestamp from the current time, that is, the data center that is accessed most recently from the current time.
And S203, when the time lengths of the latest timestamps from the current time are different, determining the data center corresponding to the latest timestamp with the shortest time length from the current time in the latest timestamps as the data center issued by the resource access request.
In the embodiment of the invention, the data center which is accessed recently can be used as the data center which is issued by the resource access request, and the data of other data centers are processed in a consistent manner according to the data of the data center which is accessed recently.
And S204, when the time lengths of the latest timestamps are the same as the time length of the current time, acquiring a region to which each data center belongs, and determining the data center, which is the same as or closest to the region to which the client side which provides the resource access request belongs, in the acquired regions as the data center issued by the resource access request.
In the embodiment of the present invention, when the last access time of the plurality of data centers is the same as the current time, the data center to which the resource access request should be issued cannot be determined by the above embodiment. The region information of the client sending the resource access request can be acquired through the IP address carried in the resource access request, so that the region is further compared with the region recorded in the data center, a data center which is the same as or closest to the region of the client is acquired, and the data center is determined as the data center issued by the resource access request.
In the embodiment of the present invention, when the last access time of the plurality of data centers is the same as the current time, the data centers to be accessed may be determined by comparing other information, which is not limited to the region information, and is not limited to other specific information again.
In the embodiment of the present invention, the step and the step S203 have no precedence order, and are different processing schemes under different situations.
Optionally, the method further comprises: and synchronizing the resource data of the data centers except the first data center in the plurality of data centers according to the determined resource data of the first data center.
In the embodiment of the present invention, after the data center that has been accessed recently is determined through the above steps, as described above, the first data center may perform synchronization processing, that is, consistency processing, on the resource data of other data centers according to the resource data of the data center that has been accessed recently, so as to ensure consistency of data of multiple data centers.
S103, performing resource access operation in the determined resource pool of the data center.
In the embodiment of the invention, after the data center which is accessed recently is determined through the steps, the resource access operation can be directly performed in the resource pool of the data center. Such as read and write operations and other access operations.
Optionally, the method further comprises: when the resource access operation is carried out in the resource pool of the first data center, log information of the resource access operation is recorded. The encountered problems can be positioned and solved according to the log information.
In the examples of the present invention, the embodiments of the present invention are described below by way of specific examples.
Assuming that there are 3 data centers, namely a data center 1, a data center 2 and a data center 3 (all data centers are completely consistent after the scheme is deployed for the first time), when an issued resource access request command is obtained, 1) the latest timestamps of resource access in the 3 data centers are compared first; 2) if 3 latest timestamps of the 3 data centers are the same, selecting the data center closest to the region to which the IP address carried in the resource access request belongs to perform resource access; 3) and if 3 latest time stamps of the 3 data centers are different, selecting the data center with the latest time stamp for resource access. And the data in the 3 data centers are synchronized in a timing mode, the data in the data center (such as the data center 1) with the latest timestamp is taken as the basis, the resource data in the other 2 data centers (such as the data center 2 and the data center 3) are synchronized, and the consistency of the data in the data centers is ensured.
In order to achieve the object of the embodiment of the present invention, an embodiment of the present invention further provides a resource access and control apparatus 1, as shown in fig. 2, the apparatus includes: the system comprises an acquisition module 11, a determination module 12 and an access module 13;
the acquisition module 11 is configured to acquire a resource access request through a resource access portal user interface UI;
the determining module 12 is configured to determine, according to the timestamp, a data center to which the resource access request is issued;
and the access module 13 is configured to perform a resource access operation in the determined resource pool of the data center.
Optionally, the determining module 12 determines, according to the timestamp, that the data center to which the resource access request is issued includes:
acquiring the latest timestamp recorded by each data center in the plurality of data centers, wherein the timestamp was accessed by the resource;
comparing the obtained time lengths of the plurality of latest timestamps to the current time;
when the time lengths of the latest timestamps from the current time are different, determining the data center corresponding to the latest timestamp with the shortest time length from the current time in the latest timestamps as the data center issued by the resource access request;
and when the time lengths of the latest timestamps are the same as the time length of the current time, acquiring the region to which each data center belongs, and determining the data center, which is the same as or closest to the region to which the client side which provides the resource access request belongs, in the acquired regions as the data center issued by the resource access request.
Optionally, the apparatus further comprises: a synchronization module 14;
and the synchronization module 14 is configured to synchronize resource data of data centers other than the first data center among the plurality of data centers according to the determined resource data of the first data center.
Optionally, the apparatus further comprises: a recording module 15;
and the recording module 15 is configured to record log information of the resource access operation when the resource access operation is performed in the determined resource pool of the data center.
Optionally, multiple data centers have the same access rights.
The embodiment of the invention comprises the following steps: acquiring a resource access request through a resource access portal User Interface (UI); determining a data center issued by the resource access request according to the timestamp; and performing resource access operation in the determined resource pool of the data center. Through the embodiment, the optimal data center resource pool can be selected for resource access operation.
In summary, according to the scheme of the embodiment of the invention, the latest timestamps of resource access in a plurality of data centers are compared, and the optimal data center resource pool is selected for resource access control operation according to the same or different conditions of the latest timestamps; meanwhile, the consistency of resources in the multi-data center is ensured through the timing synchronous operation of the resource data synchronization module, the consistency of resource access under the multi-data center is realized, and the consistency of resource access control under the multi-data center is ensured.
Although the embodiments of the present invention have been described above, the descriptions are only used for understanding the embodiments of the present invention, and are not intended to limit the embodiments of the present invention. It will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the embodiments of the invention as defined by the appended claims.

Claims (8)

1. A method for resource access and control, the method comprising:
acquiring a resource access request through a resource access portal User Interface (UI);
determining a data center issued by the resource access request according to the timestamp;
performing resource access operation in the determined resource pool of the data center;
wherein, the determining the data center issued by the resource access request according to the timestamp comprises:
acquiring the latest timestamp recorded by each data center in the plurality of data centers, wherein the timestamp was accessed by the resource;
comparing the obtained time lengths of the plurality of latest timestamps to the current time;
when the time lengths of the latest timestamps from the current time are different, determining the data center corresponding to the latest timestamp with the shortest time length from the current time in the latest timestamps as the data center issued by the resource access request;
and when the time lengths of the latest timestamps from the current time are the same, acquiring a region to which each data center belongs, and determining the data center, which is the same as or closest to the region to which the client side which provides the resource access request belongs, in the acquired regions as the data center issued by the resource access request.
2. The method of claim 1, wherein the method further comprises:
and synchronizing the resource data of the data centers except the first data center in the plurality of data centers according to the determined resource data of the first data center.
3. The method of claim 1, wherein the method further comprises: and when the resource access operation is performed in the determined resource pool of the data center, recording the log information of the resource access operation.
4. The method according to any of claims 1 to 3, wherein the plurality of data centers have the same access rights.
5. An apparatus for resource access and control, the apparatus comprising: the system comprises an acquisition module, a determination module and an access module;
the acquisition module is used for acquiring a resource access request through a resource access portal User Interface (UI);
the determining module is used for determining the data center issued by the resource access request according to the timestamp;
the access module is used for performing resource access operation in the determined resource pool of the data center;
wherein, the determining module determines the data center issued by the resource access request according to the timestamp, and the determining module comprises:
acquiring the latest timestamp recorded by each data center in the plurality of data centers, wherein the timestamp was accessed by the resource;
comparing the obtained time lengths of the plurality of latest timestamps to the current time;
when the time lengths of the latest timestamps from the current time are different, determining the data center corresponding to the latest timestamp with the shortest time length from the current time in the latest timestamps as the data center issued by the resource access request;
and when the time lengths of the latest timestamps from the current time are the same, acquiring a region to which each data center belongs, and determining the data center, which is the same as or closest to the region to which the client side which provides the resource access request belongs, in the acquired regions as the data center issued by the resource access request.
6. The apparatus for resource access and control according to claim 5, said apparatus further comprising: a synchronization module;
and the synchronization module is used for synchronizing the resource data of the data centers except the first data center according to the determined resource data of the first data center.
7. The apparatus for resource access and control according to claim 5, said apparatus further comprising: a recording module;
and the recording module is used for recording the log information of the resource access operation when the resource access operation is performed in the determined resource pool of the data center.
8. The apparatus according to any of claims 5 to 7, wherein the plurality of data centers have the same access rights.
CN201710617867.5A 2017-07-26 2017-07-26 Resource access and control method and device Active CN107404527B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710617867.5A CN107404527B (en) 2017-07-26 2017-07-26 Resource access and control method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710617867.5A CN107404527B (en) 2017-07-26 2017-07-26 Resource access and control method and device

Publications (2)

Publication Number Publication Date
CN107404527A CN107404527A (en) 2017-11-28
CN107404527B true CN107404527B (en) 2020-05-29

Family

ID=60401261

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710617867.5A Active CN107404527B (en) 2017-07-26 2017-07-26 Resource access and control method and device

Country Status (1)

Country Link
CN (1) CN107404527B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111679917A (en) * 2020-06-04 2020-09-18 中国建设银行股份有限公司 Resource access processing method, device, server and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101325552A (en) * 2008-08-01 2008-12-17 杭州华三通信技术有限公司 Triangle forwarding method for access request and GLB server
CN103383653A (en) * 2012-05-02 2013-11-06 中国科学院计算技术研究所 Method and system for managing and dispatching cloud resource
CN104113590A (en) * 2014-06-30 2014-10-22 南京邮电大学 Copy selection method based on copy response time prediction
CN106060145A (en) * 2016-06-22 2016-10-26 北京交通大学 Profit based request access control method in distributed multi-cloud data center
CN106612299A (en) * 2015-10-22 2017-05-03 阿里巴巴集团控股有限公司 Access request processing method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10581670B2 (en) * 2015-10-02 2020-03-03 Microsoft Technology Licensing, Llc Cross-data center interoperation and communication

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101325552A (en) * 2008-08-01 2008-12-17 杭州华三通信技术有限公司 Triangle forwarding method for access request and GLB server
CN103383653A (en) * 2012-05-02 2013-11-06 中国科学院计算技术研究所 Method and system for managing and dispatching cloud resource
CN104113590A (en) * 2014-06-30 2014-10-22 南京邮电大学 Copy selection method based on copy response time prediction
CN106612299A (en) * 2015-10-22 2017-05-03 阿里巴巴集团控股有限公司 Access request processing method and device
CN106060145A (en) * 2016-06-22 2016-10-26 北京交通大学 Profit based request access control method in distributed multi-cloud data center

Also Published As

Publication number Publication date
CN107404527A (en) 2017-11-28

Similar Documents

Publication Publication Date Title
US8874700B2 (en) Optimizing storage of data files
WO2017167171A1 (en) Data operation method, server, and storage system
WO2018045820A1 (en) File synchronization method, device, and system
CN106503158B (en) Data synchronization method and device
CN111399764B (en) Data storage method, data reading device, data storage equipment and data storage medium
CN107181686B (en) Method, device and system for synchronizing routing table
WO2019057193A1 (en) Data deletion method and distributed storage system
CN113485962B (en) Log file storage method, device, equipment and storage medium
CN103605617A (en) Method and device for recording changes in stored data
CN107040576A (en) Information-pushing method and device, communication system
CN105989139A (en) Affair synchronization method and equipment
CN107404527B (en) Resource access and control method and device
CN113064919B (en) Data processing method, data storage system, computer device and storage medium
CN111552701B (en) Method for determining data consistency in distributed cluster and distributed data system
US20150189019A1 (en) Managing network attached storage
CN112231324B (en) System and method for realizing incremental data comparison
CN111147226B (en) Data storage method, device and storage medium
CN110515907B (en) Data synchronization method and related device for distributed storage nodes
CN113486025B (en) Data storage method, data query method and device
US10803109B2 (en) Method and device for reading and writing video data in NAS device
CN104133876A (en) Affair-based incremental management cluster configuration file method
CN114840562A (en) Distributed caching method and device for business data, electronic equipment and storage medium
CN111447267B (en) Information synchronization method, device, computer readable storage medium and equipment
CN103064929A (en) Method for server writing data in network file system
CN107332679B (en) Centerless information synchronization method and device

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
GR01 Patent grant
GR01 Patent grant