CN111367997B - Method for realizing cross-region data synchronization - Google Patents

Method for realizing cross-region data synchronization Download PDF

Info

Publication number
CN111367997B
CN111367997B CN202010120907.7A CN202010120907A CN111367997B CN 111367997 B CN111367997 B CN 111367997B CN 202010120907 A CN202010120907 A CN 202010120907A CN 111367997 B CN111367997 B CN 111367997B
Authority
CN
China
Prior art keywords
user information
access point
client
database
data
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
CN202010120907.7A
Other languages
Chinese (zh)
Other versions
CN111367997A (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.)
Hangzhou Cloudaemon Technology Co ltd
Original Assignee
Hangzhou Cloudaemon 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 Hangzhou Cloudaemon Technology Co ltd filed Critical Hangzhou Cloudaemon Technology Co ltd
Priority to CN202010120907.7A priority Critical patent/CN111367997B/en
Publication of CN111367997A publication Critical patent/CN111367997A/en
Application granted granted Critical
Publication of CN111367997B publication Critical patent/CN111367997B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • H04L67/5683Storage of data provided by user terminals, i.e. reverse caching

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Storage Device Security (AREA)

Abstract

The invention aims to provide a method for realizing cross-region data synchronization.A database feeds back user information (I) when a client accesses an access point for the first time, calculates service response according to required service data and generates new data, wherein the user information (I) is updated to user information (II), and the user information (II) is encrypted by the access point and then transmitted to the client for storage at the client; meanwhile, the access point transmits new data to the database for storage in real time; when the client accesses any access point again, the client carries the user information II, so that the access point does not need to request data from the database, and can directly calculate service response according to the service data in the user information II, thereby solving the problem of data synchronization of the access points by using the client resources, reducing the access times to the database and relieving the access pressure of the database.

Description

Method for realizing cross-region data synchronization
Technical Field
The invention relates to the field of computers, in particular to a method for realizing cross-region data synchronization.
Background
With the increase of the access data volume, a CDN scheme is used for a static website, and multi-point deployment is often adopted. Content Delivery Network (CDN) is a Content Delivery Network. The CDN is a group of WEB servers distributed in a plurality of different geographic locations, and is configured to deliver content to a user more efficiently, and when performance is optimized, the CDN is selected according to the distance. The user accesses nearby to directly obtain the cache data of the access point and directly responds to the user request. However, for a request of dynamic data, the access point server needs to give a response according to the data and some behaviors of the user in combination with a policy and a configuration, so the access point still needs to obtain user information from the central server or the central database and then can give a response to the user, meanwhile, the background also needs to store the state of the user, and when the user is switched from one access point to another access point, the intermediate state of the user cannot be timely transferred to other access points.
The existing scheme has the following defects:
(1) if a centralized database mode is adopted, communication delay between the access point and the database exists, slow access is caused, and the access pressure of the database is high;
(2) if the databases are separately deployed at the access point, the problem of inconsistent data of each database and the central database occurs;
(3) if the cache database is deployed near each access point, the problem of cache and central database data inconsistency can occur. Meanwhile, the disk and the memory of the cache database cannot be increased infinitely.
Disclosure of Invention
The invention aims to provide a method for realizing cross-region data synchronization, when a client switches access points, each access server acquires an intermediate state by acquiring self-carried service data, thereby relieving the access pressure of a database.
To achieve the above object, the main technical solution of the present invention is to provide a method for implementing cross-region data synchronization, comprising the following steps:
the S1 client initiates an access request to the first access point;
s2, the first access point requests service data (r) from the database;
s3, the database sends first user information to the first access point, the first user information includes first service data;
s4, the first access point generates a calculation service response and generates new data (I), so that the user information (I) is updated to user information (II), and the user information (II) comprises the new data (I);
s5, the access point I transmits the new data to the database in real time;
s6, the access point sends the user information II to the client, and the client stores the user information II;
the S7 client side accesses a second access point with user information, wherein the second access point is the first access point or any one of other access points;
s8, the second access point generates a calculation service response according to the service data II in the user information II and generates new data II, the user information II is updated to user information III, and the user information III contains the new data II;
s9, the second access point transmits the new data to the database in real time;
and S10, the access point sends the user information to the client, and the client stores the user information.
Further, the user information (r) is all the information of the user in the database.
Further, the access point I encrypts and sends the user information II to the client.
Further, the second access point encrypts and sends the user information III to the client.
Further, the user information (II) includes user state information and service information.
Furthermore, the user information (c) includes user state information and service information.
The invention has the beneficial effects that:
(1) the access pressure of the database is relieved;
(2) each access server stores a large amount of user information and service data without totally depending on the service data of a database;
(3) when the client switches the access points, each access server can acquire the intermediate state by itself without carrying out a large amount of data synchronization.
Drawings
Fig. 1 is a schematic diagram of a data operation flow structure according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments that can be derived by one of ordinary skill in the art from the embodiments given herein are intended to be within the scope of the present invention.
It will be understood by those skilled in the art that in the present disclosure, the terms "longitudinal," "lateral," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," and the like are used in an orientation or positional relationship indicated in the drawings for ease of description and simplicity of description, and do not indicate or imply that the referenced devices or components must be constructed and operated in a particular orientation and thus are not to be considered limiting.
It is understood that the terms "a" and "an" should be interpreted as meaning that a number of one element or element is one in one embodiment, while a number of other elements is one in another embodiment, and the terms "a" and "an" should not be interpreted as limiting the number.
A method for realizing cross-region data synchronization comprises the following steps:
s1 client 1 sends access request to first access point 2;
s2, the access point 2 requests service data (r) from the database 4;
s3, the database 4 sends user information (r) to the first access point 2, wherein the user information (r) comprises service data (r);
s4, the first access point 2 generates a calculation service response and generates new data (I), so that the user information (I) is updated to user information (II), and the user information (II) comprises the new data (I);
s5, the access point 2 transmits the new data to the database 4 in real time;
s6, the access point 2 sends the user information II to the client 1, and the client 1 stores the user information II;
s7 client 1 accesses the second access point with user information, wherein the second access point is the first access point 2 or the third access point 3 or any one of other access points;
s8, the second access point generates a calculation service response according to the service data II in the user information II and generates new data II, the user information II is updated to user information III, and the user information III contains the new data II;
s9, the second access point transmits new data to the database 4 in real time;
and S10, the access point II sends the user information (c) to the client 1, and the client 1 stores the user information (c).
Specifically, when the client 1 accesses the first access point 2 for the first time, the first access point 2 requests service data (I) from the database 4, all initial information of the user returned by the database 4 is user information (I) to the first access point 2, and the first access point 2 calculates service response according to the service data (I) contained in the user information (I); generating new data (i) in the process of calculating the service response, wherein the new data (i) and the user information (i) are called user information (ii) together; the first access point 2 encrypts and sends user information (user state information and service information) to the client 1, and simultaneously, the first access point 2 inputs necessary access data into the database 4 as required.
When the client 1 initiates other service requests to the first access point 2, the first access point 2 takes user information II at the same time, calculates service response according to the service data required in the user information II, and generates corresponding new data II; the new data and the user information are called user information; the first access point 2 encrypts the user information at the moment and sends the encrypted user information to the client 1, and meanwhile, the first access point 2 records necessary access data into the database 4 as required.
When a client initiates a service request to the third access point 3, the third access point 3 takes user information and carries out calculation service response according to the service data required in the user information and generates corresponding new data; the new data and the user information are called user information; the third access point 3 encrypts the user information (r) at the moment and sends the encrypted user information to the client 1, and simultaneously records necessary access data into the database 4 as required.
When the client 1 accesses the access point for the first time, the database 4 feeds back all information of the user, service response is calculated according to the required service data, when new data is generated, the new data and the information before the user are encrypted together and then transmitted to the client, and the encrypted new data and the information before the user are stored in the client 1; meanwhile, the access point transmits new data generated in the process of calculating the service response to the database 4 in real time for storage. When the client 1 accesses any access point again, the user information stored in the access point is taken, so that the access point does not need to request data from the database 4, and can directly calculate service response according to service data in the user information of the access point, thereby solving the problem of data synchronization of the access point by using client resources, reducing the access times of the database and relieving the access pressure of the database. Even if the database runs short, the normal service calculation of the access point of the client 1 is not influenced.
The present invention is not limited to the above-mentioned preferred embodiments, and any other products in various forms can be obtained by anyone in the light of the present invention, but any changes in the shape or structure thereof, which have the same or similar technical solutions as those of the present application, fall within the protection scope of the present invention.

Claims (6)

1. A method for realizing cross-region data synchronization is characterized by comprising the following steps:
the S1 client initiates an access request to the first access point;
s2, the first access point requests service data (r) from the database;
s3, the database sends first user information to the first access point, the first user information includes first service data;
s4, the first access point generates a calculation service response and generates new data (I), so that the user information (I) is updated to user information (II), and the user information (II) comprises the new data (I);
s5, the access point I transmits the new data to the database in real time;
s6, the access point sends the user information II to the client, and the client stores the user information II;
the S7 client side carries user information to access a second access point, wherein the second access point is any one of a first access point 2, a third access point 3 or other access points;
s8, the second access point generates a calculation service response according to the service data II in the user information II and generates new data II, the user information II is updated to user information III, and the user information III contains the new data II;
s9, the second access point transmits the new data to the database in real time;
and S10, the access point sends the user information to the client, and the client stores the user information.
2. The method for realizing cross-regional data synchronization of claim 1, wherein the method comprises the following steps: the user information (i) is all the information of the user in the database.
3. The method for realizing cross-regional data synchronization of claim 1, wherein the method comprises the following steps: and the first access point encrypts and sends the user information to the client.
4. The method for realizing cross-regional data synchronization of claim 1, wherein the method comprises the following steps: and the second access point encrypts and sends the user information III to the client.
5. The method for realizing cross-regional data synchronization of claim 1, wherein the method comprises the following steps: the user information (II) comprises user state information and service information.
6. The method for realizing cross-regional data synchronization of claim 1, wherein the method comprises the following steps: the user information (c) contains user state information and service information.
CN202010120907.7A 2020-02-26 2020-02-26 Method for realizing cross-region data synchronization Active CN111367997B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010120907.7A CN111367997B (en) 2020-02-26 2020-02-26 Method for realizing cross-region data synchronization

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010120907.7A CN111367997B (en) 2020-02-26 2020-02-26 Method for realizing cross-region data synchronization

Publications (2)

Publication Number Publication Date
CN111367997A CN111367997A (en) 2020-07-03
CN111367997B true CN111367997B (en) 2021-06-18

Family

ID=71208109

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010120907.7A Active CN111367997B (en) 2020-02-26 2020-02-26 Method for realizing cross-region data synchronization

Country Status (1)

Country Link
CN (1) CN111367997B (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101635728B (en) * 2009-09-02 2012-09-26 中兴通讯股份有限公司 Method and system for data synchronization in content distribution network
CN107292181B (en) * 2017-06-20 2020-05-19 无锡井通网络科技有限公司 Database system based on block chain and using method using system
CN107888666B (en) * 2017-10-27 2021-02-12 北京奇艺世纪科技有限公司 Cross-region data storage system and data synchronization method and device
CN110099136A (en) * 2018-01-30 2019-08-06 阿里巴巴集团控股有限公司 Network Access Method, client, network interaction method and scheduling, network system

Also Published As

Publication number Publication date
CN111367997A (en) 2020-07-03

Similar Documents

Publication Publication Date Title
CN109542613A (en) Distribution method, device and the storage medium of service dispatch in a kind of CDN node
CN103533023B (en) Cloud service application cluster based on cloud service feature synchronizes system and synchronous method
US20120166391A1 (en) Method and System for Data Synchronization in Content Delivery Network
CN104539681A (en) Distributed GIS accelerating system and GIS service processing method
CN103297529A (en) Timestamp-based tree structure data synchronization method
CN103607424B (en) Server connection method and server system
CN105530306A (en) Hyper-converged storage system supporting data application service
CN103607418B (en) Large-scale data segmenting system based on cloud service data characteristics and dividing method
CN110737857A (en) back-end paging acceleration method, system, terminal and storage medium
CN107888666A (en) A kind of cross-region data-storage system and method for data synchronization and device
CN107451853A (en) Method, apparatus, system and the storage medium that a kind of red packet distributes in real time
US20190340710A1 (en) Transaction object reservation system, method, and apparatus
CN105069152A (en) Data processing method and apparatus
CN109783564A (en) Support the distributed caching method and equipment of multinode
US20190251096A1 (en) Synchronization of offline instances
CN103902548B (en) A kind of system and method and registration, ticket booking, net purchase system for accessing database
CN102710763A (en) Method and system for pooling, slicing and fault transfer of distributed cache
CN112121413A (en) Response method, system, device, terminal and medium of function service
CN111680210B (en) Information searching method, device, searching gateway and storage medium
CN109992431A (en) It is a kind of to realize the method and terminal retried
CN109597903A (en) Image file processing apparatus and method, document storage system and storage medium
CN106886376B (en) A kind of marine monitoring data copy management method optimized based on more attributes
EP3306471A1 (en) Automatic server cluster discovery
CN105610917A (en) Method and system for achieving repair of synchronous data in system
US8266634B2 (en) Resource assignment system with recovery notification

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