CN108334283B - Data writing-in and reading method and system, and data reading-writing system - Google Patents

Data writing-in and reading method and system, and data reading-writing system Download PDF

Info

Publication number
CN108334283B
CN108334283B CN201810051572.0A CN201810051572A CN108334283B CN 108334283 B CN108334283 B CN 108334283B CN 201810051572 A CN201810051572 A CN 201810051572A CN 108334283 B CN108334283 B CN 108334283B
Authority
CN
China
Prior art keywords
data
sector
sector number
load
load servers
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
CN201810051572.0A
Other languages
Chinese (zh)
Other versions
CN108334283A (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.)
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shirui Electronics Co Ltd
Original Assignee
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shirui Electronics 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 Guangzhou Shiyuan Electronics Thecnology Co Ltd, Guangzhou Shirui Electronics Co Ltd filed Critical Guangzhou Shiyuan Electronics Thecnology Co Ltd
Priority to CN201810051572.0A priority Critical patent/CN108334283B/en
Publication of CN108334283A publication Critical patent/CN108334283A/en
Application granted granted Critical
Publication of CN108334283B publication Critical patent/CN108334283B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools
    • 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/0614Improving the reliability of storage systems
    • G06F3/0619Improving the reliability of storage systems in relation to data integrity, e.g. data losses, bit errors
    • 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)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to a data writing method, which comprises the following steps: responding to a write sector request sent by an operating system of the computer, and driving to acquire sector data to be written and a sector number of the computer according to the write sector request; the computer stores the login information of the user account; the driver acquires the addresses of N load servers according to the sector number and the unique identity identifier corresponding to the user account acquired in advance according to the login information; the driver respectively sends the sector number, the unique identity identifier and the sector data to the N load servers according to the addresses of the N load servers; and the N load servers respectively and correspondingly store the received unique identity identifier, the sector number and the sector data. The data writing method can reduce the probability of losing the stored data, and simultaneously the invention also provides a data writing system, a data reading method and system, and a data reading and writing system.

Description

Data writing-in and reading method and system, and data reading-writing system
Technical Field
The invention relates to the technical field of computers, in particular to a data writing and reading method and system and a data reading and writing system.
Background
When an operating system of a computer generates data in operation, the operating system needs to write data into a hard disk of the computer, the operating system sends a write sector request to a drive, and the drive sends a write control instruction to the hard disk after receiving the request so as to write the data into the hard disk; when the computer hard disk is read, the operating system sends a sector reading request to the drive, and the drive sends a reading control instruction to the hard disk after receiving the request so as to read data from the hard disk.
The inventor finds that the following technical problems exist in the prior art in the process of implementing the invention:
the hard disk has the possibility of damage, and once a hard disk bad track appears, the data stored in the hard disk can be damaged;
the hard disk space capacity of the personal computer is limited, and the capacity can not meet the requirement;
in addition, when a user needs to operate his own file, he needs to operate the file on a fixed computer, or copy the file to another computer by means of a usb disk, so that the data reading and writing operation is very troublesome.
Disclosure of Invention
The invention provides a data writing-in method, a data reading-out method, a data writing-in system, a data reading-out system and a data reading-out system, which can reduce the probability of losing stored data.
One aspect of the present invention provides a data writing method, including:
responding to a write sector request sent by an operating system of a computer, and driving to acquire sector data to be written and a sector number of the computer according to the write sector request; the computer stores login information of a user account;
the driver acquires the addresses of N load servers according to the sector number and a unique identity identifier corresponding to the user account acquired in advance according to the login information;
the driver respectively sends the sector number, the unique identity identifier and the sector data to the N load servers according to the addresses of the N load servers;
and the N load servers respectively and correspondingly store the received unique identity identifier, the sector number and the sector data.
More preferably, the obtaining, by the driver, addresses of N load servers according to the sector number and a unique identity identifier corresponding to the user account obtained in advance according to the login information includes:
the driver sends the sector number and the unique identity identifier to a meta-server;
and the meta-server returns the addresses of the N load servers to the driver after receiving the sector number and the unique identity identifier.
In an optional embodiment, the correspondingly storing, by the N load servers, the received unique identifier, the sector number, and the sector data respectively includes:
each load server determining whether historical data corresponding to the unique identity identifier and corresponding to the sector number is stored;
when the historical data is judged to be stored, erasing the historical data and correspondingly storing the received unique identity identifier, the sector number and the sector data;
when the historical data is judged not to exist, the received unique identity identifier, the sector number and the sector data are correspondingly stored.
In an alternative embodiment, the meta-server returning addresses of N load servers to the driver after receiving the sector number and the unique identity identifier, includes:
the meta-server determining whether there is a write record corresponding to the unique id and corresponding to the sector number;
when the write record is judged to exist, the meta-server returns the addresses of the N load servers corresponding to the unique identity identifiers and the sector numbers to the drive according to the write record;
when it is determined that there is no write record, the meta server returns addresses of N available load servers to the driver;
the data writing method further comprises:
each load server sends a notification to the meta-server after correspondingly storing the received unique identity identifier, the sector number and the sector data;
and after receiving the notification, the meta-server correspondingly stores the unique identity identifier, the sector number and the addresses of the N load servers into the write record.
In an alternative embodiment, when it is determined that there is no write record, the meta-server returns addresses of N available load servers to the driver, including:
when the write record is judged not to exist, the meta-server calculates the pressure coefficient of each load server of the load server cluster according to the resource idle quantity of each load server of the load server cluster;
sorting all load servers of the load server cluster according to the pressure coefficients;
selecting N load servers with the minimum pressure coefficients from all load servers of the load server group;
and returning the addresses of the N load servers with the minimum pressure coefficients to the driver as the addresses of the N available load servers.
The invention also provides a data reading method, which comprises the following steps:
responding to a read sector request sent by an operating system of a computer, and acquiring a sector number of the computer by the drive according to the write sector request; the computer stores login information of a user account;
the driver acquires the addresses of N load servers according to the unique identity identifier corresponding to the user account and the sector number acquired in advance according to the login information; wherein the N load servers pre-store sector data corresponding to the unique identity identifier and corresponding to the sector number;
the driver respectively sends sector data acquisition requests corresponding to the unique identity identifiers and the sector numbers to the N load servers according to the addresses of the N load servers;
the N load servers respectively send sector data corresponding to the unique identity identifier and the sector number to a driver according to the received acquisition request;
and the driver sends the received sector data to the operating system.
More preferably, the driver obtains addresses of the N load servers according to the unique identifier corresponding to the user account and the sector number, which are obtained in advance according to the login information, and the addresses include
The driver sends the unique identity identifier and the sector number to a meta-server;
and the meta-server sends the pre-stored addresses of all load servers corresponding to the unique identity identifier and the sector number to the driver according to the received unique identity identifier and the sector number.
In an optional implementation manner, the sending, by the driver, an acquisition request of sector data corresponding to the unique identifier and corresponding to the sector number to the N load servers according to addresses of the N load servers respectively includes:
the driver acquires sector capacity corresponding to the unique identity identifier and the sector number according to the unique identity identifier and the sector number;
the drive divides the sector data into N parts according to the sector capacity, and generates an acquisition request of data of a corresponding part of the sector data corresponding to the unique identity identifier and corresponding to the sector number according to each part;
the driver respectively sends different acquiring requests of the data of the corresponding part to different load servers according to the addresses of the N load servers;
the N load servers respectively send sector data corresponding to the unique id and corresponding to the sector number to a driver according to the received acquisition request, including:
the N load servers respectively send the data of the corresponding part to the driver according to the received acquisition request of the data of the corresponding part;
the driver sends the received sector data to the operating system, and the method comprises the following steps:
the driver synthesizes the received data of the N corresponding parts to obtain synthesized sector data;
and the driver sends the synthesized sector data to the operating system.
The invention also provides a data writing system, which comprises a driver and N load servers;
the driving includes:
the first acquisition module is used for responding to a write sector request sent by an operating system of a computer and acquiring sector data to be written and a sector number of the computer according to the write sector request; the computer stores login information of a user account;
a second obtaining module, configured to obtain addresses of the N load servers according to the sector number and a unique identity identifier corresponding to the user account, which is obtained in advance according to the login information;
a first sending module, configured to send the sector number, the unique identifier, and the sector data to the N load servers according to addresses of the N load servers, respectively;
the load server comprises a first storage module, which is used for correspondingly storing the received unique identity identifier, the sector number and the sector data.
More preferably, the data writing system further comprises a meta server;
the second obtaining module further comprises a first sending unit, configured to send the sector number and the unique identifier to a meta-server;
the meta-server comprises a first return module for returning addresses of the N load servers to the driver after receiving the sector number and the unique identity identifier.
In an alternative embodiment, the first storage module comprises:
a history data judgment unit operable to judge whether history data corresponding to the unique identifier and corresponding to the sector number is stored;
an erasure determination unit configured to, when it is determined that the history data is stored, erase the history data and store the received unique identifier, the sector number, and the sector data in correspondence;
and a storage determining unit, configured to, when it is determined that there is no history data, correspondingly store the received unique identifier, the sector number, and the sector data.
In an alternative embodiment, the first return module comprises:
a first judgment unit, configured to judge whether there is a write record corresponding to the unique id and corresponding to the sector number;
a first determination unit, configured to, when it is determined that there is the write record, return, to the drive, addresses of N load servers corresponding to the unique identifier and corresponding to the sector number according to the write record;
a second determination unit configured to return addresses of N available load servers to the driver when it is determined that there is no write record;
the load server further comprises a first notification module, configured to send a notification to the meta-server after the received unique identity identifier, the sector number, and the sector data are correspondingly stored;
the meta-server further includes a first recording module configured to store the unique identifier, the sector number, and the addresses of the N load servers in the write record in a corresponding manner after receiving the notification.
In an alternative embodiment, the second determination unit includes:
a coefficient calculation unit configured to calculate a pressure coefficient of each load server of a load server cluster according to a resource vacancy amount of each load server of the load server cluster when it is determined that there is no write record;
a first ordering unit, configured to order all load servers of the load server cluster according to the pressure coefficient;
a server selecting unit, configured to select N load servers with the smallest pressure coefficients from all load servers of the load server cluster;
and the address returning unit is used for returning the addresses of the N load servers with the minimum pressure coefficients to the driver as the addresses of the N available load servers.
The invention also provides a data reading system, which comprises a driver and N load servers;
the driving includes:
a third obtaining module, configured to respond to a read sector request sent by an operating system of a computer, where the driver obtains a sector number of the computer according to the write sector request; the computer stores login information of a user account;
a fourth obtaining module, configured to obtain addresses of the N load servers according to the unique identity identifier corresponding to the user account and the sector number, which are obtained in advance according to the login information; wherein the N load servers pre-store sector data corresponding to the unique identity identifier and corresponding to the sector number;
the driving further includes:
a second sending module, configured to send, according to the addresses of the N load servers, sector data acquisition requests corresponding to the unique identity identifiers and corresponding to the sector numbers to the N load servers, respectively;
the load server also comprises a third sending module used for sending the sector data which corresponds to the unique identity identifier and corresponds to the sector number to a driver according to the received acquisition request;
the driver further comprises a fourth sending module, configured to send the received sector data to the operating system.
More preferably, the data reading system further comprises a meta-server;
the fourth obtaining module comprises a second sending unit, configured to send the unique identity identifier and the sector number to a meta-server;
the meta-server comprises a second return module for sending pre-stored addresses of all load servers corresponding to the unique identity identifier and the sector number to the driver according to the received unique identity identifier and the sector number.
In an optional implementation manner, the second sending module includes:
a capacity acquiring unit, configured to acquire, according to the unique identifier and the sector number, a sector capacity corresponding to the unique identifier and corresponding to the sector number;
a request generation unit configured to divide the sector data into N parts according to the sector capacity, and generate, according to each part, an acquisition request for data of a corresponding part of the sector data corresponding to the unique identifier and corresponding to the sector number;
a request sending unit, configured to send different requests for acquiring data of the corresponding portion to different load servers according to the addresses of the N load servers;
the third sending module includes:
the data sending unit is used for sending the data of the corresponding part to the driver according to the received acquisition request of the data of the corresponding part;
the third sending module includes:
a data synthesis unit, configured to synthesize the received N data of the corresponding portions to obtain synthesized sector data;
and the data return unit is used for sending the synthesized sector data to the operating system.
The invention also provides a data reading and writing system, which comprises the data writing system in any embodiment and the data reading system in any embodiment.
Compared with the prior art, the invention has the following outstanding beneficial effects: the invention provides a data writing method, a data reading method, a data writing system, a data reading system and a data reading system, wherein the data writing method comprises the following steps: responding to a write sector request sent by an operating system of a computer, and driving to acquire sector data to be written and a sector number of the computer according to the write sector request; the computer stores login information of a user account; the driver acquires the addresses of N load servers according to the sector number and a unique identity identifier corresponding to the user account acquired in advance according to the login information; the driver respectively sends the sector number, the unique identity identifier and the sector data to the N load servers according to the addresses of the N load servers; and the N load servers respectively and correspondingly store the received unique identity identifier, the sector number and the sector data. The data writing and reading method and system, and the data reading and writing system provided by the invention acquire the sector number through the drive, acquire the addresses of N load servers according to the sector number and the unique identity identifier corresponding to the user account acquired in advance according to the login information, and identify the data stored in the load servers through the unique identity identifier and the sector number, so that the sector data to be written into the local computer by the operating system is stored to the N load servers through the drive, the data loss caused by the damage of the local computer hard disk is avoided, the storage space is expanded through the N load servers, the hard disk does not need to be replaced even if the data to be written exceeds the space capacity of the local computer hard disk, the expansion difficulty is reduced, and the cost is saved.
Drawings
FIG. 1 is a flowchart illustrating a data writing method according to a first embodiment of the present invention;
FIG. 2 is a flowchart illustrating a data reading method according to a first embodiment of the present invention;
FIG. 3 is a block diagram of a first embodiment of a data writing system provided by the present invention;
FIG. 4 is a block diagram of a data reading system according to a first embodiment of the present invention;
fig. 5 is a block diagram of a data reading and writing system according to a first 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, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, it is a schematic flow chart of a first embodiment of a data writing method provided by the present invention, where the method includes:
s101, responding to a write sector request sent by an operating system of a computer, and driving to acquire sector data to be written and a sector number of the computer according to the write sector request; the computer stores login information of a user account;
s102, the driver acquires the addresses of N load servers according to the sector number and a unique identity identifier corresponding to the user account acquired in advance according to the login information;
s103, the driver respectively sends the sector number, the unique identity identifier and the sector data to the N load servers according to the addresses of the N load servers;
s104, the N load servers respectively and correspondingly store the received unique identity identifier, the sector number and the sector data;
in this embodiment, when the operating system of the computer needs to write data into the hard disk of the computer, a write sector request is sent to the drive; for example, when the operating system generates data during operation or when data of an external storage device needs to be written into a hard disk of a computer, a write sector request is sent to the drive.
In this embodiment, after the user logs in the computer by using the user account, the computer stores login information of the user account, and the driver acquires the unique identity corresponding to the user account according to the login information. The unique identification corresponding to different user accounts is different.
In this embodiment, N is a positive integer greater than or equal to 1; the driving respectively sends the sector number, the unique identity identifier and the sector data to the N load servers according to the addresses of the N load servers, and the driving method comprises the following steps:
the driver is respectively connected with the N load servers according to the addresses of the N load servers;
the driver sends the sector number, the unique identifier and the sector data to the N load servers, respectively.
When each load server stores the sector data according to the unique identity identifier and the sector number, the storage structure of the load server can be regarded as being stored by an index structure of a hash table (hash table), and the unique identity identifier can be regarded as an index value of the hash table; the sector number can also be considered as an index value of the hash table. Therefore, in the data stored in the load server, the data corresponding to the user account pointed by the unique identity identifier can be indexed through the unique identity identifier; and indexing sector data corresponding to the sector indicated by the sector number in the data of the user account indicated by the unique identity identifier on the load server through the unique identity identifier and the sector number. Therefore, the sector data corresponding to the unique id and the sector number is the sector data corresponding to the sector indicated by the sector number in the data of the user account indicated by the unique id.
The sector number is obtained through the drive, the addresses of N load servers are obtained according to the sector number and the unique identity identifier which is obtained in advance according to the login information and corresponds to the user account, the data stored in the load servers are identified through the unique identity identifier and the sector number, so that the sector data of an operating system, which are written into a local computer, are stored to the N load servers through the drive, the data loss caused by the damage of the local computer hard disk is avoided, the storage space is expanded through the N load servers, the hard disk does not need to be replaced even if the written data exceeds the space capacity of the local computer hard disk, the expansion difficulty is reduced, and the cost is saved; the data can be operated by the user at any time and any place conveniently through the unique identity identifier corresponding to the user account, and the user can operate the data after logging in the computer by using the user account without being fixed on the same computer, so that the convenience of file operation is improved, and the data corresponding to the user account can be prevented from being operated by other people.
The present invention further provides a second embodiment of a data writing method, where the method includes steps S101 to S104 in the first embodiment of the data writing method, and further defines that the driver obtains addresses of N load servers according to the sector number and a unique identifier corresponding to the user account obtained in advance according to the login information, and the method includes:
the driver sends the sector number and the unique identity identifier to a meta-server;
and the meta-server returns the addresses of the N load servers to the driver after receiving the sector number and the unique identity identifier.
In an alternative embodiment, the meta-server returning addresses of N load servers to the driver after receiving the sector number and the unique identity identifier, includes: the meta-server acquires the addresses of the N load servers according to the sector numbers and the unique identity identifiers; the meta-server returns the addresses of the N load servers to the driver corresponding to the unique identity identifier. That is, when a plurality of drives send sector numbers and unique identifiers to the same meta-server, different drives are distinguished by the unique identifiers.
In an optional implementation manner, the driver sends the sector number and a unique identifier corresponding to the user account, which is obtained in advance according to the login information, to the meta-server through a network.
The meta-server is used for scheduling the load server used for writing the sector data into the computer, and the unique identity identifier is used for identifying the computer, so that the meta-server can conveniently serve a plurality of computers, and the scheduling efficiency is improved; and returning the addresses of the N load servers to the driver after the meta-server receives the sector number and the unique identity identifier, so that the load server group is conveniently managed in a unified manner, the driver can quickly acquire the addresses of the load servers, and the writing efficiency is improved.
The present invention further provides a third embodiment of a data writing method, where the method includes steps S101 to S104 in the first embodiment of the data writing method, and further defines that the N load servers respectively store the received unique identifier, the received sector number, and the received sector data in a corresponding manner, and includes:
each load server determining whether historical data corresponding to the unique identity identifier and corresponding to the sector number is stored;
when the historical data is judged to be stored, erasing the historical data and correspondingly storing the received unique identity identifier, the sector number and the sector data;
when the historical data is judged not to exist, the received unique identity identifier, the sector number and the sector data are correspondingly stored.
That is, each load server determines whether the history data corresponding to the unique id and corresponding to the sector number is stored, so as to erase the history data, that is, the sector data covers the history data corresponding to the unique id and corresponding to the sector number on the load server, thereby only the latest data corresponding to the unique id and corresponding to the sector number is saved, and the storage space of the load server is saved.
The present invention further provides a fourth embodiment of a data writing method, where the method includes steps S101 to S104 in the first embodiment of the data writing method, and further defines that the meta-server returns addresses of N load servers to the driver after receiving the sector number and the unique identifier, and includes:
the meta-server determining whether there is a write record corresponding to the unique id and corresponding to the sector number;
when the write record is judged to exist, the meta-server returns the addresses of the N load servers corresponding to the unique identity identifiers and the sector numbers to the drive according to the write record;
when it is determined that there is no write record, the meta server returns addresses of N available load servers to the driver;
the data writing method further comprises:
each load server sends a notification to the meta-server after correspondingly storing the received unique identity identifier, the sector number and the sector data;
and after receiving the notification, the meta-server correspondingly stores the unique identity identifier, the sector number and the addresses of the N load servers into the write record.
It should be noted that, if the unique id, the sector number, and the addresses of the N load servers are stored in the write record correspondingly, the addresses of the N load servers and the addresses of the N load servers all correspond to the unique id; the N load servers and the addresses of the N load servers both correspond to the unique identity identifier and to the sector number.
That is, the meta-server determines whether there is a written record corresponding to the unique id and corresponding to the sector number, and determines whether there is a written address of the load server, so as to quickly locate the load server having the written record, thereby facilitating to improve the probability that the load server determines that the history data is stored, and further improving the efficiency.
The present invention also provides a fifth embodiment of a data writing method, where the method includes steps S101 to S104 in the first embodiment of the data writing method, and further defines that when it is determined that there is no write record, the meta server returns addresses of N available load servers to the driver, including:
when the write record is judged not to exist, the meta-server calculates the pressure coefficient of each load server of the load server cluster according to the resource idle quantity of each load server of the load server cluster;
sorting all load servers of the load server cluster according to the pressure coefficients;
selecting N load servers with the minimum pressure coefficients from all load servers of the load server group;
and returning the addresses of the N load servers with the minimum pressure coefficients to the driver as the addresses of the N available load servers.
When the writing record is judged not to exist, the N load servers with the minimum pressure coefficient are selected to serve as the N available load servers, and the load servers with the small pressure are scheduled to store, so that the writing efficiency of data is improved.
Referring to fig. 2, it is a schematic flow chart of a first embodiment of the data reading method provided by the present invention; the data reading method comprises the following steps:
s301, in response to a read sector request sent by an operating system of a computer, the drive acquires a sector number of the computer according to the write sector request; the computer stores login information of a user account;
s302, the driver acquires the addresses of N load servers according to the unique identity identifier corresponding to the user account and the sector number acquired in advance according to the login information; wherein the N load servers pre-store sector data corresponding to the unique identity identifier and corresponding to the sector number;
s303, the driver respectively sends sector data acquisition requests corresponding to the unique identity identifiers and the sector numbers to the N load servers according to the addresses of the N load servers;
s304, the N load servers respectively send the sector data corresponding to the unique identity identifier and the sector number to a driver according to the received acquisition request;
s305, the driver sends the received sector data to the operating system.
In this embodiment, when the operating system of the computer needs to read the sector data of the hard disk, a read sector request is sent to the drive; for example, when the operating system calls data to perform calculation during running or when sector data needs to be copied to an external storage device, a read sector request is sent to the drive.
In this embodiment, after the user logs in the computer by using the user account, the computer stores login information of the user account, and the driver acquires the unique identity corresponding to the user account according to the login information. The unique identification corresponding to different user accounts is different.
In this embodiment, N is a positive integer greater than or equal to 1; the driving unit is configured to send, to the N load servers, sector data acquisition requests corresponding to the unique id and corresponding to the sector number, respectively according to the addresses of the N load servers, and includes:
the driver is respectively connected with the N load servers according to the addresses of the N load servers;
and the driver respectively sends an acquisition request of sector data corresponding to the unique identity identifier and the sector number to the N load servers.
When each load server stores the sector data according to the unique identity identifier and the sector number, the storage structure of the load server can be regarded as being stored by an index structure of a hash table (hash table), and the unique identity identifier can be regarded as an index value of the hash table; the sector number can also be considered as an index value of the hash table. Therefore, in the data stored in the load server, the data corresponding to the user account pointed by the unique identity identifier can be indexed through the unique identity identifier; and indexing sector data corresponding to the sector indicated by the sector number in the data of the user account indicated by the unique identity identifier on the load server through the unique identity identifier and the sector number. Therefore, the sector data corresponding to the unique id and the sector number is the sector data corresponding to the sector indicated by the sector number in the data of the user account indicated by the unique id.
The sector number is obtained through the drive, the addresses of N load servers are obtained according to the sector number and the unique identity identifier which is obtained in advance according to the login information and corresponds to the user account, and the data in the load servers are obtained according to the unique identity identifier and the sector number, so that the sector data to be read by an operating system is obtained from the load servers through the drive, and the data loss caused by the damage of a local computer hard disk is avoided; the storage space is expanded through the N load servers, and even if the data to be written exceeds the space capacity of the hard disk of the local computer, the hard disk does not need to be replaced, so that the expansion difficulty is reduced, and the cost is saved; the unique identity identifier corresponding to the user account facilitates the user to read data at any time and any place, and the user can read the data after logging in the computer by using the user account without being fixed on the same computer, so that the convenience of reading the file is improved, and the data corresponding to the user account is prevented from being read by other people.
The present invention further provides a second embodiment of a data reading method, where the method includes steps S301 to S305 in the first embodiment of the data reading method, and further defines that the driver obtains addresses of N load servers according to the unique identifier corresponding to the user account and the sector number, which are obtained in advance according to the login information, where the addresses include
The driver sends the unique identity identifier and the sector number to a meta-server;
and the meta-server sends the pre-stored addresses of all load servers corresponding to the unique identity identifier and the sector number to the driver according to the received unique identity identifier and the sector number.
It should be noted that, if the meta server stores the unique identifier, the sector number, and the addresses of the plurality of load servers in advance, the addresses of the N load servers and the N load servers correspond to the unique identifier; the N load servers and the addresses of the N load servers correspond to the unique identity identifier and to the sector number.
In an alternative embodiment, the meta-server sends pre-stored addresses of all load servers corresponding to the unique identity identifier and the sector number to the driver according to the received unique identity identifier and the sector number, including: acquiring addresses of N load servers corresponding to the unique identity identifiers and the sector numbers; returning addresses of the N load servers to a driver corresponding to the unique identity identifier. The meta-server searches a load server for reading sector data for the computer, and distinguishes different computers through the unique identity identifier, so that the meta-server can conveniently serve a plurality of computers, and the scheduling efficiency is improved.
In an alternative embodiment, the driver sends the sector number and a pre-configured unique identity identifier of the computer to a meta-server over a network.
The meta-server returns the addresses of the N load servers to the driver after receiving the sector number and the unique identity identifier, so that the load server group is managed uniformly, the driver can acquire the addresses of the load servers quickly, and the reading efficiency is improved.
The present invention further provides a third embodiment of a data reading method, where the method includes steps S301 to S305 in the first embodiment of the data reading method, and further defines that the driver sends, to the N load servers, sector data acquisition requests corresponding to the unique identifier and corresponding to the sector number according to the addresses of the N load servers, respectively, and the method includes:
the driver acquires sector capacity corresponding to the unique identity identifier and the sector number according to the unique identity identifier and the sector number;
the drive divides the sector data into N parts according to the sector capacity, and generates an acquisition request of data of a corresponding part of the sector data corresponding to the unique identity identifier and corresponding to the sector number according to each part;
the driver respectively sends different acquiring requests of the data of the corresponding part to different load servers according to the addresses of the N load servers;
the N load servers respectively send sector data corresponding to the unique id and corresponding to the sector number to a driver according to the received acquisition request, including:
the N load servers respectively send the data of the corresponding part to the driver according to the received acquisition request of the data of the corresponding part;
the driver sends the received sector data to the operating system, and the method comprises the following steps:
the driver synthesizes the received data of the N corresponding parts to obtain synthesized sector data;
and the driver sends the synthesized sector data to the operating system.
In this embodiment, the sector size, also called sector size, refers to the number of bytes in a sector of the hard disk.
In an alternative embodiment, the sector size is 512 bytes, and N is 3; the drive divides the sector data into N parts according to the sector capacity, and generates an acquisition request for data of a corresponding part of the sector data corresponding to the unique identifier and corresponding to the sector number according to each part, specifically: the drive divides the sector data into 3 portions of 172 bytes, 170 bytes and 170 bytes by the sector capacity and generates 3 acquisition requests corresponding to a first portion of 172 bytes in size, a second portion of 170 bytes in size and a third portion of 170 bytes in size, respectively. The driver sends different requests for acquiring the data of the corresponding part to different load servers according to the addresses of the N load servers, specifically: the driver sends different acquisition requests of the data of the corresponding parts to 3 load servers respectively corresponding to the addresses of the load servers; in an optional implementation manner, the driver randomly numbers the 3 load servers respectively corresponding to the addresses of the load servers to obtain a load server No. 1, a load server No. 2, and a load server No. 3; the driver sends an acquisition request of the first part to a No. 1 load server; sending an acquisition request of the second part to the No. 2 load server; and sending the acquisition request of the third part to the No. 3 load server. The driving sends the synthesized sector data to the operating system, specifically: the driver synthesizes the received 3 parts of data; and the driver sends the synthesized data to the operating system.
The sector capacity is divided into N parts, an acquisition request corresponding to each part is generated, the acquisition requests corresponding to different parts are sent to different load servers according to the addresses of the N load servers, so that data of 1 part of the sector is acquired from each load server, the received data of the N parts are synthesized by the driver, the synthesized data are sent to the operating system, the sector data corresponding to the sector number are returned to the operating system, and the data acquisition speed is further improved.
Referring to fig. 3, it is a schematic block diagram of a data writing system according to a first embodiment of the present invention; the data writing system 20 includes a driver 201 and N load servers 203;
the drive 201 includes:
a first obtaining module 2011, configured to, in response to a write sector request sent by an operating system of a computer, obtain, according to the write sector request, sector data to be written and a sector number of the computer; the computer stores login information of a user account;
a second obtaining module 2014, configured to obtain addresses of the N load servers according to the sector number and a unique identity identifier corresponding to the user account obtained in advance according to the login information;
a first sending module 2013, configured to send the sector number, the unique identifier, and the sector data to the N load servers according to the addresses of the N load servers, respectively;
the load server 203 includes a first storage module 2031 configured to correspondingly store the received unique identifier, the received sector number, and the received sector data.
In this embodiment, when the operating system of the computer needs to write data into the hard disk of the computer, a write sector request is sent to the drive; for example, when the operating system generates data during operation or when data of an external storage device needs to be written into a hard disk of a computer, a write sector request is sent to the drive.
In this embodiment, after the user logs in the computer by using the user account, the computer stores login information of the user account, and the driver acquires the unique identity corresponding to the user account according to the login information. The unique identification corresponding to different user accounts is different.
In this embodiment, N is a positive integer greater than or equal to 1; the first transmitting module includes:
the first connecting unit is used for respectively connecting the N load servers according to the addresses of the N load servers;
a third sending unit, configured to send the sector number, the unique identifier, and the sector data to the N connected load servers, respectively.
When each load server stores the sector data according to the unique identity identifier and the sector number, the storage structure of the load server can be regarded as being stored by an index structure of a hash table (hash table), and the unique identity identifier can be regarded as an index value of the hash table; the sector number can also be considered as an index value of the hash table. Therefore, in the data stored in the load server, the data corresponding to the user account pointed by the unique identity identifier can be indexed through the unique identity identifier; and indexing sector data corresponding to the sector indicated by the sector number in the data of the user account indicated by the unique identity identifier on the load server through the unique identity identifier and the sector number. Therefore, the sector data corresponding to the unique id and the sector number is the sector data corresponding to the sector indicated by the sector number in the data of the user account indicated by the unique id.
The sector number is obtained through the drive, the addresses of N load servers are obtained according to the sector number and the unique identity identifier which is obtained in advance according to the login information and corresponds to the user account, the data stored in the load servers are identified through the unique identity identifier and the sector number, so that the sector data of an operating system, which are written into a local computer, are stored to the N load servers through the drive, the data loss caused by the damage of the local computer hard disk is avoided, the storage space is expanded through the N load servers, the hard disk does not need to be replaced even if the written data exceeds the space capacity of the local computer hard disk, the expansion difficulty is reduced, and the cost is saved; the data can be operated by the user at any time and any place conveniently through the unique identity identifier corresponding to the user account, and the user can operate the data after logging in the computer by using the user account without being fixed on the same computer, so that the convenience of file operation is improved, and the data corresponding to the user account can be prevented from being operated by other people.
The present invention further provides a second embodiment of a data writing system, comprising the driver 201 and the N load servers 203 of the first embodiment of the data writing system 20 described above, further defined, the data writing system further comprising a meta server;
the second obtaining module further comprises a first sending unit, configured to send the sector number and the unique identifier to a meta-server;
the meta-server comprises a first return module for returning addresses of the N load servers to the driver after receiving the sector number and the unique identity identifier.
The meta-server is used for scheduling the load server used for writing the sector data for the computer, and the unique identity identifier is used for distinguishing different computers, so that the meta-server can conveniently serve a plurality of computers, and the scheduling efficiency is improved.
In an alternative embodiment, the first return module comprises: a fifth sending unit, configured to obtain addresses of the N load servers according to the sector number and the unique identity identifier; a first returning unit for returning addresses of the N load servers to the driver corresponding to the unique identity identifier. That is, when a plurality of drives send sector numbers and unique identifiers to the same meta-server, different drives are distinguished by the unique identifiers.
In an optional implementation manner, the driver sends the sector number and a unique identifier corresponding to the user account, which is obtained in advance according to the login information, to the meta-server through a network.
The meta-server is used for scheduling the load server used for writing the sector data into the computer, and the unique identity identifier is used for identifying the computer, so that the meta-server can conveniently serve a plurality of computers, and the scheduling efficiency is improved; and returning the addresses of the N load servers to the driver after the meta-server receives the sector number and the unique identity identifier, so that the load server group is conveniently managed in a unified manner, the driver can quickly acquire the addresses of the load servers, and the writing efficiency is improved.
The present invention further provides a third embodiment of a data writing system, which includes the driver 201 and the N load servers 203 of the first embodiment of the data writing system 20, and further defines that the first storage module includes:
a history data judgment unit operable to judge whether history data corresponding to the unique identifier and corresponding to the sector number is stored;
an erasure determination unit, configured to, when it is determined that the history data is stored, erase the history data and store the received unique identifier, the sector number, and the sector data in a corresponding manner;
and the storage judging unit is used for correspondingly storing the received unique identity identifier, the sector number and the sector data when judging that the historical data does not exist.
That is, each load server determines whether the history data corresponding to the unique id and corresponding to the sector number is stored, so as to erase the history data, that is, the sector data covers the history data corresponding to the unique id and corresponding to the sector number on the load server, thereby only the latest data corresponding to the unique id and corresponding to the sector number is saved, and the storage space of the load server is saved.
The present invention also provides a fourth embodiment of a data writing system, which includes the driver 201 and the N load servers 203 of the first embodiment of the data writing system 20, and further defines that the first returning module includes:
a first judgment unit, configured to judge whether there is a write record corresponding to the unique id and corresponding to the sector number;
a first determination unit, configured to, when it is determined that there is the write record, return, to the drive, addresses of N load servers corresponding to the unique identifier and corresponding to the sector number according to the write record;
a second determination unit configured to return addresses of N available load servers to the driver when it is determined that there is no write record;
the load server further comprises a first notification module, configured to send a notification to the meta-server after the received unique identity identifier, the sector number, and the sector data are correspondingly stored;
the meta-server further includes a first recording module configured to store the unique identifier, the sector number, and the addresses of the N load servers in the write record in a corresponding manner after receiving the notification.
It should be noted that, if the unique id, the sector number, and the addresses of the N load servers are stored in the write record correspondingly, the addresses of the N load servers and the addresses of the N load servers all correspond to the unique id; the N load servers and the addresses of the N load servers both correspond to the unique identity identifier and to the sector number.
That is, the meta-server determines whether there is a written record corresponding to the unique id and corresponding to the sector number, and determines whether there is a written address of the load server, so as to quickly locate the load server having the written record, thereby facilitating to improve the probability that the load server determines that the history data is stored, and further improving the efficiency.
The present invention also provides a fifth embodiment of a data writing system, which includes the driver 201 and the N load servers 203 of the first embodiment of the data writing system 20, and further defines that the second determination unit includes:
a coefficient calculation unit configured to calculate a pressure coefficient of each load server of a load server cluster according to a resource vacancy amount of each load server of the load server cluster when it is determined that there is no write record;
a first ordering unit, configured to order all load servers of the load server cluster according to the pressure coefficient;
a server selecting unit, configured to select N load servers with the smallest pressure coefficients from all load servers of the load server cluster;
and the address returning unit is used for returning the addresses of the N load servers with the minimum pressure coefficients to the driver as the addresses of the N available load servers.
When the writing record is judged not to exist, the N load servers with the minimum pressure coefficient are selected to serve as the N available load servers, and the load servers with the small pressure are scheduled to store, so that the writing efficiency of data is improved.
Referring to fig. 4, it is a schematic block diagram of a data reading system according to a first embodiment of the present invention; as shown in fig. 4, the data reading system 40 includes a driver 401 and N load servers 403;
the drive 401 includes:
a third obtaining module 4011, configured to respond to a read sector request sent by an operating system of a computer, where the driver obtains a sector number of the computer according to the write sector request; the computer stores login information of a user account;
a fourth obtaining module 4014, configured to obtain addresses of the N load servers according to the unique identity identifier corresponding to the user account and the sector number, which are obtained in advance according to the login information; wherein the N load servers pre-store sector data corresponding to the unique identity identifier and corresponding to the sector number;
a second sending module 4013, configured to send, according to the addresses of the N load servers, sector data acquisition requests corresponding to the unique identity identifiers and corresponding to the sector numbers to the N load servers, respectively;
the load server 403 further includes a third sending module 4031, configured to send, according to the received acquisition request, sector data corresponding to the unique identity identifier and corresponding to the sector number to a driver;
the driver further includes a fourth sending module 4015, configured to send the received sector data to the operating system.
In this embodiment, when the operating system of the computer needs to read the sector data of the hard disk, a read sector request is sent to the drive; for example, when the operating system calls data to perform calculation during running or when sector data needs to be copied to an external storage device, a read sector request is sent to the drive.
In this embodiment, N is a positive integer greater than or equal to 1; and after the user logs in the computer by using the user account, the computer stores the login information of the user account and drives to acquire the unique identity corresponding to the user account according to the login information. The unique identification corresponding to different user accounts is different.
In this embodiment, the second sending module includes:
the second connecting unit is used for respectively connecting the N load servers according to the addresses of the N load servers;
a fourth sending unit, configured to send the sector number, the unique identifier, and the sector data to the N load servers, respectively.
When each load server stores the sector data according to the unique identity identifier and the sector number, the storage structure of the load server can be regarded as being stored by an index structure of a hash table (hash table), and the unique identity identifier can be regarded as an index value of the hash table; the sector number can also be considered as an index value of the hash table. Therefore, in the data stored in the load server, the data corresponding to the user account pointed by the unique identity identifier can be indexed through the unique identity identifier; and indexing sector data corresponding to the sector indicated by the sector number in the data of the user account indicated by the unique identity identifier on the load server through the unique identity identifier and the sector number. Therefore, the sector data corresponding to the unique id and the sector number is the sector data corresponding to the sector indicated by the sector number in the data of the user account indicated by the unique id.
The sector number is obtained through the drive, the addresses of N load servers are obtained according to the sector number and the unique identity identifier which is obtained in advance according to the login information and corresponds to the user account, and the data in the load servers are obtained according to the unique identity identifier and the sector number, so that the sector data to be read by an operating system is obtained from the load servers through the drive, and the data loss caused by the damage of a local computer hard disk is avoided; the storage space is expanded through the N load servers, and even if the data to be written exceeds the space capacity of the hard disk of the local computer, the hard disk does not need to be replaced, so that the expansion difficulty is reduced, and the cost is saved; the unique identity identifier corresponding to the user account facilitates the user to read data at any time and any place, and the user can read the data after logging in the computer by using the user account without being fixed on the same computer, so that the convenience of reading the file is improved, and the data corresponding to the user account is prevented from being read by other people.
The present invention also provides a second embodiment of a data reading system, comprising the driver 401 and the N load servers 403 of the first embodiment of the data reading system 40 described above, further defined, the data reading system further comprising a meta server;
the fourth obtaining module comprises a second sending unit, configured to send the unique identity identifier and the sector number to a meta-server;
the meta-server comprises a second return module for sending pre-stored addresses of all load servers corresponding to the unique identity identifier and the sector number to the driver according to the received unique identity identifier and the sector number.
It should be noted that, if the meta server stores the unique identifier, the sector number, and the addresses of the plurality of load servers in advance, the addresses of the N load servers and the N load servers correspond to the unique identifier; the N load servers and the addresses of the N load servers correspond to the unique identity identifier and to the sector number.
In an alternative embodiment, the second return module comprises: a sixth sending unit, configured to obtain addresses of the N load servers corresponding to the unique identity identifier and the sector number; a second return unit for returning addresses of the N load servers to a driver corresponding to the unique identity identifier. That is, when a plurality of drives send sector numbers and unique identifiers to the same meta-server, different drives are distinguished by the unique identifiers. The meta-server searches a load server for reading sector data for the computer, and distinguishes different computers through the unique identity identifier, so that the meta-server can conveniently serve a plurality of computers, and the scheduling efficiency is improved.
In an optional implementation manner, the driver sends the sector number and a unique identifier corresponding to the user account, which is obtained in advance according to the login information, to a meta-server through a network.
The meta server returns the addresses of the N load servers corresponding to the received unique identity identifiers and the received sector numbers to the driver, so that the load server group is conveniently managed in a unified manner, the driver can quickly acquire the addresses of the load servers, and the writing efficiency is improved.
The present invention further provides a third embodiment of a data reading system, which includes the driver 401 and the N load servers 403 of the first embodiment of the data reading system 40, and further defines that the second sending module includes:
a capacity acquiring unit, configured to acquire, according to the unique identifier and the sector number, a sector capacity corresponding to the unique identifier and corresponding to the sector number;
a request generation unit configured to divide the sector data into N parts according to the sector capacity, and generate, according to each part, an acquisition request for data of a corresponding part of the sector data corresponding to the unique identifier and corresponding to the sector number;
a request sending unit, configured to send different requests for acquiring data of the corresponding portion to different load servers according to the addresses of the N load servers;
the third sending module includes:
the data sending unit is used for sending the data of the corresponding part to the driver according to the received acquisition request of the data of the corresponding part;
the third sending module includes:
a data synthesis unit, configured to synthesize the received N data of the corresponding portions to obtain synthesized sector data;
and the data return unit is used for sending the synthesized sector data to the operating system.
In this embodiment, the sector size, also called sector size, refers to the number of bytes in a sector of the hard disk.
In an alternative embodiment, the sector size is 512 bytes, and N is 3; the request generating unit divides the sector data into N parts according to the sector capacity, and generates an acquisition request of data of a corresponding part of the sector data corresponding to the unique identifier and corresponding to the sector number according to each part, specifically: the request generation unit divides the sector data into 3 parts of 172 bytes, 170 bytes and 170 bytes by the sector capacity and generates 3 acquisition requests respectively corresponding to a first part of 172 bytes in size, a second part of 170 bytes in size and a third part of 170 bytes in size. The data sending unit sends different requests for acquiring the data of the corresponding part to different load servers according to the addresses of the N load servers, specifically: the data sending unit sends different acquiring requests of the data of the corresponding parts to 3 load servers respectively corresponding to the addresses of the load servers; in an optional implementation manner, the data sending unit randomly numbers the 3 load servers respectively corresponding to the addresses of the load servers to obtain a load server No. 1, a load server No. 2, and a load server No. 3; the data sending unit sends an acquisition request of the first part to a No. 1 load server; sending an acquisition request of the second part to the No. 2 load server; and sending the acquisition request of the third part to the No. 3 load server. The data returning unit sends the synthesized sector data to the operating system, specifically: the data return unit synthesizes the received 3 parts of data; and the data return unit sends the synthesized data to the operating system.
The sector capacity is divided into N parts, an acquisition request corresponding to each part is generated, the acquisition requests corresponding to different parts are sent to different load servers according to the addresses of the N load servers, so that data of 1 part of the sector by N are acquired from each load server, the received data of the N parts are synthesized, the synthesized data are sent to the operating system, the sector data corresponding to the sector number are returned to the operating system, and the data acquisition speed is further improved.
Referring to fig. 5, it is a schematic block diagram of a data reading and writing system according to a first embodiment of the present invention; as shown in fig. 5, the data reading and writing system 1 includes a data reading and writing system 20 according to any one of the above embodiments and a data reading and writing system 40 according to any one of the above embodiments.
The sector number is obtained through the drive, the addresses of N load servers are obtained according to the sector number and the unique identity identifier which is obtained in advance according to the login information and corresponds to the user account, the data stored in the load servers are identified through the unique identity identifier and the sector number, so that the sector data of an operating system, which are written into a local computer, are stored to the N load servers through the drive, the data loss caused by the damage of the local computer hard disk is avoided, the storage space is expanded through the N load servers, the hard disk does not need to be replaced even if the written data exceeds the space capacity of the local computer hard disk, the expansion difficulty is reduced, and the cost is saved; the unique identity identifier corresponding to the user account facilitates the user to read and write data at any time and any place, and the user can read and write the data after logging in the computer by using the user account without being fixed on the same computer, so that the convenience of reading and writing files is improved, and the data corresponding to the user account is prevented from being read and written by other people.
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 a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention.

Claims (17)

1. A data writing method, characterized in that the data writing method comprises:
responding to a write sector request sent by an operating system of a computer, and driving to acquire sector data to be written and a sector number of the computer according to the write sector request; the computer stores login information of a user account;
the driver acquires the addresses of N load servers according to the sector number and a unique identity identifier corresponding to the user account acquired in advance according to the login information;
the driver respectively sends the sector number, the unique identity identifier and the sector data to the N load servers according to the addresses of the N load servers;
the N load servers respectively and correspondingly store the received unique identity identifier, the sector number and the sector data; so that in the data reading process, the driver can send sector data acquisition requests corresponding to the unique identity identifiers and the sector numbers to the N load servers according to the addresses of the N load servers respectively;
wherein the driver sends, according to the addresses of the N load servers, sector data acquisition requests corresponding to the unique identifier and corresponding to the sector number to the N load servers, respectively, and includes:
the driver acquires sector capacity corresponding to the unique identity identifier and the sector number according to the unique identity identifier and the sector number; the drive divides the sector data into N parts according to the sector capacity, and generates an acquisition request of data of a corresponding part of the sector data corresponding to the unique identity identifier and corresponding to the sector number according to each part; and the driver respectively sends different acquisition requests of the data of the corresponding part to different load servers according to the addresses of the N load servers.
2. The data writing method according to claim 1, wherein the driving obtains addresses of N load servers according to the sector number and a unique id corresponding to the user account obtained in advance according to the login information, and includes:
the driver sends the sector number and the unique identity identifier to a meta-server;
and the meta-server returns the addresses of the N load servers to the driver after receiving the sector number and the unique identity identifier.
3. The data writing method according to claim 2,
the N load servers respectively and correspondingly store the received unique identifier, the received sector number, and the received sector data, and the method includes:
each load server determining whether historical data corresponding to the unique identity identifier and corresponding to the sector number is stored;
when the historical data is judged to be stored, erasing the historical data and correspondingly storing the received unique identity identifier, the sector number and the sector data;
when the historical data is judged not to exist, the received unique identity identifier, the sector number and the sector data are correspondingly stored.
4. The data writing method according to claim 3,
the meta-server returning addresses of the N load servers to the driver after receiving the sector number and the unique identity identifier, comprising:
the meta-server determining whether there is a write record corresponding to the unique id and corresponding to the sector number;
when the write record is judged to exist, the meta-server returns the addresses of the N load servers corresponding to the unique identity identifiers and the sector numbers to the drive according to the write record;
when it is determined that there is no write record, the meta server returns addresses of N available load servers to the driver;
the data writing method further comprises:
each load server sends a notification to the meta-server after correspondingly storing the received unique identity identifier, the sector number and the sector data;
and after receiving the notification, the meta-server correspondingly stores the unique identity identifier, the sector number and the addresses of the N load servers into the write record.
5. The data writing method of claim 4, wherein the returning, by the meta-server, addresses of N available load servers to the driver when it is determined that there is no write record comprises:
when the write record is judged not to exist, the meta-server calculates the pressure coefficient of each load server of the load server cluster according to the resource idle quantity of each load server of the load server cluster;
sorting all load servers of the load server cluster according to the pressure coefficients;
selecting N load servers with the minimum pressure coefficients from all load servers of the load server group;
and returning the addresses of the N load servers with the minimum pressure coefficients to the driver as the addresses of the N available load servers.
6. A data reading method, characterized in that the data reading method comprises:
responding to a read sector request sent by an operating system of a computer, and driving to acquire a sector number of the computer according to the read sector request; the computer stores login information of a user account;
the driver acquires the addresses of N load servers according to the unique identity identifier corresponding to the user account and the sector number acquired in advance according to the login information; wherein the N load servers pre-store sector data corresponding to the unique identity identifier and corresponding to the sector number;
the driver respectively sends sector data acquisition requests corresponding to the unique identity identifiers and the sector numbers to the N load servers according to the addresses of the N load servers;
the N load servers respectively send sector data corresponding to the unique identity identifier and the sector number to a driver according to the received acquisition request;
the driver sends the received sector data to the operating system;
wherein the driver sends, according to the addresses of the N load servers, sector data acquisition requests corresponding to the unique identifier and corresponding to the sector number to the N load servers, respectively, and includes:
the driver acquires sector capacity corresponding to the unique identity identifier and the sector number according to the unique identity identifier and the sector number;
the drive divides the sector data into N parts according to the sector capacity, and generates an acquisition request of data of a corresponding part of the sector data corresponding to the unique identity identifier and corresponding to the sector number according to each part;
and the driver respectively sends different acquisition requests of the data of the corresponding part to different load servers according to the addresses of the N load servers.
7. The data reading method of claim 6,
the driver acquires the addresses of N load servers according to the unique identity identifier corresponding to the user account and the sector number acquired in advance according to the login information, and the method comprises the following steps of
The driver sends the unique identity identifier and the sector number to a meta-server;
and the meta-server sends the pre-stored addresses of all load servers corresponding to the unique identity identifier and the sector number to the driver according to the received unique identity identifier and the sector number.
8. The data reading method according to claim 7, wherein the N load servers respectively send sector data corresponding to the unique id and corresponding to the sector number to a drive according to the received acquisition request, comprising:
the N load servers respectively send the data of the corresponding part to the driver according to the received acquisition request of the data of the corresponding part;
the driver sends the received sector data to the operating system, and the method comprises the following steps:
the driver synthesizes the received data of the N corresponding parts to obtain synthesized sector data;
and the driver sends the synthesized sector data to the operating system.
9. A data writing system, characterized in that the data writing system comprises a driver and N load servers;
the driving includes:
the first acquisition module is used for responding to a write sector request sent by an operating system of a computer and acquiring sector data to be written and a sector number of the computer according to the write sector request; the computer stores login information of a user account;
a second obtaining module, configured to obtain addresses of the N load servers according to the sector number and a unique identity identifier corresponding to the user account, which is obtained in advance according to the login information;
a first sending module, configured to send the sector number, the unique identifier, and the sector data to the N load servers according to addresses of the N load servers, respectively;
the load server comprises a first storage module, a second storage module and a third storage module, wherein the first storage module is used for correspondingly storing the received unique identity identifier, the sector number and the sector data; so that in the data reading process, the driver can send sector data acquisition requests corresponding to the unique identity identifiers and the sector numbers to the N load servers according to the addresses of the N load servers respectively;
wherein the driver sends, according to the addresses of the N load servers, sector data acquisition requests corresponding to the unique identifier and corresponding to the sector number to the N load servers, respectively, and includes:
the driver acquires sector capacity corresponding to the unique identity identifier and the sector number according to the unique identity identifier and the sector number; the drive divides the sector data into N parts according to the sector capacity, and generates an acquisition request of data of a corresponding part of the sector data corresponding to the unique identity identifier and corresponding to the sector number according to each part; and the driver respectively sends different acquisition requests of the data of the corresponding part to different load servers according to the addresses of the N load servers.
10. The data writing system of claim 9, wherein the data writing system further comprises a meta server;
the second obtaining module further comprises a first sending unit, configured to send the sector number and the unique identifier to a meta-server;
the meta-server comprises a first return module for returning addresses of the N load servers to the driver after receiving the sector number and the unique identity identifier.
11. The data writing system of claim 10,
the first storage module includes:
a history data judgment unit operable to judge whether history data corresponding to the unique identifier and corresponding to the sector number is stored;
an erasure determination unit configured to, when it is determined that the history data is stored, erase the history data and store the received unique identifier, the sector number, and the sector data in correspondence;
and a storage determining unit, configured to, when it is determined that there is no history data, correspondingly store the received unique identifier, the sector number, and the sector data.
12. The data writing system of claim 11,
the first return module includes:
a first judgment unit, configured to judge whether there is a write record corresponding to the unique id and corresponding to the sector number;
a first determination unit, configured to, when it is determined that there is the write record, return, to the drive, addresses of N load servers corresponding to the unique identifier and corresponding to the sector number according to the write record;
a second determination unit configured to return addresses of N available load servers to the driver when it is determined that there is no write record;
the load server further comprises a first notification module, configured to send a notification to the meta-server after the received unique identity identifier, the sector number, and the sector data are correspondingly stored;
the meta-server further includes a first recording module configured to store the unique identifier, the sector number, and the addresses of the N load servers in the write record in a corresponding manner after receiving the notification.
13. The data writing system of claim 12, wherein the second determination unit comprises:
a coefficient calculation unit configured to calculate a pressure coefficient of each load server of a load server cluster according to a resource vacancy amount of each load server of the load server cluster when it is determined that there is no write record;
a first ordering unit, configured to order all load servers of the load server cluster according to the pressure coefficient;
a server selecting unit, configured to select N load servers with the smallest pressure coefficients from all load servers of the load server cluster;
and the address returning unit is used for returning the addresses of the N load servers with the minimum pressure coefficients to the driver as the addresses of the N available load servers.
14. A data reading system, characterized in that the data reading system comprises a driver and N load servers;
the driving includes:
a third obtaining module, configured to respond to a read sector request sent by an operating system of a computer, where the driver obtains a sector number of the computer according to the read sector request; the computer stores login information of a user account;
a fourth obtaining module, configured to obtain addresses of the N load servers according to the unique identity identifier corresponding to the user account and the sector number, which are obtained in advance according to the login information; wherein the N load servers pre-store sector data corresponding to the unique identity identifier and corresponding to the sector number;
the driving further includes:
a second sending module, configured to send, according to the addresses of the N load servers, sector data acquisition requests corresponding to the unique identity identifiers and corresponding to the sector numbers to the N load servers, respectively;
the load server also comprises a third sending module used for sending the sector data which corresponds to the unique identity identifier and corresponds to the sector number to a driver according to the received acquisition request;
the driver also comprises a fourth sending module used for sending the received sector data to the operating system;
wherein the second sending module comprises:
a capacity acquiring unit, configured to acquire, according to the unique identifier and the sector number, a sector capacity corresponding to the unique identifier and corresponding to the sector number;
a request generation unit configured to divide the sector data into N parts according to the sector capacity, and generate, according to each part, an acquisition request for data of a corresponding part of the sector data corresponding to the unique identifier and corresponding to the sector number;
and the request sending unit is used for sending different acquisition requests of the data of the corresponding part to different load servers according to the addresses of the N load servers.
15. A data reading system according to claim 14, wherein the data reading system further comprises a meta-server;
the fourth obtaining module comprises a second sending unit, configured to send the unique identity identifier and the sector number to a meta-server;
the meta-server comprises a second return module for sending pre-stored addresses of all load servers corresponding to the unique identity identifier and the sector number to the driver according to the received unique identity identifier and the sector number.
16. The data reading system of claim 15,
the third sending module includes:
the data sending unit is used for sending the data of the corresponding part to the driver according to the received acquisition request of the data of the corresponding part;
the fourth sending module includes:
a data synthesis unit, configured to synthesize the received N data of the corresponding portions to obtain synthesized sector data;
and the data return unit is used for sending the synthesized sector data to the operating system.
17. A data reading and writing system, characterized in that the data reading and writing system comprises a data writing system according to any one of claims 9-13 and a data reading system according to any one of claims 14-16.
CN201810051572.0A 2018-01-16 2018-01-16 Data writing-in and reading method and system, and data reading-writing system Active CN108334283B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810051572.0A CN108334283B (en) 2018-01-16 2018-01-16 Data writing-in and reading method and system, and data reading-writing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810051572.0A CN108334283B (en) 2018-01-16 2018-01-16 Data writing-in and reading method and system, and data reading-writing system

Publications (2)

Publication Number Publication Date
CN108334283A CN108334283A (en) 2018-07-27
CN108334283B true CN108334283B (en) 2021-06-01

Family

ID=62925163

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810051572.0A Active CN108334283B (en) 2018-01-16 2018-01-16 Data writing-in and reading method and system, and data reading-writing system

Country Status (1)

Country Link
CN (1) CN108334283B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541461A (en) * 2010-12-31 2012-07-04 阿里巴巴集团控股有限公司 Data reading-writing method and device for remote data storage and system thereof
CN106817399A (en) * 2015-12-02 2017-06-09 中兴通讯股份有限公司 Virtual network hard disk hanging method, LAN server, user terminal and system
CN106843757A (en) * 2017-01-11 2017-06-13 上海斐讯数据通信技术有限公司 Method of data synchronization and multifunctional mobile hard disk based on multifunctional mobile hard disk
WO2017117350A1 (en) * 2015-12-30 2017-07-06 Alibaba Group Holding Limited Methods and apparatuses for accessing cloud storage service by using traditional file system interface
CN107257364A (en) * 2017-05-27 2017-10-17 上海斐讯数据通信技术有限公司 Wireless mobile hard disk, wireless mobile hard disk collocation method and access method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541461A (en) * 2010-12-31 2012-07-04 阿里巴巴集团控股有限公司 Data reading-writing method and device for remote data storage and system thereof
CN106817399A (en) * 2015-12-02 2017-06-09 中兴通讯股份有限公司 Virtual network hard disk hanging method, LAN server, user terminal and system
WO2017117350A1 (en) * 2015-12-30 2017-07-06 Alibaba Group Holding Limited Methods and apparatuses for accessing cloud storage service by using traditional file system interface
CN106843757A (en) * 2017-01-11 2017-06-13 上海斐讯数据通信技术有限公司 Method of data synchronization and multifunctional mobile hard disk based on multifunctional mobile hard disk
CN107257364A (en) * 2017-05-27 2017-10-17 上海斐讯数据通信技术有限公司 Wireless mobile hard disk, wireless mobile hard disk collocation method and access method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
一种基于iSCSI协议的动态扩容机制;田龙等;《微电子学与计算机》;20110605;第28卷(第6期);第58-61,66页 *

Also Published As

Publication number Publication date
CN108334283A (en) 2018-07-27

Similar Documents

Publication Publication Date Title
CN107436725A (en) A kind of data are write, read method, apparatus and distributed objects storage cluster
CN108733306B (en) File merging method and device
CN108475201B (en) Data acquisition method in virtual machine starting process and cloud computing system
JP6870466B2 (en) Control programs, control methods, controls, and database servers
US10572335B2 (en) Metadata recovery method and apparatus
CN103324533A (en) distributed data processing method, device and system
CN113282249B (en) Data processing method, system, device and medium
CN108304144B (en) Data writing-in and reading method and system, and data reading-writing system
CN106095332A (en) A kind of data heavily delete method and device
CN107870739B (en) Disk file storage method and system
CN114816240A (en) Data writing method and data reading method
CN110659251B (en) Data processing method and system and electronic equipment
CN112463880B (en) Block chain data storage method and related device
CN108334283B (en) Data writing-in and reading method and system, and data reading-writing system
CN108399049B (en) Data writing-in and reading method and system, and data reading-writing system
CN101977231A (en) Method for downloading mapping file
CN108334457B (en) IO processing method and device
CN110795031A (en) Data deduplication method, device and system based on full flash storage
CN115599299A (en) Storage bucket management method and device, electronic equipment and storage medium
CN112148220B (en) Method, device, computer storage medium and terminal for realizing data processing
CN109241011B (en) Virtual machine file processing method and device
CN111399774B (en) Data processing method and device based on snapshot under distributed storage system
US20130218851A1 (en) Storage system, data management device, method and program
CN108415665B (en) Data writing-in and reading method and system, and data reading-writing system
CN109669623A (en) A kind of file management method, document management apparatus, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant