WO2020220535A1 - 一种数据存储方法及相关装置 - Google Patents

一种数据存储方法及相关装置 Download PDF

Info

Publication number
WO2020220535A1
WO2020220535A1 PCT/CN2019/102734 CN2019102734W WO2020220535A1 WO 2020220535 A1 WO2020220535 A1 WO 2020220535A1 CN 2019102734 W CN2019102734 W CN 2019102734W WO 2020220535 A1 WO2020220535 A1 WO 2020220535A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
storage
server
storage cluster
size
Prior art date
Application number
PCT/CN2019/102734
Other languages
English (en)
French (fr)
Inventor
王鹏
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2020220535A1 publication Critical patent/WO2020220535A1/zh

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/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • 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/064Management of blocks
    • 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/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0647Migration mechanisms
    • 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]

Definitions

  • This application relates to the field of computer technology, in particular to a data storage method and related devices.
  • the data storage layer of the current distributed storage system often uses various hash methods for data distribution.
  • scale of data continues to expand and needs to be expanded, whether it is a common hash method or a consistent hash method, large
  • large-scale data migration has caused huge costs in all kinds of time, bandwidth and manpower required.
  • the embodiments of the present application provide a data storage method and related devices, which can avoid data migration and improve storage efficiency.
  • the first aspect of the embodiments of the present application provides a data storage method, including:
  • the server receives a data storage request sent by the first client, the data storage request carries the first data and the size A of the first data, where A is a positive number;
  • the server obtains the remaining storage space size B of the first storage cluster, where B is a positive number;
  • the server confirms that the size A of the first data exceeds the remaining storage space size B of the first storage cluster
  • the server performs capacity expansion processing according to the first preset algorithm to obtain a second storage cluster
  • the server processes the first data, and stores the processed data in the first storage cluster and the second storage cluster respectively according to a second preset algorithm
  • the server sends a storage success message to the first client.
  • the second aspect of the embodiments of the present application provides a data storage system, including:
  • a receiving module configured to receive a data storage request sent by the first client, the data storage request carrying the first data and the size A of the first data, where A is a positive number;
  • the obtaining module is used to obtain the remaining storage space size B of the first storage cluster, where B is a positive number;
  • a confirming module configured to confirm that the size A of the first data exceeds the remaining storage space size B of the first storage cluster
  • the processing module is configured to perform capacity expansion processing according to the first preset algorithm to obtain the second storage cluster;
  • a storage module configured to process the first data, and store the processed data in the first storage cluster and the second storage cluster according to a second preset algorithm
  • the sending module is used to send a message of successful storage to the first client.
  • a third aspect of the embodiments of the present application provides a data storage server, including a processor, an input device, an output device, and a memory.
  • the processor, input device, output device, and memory are connected to each other, wherein the memory is used for A computer program is stored, the computer program includes program instructions, and the processor is configured to invoke the program instructions to execute the method.
  • the fourth aspect of the embodiments of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method.
  • FIG. 1 is a schematic diagram of interaction of a data storage method provided by an embodiment of this application;
  • FIG. 2 is a schematic flowchart of a data storage method provided by an embodiment of the present application.
  • FIG. 3 is a schematic flowchart of a data storage method provided by an embodiment of the present application.
  • FIG. 4 is a schematic flowchart of a data storage method provided by an embodiment of the present application.
  • FIG. 5 is a schematic flowchart of a data storage method provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram of a data storage server provided by an embodiment of the present application.
  • Fig. 7 is a schematic structural diagram of a data storage system provided by an embodiment of the present application.
  • FIG. 1 is an interactive schematic diagram of a data storage method provided in an embodiment of the application. As shown in Figure 1, it may include a server 101, a first client 102, a first storage cluster 103, and a second storage cluster 104.
  • the server 101 receives a data storage request sent by the first client 102, and the data
  • the storage request carries the first data and the size A of the first data, where A is a positive number; the server 101 obtains the remaining storage space size B of the first storage cluster 103, where B is a positive number; the server 101 confirms that the size A of the first data exceeds the remaining storage space size B of the first storage cluster 103; the server 101 performs expansion processing according to the first preset algorithm to obtain the second storage cluster 104; the server 101 processes the first data, and stores the processed data in the first storage cluster 103 and the second storage cluster 104 respectively according to the second preset algorithm; the server 101 sends the storage successful Message to the first client 102.
  • the space size of the existing storage cluster (the first storage cluster) is insufficient to store the data to be stored
  • a second storage cluster is created, and the data to be stored is processed according to a specific algorithm at the same time.
  • Different storage is realized by setting different mapping relationships, and stored in the first storage cluster and the second storage cluster.
  • FIG. 2 is an interactive schematic diagram of a data storage method provided in an embodiment of the application. As shown in Figure 2, it may include steps 201-206, which are specifically as follows:
  • a server receives a data storage request sent by a first client, where the data storage request carries first data and a size A of the first data, where A is a positive number;
  • the server obtains the remaining storage space size B of the first storage cluster, where B is a positive number;
  • the first storage cluster may be a general term for the current existing storage cluster of the server
  • the server performs capacity expansion processing according to the first preset algorithm to obtain a second storage cluster.
  • the server processes the first data, and stores the processed data in the first storage cluster and the second storage cluster respectively according to a second preset algorithm.
  • the first data is processed, such as dividing it into at least two parts, and storing it in the first storage cluster and the second storage cluster respectively.
  • the server sends a storage success message to the first client.
  • FIG. 3 is an interactive schematic diagram of a data storage method provided in an embodiment of the application. As shown in Figure 3, it may include steps 301-308, which are specifically as follows:
  • a server receives a data storage request sent by a first client, where the data storage request carries first data and a size A of the first data, where A is a positive number;
  • the server obtains the remaining storage space size B of the first storage cluster, where B is a positive number;
  • the server confirms that the size A of the first data exceeds the remaining storage space size B of the first storage cluster.
  • the server obtains the ratio C between the B and A;
  • the server confirms whether the C is less than a first threshold
  • the first threshold may be 1/2, etc.;
  • the server If the C is less than the first threshold, the server generates the second storage cluster, where the storage space size of the second storage cluster is D, D is a positive number, and A ⁇ D ⁇ A+B;
  • the server If the C is not less than the first threshold, the server generates the second storage cluster, wherein the storage space size of the second storage cluster is E, E is a positive number, and AB ⁇ E ⁇ A ;
  • the server processes the first data, and stores the processed data in the first storage cluster and the second storage cluster respectively according to a second preset algorithm.
  • the server sends a storage success message to the first client.
  • a second storage cluster is created, wherein the storage space of the second storage cluster is based on the remaining storage space of the first storage cluster
  • the ratio of the size to the size of the first data is determined by the relationship between the size of the first data and the first threshold; at the same time, the data to be stored is processed according to a specific algorithm, and different storage is realized by setting different mapping relationships, and stored in The first storage cluster and the second storage cluster.
  • FIG. 4 is an interactive schematic diagram of a data storage method provided in an embodiment of this application. As shown in Figure 4, it may include steps 401-409, which are specifically as follows:
  • a server receives a data storage request sent by a first client, where the data storage request carries first data and a size A of the first data, where A is a positive number;
  • the server obtains the remaining storage space size B of the first storage cluster, where B is a positive number.
  • the server confirms that the size A of the first data exceeds the remaining storage space size B of the first storage cluster.
  • the server performs capacity expansion processing according to the first preset algorithm to obtain a second storage cluster.
  • the server confirms whether the remaining storage space size B of the first storage cluster and the storage space size of the second storage cluster are both not less than A/2;
  • the server equally divides the first data into M data segments.
  • the server sorts and signs the M data segments in a sequence to obtain M data segments to be stored.
  • the server sequentially stores the odd-numbered data segments in the M data segments to be stored in the first storage cluster, and stores the even-numbered data segments in the M data segments to be stored. Data segments are sequentially stored in the second storage cluster;
  • the first multiple of the first M to-be-stored data segments can be stored in the first storage cluster, and the rest in the second storage cluster, etc.; if the remaining storage space of the first storage cluster is B If the storage space size of the second storage cluster and the storage space of the second storage cluster are not both not less than A/2, the server divides the first data into second data and third data, wherein the size of the second data The size is B, and the size of the third data is AB; the server stores the second data in the first storage cluster, and stores the third data in the second storage cluster.
  • the server divides the first data into fourth data And the fifth data, wherein the size of the fourth data is A/2-B, the size of the fifth data is A/2+B, 2B ⁇ A ⁇ 4B; the server transfers the fourth data Store to the first storage cluster, and store the fifth data in the second storage cluster.
  • the server sends a storage success message to the first client.
  • a second storage cluster is created, and the data to be stored is processed according to a specific algorithm at the same time, by setting different mappings
  • the relationship further implements different storage and stores it in the first storage cluster and the second storage cluster.
  • FIG. 5 is an interactive schematic diagram of a data storage method provided in an embodiment of the application. As shown in Figure 5, it may include steps 501-512, which are specifically as follows:
  • a server receives a data storage request sent by a first client, where the data storage request carries first data and a size A of the first data, where A is a positive number;
  • the server obtains the remaining storage space size B of the first storage cluster, where B is a positive number;
  • the server confirms that the size A of the first data exceeds the remaining storage space size B of the first storage cluster.
  • the server performs capacity expansion processing according to the first preset algorithm to obtain a second storage cluster.
  • the server processes the first data, and stores the processed data in the first storage cluster and the second storage cluster respectively according to a second preset algorithm.
  • the server obtains N repeated fields in the first data, where N is a positive integer.
  • the server confirms that the number of occurrences of each of the N'fields in the N repeated fields in the first data exceeds a preset threshold, where N'is a positive integer;
  • N For example, N’ fields are obtained, and the number of repeated occurrences of each field exceeds the preset threshold
  • the server obtains the N'fields.
  • the server confirms the data importance levels corresponding to the N'fields according to the preset data importance level and the corresponding relationship between the fields.
  • the data importance levels corresponding to the N'fields may be the average value of the sum of the data importance levels corresponding to the N'fields
  • the server separately obtains the importance level of each field in the N'fields according to the preset data importance level and the corresponding relationship between the fields; the server sorts the N'fields according to the importance level , And label the N'fields obtained by sorting from the beginning; the server respectively obtains the different labels of the different fields as the abscissa, and the height corresponding to the importance levels of the different fields as the ordinate N'coordinates; such as (1, 5) (3, 2), etc., where the abscissas 1, 3 are the first and third fields that are sorted according to the importance level. coordinate.
  • the ordinates 5 and 2 are respectively the magnitudes of the importance levels corresponding to the first field and the third field.
  • the server places the N'coordinates in a two-dimensional coordinate system, and sequentially connects the origin and the points corresponding to the N'coordinates to obtain a first curve; the server obtains the first curve and the straight line
  • the server confirms that the data importance level exceeds a preset data importance level.
  • the server backs up the first data.
  • the server sends a storage success message to the first client.
  • the importance of the first data is confirmed and the important data is backed up to ensure the security of the data.
  • the data storage request also carries the data type of the first data. If the data type of the first data is a video, the server obtains that the first important plot of the video is in the first data
  • the server divides the first data into a first initial data segment, a second initial data segment, and a third initial data segment according to the time segment in which the first important plot is located, wherein the initial The first data segment corresponds to the first important plot; the server obtains the time periods in which the second initial data segment and the third initial data segment are in the data; the server responds to the first initial data segment
  • the data segment, the second initial data segment and the third initial data segment are respectively added with identifiers to obtain the first data segment, the second data segment and the third data segment, wherein the identifiers respectively carry the first initial data Segment, the second initial data segment, and the time segment of the third initial data segment, the identifier is used to identify the first data segment, the second data segment, and the third data segment; the server confirms the The size of the first data segment is not
  • the server receives a read request sent by the second client, the read request carries identity information, and the read request is used to instruct to obtain the first data; the server verifies whether the identity information is available The qualification to read the first data; if so, the server sends a request to the first storage cluster and the second storage cluster to obtain the first data; the server transfers the first data Sent to the second client in response to the read request sent by the second client.
  • the server sends a request to multiple storage nodes of the first storage cluster and the second storage cluster, and the request is used to instruct the different storage nodes to establish network connections with the server respectively; the server receives the Different storage nodes respectively return a successful response to the network connection.
  • FIG. 6 is a schematic structural diagram of a data storage server provided by an embodiment of the application. As shown in the figure, it includes a processor, an input device, an output device, and a memory.
  • the processor, the input device, the output device, and the memory are connected to each other, wherein the memory is used to store a computer program, the computer program includes program instructions, the processor is configured to call the program instructions, and the program includes An instruction to perform the following steps: receive a data storage request sent by the first client, the data storage request carries the first data and the size A of the first data, where A is a positive number; obtain the remaining amount of the first storage cluster Storage space size B, where B is a positive number; confirm that the size A of the first data exceeds the remaining storage space size B of the first storage cluster; perform expansion processing according to the first preset algorithm to obtain the second storage Cluster; process the first data, and store the processed data in the first storage cluster and the second storage cluster according to a second preset algorithm; send a message indicating that the storage is successful to the first storage cluster One client.
  • the embodiments of the present application may divide the terminal into functional units according to the foregoing method examples.
  • each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit. It should be noted that the division of units in the embodiments of the present application is illustrative, and is only a logical function division, and there may be other division methods in actual implementation.
  • FIG. 7 provides a schematic structural diagram of a data storage system according to an embodiment of the application. It includes a receiving module 701, an acquisition module 702, a confirmation module 703, a processing module 704, a storage module 705, and a sending module 706.
  • the receiving module 701 is configured to receive a data storage request sent by a first client.
  • the data storage request Carries the first data and the size A of the first data, where A is a positive number; the obtaining module 702 is used to obtain the remaining storage space size B of the first storage cluster, where B is a positive number; the confirmation module 703, It is used to confirm that the size A of the first data exceeds the remaining storage space size B of the first storage cluster; the processing module 704 is used to perform capacity expansion processing according to the first preset algorithm to obtain the second storage cluster; storage module 705, configured to process the first data, and store the processed data in the first storage cluster and the second storage cluster respectively according to a second preset algorithm; a sending module 706, configured to send Store the successful message to the first client.
  • It also includes a data importance confirmation module for obtaining N repeated fields in the first data, where N is a positive integer; confirming that each of the N'fields in the N repeated fields is The number of occurrences in the first data exceeds a preset threshold, where N'is a positive integer; the N'fields are acquired; the N'fields are confirmed according to the corresponding relationship between the preset data importance levels and the fields Corresponding data importance level; confirm that the data importance level exceeds the preset data importance level; backup the first data.
  • the embodiments of the present application also provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute any data recorded in the above method embodiments. Part or all of the steps of the storage method.
  • the embodiments of the present application also provide a computer program product.
  • the computer program product includes a non-transitory computer-readable storage medium storing a computer program.
  • the computer program enables a computer to execute any data recorded in the above method embodiments. Part or all of the steps of the storage method.
  • the disclosed device may be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined or may be Integrate into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • each functional unit in each embodiment may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be realized in the form of hardware or software program module.
  • the integrated unit is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer readable memory.
  • the technical solution of the present application essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory, A number of instructions are included to enable a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application.
  • the aforementioned memory includes: U disk, read-only memory (read-only memory, ROM), random access memory (random access memory, RAM), mobile hard disk, magnetic disk, or optical disk and other media that can store program codes.
  • the program can be stored in a computer-readable memory, and the memory can include: flash disk , Read-only memory, random access device, magnetic or optical disk, etc.

Landscapes

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

Abstract

一种数据存储方法及相关装置,包括:服务器接收第一客户端发送的数据存储请求,所述数据存储请求携带第一数据和所述第一数据的大小A(201),所述服务器获取第一存储集群的剩余存储空间大小B(202),所述服务器确认所述第一数据的大小A超出所述第一存储集群的剩余存储空间大小B(203);所述服务器按照第一预设算法进行扩容处理,以得到第二存储集群(204);所述服务器对所述第一数据进行处理,并将处理后得到的数据按照第二预设算法分别存储至所述第一存储集群和所述第二存储集群(205);所述服务器发送存储成功的消息至所述第一客户端(206)。采用该方法,提升了存储效率,且保障了数据存储的秩序性。

Description

一种数据存储方法及相关装置
本申请要求于2019年04月28日提交中国专利局、申请号为201910348682.8、申请名称为“一种数据存储方法及相关装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机技术领域,尤其涉及一种数据存储方法及相关装置。
背景技术
现在的分布式存储系统的数据存储层往往采用各类哈希方法进行数据分布,在数据规模不断扩大需要扩容的时候,无论是常见的哈希方式,还是一致性哈希方式,都需要进行大规模的数据迁移,这样造成了所需的时间、带宽和人力等各类的巨大成本。
发明内容
本申请实施例提供一种数据存储方法及相关装置,能够避免数据迁移,提升存储效率。
本申请实施例的第一方面提供了一种数据存储方法,包括:
服务器接收第一客户端发送的数据存储请求,所述数据存储请求携带第一数据和所述第一数据的大小A,其中,A为正数;
所述服务器获取第一存储集群的剩余存储空间大小B,其中,B为正数;
所述服务器确认所述第一数据的大小A超出所述第一存储集群的剩余存储空间大小B;
所述服务器按照第一预设算法进行扩容处理,以得到第二存储集群;
所述服务器对所述第一数据进行处理,并将处理后得到的数据按照第二预设算法分别存储至所述第一存储集群和所述第二存储集群;
所述服务器发送存储成功的消息至所述第一客户端。
本申请实施例的第二方面提供了一种数据存储系统,包括:
接收模块,用于接收第一客户端发送的数据存储请求,所述数据存储请求携带第一数据和所述第一数据的大小A,其中,A为正数;
获取模块,用于获取第一存储集群的剩余存储空间大小B,其中,B为正数;
确认模块,用于确认所述第一数据的大小A超出所述第一存储集群的剩余存储空间大小B;
处理模块,用于按照第一预设算法进行扩容处理,以得到第二存储集群;
存储模块,用于对所述第一数据进行处理,并将处理后得到的数据按照第二预设算法分别存储至所述第一存储集群和所述第二存储集群;
发送模块,用于发送存储成功的消息至所述第一客户端。
本申请实施例的第三方面提供了一种数据存储服务器,包括处理器、输入设备、输出设备和存储器,所述处理器、输入设备、输出设备和存储器相互连接,其中,所述存储器用于存储计算机程序,所述计算机程序包括程序指令,所述处理器被配置用于调用所述程序指令,执行所述的方法。
本申请实施例的第四方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行,以实现所述的方法。
通过本申请实施例,提升了存储效率,且保障了数据存储的秩序性。
附图说明
为了更清楚地说明本申请实施例或背景技术中的技术方案,下面将对本申请实施例或背景技术中所涉及到的附图作简单地介绍。
图1为本申请实施例提供的一种数据存储方法的交互示意图;
图2是本申请实施例提供的一种数据存储方法的流程示意图;
图3是本申请实施例提供的一种数据存储方法的流程示意图;
图4是本申请实施例提供的一种数据存储方法的流程示意图;
图5是本申请实施例提供的一种数据存储方法的流程示意图;
图6是本申请实施例提供的一种数据存储服务器的示意图;
图7是本申请实施例提供的一种数据存储系统的结构示意图。
具体实施方式
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本申请保护的范围。
请参阅图1,图1为本申请实施例提供了一种数据存储方法的交互示意图。如图1所示,其可包括:服务器101、第一客户端102、第一存储集群103、第二存储集群104,其中:服务器101接收第一客户端102发送的数据存储请求,所述数据存储请求携带第一数据和所述第一数据的大小A,其中,A为正数;所述服务器101获取第一存储集群103的剩余存储空间大小B,其中,B为正数;所述服务器101确认所述第一数据的大小A超出所述第一存储集群103的剩余存储空间大小B;所述服务器101按照第一预设算法进行扩容处理,以得到第二存储集群104;所述服务器101对所述第一数据进行处理,并将处理后得到的数据按照第二预设算法分别存储至所述第一存储集群103和所述第二存储集群104;所述服务器101发送存储成功的消息至所述第一客户端102。
通过本申请实施例,通过确认现有存储集群(第一存储集群)的空间大小不足以存入待存储数据时,则新建第二存储集群,同时对所述待存储数据按照特定算法进行处理,通过设定不同的映射关系进而实现不同的存储,并将其存储至第一存储集群和第二存储集群中。采用该手段,提升了存储效率,且保障了数据存储的秩序性。
请参阅图2,图2为本申请实施例提供了一种数据存储方法的交互示意图。如图2所示,其可包括步骤201-206,具体如下:
201、服务器接收第一客户端发送的数据存储请求,所述数据存储请求携带第一数据和所述第一数据的大小A,其中,A为正数;
202、所述服务器获取第一存储集群的剩余存储空间大小B,其中,B为 正数;
其中,所述第一存储集群可以是所述服务器目前现有的存储集群的统称;
203、所述服务器确认所述第一数据的大小A超出所述第一存储集群的剩余存储空间大小B时;
204、所述服务器按照第一预设算法进行扩容处理,以得到第二存储集群;
205、所述服务器对所述第一数据进行处理,并将处理后得到的数据按照第二预设算法分别存储至所述第一存储集群和所述第二存储集群;
对所述第一数据进行处理,如将其分割为至少两份等,并将其分别存储至第一存储集群和第二存储集群。
206、所述服务器发送存储成功的消息至所述第一客户端。
通过本申请实施例,提升了存储效率,且保障了数据存储的秩序性。
请参阅图3,图3为本申请实施例提供了一种数据存储方法的交互示意图。如图3所示,其可包括步骤301-308,具体如下:
301、服务器接收第一客户端发送的数据存储请求,所述数据存储请求携带第一数据和所述第一数据的大小A,其中,A为正数;
302、所述服务器获取第一存储集群的剩余存储空间大小B,其中,B为正数;
303、所述服务器确认所述第一数据的大小A超出所述第一存储集群的剩余存储空间大小B;
304、所述服务器获取所述B与A之间的比值C;
305、所述服务器确认所述C是否小于第一阈值;
如所述第一阈值可以是1/2等;
306、若所述C小于所述第一阈值,则所述服务器生成所述第二存储集群,其中,所述第二存储集群的存储空间大小为D,D为正数,且A≤D≤A+B;
若所述C不小于所述第一阈值,则所述服务器生成所述第二存储集群,其中,所述第二存储集群的存储空间大小为E,E为正数,且A-B≤E≤A;
307、所述服务器对所述第一数据进行处理,并将处理后得到的数据按照第二预设算法分别存储至所述第一存储集群和所述第二存储集群;
308、所述服务器发送存储成功的消息至所述第一客户端。
通过本申请实施例,通过确认第一存储集群的空间大小不足以存入待存储数据时,则新建第二存储集群,其中,第二存储集群的存储空间大小根据第一存储集群的剩余存储空间大小与第一数据的大小的比值与第一阈值的关系来进行确定;同时对所述待存储数据按照特定算法进行处理,通过设定不同的映射关系进而实现不同的存储,并将其存储至第一存储集群和第二存储集群中。采用该手段,提升了存储效率,且保障了数据存储的秩序性。
请参阅图4,图4为本申请实施例提供了一种数据存储方法的交互示意图。如图4所示,其可包括步骤401-409,具体如下:
401、服务器接收第一客户端发送的数据存储请求,所述数据存储请求携带第一数据和所述第一数据的大小A,其中,A为正数;
402、所述服务器获取第一存储集群的剩余存储空间大小B,其中,B为正数;
403、所述服务器确认所述第一数据的大小A超出所述第一存储集群的剩余存储空间大小B;
404、所述服务器按照第一预设算法进行扩容处理,以得到第二存储集群;
405、所述服务器确认所述第一存储集群的剩余存储空间大小B和所述第二存储集群的存储空间大小是否均不小于A/2;
406、若是,则所述服务器将所述第一数据平均分割为M份数据段;
407、所述服务器将所述M份数据段按照先后顺序进行排序标号,以得到M份待存储数据段;
408、所述服务器将所述M份待存储数据段中标号为奇数的待存储数据段依次存储至所述第一存储集群,并将所述M份待存储数据段中标号为偶数的待存储数据段依次存储至所述第二存储集群;
可替代的,可将前M份待存储数据段中的前面的多份存储在第一存储集群,剩下的存储在第二存储集群等;若所述第一存储集群的剩余存储空间大小B和所述第二存储集群的存储空间大小并不同时满足均不小于A/2,则所述服务器将所述第一数据分割为第二数据和第三数据,其中,所述第二数据的大小 为B,所述第三数据的大小为A-B;所述服务器将所述第二数据存储至所述第一存储集群,并将所述第三数据存储至所述第二存储集群。
进一步,若所述第一存储集群的剩余存储空间大小B小于A/2,所述第二存储集群的存储空间大小大于A/2,则所述服务器将所述第一数据分割为第四数据和第五数据,其中,所述第四数据的大小为A/2-B,所述第五数据的大小为A/2+B,2B<A<4B;所述服务器将所述第四数据存储至所述第一存储集群,并将所述第五数据存储至所述第二存储集群。
409、所述服务器发送存储成功的消息至所述第一客户端。
通过本申请实施例,通过确认第一存储集群的空间大小不足以存入待存储数据时,则新建第二存储集群,同时对所述待存储数据按照特定算法进行处理,通过设定不同的映射关系进而实现不同的存储,并将其存储至第一存储集群和第二存储集群中。采用该手段,提升了存储效率,且保障了数据存储的秩序性。
请参阅图5,图5为本申请实施例提供了一种数据存储方法的交互示意图。如图5所示,其可包括步骤501-512,具体如下:
501、服务器接收第一客户端发送的数据存储请求,所述数据存储请求携带第一数据和所述第一数据的大小A,其中,A为正数;
502、所述服务器获取第一存储集群的剩余存储空间大小B,其中,B为正数;
503、所述服务器确认所述第一数据的大小A超出所述第一存储集群的剩余存储空间大小B;
504、所述服务器按照第一预设算法进行扩容处理,以得到第二存储集群;
505、所述服务器对所述第一数据进行处理,并将处理后得到的数据按照第二预设算法分别存储至所述第一存储集群和所述第二存储集群;
506、所述服务器获取所述第一数据中的N个重复字段,其中,N为正整数;
507、所述服务器确认所述N个重复字段中的N’个字段中每个字段在所述第一数据中出现的次数均超出预设阈值,其中,N’为正整数;
如获取到N’个字段,其中每个字段重复出现的次数为超出预设阈值;
508、所述服务器获取所述N’个字段;
509、所述服务器根据预设数据重要等级与字段的对应的关系,确认所述N’个字段所对应的数据重要等级;
其中,所述N’个字段所对应的数据重要等级可以是N’个字段分别对应的数据重要等级大小的和的平均值;
或者,也可以是:
所述服务器根据预设数据重要等级与字段的对应的关系,分别获取所述N’个字段中每个字段的重要等级;所述服务器将所述N’个字段按照重要等级的高低大小进行排序,并将排序所得的N’个字段分别从一开始进行标号;所述服务器分别获取以所述不同字段的不同标号为横坐标,以对应所述不同字段的重要等级的高低大小为纵坐标的N’个坐标;如(1,5)(3,2)等,其中,横坐标1,3分别为按照重要等级的高低大小进行排序后的第一个字段和第三个字段分别对应的横坐标。纵坐标5,2分别为所述第一个字段和第三个字段分别对应的重要等级的高低大小。所述服务器将所述N’个坐标置于二维坐标系中,依次连接原点以及所述N’个坐标所对应的点,以得到第一曲线;所述服务器获取所述第一曲线与直线x=N’以及y=0所组成的封闭区域的面积大小,并将所述面积大小记为所述N’个字段所对应的数据重要等级。即获取各点连接所得的曲线与x轴以及x=N’所围成的区域的区域面积,将该区域面积大小可取整数处理后作为所述N’个字段整体所对应的数据重要等级。
510、所述服务器确认所述数据重要等级超出预设数据重要等级;
511、所述服务器将所述第一数据进行备份;
512、所述服务器发送存储成功的消息至所述第一客户端。
本申请实施例中,通过对第一数据的重要性进行确认,并对重要数据进行备份,保障了数据的安全性。
进一步,所述数据存储请求还携带所述第一数据的数据类型,若所述第一数据的数据类型为视频,则所述服务器获取所述视频的第一重要情节处于所述第一数据中的时间段;所述服务器按照所述第一重要情节所处的时间段将所述第一数据分割为第一初始数据段、第二初始数据段和第三初始数据段,其中, 所述初始第一数据段对应所述第一重要情节;所述服务器获取所述第二初始数据段和所述第三初始数据段分别处于所述数据中的时间段;所述服务器对所述第一初始数据段、第二初始数据段和所述第三初始数据段分别添加标识,以得到第一数据段、第二数据段和第三数据段,其中,所述标识分别携带所述第一初始数据段、第二初始数据段和所述第三初始数据段所处于的时间段,所述标识用于识别所述第一数据段、第二数据段和第三数据段;所述服务器确认所述第一数据段的大小不大于B;所述服务器将所述第一数据段存储至所述第一存储集群,同时所述服务器将所述第二数据段和所述第三数据段存储至所述第二存储集群。
进一步,所述服务器接收第二客户端发送的读取请求,所述读取请求携带身份信息,所述读取请求用于指示获取所述第一数据;所述服务器验证所述身份信息是否具备读取所述第一数据的资格;若是,则所述服务器向所述第一存储集群和所述第二存储集群发送请求,以获取所述第一数据;所述服务器将所述第一数据发送至所述第二客户端,以响应所述第二客户端发送的读取请求。
进一步,还包括:
所述服务器向所述第一存储集群及第二存储集群的多个存储节点分别发送请求,所述请求用于指示所述不同存储节点分别与所述服务器建立网络连接;所述服务器接收所述不同存储节点分别返回的网络连接成功的响应。
采用该手段,通过服务器与不同存储集群和/或各存储节点进行通信连接,避免了多客户端直接与存储集群和/或各存储节点进行交互而占据多带宽。
与上述实施例一致的,请参阅图6,图6为本申请实施例提供的一种数据存储服务器的结构示意图,如图所示,包括处理器、输入设备、输出设备和存储器,所述处理器、输入设备、输出设备和存储器相互连接,其中,所述存储器用于存储计算机程序,所述计算机程序包括程序指令,所述处理器被配置用于调用所述程序指令,上述程序包括用于执行以下步骤的指令:接收第一客户端发送的数据存储请求,所述数据存储请求携带第一数据和所述第一数据的大小A,其中,A为正数;获取第一存储集群的剩余存储空间大小B,其中,B为正数;确认所述第一数据的大小A超出所述第一存储集群的剩余存储空间 大小B;按照第一预设算法进行扩容处理,以得到第二存储集群;对所述第一数据进行处理,并将处理后得到的数据按照第二预设算法分别存储至所述第一存储集群和所述第二存储集群;发送存储成功的消息至所述第一客户端。
通过本申请实施例,提升了存储效率,且保障了数据存储的秩序性。
本申请实施例可以根据上述方法示例对终端进行功能单元的划分,例如,可以对应各个功能划分各个功能单元,也可以将两个或两个以上的功能集成在一个处理单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。需要说明的是,本申请实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
与上述一致的,请参阅图7,图7为本申请实施例提供了一种数据存储系统的结构示意图。其包括接收模块701、获取模块702、确认模块703、处理模块704、存储模块705、发送模块706,其中:接收模块701,用于接收第一客户端发送的数据存储请求,所述数据存储请求携带第一数据和所述第一数据的大小A,其中,A为正数;获取模块702,用于获取第一存储集群的剩余存储空间大小B,其中,B为正数;确认模块703,用于确认所述第一数据的大小A超出所述第一存储集群的剩余存储空间大小B;处理模块704,用于按照第一预设算法进行扩容处理,以得到第二存储集群;存储模块705,用于对所述第一数据进行处理,并将处理后得到的数据按照第二预设算法分别存储至所述第一存储集群和所述第二存储集群;发送模块706,用于发送存储成功的消息至所述第一客户端。
其还包括数据重要性确认模块,用于获取所述第一数据中的N个重复字段,其中,N为正整数;确认所述N个重复字段中的N’个字段中每个字段在所述第一数据中出现的次数均超出预设阈值,其中,N’为正整数;获取所述N’个字段;根据预设数据重要等级与字段的对应的关系,确认所述N’个字段所对应的数据重要等级;确认所述数据重要等级超出预设数据重要等级;将所述第一数据进行备份。
其还包括视频数据处理模块,用于获取所述视频的第一重要情节处于所述第一数据中的时间段;按照所述第一重要情节所处的时间段将所述第一数据分 割为第一初始数据段、第二初始数据段和第三初始数据段,其中,所述初始第一数据段对应所述第一重要情节;获取所述第二初始数据段和所述第三初始数据段分别处于所述数据中的时间段;对所述第一初始数据段、第二初始数据段和所述第三初始数据段分别添加标识,以得到第一数据段、第二数据段和第三数据段,其中,所述标识分别携带所述第一初始数据段、第二初始数据段和所述第三初始数据段所处于的时间段,所述标识用于识别所述第一数据段、第二数据段和第三数据段;确认所述第一数据段的大小不大于B;将所述第一数据段存储至所述第一存储集群,同时所述服务器将所述第二数据段和所述第三数据段存储至所述第二存储集群。
可以看出,采用该手段,提升了存储效率,且保障了数据存储的秩序性。
本申请实施例还提供一种计算机可读存储介质,其中,该计算机可读存储介质存储用于电子数据交换的计算机程序,该计算机程序使得计算机执行如上述方法实施例中记载的任何一种数据存储方法的部分或全部步骤。
本申请实施例还提供一种计算机程序产品,所述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,该计算机程序使得计算机执行如上述方法实施例中记载的任何一种数据存储方法的部分或全部步骤。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置,可通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在申请明各个实施例中的各功能单元可以集成在一个处理单元中, 也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件程序模块的形式实现。
所述集成的单元如果以软件程序模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储器中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储器中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储器包括:U盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储器中,存储器可以包括:闪存盘、只读存储器、随机存取器、磁盘或光盘等。
以上对本申请实施例进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。

Claims (20)

  1. 一种数据存储方法,其特征在于,包括:
    服务器接收第一客户端发送的数据存储请求,所述数据存储请求携带第一数据和所述第一数据的大小A,其中,A为正数;
    所述服务器获取第一存储集群的剩余存储空间大小B,其中,B为正数;
    所述服务器确认所述第一数据的大小A是否超出所述第一存储集群的剩余存储空间大小B,若是,则所述服务器按照第一预设算法进行扩容处理,以得到第二存储集群;
    所述服务器对所述第一数据进行处理,并将处理后得到的数据按照第二预设算法分别存储至所述第一存储集群和所述第二存储集群;
    所述服务器发送存储成功的消息至所述第一客户端。
  2. 根据权利要求1所述的方法,其特征在于,所述服务器按照第一预设算法进行扩容处理,以得到第二存储集群,包括:
    所述服务器获取所述B与A之间的比值C;
    所述服务器确认所述C是否小于第一阈值;
    若所述C小于所述第一阈值,则所述服务器生成所述第二存储集群,其中,所述第二存储集群的存储空间大小为D,D为正数,且A≤D≤A+B;
    若所述C不小于所述第一阈值,则所述服务器生成所述第二存储集群,其中,所述第二存储集群的存储空间大小为E,E为正数,且A-B≤E≤A。
  3. 根据权利要求1或2所述的方法,其特征在于,所述服务器对所述第一数据进行处理,并将处理后得到的数据按照第二预设算法分别存储至所述第一存储集群和所述第二存储集群,包括:
    所述服务器确认所述第一存储集群的剩余存储空间大小B和所述第二存储集群的存储空间大小是否均不小于A/2;
    若是,则所述服务器将所述第一数据平均分割为M份数据段;
    所述服务器将所述M份数据段按照先后顺序进行排序标号,以得到M份待存储数据段;
    所述服务器将所述M份待存储数据段中标号为奇数的待存储数据段依次 存储至所述第一存储集群,并将所述M份待存储数据段中标号为偶数的待存储数据段依次存储至所述第二存储集群。
  4. 根据权利要求3所述的方法,其特征在于,包括:
    若所述第一存储集群的剩余存储空间大小B和所述第二存储集群的存储空间大小并不同时满足均不小于A/2,则所述服务器将所述第一数据分割为第二数据和第三数据,其中,所述第二数据的大小为B,所述第三数据的大小为A-B;
    所述服务器将所述第二数据存储至所述第一存储集群,并将所述第三数据存储至所述第二存储集群。
  5. 根据权利要求3所述的方法,其特征在于,包括:
    若所述第一存储集群的剩余存储空间大小B小于A/2,所述第二存储集群的存储空间大小大于A/2,则所述服务器将所述第一数据分割为第四数据和第五数据,其中,所述第四数据的大小为A/2-B,所述第五数据的大小为A/2+B,2B<A<4B;
    所述服务器将所述第四数据存储至所述第一存储集群,并将所述第五数据存储至所述第二存储集群。
  6. 根据权利要求1所述的方法,其特征在于,所述服务器对所述第一数据进行处理,并将处理后得到的数据按照第二预设算法分别存储至所述第一存储集群和所述第二存储集群之后,所述服务器发送存储成功的消息至所述第一客户端之前,包括:
    所述服务器获取所述第一数据中的N个重复字段,其中,N为正整数;
    所述服务器确认所述N个重复字段中的N’个字段中每个字段在所述第一数据中出现的次数均超出预设阈值,其中,N’为正整数;
    所述服务器获取所述N’个字段;
    所述服务器根据预设数据重要等级与字段的对应的关系,确认所述N’个字段所对应的数据重要等级;
    所述服务器确认所述数据重要等级超出预设数据重要等级;
    所述服务器将所述第一数据进行备份。
  7. 根据权利要求6所述的方法,其特征在于,所述服务器根据预设数据重要等级与字段的对应的关系,确认所述N’个字段所对应的数据重要等级,包括:
    所述服务器根据预设数据重要等级与字段的对应的关系,分别获取所述N’个字段中每个字段的重要等级;
    所述服务器将所述N’个字段按照重要等级的高低大小进行排序,并将排序所得的N’个字段分别从一开始进行标号;
    所述服务器分别获取以所述不同字段的不同标号为横坐标,以对应所述不同字段的重要等级的高低大小为纵坐标的N’个坐标;
    所述服务器将所述N’个坐标置于二维坐标系中,依次连接原点以及所述N’个坐标所对应的点,以得到第一曲线;
    所述服务器获取所述第一曲线与直线x=N’以及y=0所组成的封闭区域的面积大小,并将所述面积大小记为所述N’个字段所对应的数据重要等级。
  8. 根据权利要求1所述的方法,其特征在于,还包括:
    所述数据存储请求还携带所述第一数据的数据类型,若所述第一数据的数据类型为视频,则所述服务器获取所述视频的第一重要情节处于所述第一数据中的时间段;
    所述服务器按照所述第一重要情节所处的时间段将所述第一数据分割为第一初始数据段、第二初始数据段和第三初始数据段,其中,所述初始第一数据段对应所述第一重要情节;
    所述服务器获取所述第二初始数据段和所述第三初始数据段分别处于所述数据中的时间段;
    所述服务器对所述第一初始数据段、第二初始数据段和所述第三初始数据段分别添加标识,以得到第一数据段、第二数据段和第三数据段,其中,所述标识分别携带所述第一初始数据段、第二初始数据段和所述第三初始数据段所处于的时间段,所述标识用于识别所述第一数据段、第二数据段和第三数据段;
    所述服务器确认所述第一数据段的大小不大于B;
    所述服务器将所述第一数据段存储至所述第一存储集群,同时所述服务器 将所述第二数据段和所述第三数据段存储至所述第二存储集群。
  9. 根据权利要求1至8任一项所述的方法,其特征在于,还包括:
    所述服务器接收第二客户端发送的读取请求,所述读取请求携带身份信息,所述读取请求用于指示获取所述第一数据;
    所述服务器验证所述身份信息是否具备读取所述第一数据的资格;
    若是,则所述服务器向所述第一存储集群和所述第二存储集群发送请求,以获取所述第一数据;
    所述服务器将所述第一数据发送至所述第二客户端,以响应所述第二客户端发送的读取请求。
  10. 一种数据存储系统,其特征在于,包括:
    接收模块,用于接收第一客户端发送的数据存储请求,所述数据存储请求携带第一数据和所述第一数据的大小A,其中,A为正数;
    获取模块,用于获取第一存储集群的剩余存储空间大小B,其中,B为正数;
    确认模块,用于确认所述第一数据的大小A超出所述第一存储集群的剩余存储空间大小B;
    处理模块,用于按照第一预设算法进行扩容处理,以得到第二存储集群;
    存储模块,用于对所述第一数据进行处理,并将处理后得到的数据按照第二预设算法分别存储至所述第一存储集群和所述第二存储集群;
    发送模块,用于发送存储成功的消息至所述第一客户端。
  11. 根据权利要求10所述的系统,其特征在于,所述处理模块,用于:
    获取所述B与A之间的比值C;
    确认所述C是否小于第一阈值;
    若所述C小于所述第一阈值,则生成所述第二存储集群,其中,所述第二存储集群的存储空间大小为D,D为正数,且A≤D≤A+B;
    若所述C不小于所述第一阈值,则生成所述第二存储集群,其中,所述第二存储集群的存储空间大小为E,E为正数,且A-B≤E≤A。
  12. 根据权利要求10或11所述的系统,其特征在于,所述存储模块,用 于:
    确认所述第一存储集群的剩余存储空间大小B和所述第二存储集群的存储空间大小是否均不小于A/2;
    若是,则将所述第一数据平均分割为M份数据段;
    将所述M份数据段按照先后顺序进行排序标号,以得到M份待存储数据段;
    将所述M份待存储数据段中标号为奇数的待存储数据段依次存储至所述第一存储集群,并将所述M份待存储数据段中标号为偶数的待存储数据段依次存储至所述第二存储集群。
  13. 根据权利要求12所述的系统,其特征在于,所述存储模块还用于:
    若所述第一存储集群的剩余存储空间大小B和所述第二存储集群的存储空间大小并不同时满足均不小于A/2,则将所述第一数据分割为第二数据和第三数据,其中,所述第二数据的大小为B,所述第三数据的大小为A-B;
    将所述第二数据存储至所述第一存储集群,并将所述第三数据存储至所述第二存储集群。
  14. 根据权利要求12所述的系统,其特征在于,所述存储模块还用于:
    若所述第一存储集群的剩余存储空间大小B小于A/2,所述第二存储集群的存储空间大小大于A/2,则将所述第一数据分割为第四数据和第五数据,其中,所述第四数据的大小为A/2-B,所述第五数据的大小为A/2+B,2B<A<4B;
    将所述第四数据存储至所述第一存储集群,并将所述第五数据存储至所述第二存储集群。
  15. 根据权利要求10所述的系统,其特征在于,还包括备份模块,用于:
    获取所述第一数据中的N个重复字段,其中,N为正整数;
    确认所述N个重复字段中的N’个字段中每个字段在所述第一数据中出现的次数均超出预设阈值,其中,N’为正整数;
    获取所述N’个字段;
    根据预设数据重要等级与字段的对应的关系,确认所述N’个字段所对应的数据重要等级;
    确认所述数据重要等级超出预设数据重要等级;
    将所述第一数据进行备份。
  16. 根据权利要求15所述的系统,其特征在于,所述备份模块,用于:
    根据预设数据重要等级与字段的对应的关系,分别获取所述N’个字段中每个字段的重要等级;
    将所述N’个字段按照重要等级的高低大小进行排序,并将排序所得的N’个字段分别从一开始进行标号;
    分别获取以所述不同字段的不同标号为横坐标,以对应所述不同字段的重要等级的高低大小为纵坐标的N’个坐标;
    将所述N’个坐标置于二维坐标系中,依次连接原点以及所述N’个坐标所对应的点,以得到第一曲线;
    获取所述第一曲线与直线x=N’以及y=0所组成的封闭区域的面积大小,并将所述面积大小记为所述N’个字段所对应的数据重要等级。
  17. 根据权利要求10所述的系统,其特征在于,还包括数据类型处理模块,用于:
    所述数据存储请求还携带所述第一数据的数据类型,若所述第一数据的数据类型为视频,则获取所述视频的第一重要情节处于所述第一数据中的时间段;
    按照所述第一重要情节所处的时间段将所述第一数据分割为第一初始数据段、第二初始数据段和第三初始数据段,其中,所述初始第一数据段对应所述第一重要情节;
    获取所述第二初始数据段和所述第三初始数据段分别处于所述数据中的时间段;
    对所述第一初始数据段、第二初始数据段和所述第三初始数据段分别添加标识,以得到第一数据段、第二数据段和第三数据段,其中,所述标识分别携带所述第一初始数据段、第二初始数据段和所述第三初始数据段所处于的时间段,所述标识用于识别所述第一数据段、第二数据段和第三数据段;
    确认所述第一数据段的大小不大于B;
    将所述第一数据段存储至所述第一存储集群,同时将所述第二数据段和所 述第三数据段存储至所述第二存储集群。
  18. 根据权利要求10至17任一项所述的系统,其特征在于,还包括信息验证模块,用于:
    接收第二客户端发送的读取请求,所述读取请求携带身份信息,所述读取请求用于指示获取所述第一数据;
    验证所述身份信息是否具备读取所述第一数据的资格;
    若是,则向所述第一存储集群和所述第二存储集群发送请求,以获取所述第一数据;
    将所述第一数据发送至所述第二客户端,以响应所述第二客户端发送的读取请求。
  19. 一种数据存储服务器,其特征在于,包括处理器、输入设备、输出设备和存储器,所述处理器、输入设备、输出设备和存储器相互连接,其中,所述存储器用于存储计算机程序,所述计算机程序包括程序指令,所述处理器被配置用于调用所述程序指令,执行如权利要求1-9任一项所述的方法。
  20. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行,以实现如权利要求1-9任一项所述的方法。
PCT/CN2019/102734 2019-04-28 2019-08-27 一种数据存储方法及相关装置 WO2020220535A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910348682.8 2019-04-28
CN201910348682.8A CN110134332B (zh) 2019-04-28 2019-04-28 一种数据存储方法及相关装置

Publications (1)

Publication Number Publication Date
WO2020220535A1 true WO2020220535A1 (zh) 2020-11-05

Family

ID=67575457

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/102734 WO2020220535A1 (zh) 2019-04-28 2019-08-27 一种数据存储方法及相关装置

Country Status (2)

Country Link
CN (1) CN110134332B (zh)
WO (1) WO2020220535A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112737977A (zh) * 2020-12-28 2021-04-30 苏州浪潮智能科技有限公司 一种数据包处理方法以及装置
CN114629925A (zh) * 2020-12-11 2022-06-14 飞狐信息技术(天津)有限公司 一种数据传输方法、装置及电子设备
CN117082083A (zh) * 2023-08-30 2023-11-17 杭州浩联智能科技有限公司 一种基于分布式物联网架构的数据存储方法、装置及介质

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110134332B (zh) * 2019-04-28 2022-03-08 平安科技(深圳)有限公司 一种数据存储方法及相关装置
CN113132678B (zh) * 2019-12-31 2023-08-01 深圳云天励飞技术有限公司 一种数据传输方法、装置、电子设备及存储介质
CN112637327B (zh) * 2020-12-21 2022-07-22 北京奇艺世纪科技有限公司 一种数据处理方法、装置及系统
CN113867643A (zh) * 2021-09-29 2021-12-31 北京金山云网络技术有限公司 数据存储方法、装置、设备及存储介质
CN114357030B (zh) * 2022-01-04 2022-09-30 深圳市智百威科技发展有限公司 一种大数据存储系统及方法
CN114915550B (zh) * 2022-05-30 2023-04-14 深圳市政元软件有限公司 移动互联网大数据的存储配置方法及系统
CN116880776B (zh) * 2023-09-06 2023-11-17 上海凯翔信息科技有限公司 一种存储数据的数据处理系统
CN117407324B (zh) * 2023-12-12 2024-03-15 深圳市银闪科技有限公司 基于固态硬盘的数据存储方法、装置、固态硬盘控制器

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050091455A1 (en) * 2001-07-05 2005-04-28 Yoshiki Kano Automated on-line capacity expansion method for storage device
CN101753936A (zh) * 2008-12-08 2010-06-23 北京中星微电子有限公司 一种视频监控系统的存储空间的配置方法和视频服务器
CN104205780A (zh) * 2014-01-23 2014-12-10 华为技术有限公司 一种存储数据的方法和装置
CN104571955A (zh) * 2014-12-27 2015-04-29 华为技术有限公司 提高存储容量的方法和装置
CN110134332A (zh) * 2019-04-28 2019-08-16 平安科技(深圳)有限公司 一种数据存储方法及相关装置

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109426439A (zh) * 2017-09-04 2019-03-05 阿里巴巴集团控股有限公司 对分布式存储系统进行扩容的方法及装置
CN107632791A (zh) * 2017-10-10 2018-01-26 郑州云海信息技术有限公司 一种存储空间的分配方法及系统
CN109062512B (zh) * 2018-07-26 2022-02-18 郑州云海信息技术有限公司 一种分布式存储集群、数据读写方法、系统及相关装置
CN109407976B (zh) * 2018-09-21 2021-09-14 联想(北京)有限公司 一种分布式存储方法及分布式存储装置
CN109388351A (zh) * 2018-12-18 2019-02-26 平安科技(深圳)有限公司 一种分布式数据存储的方法及相关装置
CN109547574A (zh) * 2019-01-04 2019-03-29 平安科技(深圳)有限公司 一种数据传输方法及相关装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050091455A1 (en) * 2001-07-05 2005-04-28 Yoshiki Kano Automated on-line capacity expansion method for storage device
CN101753936A (zh) * 2008-12-08 2010-06-23 北京中星微电子有限公司 一种视频监控系统的存储空间的配置方法和视频服务器
CN104205780A (zh) * 2014-01-23 2014-12-10 华为技术有限公司 一种存储数据的方法和装置
CN104571955A (zh) * 2014-12-27 2015-04-29 华为技术有限公司 提高存储容量的方法和装置
CN110134332A (zh) * 2019-04-28 2019-08-16 平安科技(深圳)有限公司 一种数据存储方法及相关装置

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114629925A (zh) * 2020-12-11 2022-06-14 飞狐信息技术(天津)有限公司 一种数据传输方法、装置及电子设备
CN112737977A (zh) * 2020-12-28 2021-04-30 苏州浪潮智能科技有限公司 一种数据包处理方法以及装置
CN117082083A (zh) * 2023-08-30 2023-11-17 杭州浩联智能科技有限公司 一种基于分布式物联网架构的数据存储方法、装置及介质

Also Published As

Publication number Publication date
CN110134332B (zh) 2022-03-08
CN110134332A (zh) 2019-08-16

Similar Documents

Publication Publication Date Title
WO2020220535A1 (zh) 一种数据存储方法及相关装置
CN109034809B (zh) 区块链的生成方法、装置、区块链节点及存储介质
US10949158B2 (en) Screenshot method and apparatus
US9342408B2 (en) Backup system and backcup method thereof
CN111163130B (zh) 一种网络服务系统及其数据传输方法
CN107977396B (zh) 一种KeyValue数据库的数据表的更新方法与表数据更新装置
CN109739690B (zh) 备份方法及相关产品
CN107506145B (zh) 一种物理存储调度方法及云主机创建方法
CN108460041A (zh) 数据的处理方法和装置
WO2021258512A1 (zh) 数据的聚合处理装置、方法和存储介质
CN111541762B (zh) 数据处理的方法、管理服务器、设备及存储介质
CN111385294B (zh) 数据处理方法、系统、计算机设备和存储介质
CN111275495A (zh) 基于区块链的广告投放监测方法、装置及系统
CN107357808B (zh) 数据管理方法、装置及设备
CN111813485A (zh) 页面布局的处理方法、装置、设备及计算机可读存储介质
CN116800671A (zh) 数据传输方法、装置、计算机设备、存储介质和程序产品
CN110555020B (zh) 一种映射关系建立、数据查询方法、装置及设备
CN107704557B (zh) 操作互斥数据的处理方法、装置、计算机设备和存储介质
CN114006938A (zh) 分布式集群的消息路由下发方法、装置、设备及存储介质
CN106408269A (zh) 签章处理方法、签章中心系统和签章系统
CN104407846B (zh) 一种信息处理方法及装置
CN107332679B (zh) 一种无中心信息同步方法及装置
CN115509763B (zh) 指纹计算方法及装置
CN111857583B (zh) 一种分布式存储卷更新方法、系统、设备及计算机介质
CN112804335B (zh) 数据处理方法、装置、计算机可读存储介质和处理器

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19926871

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19926871

Country of ref document: EP

Kind code of ref document: A1