CN109471595A - A kind of data read-write method and system - Google Patents

A kind of data read-write method and system Download PDF

Info

Publication number
CN109471595A
CN109471595A CN201811250589.5A CN201811250589A CN109471595A CN 109471595 A CN109471595 A CN 109471595A CN 201811250589 A CN201811250589 A CN 201811250589A CN 109471595 A CN109471595 A CN 109471595A
Authority
CN
China
Prior art keywords
data
server
write
read
reading
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
CN201811250589.5A
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.)
Wuxi Tvmining Juyuan Media Technology Co Ltd
Original Assignee
Wuxi Tvmining Juyuan Media 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 Wuxi Tvmining Juyuan Media Technology Co Ltd filed Critical Wuxi Tvmining Juyuan Media Technology Co Ltd
Priority to CN201811250589.5A priority Critical patent/CN109471595A/en
Publication of CN109471595A publication Critical patent/CN109471595A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0608Saving storage space on storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a kind of data read-write method and systems, the type of reading and writing data request is requested and judged the method includes receiving reading and writing data, when reading and writing data request belongs to preset type, data read-write requests are parsed, if belonging to data read request, then by reading corresponding data from server, if belonging to data write request, corresponding data are written in primary server and etc..The present invention receives the data of write-in using primary server, the data to be read are provided using from server, it can make each server that there are the different division of labor, in the operation set for avoiding the two processes of data read and write different on the same server, the speed and efficiency of reading and writing data process is substantially improved, the burden of server is reduced, the Internet resources for needing to occupy are reduced.The present invention is not necessarily to carry out server the transformation on hardware, on original hardware foundation, can promote the reading and writing data performance of server.The present invention is widely used in information technology field.

Description

A kind of data read-write method and system
Technical field
The present invention relates to information technology field, especially a kind of data read-write method and system.
Background technique
In the information age, a large amount of data need to read and write, and the read-write of data is the important link of any information system running, Directly affect the work of information system entirety.With the arrival of mobile internet era, internet increasingly decentralization is any People can share a large amount of data to other people by internet, this causes server read-write pressure increased dramatically, operator Have to use instead that hardware performance is more preferable, the stronger server of processing capacity, to cope with increasingly increased reading and writing data request, this is mentioned High operation cost, also increases the consumption to resource.
Summary of the invention
In order to solve the above-mentioned technical problem, the object of the invention is that providing a kind of data read-write method and system.
First technical solution adopted by the present invention is:
A kind of data read-write method, comprising the following steps:
Receive the type that reading and writing data requests and judges reading and writing data request;
When reading and writing data request belongs to preset type, data read-write requests are parsed, if belonging to number According to read requests, then corresponding data are write if belonging to data write request by reading corresponding data from server Enter in primary server.
Further, the method also includes following steps: when reading and writing data request is not belonging to preset type, The read-write of corresponding data is carried out to the read-write for carrying out corresponding data from server or to primary server.
Further, the preset type be according to reading and writing data request urgency level, issue frequency and/or What degree of malice was divided.
Further, it is described from the quantity of server be it is multiple, after the primary server is written into data, by what is be newly written Data are synchronized to all from server.
Further, the data being newly written are synchronized to it is all after in server, delete primary server in be newly written Data.
Further, it is described by from server read corresponding data the step for, specifically include:
Detection is respectively from the current loads of server;
Corresponding data are read from server from current loads are minimum.
Further, the data that will be newly written be synchronized to it is all from server the step for, specifically include:
Detection is respectively from the current loads of server;
The data copy being newly written in primary server is minimum from server to current loads;
It is minimum from server as data providing using current loads, by the data copy of the new write-in to other from In server.
Further, the data copy by the new write-in to other from server the step for, specifically include:
It is ranked up to every other from server according to current loads according to ascending sequence;
According to the sequence sequenced, successively other are used as one by one from server data receiver carry out data copy.
Second technical solution adopted by the present invention is:
A kind of data read-write system, including data reception module, control module, primary server and at least one from service Device;
Data reception module read-write requests for receiving data;
The control module is used to judge the type of reading and writing data request;When reading and writing data request belongs to preset class When type, data read-write requests are parsed, if belonging to data read request, by reading corresponding number from server According to, if belonging to data write request, will corresponding data be written primary server in.
Further, the control module is also used to execute the data read-write method as described in the first technical solution.
The beneficial effects of the present invention are: the present invention is designed by algorithm, the data of write-in are received using primary server, are utilized The data to be read are provided from server, can make each server that there are the different division of labor, avoid the two streams of data read and write In the operation set of Cheng Butong on the same server, the speed and efficiency of reading and writing data process is substantially improved, reduces server Burden reduces the Internet resources for needing to occupy.The present invention is not necessarily to carry out server the transformation on hardware, can be in original hardware On the basis of, promote the reading and writing data performance of server.
Detailed description of the invention
Fig. 1 is the method for the present invention flow chart;
Fig. 2 is present system structural block diagram.
Specific embodiment
Embodiment 1
A kind of data read-write method of the present invention, referring to Fig.1, comprising the following steps:
Receive the type that reading and writing data requests and judges reading and writing data request;
When reading and writing data request belongs to preset type, data read-write requests are parsed, if belonging to number According to read requests, then corresponding data are write if belonging to data write request by reading corresponding data from server Enter in primary server.
The type of reading and writing data request is the urgency level, sending frequency and/or degree of malice according to reading and writing data request It is divided.For example, according to urgency level, reading and writing data can be requested to be divided into extra urgent grade, urgent grade, urgent grade and general Logical grade;It can be sent out with the source of locking data read-write requests according to before this source according to the network information of reading and writing data request The frequency requested out can request reading and writing data to be classified as frequent type, plain edition and accidental type;It is sent out according to before this source This source can be classified as malice type, suspicious using existing anti-virus and malicious attack technology by the content requested out Type, maloperation type and normal type, the request that this source is issued are classified as corresponding type respectively naturally.
The concrete condition when partitioning standards of type can be according to application the method for the present invention determines.
It is Type division according to for by the urgency level of reading and writing data request, the method for the present invention is illustrated.At this In inventive method, the reading and writing data of extra urgent grade and urgent grade can be requested to carry out specific response, to urgent grade and regular grade Reading and writing data request carries out trivial response.
When carrying out specific response, data read-write requests are parsed, if belonging to data read request, by from Server reads corresponding data, if belonging to data write request, corresponding data are written in primary server.Special In response, primary server and different tasks is executed respectively from server, i.e., be used for from server for reading data, main clothes Business significantly reduces single server for for data are written, the read and write of data to be carried out for different servers Burden, improves reading and writing data speed.Moreover, read and write abruption can also play the role of backup and isolated data, if data Write request requires the data band of write-in to have virus, and the data in other servers can be infected to avoid it.
When carrying out trivial response, corresponding data is carried out to the read-write for carrying out corresponding data from server or to primary server Read-write.In trivial response, the read and writes of data is carried out for same server, i.e., the read and write of data be directed to from The read and write of server or data is directed to primary server.Trivial response is set, can be used as the supplement of specific response, keep away Exempt to require primary server under any circumstance and cooperate from server, improves the adaptability of the method for the present invention.
Be further used as preferred embodiment, it is described from the quantity of server be it is multiple, the primary server is written into After data, the data being newly written are synchronized to all from server.
It is either one or more from the quantity of server.In specific response, when primary server is written into number According to rear, by the data being newly written be synchronized to it is all backed up from server, can so that when receiving data read request To execute specific response, thus reading corresponding data from server.The data being newly written are synchronized to all from service After in device, the data being newly written in primary server are deleted, the memory space of primary server can be saved in this way.Due to special sound Data should can't be read from primary server, therefore are deleted the data being newly written in main service and be will not influence the method for the present invention It executes.
Be further used as preferred embodiment, it is described by reading corresponding data from server the step for, specifically Include:
Detection is respectively from the current loads of server;
Corresponding data are read from server from current loads are minimum.
In specific response, executing data read request is specifically to read accordingly from server from current loads are minimum Data.Due to the data being newly written in primary server be synchronized to back up to it is all from server, it is each from clothes The data that are stored of business device be it is duplicate, no matter which can read the number of targets to be read from server from According to.Corresponding data are preferably read from server from load is minimum, it can be excellent with reasonable distribution respectively from the load of server Change the process of reading data, improves data reading speed.
It is further used as preferred embodiment, the data that will be newly written are synchronized to all this steps from server Suddenly, it specifically includes:
Detection is respectively from the current loads of server;
The data copy being newly written in primary server is minimum from server to current loads;
It is minimum from server as data providing using current loads, by the data copy of the new write-in to other from In server.
It is synchronized to respectively from server process by the data being newly written in primary server, can first copy data to and work as Preload is minimum, and from server, then primary server exits this copy procedure, to have received this new that data are written Minimum current loads from server are data source, continue by data copy to it is remaining other from server.By this optimization, Can make in entire data synchronization process, primary server only needs to participate in a data copy, other data copies be from It is carried out between server, the burden of primary server can be greatly reduced in this way, primary server is allowed to have more free time Resource executes other tasks, improves the data processing and storage capacity of system.
Be further used as preferred embodiment, the data copy by the new write-in to other from server this One step, specifically includes:
It is ranked up to every other from server according to current loads according to ascending sequence;
According to the sequence sequenced, successively other are used as one by one from server data receiver carry out data copy.
During to respectively from server sync data, primary server is minimum from server copy number to current loads According to rear, primary server is no longer participate in data synchronization process, and current loads are minimum to become unique data source from server.It is right In the slave server of the data to be received such as other, can be ranked up according to the ascending sequence of current loads, load is smaller , the priority for receiving data is higher.From load minimum (i.e. all load resets from server two are low) since server, Data copy is carried out from server to other one by one.In this way, it can make load is small first to copy from server To data;After slave server when front completes data copy, there is a possibility that certain, the big slave server of preload it is negative Lotus reduces, and carries out data copy for it again at this time, will greatly improve the speed of data copy, saves data transfer time and accounts for Resource.
Embodiment 2
The invention also discloses a kind of data read-write systems, referring to Fig. 2, including data reception module, control module, main clothes Be engaged in device and at least one from server;Data reception module read-write requests for receiving data;The control module is used for Judge the type of reading and writing data request;When reading and writing data request belongs to preset type, data read-write requests are carried out Parsing, if belonging to data read request, by reading corresponding data from server, if belonging to data write request, Then corresponding data are written in primary server.
It is further used as preferred embodiment, the control module is also used to execute data as described in Example 1 and reads Write method.
Existing server architecture can be used in present system, and used hardware module and attaching method thereof is ok It is realized using the prior art.Present system is able to carry out the method for the present invention, but the method for the present invention does not depend on present system Hardware realization.
To sum up, the beneficial effects of the present invention are: the present invention is designed by algorithm, the number of write-in is received using primary server According to, using from server provide the data to be read, can make each server have the different division of labor, avoid data read and write this In the different operation set of two processes on the same server, the speed and efficiency of reading and writing data process is substantially improved, reduces clothes The burden of business device, reduces the Internet resources for needing to occupy.The present invention is not necessarily to carry out server the transformation on hardware, can be in original Have on hardware foundation, promotes the reading and writing data performance of server.
It is to be illustrated to preferable implementation of the invention, but the implementation is not limited to the invention above Example, those skilled in the art can also make various equivalent variations on the premise of without prejudice to spirit of the invention or replace It changes, these equivalent deformations or replacement are all included in the scope defined by the claims of the present application.

Claims (9)

1. a kind of data read-write method, which comprises the following steps:
Receive the type that reading and writing data requests and judges reading and writing data request;
When reading and writing data request belongs to preset type, data read-write requests are parsed, if belonging to data reading Request is taken, then by reading corresponding data from server, if belonging to data write request, corresponding data is written and are led In server.
2. a kind of data read-write method according to claim 1, which is characterized in that the method also includes following steps:
When reading and writing data request is not belonging to preset type, to the read-write from server progress corresponding data or to main clothes Business device carries out the read-write of corresponding data.
3. a kind of data read-write method according to claim 1 or 2, which is characterized in that the preset type is It is divided according to the urgency level of reading and writing data request, sending frequency and/or degree of malice.
4. a kind of data read-write method according to claim 1 or 2, which is characterized in that described to be from the quantity of server It is multiple, after the primary server is written into data, the data being newly written are synchronized to all from server.
5. a kind of data read-write method according to claim 4, which is characterized in that be synchronized to the data being newly written all After in server, the data being newly written in primary server are deleted.
6. a kind of data read-write method according to claim 4, which is characterized in that described corresponding by being read from server Data the step for, specifically include:
Detection is respectively from the current loads of server;
Corresponding data are read from server from current loads are minimum.
7. a kind of data read-write method according to claim 4, which is characterized in that the data that will be newly written are synchronized to It is all from server the step for, specifically include:
Detection is respectively from the current loads of server;
The data copy being newly written in primary server is minimum from server to current loads;
It is minimum from server as data providing using current loads, by the data copy of the new write-in to other from service In device.
8. a kind of data read-write method according to claim 7, which is characterized in that the data by the new write-in are copied Shellfish to other from server the step for, specifically include:
It is ranked up to every other from server according to current loads according to ascending sequence;
According to the sequence sequenced, successively other are used as one by one from server data receiver carry out data copy.
9. a kind of data read-write system, which is characterized in that including data reception module, control module, primary server and at least one It is a from server;
Data reception module read-write requests for receiving data;
The control module is used to judge the type of reading and writing data request;When reading and writing data request belongs to preset type When, data read-write requests are parsed, if belonging to data read request, by reading corresponding data from server, If belonging to data write request, corresponding data are written in primary server.
CN201811250589.5A 2018-10-25 2018-10-25 A kind of data read-write method and system Pending CN109471595A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811250589.5A CN109471595A (en) 2018-10-25 2018-10-25 A kind of data read-write method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811250589.5A CN109471595A (en) 2018-10-25 2018-10-25 A kind of data read-write method and system

Publications (1)

Publication Number Publication Date
CN109471595A true CN109471595A (en) 2019-03-15

Family

ID=65666090

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811250589.5A Pending CN109471595A (en) 2018-10-25 2018-10-25 A kind of data read-write method and system

Country Status (1)

Country Link
CN (1) CN109471595A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110413413A (en) * 2019-07-26 2019-11-05 北京蜜莱坞网络科技有限公司 A kind of method for writing data, device, equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110413413A (en) * 2019-07-26 2019-11-05 北京蜜莱坞网络科技有限公司 A kind of method for writing data, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
US10496668B1 (en) Optimized tender processing of hash-based replicated data
US9753954B2 (en) Data node fencing in a distributed file system
US8924358B1 (en) Change tracking of individual virtual disk files
CN111338854B (en) Kubernetes cluster-based method and system for quickly recovering data
CN107402722B (en) Data migration method and storage device
US8195619B2 (en) Extent reference count update system and method
CN102142032B (en) Method and system for reading and writing data of distributed file system
WO2012000997A1 (en) An apparatus for processing a batched unit of work
CN104202375A (en) Method and system for synchronous data
US9836516B2 (en) Parallel scanners for log based replication
EP3680787B1 (en) Method for synchronization between primary database and standby database, database system and device
CN104050276A (en) Cache processing method and system of distributed database
US8751446B2 (en) Transference control method, transference control apparatus and recording medium of transference control program
CN101986284A (en) Dynamic recovery system for waste space of virtual machine image file
CN106331065A (en) Proxy application for host system with service container and system
CN104503863A (en) Kernel mode and user mode data exchange method used for virtual container system disaster recovery
CN102012899A (en) Method, system and equipment for updating data
US8806159B2 (en) Data storage resource management systems and methods
CN106873902B (en) File storage system, data scheduling method and data node
CN106354566A (en) Command processing method and server
US8499133B2 (en) Cache management for increasing performance of high-availability multi-core systems
CN109471595A (en) A kind of data read-write method and system
CN103399943A (en) Communication method and communication device for parallel query of clustered databases
CN109992447B (en) Data copying method, device and storage medium
CN105939203B (en) List item synchronous method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20190315