WO2022062166A1 - 一种数据处理方法、装置、设备及介质 - Google Patents

一种数据处理方法、装置、设备及介质 Download PDF

Info

Publication number
WO2022062166A1
WO2022062166A1 PCT/CN2020/132196 CN2020132196W WO2022062166A1 WO 2022062166 A1 WO2022062166 A1 WO 2022062166A1 CN 2020132196 W CN2020132196 W CN 2020132196W WO 2022062166 A1 WO2022062166 A1 WO 2022062166A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
user
metadata
storage
user data
Prior art date
Application number
PCT/CN2020/132196
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 WO2022062166A1 publication Critical patent/WO2022062166A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • G06F16/275Synchronous replication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2457Query processing with adaptation to user needs
    • G06F16/24573Query processing with adaptation to user needs using data annotations, e.g. user-defined metadata
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Definitions

  • the present application relates to the field of cloud storage technologies, and in particular, to a data processing method, apparatus, device, and medium.
  • Embodiments of the present application provide a data processing method, apparatus, device, and medium, so as to solve the problem of poor data synchronization performance in the cross-cluster data synchronization method in the prior art.
  • an embodiment of the present application provides a data processing method, including:
  • acquiring the user data to be written and the metadata of the user data includes:
  • the data length and storage path of the user data are determined, and based on the data length and the storage path, metadata of the user data is generated.
  • the metadata is inserted into the header of the user data to obtain the user storage data, including:
  • Metadata is inserted into the storage space of the set length reserved in the header of the user data to obtain user storage data.
  • the embodiment of the present application provides another data processing method, including:
  • the user storage data is obtained from the source cluster storage system, and the metadata of the user data is obtained from the user storage data, wherein the user storage data is the metadata of the user data inserted by the source cluster storage system at the head of the user data obtained after the data;
  • the user storage data is obtained from the source cluster storage system, and the metadata is obtained from the user storage data, including:
  • timing synchronization task obtain each user data block composed of user storage data from the source cluster storage system in batches;
  • the user data block is decoded to obtain user storage data in the user data block and metadata in the user storage data.
  • decoding the user data block to obtain the user storage data in the user data block and the metadata in the user storage data includes performing the following operations cyclically until the user data in the user data block is Until the decoding of the stored data is completed:
  • the first piece of data after the user stores the data
  • the data length in the metadata is obtained as the target length, and the data of the target length after the metadata is decoded to obtain the user data corresponding to the metadata;
  • the user storage data is obtained based on the metadata and the user data corresponding to the metadata.
  • an embodiment of the present application provides a data processing apparatus, including:
  • a data acquisition unit used to acquire the user data to be written and the metadata of the user data
  • a metadata insertion unit used for inserting metadata into the header of the user data to obtain user storage data
  • the data writing unit is used for writing user storage data into the user data storage node, and writing metadata into the metadata storage node.
  • the data acquisition unit when acquiring the user data to be written and the metadata of the user data, the data acquisition unit is specifically used for:
  • the data length and storage path of the user data are determined, and based on the data length and the storage path, metadata of the user data is generated.
  • the metadata insertion unit when metadata is inserted into the header of user data, and when user storage data is obtained, the metadata insertion unit is specifically used for:
  • Metadata is inserted into the storage space of the set length reserved in the header of the user data to obtain user storage data.
  • an embodiment of the present application provides another data processing apparatus, including:
  • an instruction receiving unit for receiving a data synchronization instruction
  • the data acquisition unit is used to acquire user storage data from the source cluster storage system based on the data synchronization instruction, and obtain the metadata of the user data from the user storage data, wherein the user storage data is the header of the user data in the source cluster storage system. obtained after inserting the metadata of the user data;
  • the data writing unit is used for writing user storage data into the user data storage node, and writing metadata into the metadata storage node.
  • the data acquiring unit when acquiring user storage data of the target data type from the source cluster storage system based on the data synchronization instruction, and acquiring metadata from the user storage data, the data acquiring unit is specifically configured to:
  • timing synchronization task obtain each user data block composed of user storage data from the source cluster storage system in batches;
  • the user data block is decoded to obtain user storage data in the user data block and metadata in the user storage data.
  • the data acquisition unit is specifically configured to perform the following operations cyclically until Until the decoding of the user memory data in the user data block is completed:
  • the first piece of data after the user stores the data
  • the data length in the metadata is obtained as the target length, and the data of the target length after the metadata is decoded to obtain the user data corresponding to the metadata;
  • the user storage data is obtained based on the metadata and the user data corresponding to the metadata.
  • an embodiment of the present application provides a data processing device, including: a memory, a processor, and a computer program stored in the memory and running on the processor, and the processor implements the computer program provided by the embodiment of the present application when the processor executes the computer program. data processing method.
  • an embodiment of the present application further provides a computer-readable storage medium, where the computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, implements the data processing method provided by the embodiments of the present application.
  • the source cluster storage system when writing user data and metadata of user data, the source cluster storage system inserts metadata of user data into the header of the user data, so that other cluster storage systems can
  • the user data with metadata inserted in the header is obtained from the source cluster storage system, and after the metadata is further obtained from the header of the user data, the data synchronization between the user data and the metadata in the source cluster storage system can be realized. Simplifies the cross-cluster data synchronization operation and improves the cross-cluster data synchronization performance.
  • 1 is a schematic diagram of the composition structure of user storage data in the embodiment of the application.
  • FIG. 2 is a schematic diagram of a system architecture of a cluster storage system in an embodiment of the present application
  • FIG. 3 is a schematic flowchart of an overview of a data processing method in an embodiment of the present application.
  • FIG. 4 is a schematic flowchart of an overview of another data processing method in an embodiment of the present application.
  • FIG. 5 is a schematic flowchart of a specific flow of a data processing method in an embodiment of the present application.
  • FIG. 6 is a schematic functional structure diagram of a data processing apparatus in an embodiment of the present application.
  • FIG. 7 is a schematic functional structure diagram of another data processing apparatus in an embodiment of the present application.
  • FIG. 8 is a schematic diagram of a hardware structure of a data processing device in an embodiment of the present application.
  • User data data collected by data collection equipment.
  • user data may be images collected by cameras, fingerprints collected by attendance equipment, or vehicle locations collected by vehicle-mounted terminals.
  • Metadata which is data describing attributes such as data length and storage path of user data.
  • the user stores data, and inserts user data with metadata in the header.
  • the user storage data may be data in which metadata of the user data is inserted into a storage space of a set length reserved in the header of the user data.
  • the user data block is a data block composed of user storage data stored in the disk of the user data storage node.
  • the cluster storage system is a data storage system based on object storage.
  • the cluster storage system may include but is not limited to: client file system, user data storage node cluster and metadata storage node cluster, wherein:
  • the client file system is composed of multiple clients deployed with the file system, and is used to initiate access requests according to user operations;
  • the user data storage node cluster is composed of multiple user data storage nodes, and is used to store user storage data in the object storage mode;
  • the metadata storage node cluster is composed of multiple metadata storage nodes and is used to store metadata in the object storage mode.
  • the source cluster storage system can insert the metadata into the header of the user data to obtain the user storage data, and store the user storage data.
  • the metadata of the user data is obtained from the data
  • the user storage data is written into the user data storage node, and the metadata is written into the metadata storage node.
  • the source cluster storage system when the source cluster storage system writes the user data and the metadata of the user data, the metadata of the user data is inserted into the header of the user data, so that other cluster storage systems can transfer data from the source cluster storage system to the source cluster storage system during data synchronization.
  • the user data with metadata inserted in the header is obtained from the user data, and the metadata is obtained from the header of the user data to realize the data synchronization of the user data and metadata in the source cluster storage system, thus simplifying the cross-cluster data synchronization operation. , which improves the cross-cluster data synchronization performance.
  • An embodiment of the present application provides a data processing method. Referring to FIG. 3 , an overview flow of the data processing method provided by the embodiment of the present application is as follows:
  • Step 301 Obtain user data to be written and metadata of the user data.
  • the data collection device can send the collected user data to the source cluster storage system, and the source cluster storage system can use the user data collected by the data collection device as the user data to be written, and obtain the metadata of the user data.
  • the source cluster storage system may adopt but not limited to the following methods:
  • the source cluster storage system determines the data length and storage path of the user data.
  • the source cluster storage system in order to facilitate the source cluster storage system to determine the storage path of the user data, can shard the data collection device according to the geographic location of the data collection device, and establish each shard and user data storage node The corresponding relationship between each user data storage node in the cluster, so that when determining the storage path of the user data, the source cluster storage system can first determine the shard to which the data acquisition device corresponding to the user data belongs, and then determine the shard to which the data acquisition device corresponds to the user data.
  • the shard determine the user data storage node used to store the user data in the user data storage node cluster, and secondly, determine the The offset of the user data in the user data file, and finally, based on the shard to which the data collection device corresponding to the user data belongs, the user data storage node used to store the user data in the user data storage node cluster, and the user data The offset of the data in the user data file stored by the user data storage node determines the storage path of the user data.
  • the source cluster storage system generates metadata of the user data based on the data length and storage path of the user data.
  • Step 302 Insert the metadata into the header of the user data to obtain user storage data.
  • the source cluster storage system can reserve a storage space of a set length in the header of the user data, and then obtain the metadata of the user data after obtaining the metadata of the user data.
  • the metadata of the user data can be inserted into the storage space of the set length reserved in the header of the user data to obtain the user storage data.
  • other cluster storage systems can obtain user data from the source cluster storage system and further obtain the metadata of the user data from the source cluster storage system during data synchronization, so as to realize the user data and metadata in the source cluster storage system. This simplifies the cross-cluster data synchronization operation and improves the cross-cluster data synchronization performance.
  • Step 303 Write the user storage data into the user data storage node, and write the metadata into the metadata storage node.
  • the source cluster storage system can use the storage path of the user data as the storage path of the user data, and write the user storage data into the corresponding user data storage node cluster according to the storage path of the user storage data.
  • User data storage node can use the storage path of the user data as the storage path of the user data, and write the user storage data into the corresponding user data storage node cluster according to the storage path of the user storage data.
  • the source cluster storage system performs the data collection device according to the geographic location of the data collection device. Sharding, when establishing the corresponding relationship between each shard and each user data storage node in the user data storage node cluster, you can also establish the corresponding relationship between each shard and each metadata storage node in the metadata storage node cluster. In this way, the source When determining the metadata storage node used to store the metadata of the user data in the metadata storage node cluster, the cluster storage system can first determine the shard to which the data collection device of the user data belongs, and then determine the shard to which the data collection device of the user data belongs.
  • Metadata Storage node used to store the metadata of the user data in the metadata storage node cluster, and secondly, based on the determined offset of the last piece of data in the metadata file stored by the metadata storage node, determine The offset of the metadata of the user data in the user data file, and finally, based on the shard to which the data collection device corresponding to the user data belongs, and the metadata of the metadata storage node cluster used to store the metadata of the user data
  • the data storage node and the offset of the metadata of the user data in the metadata file stored by the metadata storage node determine the storage path of the metadata of the user data, and then according to the storage path of the metadata of the user data, Write the metadata of the user data to the corresponding metadata storage node in the metadata storage node cluster.
  • FIG. 4 an overview flow of another data processing method provided by an embodiment of the present application is as follows:
  • Step 401 Receive a data synchronization instruction.
  • the source cluster storage system After the source cluster storage system writes user storage data and metadata, it can issue data synchronization instructions to other cluster storage systems to trigger other cluster storage systems to start performing data synchronization operations.
  • Step 402 Based on the data synchronization instruction, obtain user storage data from the source cluster storage system, and obtain metadata of the user data from the user storage data, wherein the user storage data is the source cluster storage system in the user data storage system. Obtained by inserting the metadata of the user data into the header.
  • cluster storage systems may use, but are not limited to, the following methods when obtaining user storage data from the source cluster storage system based on the data synchronization instruction, and obtaining metadata of user data from the user storage data:
  • cluster storage systems create a scheduled synchronization task based on the data synchronization instruction.
  • the user data block is decoded to obtain the user storage data in the user data block and the metadata in the user storage data.
  • cluster storage systems decode the data of the set length after the reference data to obtain metadata.
  • the reference data when decoding for the first time, the reference data is the first piece of data of the user data block, and when it is not decoded for the first time, the reference data is the first piece of data after the user-stored data obtained by the last decoding.
  • another cluster storage system obtains the data length in the metadata as the target length, and decodes the data of the target length after the metadata to obtain user data corresponding to the metadata.
  • cluster storage systems obtain user storage data based on the metadata and the user data corresponding to the metadata.
  • Step 403 Write the user storage data to the user data storage node, and write the metadata to the metadata storage node.
  • cluster storage systems can pre-establish the correspondence between each source cluster storage system and each user data storage node in the user data storage node cluster.
  • you can first determine the user data storage node in the user data storage node cluster that is used to store the user storage data of the source cluster storage system, and then based on the determined user data storage node in the current last file of the user data storage node.
  • the offset of the data determine the offset of the user storage data of the source cluster storage system in the user data file, and secondly, based on the user data storage node cluster is used to store the user storage data of the source cluster storage system and the offset of the user data storage node of the source cluster storage system in the user data file stored by the user data storage node, determine the storage path of the user storage data of the source cluster storage system, and finally, according to the The storage path of the user storage data of the source cluster storage system, and the user storage data of the source cluster storage system is written to the corresponding user data storage node in the user data storage node cluster.
  • other cluster storage systems can also pre-establish the correspondence between each source cluster storage system and each metadata storage node in the metadata storage node cluster. In this way, other cluster storage systems are synchronizing the metadata of the source cluster storage system.
  • the metadata storage node is used to store the metadata of the source cluster storage system in the metadata storage node cluster
  • the metadata storage node of the metadata file stored in the metadata storage node based on the determined metadata storage node can be determined.
  • Offset determine the offset of the metadata of the source cluster storage system in the metadata file, and secondly, based on the metadata storage in the metadata storage node cluster for storing the metadata of the source cluster storage system node, and the offset of the metadata of the source cluster storage system in the metadata file stored by the metadata storage node, determine the storage path of the metadata of the source cluster storage system, and finally, according to the metadata of the source cluster storage system Data storage path, and write the metadata of the source cluster storage system to the corresponding metadata storage node in the metadata storage node cluster.
  • the user data is the image collected by the camera
  • the data processing method provided by the embodiment of the present application is further described in detail. Referring to FIG. 5, the specific flow of the data processing method provided by the embodiment of the present application is as follows:
  • Step 501 The camera sends the captured image to the source cluster storage system.
  • Step 502 The source cluster storage system takes the image collected by the data collection device as user data to be written, and determines the data length and storage path of the user data.
  • Step 503 The source cluster storage system generates metadata of the user data based on the data length and storage path of the user data.
  • Step 504 The source cluster storage system inserts the metadata of the user data into the storage space of the set length reserved in the header of the user data to obtain the user storage data.
  • Step 505 The source cluster storage system uses the storage path of the user data as the storage path of the user data, and writes the user storage data to the corresponding user data in the user data storage node cluster according to the storage path of the user storage data storage node.
  • Step 506 The source cluster storage system determines the storage path of the metadata of the user data, and writes the metadata of the user data into the corresponding metadata storage in the metadata storage node cluster according to the storage path of the metadata of the user data node.
  • Step 507 The source cluster storage system issues a data synchronization instruction.
  • Step 508 When the other cluster storage system receives the data synchronization instruction issued by the source cluster storage system, it creates a timing synchronization task based on the data synchronization instruction.
  • Step 509 According to the timing synchronization task, the other cluster storage systems acquire each user data block composed of user storage data from the source cluster storage system in batches.
  • Step 510 Each time the other cluster storage system acquires a user data block, it decodes the user data block to obtain the user storage data in the user data block and the metadata in the user storage data.
  • Step 511 The other cluster storage system determines the storage path of the user's stored data, and writes the user's stored data to the corresponding user data storage node in the user data storage node cluster according to the storage path of the user's stored data.
  • Step 512 The source cluster storage system determines the storage path of the metadata in the user's stored data, and writes the metadata in the user's stored data into the metadata storage node cluster according to the storage path of the metadata in the user's stored data in the corresponding metadata storage node.
  • the embodiments of the present application provide a data processing apparatus.
  • the data processing apparatus 600 provided by the embodiments of the present application includes at least:
  • a data acquisition unit 601, configured to acquire user data to be written and metadata of the user data
  • Metadata inserting unit 602 for inserting metadata into the header of user data to obtain user storage data
  • the data writing unit 603 is configured to write user storage data into the user data storage node, and write metadata into the metadata storage node.
  • the data acquiring unit 601 when acquiring the user data to be written and the metadata of the user data, the data acquiring unit 601 is specifically configured to:
  • the data length and storage path of the user data are determined, and based on the data length and the storage path, metadata of the user data is generated.
  • the metadata insertion unit 602 when metadata is inserted into the header of user data, and when user storage data is obtained, the metadata insertion unit 602 is specifically configured to:
  • Metadata is inserted into the storage space of the set length reserved in the header of the user data to obtain user storage data.
  • the embodiments of the present application further provide another data processing apparatus.
  • the data processing apparatus 700 provided by the embodiments of the present application includes at least:
  • an instruction receiving unit 701 configured to receive a data synchronization instruction
  • the data obtaining unit 702 is configured to obtain user storage data from the source cluster storage system based on the data synchronization instruction, and obtain metadata of the user data from the user storage data, wherein the user storage data is the source cluster storage system in the user data storage system. Obtained after the header is inserted into the metadata of the user data;
  • the data writing unit 703 is configured to write user storage data into the user data storage node, and write metadata into the metadata storage node.
  • the data obtaining unit 702 is specifically configured to:
  • timing synchronization task obtain each user data block composed of user storage data from the source cluster storage system in batches;
  • the user data block is decoded to obtain user storage data in the user data block and metadata in the user storage data.
  • the data acquisition unit 702 is specifically configured to perform the following operations cyclically: Until the decoding of the user memory data in the user data block is complete:
  • the first piece of data after the user stores the data
  • the data length in the metadata is obtained as the target length, and the data of the target length after the metadata is decoded to obtain the user data corresponding to the metadata;
  • the user storage data is obtained based on the metadata and the user data corresponding to the metadata.
  • the data processing device 800 provided by the embodiment of the present application includes at least: a processor 801, a memory 802, and a computer program stored in the memory 802 and running on the processor 801.
  • the processor 801 executes the computer program
  • the data processing method provided by the embodiment of the present application is implemented.
  • data processing device 800 shown in FIG. 8 is only an example, and should not impose any limitations on the functions and scope of use of the embodiments of the present application.
  • the data processing device 800 provided in this embodiment of the present application may further include a bus 803 connecting different components (including the processor 801 and the memory 802 ).
  • the bus 803 represents one or more of several types of bus structures, including a memory bus, a peripheral bus, a local bus, and the like.
  • the memory 802 may include a readable medium in the form of a volatile memory, such as a random access memory (RAM) 8021 and/or a cache memory 8022, and may further include a read only memory (Read Only Memory, ROM) 8023.
  • RAM random access memory
  • ROM read only memory
  • the memory 802 may also include a program tool 8025 having a set (at least one) of program modules 8024 including, but not limited to, an operating subsystem, one or more application programs, other program modules, and program data, in these examples Each or some combination may include an implementation of a network environment.
  • Data processing device 800 may also communicate with one or more external devices 804 (eg, keyboards, remote controls, etc.), and may also communicate with one or more devices (eg, cell phones, computers, etc.) that enable a user to interact with data processing device 800 , and/or, with any device (eg, router, modem, etc.) that enables data processing device 800 to communicate with one or more other data processing devices 800 . Such communication may take place through an Input/Output (I/O) interface 805 . Also, data processing device 800 may communicate with one or more networks (eg, Local Area Network (LAN), Wide Area Network (WAN), and/or public networks such as the Internet) through network adapter 806. As shown in FIG.
  • I/O Input/Output
  • data processing device 800 may communicate with one or more networks (eg, Local Area Network (LAN), Wide Area Network (WAN), and/or public networks such as the Internet) through network adapter 806. As shown in FIG.
  • network adapter 806 communicates with other modules of data processing device 800 via bus 803 .
  • other hardware and/or software modules may be used in conjunction with data processing device 800, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, disk arrays ( Redundant Arrays of Independent Disks, RAID) subsystems, tape drives, and data backup storage subsystems, etc.
  • the computer-readable storage medium provided by the embodiments of the present application stores computer instructions, and when the computer instructions are executed by the processor, the data processing methods provided by the embodiments of the present application are implemented.
  • the executable program may be built-in or installed in the data processing device 800, so that the data processing device 800 can implement the data processing method provided by the embodiments of the present application by executing the built-in or installed executable program.
  • the data processing method provided by the embodiments of the present application can also be implemented as a program product, where the program product includes program code, and when the program product can be run on the data processing device 800, the program code is used to enable the data processing device 800 executes the data processing method provided by the embodiment of the present application.
  • the program product provided by the embodiments of the present application may adopt any combination of one or more readable media, where the readable medium may be a readable signal medium or a readable storage medium, and the readable storage medium may be, but not limited to, an electrical , magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses or devices, or any combination of the above, in particular, more specific examples (non-exhaustive list) of readable storage media include: having one or more Electrical connection of wires, portable disk, hard disk, RAM, ROM, Erasable Programmable Read Only Memory (EPROM), Optical Fiber, Portable Compact Disc Read-Only Memory (CD- ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above.
  • EPROM Erasable Programmable Read Only Memory
  • CD- ROM Portable Compact Disc Read-Only Memory
  • the program product provided by the embodiments of the present application may adopt a CD-ROM and include program codes, and may also run on a computing device.
  • the program product provided by the embodiment of the present application is not limited to this.
  • the readable storage medium may be any tangible medium containing or storing a program, and the program may be used by or associated with an instruction execution system, apparatus, or device. In conjunction with.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Library & Information Science (AREA)
  • Computational Linguistics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请公开了一种数据处理方法、装置、设备及介质,应用于云存储技术领域,用以解决现有技术中的跨集群数据同步方法存在数据同步性能较差的问题。具体为:源集群存储系统在写入用户数据和用户数据的元数据时,通过将用户数据的元数据插入到该用户数据的头部,使得其他集群存储系统在数据同步时,可以从源集群存储系统中获取到头部插入有元数据的用户数据,进一步从用户数据的头部获取元数据后,即可实现对源集群存储系统中的用户数据和元数据的数据同步,从而简化了跨集群数据同步操作,提高了跨集群数据同步性能。

Description

一种数据处理方法、装置、设备及介质
相关申请的交叉引用
本申请要求在2020年09月27日提交中国专利局、申请号为202011031395.3、申请名称为“一种数据处理方法、装置、设备及介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及云存储技术领域,尤其涉及一种数据处理方法、装置、设备及介质。
背景技术
近年来,随着互联网技术和计算机技术的不断发展,用户数据呈海量增长,直接推动了云存储技术的广泛应用,其中,基于对象存储的集群存储系统因其具有高可用性、高可扩展性等优点,在云存储技术领域备受青睐。
现有技术中,在源集群存储系统将用户数据写入用户数据存储节点,并将该用户数据的元数据写入元数据存储节点后,其它集群存储系统会对源集群存储系统中的用户数据和元数据进行数据同步,以实现各个集群存储系统的数据一致性,然而,目前的跨集群数据同步方法的数据同步性能较差。
发明内容
本申请实施例提供了一种数据处理方法、装置、设备及介质,用以解决现有技术中的跨集群数据同步方法存在数据同步性能较差的问题。
本申请实施例提供的技术方案如下:
一方面,本申请实施例提供了一种数据处理方法,包括:
获取待写入的用户数据和用户数据的元数据;
将元数据插入至用户数据的头部,得到用户存储数据;
将用户存储数据写入用户数据存储节点,并将元数据写入元数据存储节点。
在一种可能的实施方式中,获取待写入的用户数据和用户数据的元数据,包括:
将数据采集设备采集的用户数据作为待写入的用户数据;
确定用户数据的数据长度和存储路径,并基于数据长度和存储路径,生成用户数据的元数据。
在一种可能的实施方式中,将元数据插入至用户数据的头部,得到用户存储数据,包括:
在用户数据的头部预留的设定长度的存储空间中插入元数据,得到用户存储数据。
另一方面,本申请实施例提供了另一种数据处理方法,包括:
接收数据同步指令;
基于数据同步指令,从源集群存储系统中获取用户存储数据,并从用户存储数据中获取用户数据的元数据,其中,用户存储数据是源集群存储系统在用户数据的头部插入用户数据的元数据后获得的;
将用户存储数据写入用户数据存储节点,并将元数据写入元数据存储节点。
在一种可能的实施方式中,基于数据同步指令,从源集群存储系统中获取用户存储数据,并从用户存储数据中获取元数据,包括:
基于数据同步指令,创建定时同步任务;
按照定时同步任务,分批次地从源集群存储系统中获取由用户存储数据组成的各个用户数据块;
每获取到一个用户数据块,对该用户数据块进行解码,得到该用户数据块中的用户存储数据和该用户存储数据中的元数据。
在一种可能的实施方式中,对该用户数据块进行解码,得到该用户数据块中的用户存储数据和该用户存储数据中的元数据,包括循环执行以下操作, 直至用户数据块中的用户存储数据解码完成为止:
对基准数据后的设定长度的数据进行解码,得到元数据,其中,当首次解码时,基准数据为用户数据块的第一条数据,当非首次解码时,基准数据为上一次解码获得的用户存储数据后的第一条数据;
获取元数据中的数据长度为目标长度,并对元数据后的目标长度的数据进行解码,得到元数据对应的用户数据;
基于元数据和元数据对应的用户数据,获得用户存储数据。
另一方面,本申请实施例提供了一种数据处理装置,包括:
数据获取单元,用于获取待写入的用户数据和用户数据的元数据;
元数据插入单元,用于将元数据插入至用户数据的头部,得到用户存储数据;
数据写入单元,用于将用户存储数据写入用户数据存储节点,并将元数据写入元数据存储节点。
在一种可能的实施方式中,获取待写入的用户数据和用户数据的元数据时,数据获取单元具体用于:
将数据采集设备采集的用户数据作为待写入的用户数据;
确定用户数据的数据长度和存储路径,并基于数据长度和存储路径,生成用户数据的元数据。
在一种可能的实施方式中,将元数据插入至用户数据的头部,得到用户存储数据时,元数据插入单元具体用于:
在用户数据的头部预留的设定长度的存储空间中插入元数据,得到用户存储数据。
另一方面,本申请实施例提供了另一种数据处理装置,包括:
指令接收单元,用于接收数据同步指令;
数据获取单元,用于基于数据同步指令,从源集群存储系统中获取用户存储数据,并从用户存储数据中获取用户数据的元数据,其中,用户存储数据是源集群存储系统在用户数据的头部插入用户数据的元数据后获得的;
数据写入单元,用于将用户存储数据写入用户数据存储节点,并将元数据写入元数据存储节点。
在一种可能的实施方式中,基于数据同步指令,从源集群存储系统中获取目标数据类型的用户存储数据,并从用户存储数据中获取元数据时,数据获取单元具体用于:
基于数据同步指令,创建定时同步任务;
按照定时同步任务,分批次地从源集群存储系统中获取由用户存储数据组成的各个用户数据块;
每获取到一个用户数据块,对该用户数据块进行解码,得到该用户数据块中的用户存储数据和该用户存储数据中的元数据。
在一种可能的实施方式中,对该用户数据块进行解码,得到该用户数据块中的用户存储数据和该用户存储数据中的元数据时,数据获取单元具体用于循环执行以下操作,直至用户数据块中的用户存储数据解码完成为止:
对基准数据后的设定长度的数据进行解码,得到元数据,其中,当首次解码时,基准数据为用户数据块的第一条数据,当非首次解码时,基准数据为上一次解码获得的用户存储数据后的第一条数据;
获取元数据中的数据长度为目标长度,并对元数据后的目标长度的数据进行解码,得到元数据对应的用户数据;
基于元数据和元数据对应的用户数据,获得用户存储数据。
另一方面,本申请实施例提供了一种数据处理设备,包括:存储器、处理器和存储在存储器上并可在处理器上运行的计算机程序,处理器执行计算机程序时实现本申请实施例提供的数据处理方法。
另一方面,本申请实施例还提供了一种计算机可读存储介质,计算机可读存储介质存储有计算机指令,计算机指令被处理器执行时实现本申请实施例提供的数据处理方法。
本申请实施例的有益效果如下:
本申请实施例中,源集群存储系统在写入用户数据和用户数据的元数据 时,通过将用户数据的元数据插入到该用户数据的头部,使得其他集群存储系统在数据同步时,可以从源集群存储系统中获取到头部插入有元数据的用户数据,进一步从用户数据的头部获取元数据后,即可实现对源集群存储系统中的用户数据和元数据的数据同步,从而简化了跨集群数据同步操作,提高了跨集群数据同步性能。
本申请的其它特征和优点将在随后的说明书中阐述,并且,部分地可以从说明书中变得显而易见,或者通过实施本申请而了解。本申请的目的和其他优点可通过在所写的说明书、权利要求书、以及附图中特别指出的结构来实现和获得。
附图说明
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:
图1为本申请实施例中用户存储数据的组成结构示意图;
图2为本申请实施例中集群存储系统的系统架构示意图;
图3为本申请实施例中一种数据处理方法的概况流程示意图;
图4为本申请实施例中另一种数据处理方法的概况流程示意图;
图5为本申请实施例中数据处理方法的具体流程示意图;
图6为本申请实施例中一种数据处理装置的功能结构示意图;
图7为本申请实施例中另一种数据处理装置的功能结构示意图;
图8为本申请实施例中数据处理设备的硬件结构示意图。
具体实施方式
为了使本申请的目的、技术方案及有益效果更加清楚明白,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,并不是全部的实施 例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
为便于本领域技术人员更好地理解本申请,下面先对本申请涉及的技术用语进行简单介绍。
1、用户数据,为数据采集设备采集的数据。例如,用户数据可以是摄像头采集的图像,也可以是考勤设备采集的指纹,还可以是车载终端采集的车辆位置等。
2、元数据,为对用户数据的数据长度和存储路径等属性进行描述的数据。
3、用户存储数据,为头部插入有元数据的用户数据。本申请中,参阅图1所示,用户存储数据可以是在用户数据的头部预留的设定长度的存储空间中插入有该用户数据的元数据的数据。
4、用户数据块,为对用户数据存储节点的磁盘中存储的由用户存储数据组成的数据块。
5、集群存储系统,为基于对象存储的数据存储系统。本申请中,参阅图2所示,集群存储系统可以包括但不限于:客户端文件系统、用户数据存储节点集群和元数据存储节点集群,其中:
客户端文件系统,为由多个部署有文件系统的客户端组成,用于根据用户操作,发起访问请求;
用户数据存储节点集群,为由多个用户数据存储节点组成,用于采用对象存储方式对用户存储数据进行存储;
元数据存储节点集群,为由多个元数据存储节点组成,用于采用对象存储方式对元数据进行存储。
在介绍了本申请涉及的技术用语后,接下来,对本申请实施例的应用场景和设计思想进行简单介绍。
目前,跨集群数据同步方法主要有两种,一种是从源集群存储系统中同时读取元数据和用户数据,这种数据同步方法由于元数据随机分布在元数据存储节点的磁盘上,且磁盘随机读取的性能远不如顺序读取,从而造成数据 同步性能较差;另一种是源集群存储系统在写入用户数据和元数据的同时,将数据变化记录到操作日志(opLog)文件中,以使其它集群存储系统通过回放该opLog文件实现数据同步,这种数据同步方法除了正常写入用户数据和元数据之外还需要多写入一份opLog文件,且写数据的性能较差,从而造成数据同步性能较差。因此,如何提高跨集群数据同步的性能是当前需要解决的问题。
为此,本申请实施例中,源集群存储系统获取待写入的用户数据和用户数据的元数据后,可以将元数据插入至用户数据的头部,得到用户存储数据,并将用户存储数据写入用户数据存储节点,将元数据写入元数据存储节点;而其他集群存储系统接收到数据同步指令时,可以基于数据同步指令,从源集群存储系统中获取用户存储数据,并从用户存储数据中获取用户数据的元数据后,将用户存储数据写入用户数据存储节点,将元数据写入元数据存储节点。这样,源集群存储系统在写入用户数据和用户数据的元数据时,通过将用户数据的元数据插入到该用户数据的头部,使得其他集群存储系统在数据同步时,从源集群存储系统中获取到头部插入有元数据的用户数据,从用户数据的头部获取元数据,即可实现对源集群存储系统中的用户数据和元数据的数据同步,从而简化了跨集群数据同步操作,提高了跨集群数据同步性能。
在介绍了本申请实施例的应用场景和设计思想之后,下面对本申请实施例提供的技术方案进行详细说明。
本申请实施例提供了一种数据处理方法,参阅图3所示,本申请实施例提供的数据处理方法的概况流程如下:
步骤301:获取待写入的用户数据和该用户数据的元数据。
实际应用中,数据采集设备可以将采集到的用户数据发送至源集群存储系统,源集群存储系统可以将数据采集设备采集的用户数据作为待写入的用户数据,并获取该用户数据的元数据,进一步的,源集群存储系统在获取该用户数据的元数据时,可以采用但不限于以下方式:
首先,源集群存储系统确定该用户数据的数据长度和存储路径。
在具体实施时,为了方便源集群存储系统确定该用户数据的存储路径,源集群存储系统可以根据数据采集设备的地理位置,对数据采集设备进行分片,并建立各个分片与用户数据存储节点集群中各个用户数据存储节点的对应关系,这样,源集群存储系统在确定该用户数据的存储路径时,可以先确定该用户数据对应的数据采集设备所属的分片,再根据该数据采集设备所属的分片,确定用户数据存储节点集群中用于存储该用户数据的用户数据存储节点,其次,基于确定出的用户数据存储节点存储的用户数据文件中当前最后一条数据的偏移量,确定该用户数据在该用户数据文件中的偏移量,最后,基于该用户数据对应的数据采集设备所属的分片、用户数据存储节点集群中用于存储该用户数据的用户数据存储节点,以及该用户数据在用户数据存储节点存储的用户数据文件中的偏移量,确定该用户数据的存储路径。
然后,源集群存储系统基于该用户数据的数据长度和存储路径,生成该用户数据的元数据。
步骤302:将该元数据插入至该用户数据的头部,得到用户存储数据。
实际应用中,源集群存储系统为了能够在用户数据的头部插入用户数据的元数据,可以在该用户数据的头部预留设定长度的存储空间,进而在获得该用户数据的元数据后,即可在该用户数据的头部预留的设定长度的存储空间中插入该用户数据的元数据,以获得用户存储数据。这样,其他集群存储系统在数据同步时,从源集群存储系统中获取用户存储数据并进一步从用户存储数据中获取用户数据的元数据,即可实现对源集群存储系统中的用户数据和元数据的数据同步,从而简化了跨集群数据同步操作,提高了跨集群数据同步性能。
步骤303:将该用户存储数据写入用户数据存储节点,并将该元数据写入元数据存储节点。
实际应用中,源集群存储系统可以将该用户数据的存储路径作为该用户存储数据的存储路径,并根据该用户存储数据的存储路径,将该用户存储数 据写入用户数据存储节点集群中相应的用户数据存储节点。
在具体实施时,为了方便源集群存储系统确定元数据存储节点集群中用于存储该用户数据的元数据的元数据存储节点,源集群存储系统根据数据采集设备的地理位置,对数据采集设备进行分片,在建立各个分片与用户数据存储节点集群中各个用户数据存储节点的对应关系时,还可以建立各个分片与元数据存储节点集群中各个元数据存储节点的对应关系,这样,源集群存储系统在确定元数据存储节点集群中用于存储该用户数据的元数据的元数据存储节点时,可以先确定该用户数据的数据采集设备所属的分片,再根据数据采集设备所属的分片,确定元数据存储节点集群中用于存储该用户数据的元数据的元数据存储节点,其次,基于确定出的元数据存储节点存储的元数据文件中当前最后一条数据的偏移量,确定该用户数据的元数据在该用户数据文件中的偏移量,最后,基于该用户数据对应的数据采集设备所属的分片、元数据存储节点集群中用于存储该用户数据的元数据的元数据存储节点,以及该用户数据的元数据在元数据存储节点存储的元数据文件中的偏移量,确定该用户数据的元数据的存储路径,进而根据该用户数据的元数据的存储路径,将该用户数据的元数据写入元数据存储节点集群中相应的元数据存储节点。
进一步的,源集群存储系统写入用户存储数据和元数据后,其他集群存储系统即可采用本申请实施例提供的另一种数据处理方法,对源集群存储系统中的用户存储数据和元数据进行数据同步,具体的,参阅图4所示,本申请实施例提供的另一种数据处理方法的概况流程如下:
步骤401:接收数据同步指令。
实际应用中,源集群存储系统写入用户存储数据和元数据后,可以向其它集群存储系统发布数据同步指令,以触发其它集群存储系统开始执行数据同步操作。
步骤402:基于该数据同步指令,从源集群存储系统中获取用户存储数据,并从该用户存储数据中获取用户数据的元数据,其中,该用户存储数据是源 集群存储系统在该用户数据的头部插入该用户数据的元数据后获得的。
实际应用中,其它集群存储系统在基于该数据同步指令,从源集群存储系统中获取用户存储数据,并从该用户存储数据中获取用户数据的元数据时,可以采用但不限于以下方式:
首先,其它集群存储系统基于该数据同步指令,创建定时同步任务。
然后,其它集群存储系统按照该定时同步任务,分批次地从源集群存储系统中获取由用户存储数据组成的各个用户数据块。
最后,其它集群存储系统每获取到一个用户数据块,对该用户数据块进行解码,得到该用户数据块中的用户存储数据和该用户存储数据中的元数据。
具体的,其它集群存储系统对该用户数据块进行解码时,可以循环执行以下操作,直至该用户数据块中的用户存储数据解码完成为止:
首先,其它集群存储系统对基准数据后的设定长度的数据进行解码,得到元数据。
其中,当首次解码时,该基准数据为该用户数据块的第一条数据,当非首次解码时,该基准数据为上一次解码获得的用户存储数据后的第一条数据。
然后,其它集群存储系统获取该元数据中的数据长度作为目标长度,对该元数据后的目标长度的数据进行解码,即可得到该元数据对应的用户数据。
最后,其它集群存储系统基于该元数据和该元数据对应的用户数据,获得用户存储数据。
步骤403:将该用户存储数据写入用户数据存储节点,并将该元数据写入元数据存储节点。
实际应用中,其它集群存储系统可以预先建立各个源集群存储系统与用户数据存储节点集群中各个用户数据存储节点的对应关系,这样,其它集群存储系统在对源集群存储系统的用户存储数据进行数据同步时,可以先确定用户数据存储节点集群中用于对该源集群存储系统的用户存储数据进行存储的用户数据存储节点,再基于确定出的用户数据存储节点存储的用户数据文件中当前最后一条数据的偏移量,确定该源集群存储系统的用户存储数据在 该用户数据文件中的偏移量,其次,基于用户数据存储节点集群中用于对该源集群存储系统的用户存储数据进行存储的用户数据存储节点,以及该源集群存储系统的用户存储数据在用户数据存储节点存储的用户数据文件中的偏移量,确定该源集群存储系统的用户存储数据的存储路径,最后,根据该源集群存储系统的用户存储数据的存储路径,将该源集群存储系统的用户存储数据写入用户数据存储节点集群中相应的用户数据存储节点。
对应的,其它集群存储系统还可以预先建立各个源集群存储系统与元数据存储节点集群中各个元数据存储节点的对应关系,这样,其它集群存储系统在对源集群存储系统的元数据进行数据同步时,可以先确定元数据存储节点集群中用于对该源集群存储系统的元数据进行存储的元数据存储节点,再基于确定出的元数据存储节点存储的元数据文件中当前最后一条数据的偏移量,确定该源集群存储系统的元数据在该元数据文件中的偏移量,其次,基于元数据存储节点集群中用于对该源集群存储系统的元数据进行存储的元数据存储节点,以及该源集群存储系统的元数据在元数据存储节点存储的元数据文件中的偏移量,确定该源集群存储系统的元数据的存储路径,最后,根据该源集群存储系统的元数据的存储路径,将该源集群存储系统的元数据写入元数据存储节点集群中相应的元数据存储节点。
下面采用“用户数据是摄像头采集的图像”为具体应用场景,对本申请实施例提供的数据处理方法作进一步详细说明,参阅图5所示,本申请实施例提供的数据处理方法的具体流程如下:
步骤501:摄像头将采集到的图像发送至源集群存储系统。
步骤502:源集群存储系统将数据采集设备采集的图像作为待写入的用户数据,并确定该用户数据的数据长度和存储路径。
步骤503:源集群存储系统基于该用户数据的数据长度和存储路径,生成该用户数据的元数据。
步骤504:源集群存储系统在该用户数据的头部预留的设定长度的存储空间中插入该用户数据的元数据,得到用户存储数据。
步骤505:源集群存储系统将该用户数据的存储路径作为该用户存储数据的存储路径,并根据该用户存储数据的存储路径,将该用户存储数据写入用户数据存储节点集群中相应的用户数据存储节点。
步骤506:源集群存储系统确定该用户数据的元数据的存储路径,并根据该用户数据的元数据的存储路径,将该用户数据的元数据写入元数据存储节点集群中相应的元数据存储节点。
步骤507:源集群存储系统发布数据同步指令。
步骤508:其它集群存储系统接收到源集群存储系统发布的数据同步指令时,基于该数据同步指令,创建定时同步任务。
步骤509:其它集群存储系统按照该定时同步任务,分批次地从源集群存储系统中获取由用户存储数据组成的各个用户数据块。
步骤510:其它集群存储系统每获取到一个用户数据块,对该用户数据块进行解码,得到该用户数据块中的用户存储数据和该用户存储数据中的元数据。
步骤511:其它集群存储系统确定该用户存储数据的存储路径,并根据该用户存储数据的存储路径,将该用户存储数据写入用户数据存储节点集群中相应的用户数据存储节点。
步骤512:源集群存储系统确定该用户存储数据中的元数据的存储路径,并根据该用户存储数据中的元数据的存储路径,将该用户存储数据中的元数据写入元数据存储节点集群中相应的元数据存储节点。
基于上述实施例,本申请实施例提供了一种数据处理装置,参阅图6所示,本申请实施例提供的数据处理装置600至少包括:
数据获取单元601,用于获取待写入的用户数据和用户数据的元数据;
元数据插入单元602,用于将元数据插入至用户数据的头部,得到用户存储数据;
数据写入单元603,用于将用户存储数据写入用户数据存储节点,并将元数据写入元数据存储节点。
在一种可能的实施方式中,获取待写入的用户数据和用户数据的元数据时,数据获取单元601具体用于:
将数据采集设备采集的用户数据作为待写入的用户数据;
确定用户数据的数据长度和存储路径,并基于数据长度和存储路径,生成用户数据的元数据。
在一种可能的实施方式中,将元数据插入至用户数据的头部,得到用户存储数据时,元数据插入单元602具体用于:
在用户数据的头部预留的设定长度的存储空间中插入元数据,得到用户存储数据。
基于上述实施例,本申请实施例还提供了另一种数据处理装置,参阅图7所示,本申请实施例提供的数据处理装置700至少包括:
指令接收单元701,用于接收数据同步指令;
数据获取单元702,用于基于数据同步指令,从源集群存储系统中获取用户存储数据,并从用户存储数据中获取用户数据的元数据,其中,用户存储数据是源集群存储系统在用户数据的头部插入用户数据的元数据后获得的;
数据写入单元703,用于将用户存储数据写入用户数据存储节点,并将元数据写入元数据存储节点。
在一种可能的实施方式中,基于数据同步指令,从源集群存储系统中获取目标数据类型的用户存储数据,并从用户存储数据中获取元数据时,数据获取单元702具体用于:
基于数据同步指令,创建定时同步任务;
按照定时同步任务,分批次地从源集群存储系统中获取由用户存储数据组成的各个用户数据块;
每获取到一个用户数据块,对该用户数据块进行解码,得到该用户数据块中的用户存储数据和该用户存储数据中的元数据。
在一种可能的实施方式中,对该用户数据块进行解码,得到该用户数据块中的用户存储数据和该用户存储数据中的元数据时,数据获取单元702具 体用于循环执行以下操作,直至用户数据块中的用户存储数据解码完成为止:
对基准数据后的设定长度的数据进行解码,得到元数据,其中,当首次解码时,基准数据为用户数据块的第一条数据,当非首次解码时,基准数据为上一次解码获得的用户存储数据后的第一条数据;
获取元数据中的数据长度为目标长度,并对元数据后的目标长度的数据进行解码,得到元数据对应的用户数据;
基于元数据和元数据对应的用户数据,获得用户存储数据。
需要说明的是,本申请实施例提供的两种数据处理装置解决技术问题的原理与本申请实施例提供的数据处理方法相似,因此,本申请实施例提供的两种数据处理装置的实施可以参见本申请实施例提供的数据处理方法的实施,重复之处不再赘述。
在介绍了本申请实施例提供的数据处理方法和装置之后,接下来,对本申请实施例提供的数据处理设备进行简单介绍。
参阅图8所示,本申请实施例提供的数据处理设备800至少包括:处理器801、存储器802和存储在存储器802上并可在处理器801上运行的计算机程序,处理器801执行计算机程序时实现本申请实施例提供的数据处理方法。
需要说明的是,图8所示的数据处理设备800仅仅是一个示例,不应对本申请实施例的功能和使用范围带来任何限制。
本申请实施例提供的数据处理设备800还可以包括连接不同组件(包括处理器801和存储器802)的总线803。其中,总线803表示几类总线结构中的一种或多种,包括存储器总线、外围总线、局域总线等。
存储器802可以包括易失性存储器形式的可读介质,例如随机存储器(Random Access Memory,RAM)8021和/或高速缓存存储器8022,还可以进一步包括只读存储器(Read Only Memory,ROM)8023。
存储器802还可以包括具有一组(至少一个)程序模块8024的程序工具8025,程序模块8024包括但不限于:操作子系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网 络环境的实现。
数据处理设备800也可以与一个或多个外部设备804(例如键盘、遥控器等)通信,还可以与一个或者多个使得用户能与数据处理设备800交互的设备通信(例如手机、电脑等),和/或,与使得数据处理设备800与一个或多个其它数据处理设备800进行通信的任何设备(例如路由器、调制解调器等)通信。这种通信可以通过输入/输出(Input/Output,I/O)接口805进行。并且,数据处理设备800还可以通过网络适配器806与一个或者多个网络(例如局域网(Local Area Network,LAN),广域网(Wide Area Network,WAN)和/或公共网络,例如因特网)通信。如图8所示,网络适配器806通过总线803与数据处理设备800的其它模块通信。应当理解,尽管图8中未示出,可以结合数据处理设备800使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理器、外部磁盘驱动阵列、磁盘阵列(Redundant Arrays of Independent Disks,RAID)子系统、磁带驱动器以及数据备份存储子系统等。
下面对本申请实施例提供的计算机可读存储介质进行介绍。本申请实施例提供的计算机可读存储介质存储有计算机指令,计算机指令被处理器执行时实现本申请实施例提供的数据处理方法。具体地,该可执行程序可以内置或者安装在数据处理设备800中,这样,数据处理设备800就可以通过执行内置或者安装的可执行程序实现本申请实施例提供的数据处理方法。
此外,本申请实施例提供的数据处理方法还可以实现为一种程序产品,该程序产品包括程序代码,当该程序产品可以在数据处理设备800上运行时,该程序代码用于使数据处理设备800执行本申请实施例提供的数据处理方法。
本申请实施例提供的程序产品可以采用一个或多个可读介质的任意组合,其中,可读介质可以是可读信号介质或者可读存储介质,而可读存储介质可以是但不限于是电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合,具体地,可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式盘、硬盘、RAM、ROM、 可擦式可编程只读存储器(Erasable Programmable Read Only Memory,EPROM)、光纤、便携式紧凑盘只读存储器(Compact Disc Read-Only Memory,CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。
本申请实施例提供的程序产品可以采用CD-ROM并包括程序代码,还可以在计算设备上运行。然而,本申请实施例提供的程序产品不限于此,在本申请实施例中,可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。
应当注意,尽管在上文详细描述中提及了装置的若干单元或子单元,但是这种划分仅仅是示例性的并非强制性的。实际上,根据本申请的实施方式,上文描述的两个或更多单元的特征和功能可以在一个单元中具体化。反之,上文描述的一个单元的特征和功能可以进一步划分为由多个单元来具体化。
此外,尽管在附图中以特定顺序描述了本申请方法的操作,但是,这并非要求或者暗示必须按照该特定顺序来执行这些操作,或是必须执行全部所示的操作才能实现期望的结果。附加地或备选地,可以省略某些步骤,将多个步骤合并为一个步骤执行,和/或将一个步骤分解为多个步骤执行。
尽管已描述了本申请的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本申请范围的所有变更和修改。
显然,本领域的技术人员可以对本申请实施例进行各种改动和变型而不脱离本申请实施例的精神和范围。这样,倘若本申请实施例的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。

Claims (14)

  1. 一种数据处理方法,其特征在于,包括:
    获取待写入的用户数据和所述用户数据的元数据;
    将所述元数据插入至所述用户数据的头部,得到用户存储数据;
    将所述用户存储数据写入用户数据存储节点,并将所述元数据写入元数据存储节点。
  2. 如权利要求1所述的数据处理方法,其特征在于,获取待写入的用户数据和所述用户数据的元数据,包括:
    将数据采集设备采集的用户数据作为待写入的用户数据;
    确定所述用户数据的数据长度和存储路径,并基于所述数据长度和所述存储路径,生成所述用户数据的元数据。
  3. 如权利要求1或2所述的数据处理方法,其特征在于,将所述元数据插入至所述用户数据的头部,得到用户存储数据,包括:
    在所述用户数据的头部预留的设定长度的存储空间中插入所述元数据,得到所述用户存储数据。
  4. 一种数据处理方法,其特征在于,包括:
    接收数据同步指令;
    基于所述数据同步指令,从源集群存储系统中获取用户存储数据,并从所述用户存储数据中获取用户数据的元数据,其中,所述用户存储数据是所述源集群存储系统在所述用户数据的头部插入所述用户数据的元数据后获得的;
    将所述用户存储数据写入用户数据存储节点,并将所述元数据写入元数据存储节点。
  5. 如权利要求4所述的数据处理方法,其特征在于,基于所述数据同步指令,从源集群存储系统中获取用户存储数据,并从所述用户存储数据中获取元数据,包括:
    基于所述数据同步指令,创建定时同步任务;
    按照所述定时同步任务,分批次地从所述源集群存储系统中获取由用户存储数据组成的各个用户数据块;
    每获取到一个用户数据块,对所述用户数据块进行解码,得到所述用户数据块中的用户存储数据和所述用户存储数据中的元数据。
  6. 如权利要求5所述的数据处理方法,其特征在于,对所述用户数据块进行解码,得到所述用户数据块中的用户存储数据和所述用户存储数据中的元数据,包括循环执行以下操作,直至所述用户数据块中的用户存储数据解码完成为止:
    对基准数据后的设定长度的数据进行解码,得到元数据,其中,当首次解码时,所述基准数据为所述用户数据块的第一条数据,当非首次解码时,所述基准数据为上一次解码获得的用户存储数据后的第一条数据;
    获取所述元数据中的数据长度为目标长度,并对所述元数据后的所述目标长度的数据进行解码,得到所述元数据对应的用户数据;
    基于所述元数据和所述元数据对应的用户数据,获得用户存储数据。
  7. 一种数据处理装置,其特征在于,包括:
    数据获取单元,用于获取待写入的用户数据和所述用户数据的元数据;
    元数据插入单元,用于将所述元数据插入至所述用户数据的头部,得到用户存储数据;
    数据写入单元,用于将所述用户存储数据写入用户数据存储节点,并将所述元数据写入元数据存储节点。
  8. 如权利要求7所述的数据处理装置,其特征在于,获取待写入的用户数据和所述用户数据的元数据时,所述数据获取单元具体用于:
    将数据采集设备采集的用户数据作为待写入的用户数据;
    确定所述用户数据的数据长度和存储路径,并基于所述数据长度和所述存储路径,生成所述用户数据的元数据。
  9. 如权利要求7或8所述的数据处理装置,其特征在于,将所述元数据 插入至所述用户数据的头部,得到用户存储数据时,所述元数据插入单元具体用于:
    在所述用户数据的头部预留的设定长度的存储空间中插入所述元数据,得到所述用户存储数据。
  10. 一种数据处理装置,其特征在于,包括:
    指令接收单元,用于接收数据同步指令;
    数据获取单元,用于基于所述数据同步指令,从源集群存储系统中获取用户存储数据,并从所述用户存储数据中获取用户数据的元数据,其中,所述用户存储数据是所述源集群存储系统在所述用户数据的头部插入所述用户数据的元数据后获得的;
    数据写入单元,用于将所述用户存储数据写入用户数据存储节点,并将所述元数据写入元数据存储节点。
  11. 如权利要求10所述的数据处理装置,其特征在于,基于所述数据同步指令,从所述源集群存储系统中获取所述目标数据类型的用户存储数据,并从所述用户存储数据中获取元数据时,所述数据获取单元具体用于:
    基于所述数据同步指令,创建定时同步任务;
    按照所述定时同步任务,分批次地从所述源集群存储系统中获取由用户存储数据组成的各个用户数据块;
    每获取到一个用户数据块,对所述用户数据块进行解码,得到所述用户数据块中的用户存储数据和所述用户存储数据中的元数据。
  12. 如权利要求11所述的数据处理装置,其特征在于,对所述用户数据块进行解码,得到所述用户数据块中的用户存储数据和所述用户存储数据中的元数据时,所述数据获取单元具体用于循环执行以下操作,直至所述用户数据块中的用户存储数据解码完成为止:
    对基准数据后的设定长度的数据进行解码,得到元数据,其中,当首次解码时,所述基准数据为所述用户数据块的第一条数据,当非首次解码时,所述基准数据为上一次解码获得的用户存储数据后的第一条数据;
    获取所述元数据中的数据长度为目标长度,并对所述元数据后的所述目标长度的数据进行解码,得到所述元数据对应的用户数据;
    基于所述元数据和所述元数据对应的用户数据,获得用户存储数据。
  13. 一种数据处理设备,其特征在于,包括:存储器、处理器和存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如权利要求1-6任一项所述的数据处理方法。
  14. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机指令,所述计算机指令被处理器执行时实现如权利要求1-6任一项所述的数据处理方法。
PCT/CN2020/132196 2020-09-27 2020-11-27 一种数据处理方法、装置、设备及介质 WO2022062166A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011031395.3A CN112148795B (zh) 2020-09-27 2020-09-27 一种数据处理方法、装置、设备及介质
CN202011031395.3 2020-09-27

Publications (1)

Publication Number Publication Date
WO2022062166A1 true WO2022062166A1 (zh) 2022-03-31

Family

ID=73894658

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/132196 WO2022062166A1 (zh) 2020-09-27 2020-11-27 一种数据处理方法、装置、设备及介质

Country Status (2)

Country Link
CN (1) CN112148795B (zh)
WO (1) WO2022062166A1 (zh)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102404411A (zh) * 2011-12-23 2012-04-04 创新科存储技术有限公司 云存储系统的数据同步方法
CN102821138A (zh) * 2012-07-09 2012-12-12 广州鼎鼎信息科技有限公司 一种适用于云存储系统的元数据分布式存储方法
CN104378431A (zh) * 2014-11-14 2015-02-25 青岛龙泰天翔通信科技有限公司 一种适用于云存储系统的元数据分布式存储方法
CN105183400A (zh) * 2015-10-23 2015-12-23 浪潮(北京)电子信息产业有限公司 一种基于内容寻址的对象存储方法和系统
CN105579974A (zh) * 2013-08-19 2016-05-11 微软技术许可有限责任公司 利用云存储的用于系统的断开连接操作
US20200125266A1 (en) * 2018-10-17 2020-04-23 International Busines Machines Corporation Providing a global unique identifier for a storage volume

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6941316B2 (en) * 2003-10-23 2005-09-06 Microsoft Corporation System and method for object persistence in a database store
US8131749B2 (en) * 2006-01-12 2012-03-06 Sony Computer Entertainment Inc. Dynamic data hierarchies
CN101102312B (zh) * 2007-06-11 2010-06-02 华为技术有限公司 一种网络通信数据处理方法、网络通信系统及客户端
CN101414277B (zh) * 2008-11-06 2010-06-09 清华大学 一种基于虚拟机的按需增量恢复容灾系统及方法
CN105302889B (zh) * 2015-10-16 2019-06-04 北京奇虎科技有限公司 数据存储结构的转换方法及装置
CN106873906A (zh) * 2017-01-04 2017-06-20 北京百度网讯科技有限公司 用于管理元信息的方法和装置
CN110018897B (zh) * 2018-01-09 2023-05-26 阿里巴巴集团控股有限公司 数据处理方法、装置及计算设备
CN109213699B (zh) * 2018-09-21 2021-10-29 郑州云海信息技术有限公司 一种元数据管理方法、系统、设备及计算机可读存储介质
CN109558443A (zh) * 2018-11-29 2019-04-02 北京数聚鑫云信息技术有限公司 一种整合数据源中的数据的方法及装置
CN110245024B (zh) * 2019-07-15 2023-12-05 北京一流科技有限公司 静态存储块的动态分配系统及其方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102404411A (zh) * 2011-12-23 2012-04-04 创新科存储技术有限公司 云存储系统的数据同步方法
CN102821138A (zh) * 2012-07-09 2012-12-12 广州鼎鼎信息科技有限公司 一种适用于云存储系统的元数据分布式存储方法
CN105579974A (zh) * 2013-08-19 2016-05-11 微软技术许可有限责任公司 利用云存储的用于系统的断开连接操作
CN104378431A (zh) * 2014-11-14 2015-02-25 青岛龙泰天翔通信科技有限公司 一种适用于云存储系统的元数据分布式存储方法
CN105183400A (zh) * 2015-10-23 2015-12-23 浪潮(北京)电子信息产业有限公司 一种基于内容寻址的对象存储方法和系统
US20200125266A1 (en) * 2018-10-17 2020-04-23 International Busines Machines Corporation Providing a global unique identifier for a storage volume

Also Published As

Publication number Publication date
CN112148795B (zh) 2021-06-15
CN112148795A (zh) 2020-12-29

Similar Documents

Publication Publication Date Title
US10719260B2 (en) Techniques for storing and retrieving data from a computing device
CN110113407B (zh) 小程序状态同步方法、设备和计算机存储介质
US7467259B2 (en) System and method to protect data stored in a storage system
CN110309218B (zh) 一种数据交换系统和数据写入方法
CN105872016B (zh) 一种桌面云中虚拟机的运行方法
CN110109778B (zh) 一种大量小数据文件备份方法及恢复方法
US11880280B2 (en) Variable number and size of put operations for storage backup
US20190347167A1 (en) Primary Node-Standby Node Data Transmission Method, Control Node, and Database System
CN112395264B (zh) 分布式存储系统中逻辑目标与卷之间映射的处理方法
US20100049932A1 (en) Method and apparatus for automatic snapshot
US9946609B2 (en) Managing multi-level backups into the cloud
CN114201421B (zh) 一种数据流处理方法、存储控制节点及可读存储介质
WO2020098654A1 (zh) 基于云存储的数据存储方法、装置和存储介质
CN114461456B (zh) 基于连续写cdp备份方法、系统、存储介质及恢复方法
CN102255866A (zh) 一种数据下载方法及装置
WO2022062166A1 (zh) 一种数据处理方法、装置、设备及介质
CN116010348B (zh) 一种分布式海量对象的管理方法和装置
CN109416617A (zh) 异构存储系统之间的复制
WO2023073547A1 (en) Efficient creation of secondary database system
CN112199329B (zh) 基于堡垒机的双机运维数据归档清理方法与设备
CN114490540A (zh) 数据存储方法、介质、装置和计算设备
WO2020238748A1 (zh) 数据同步的处理方法、装置、电子设备及计算机存储介质
CN110288309B (zh) 数据交互方法、装置、系统、计算机设备以及存储介质
CN113946293A (zh) 集群数据迁移方法、装置、电子设备和存储介质
US11720551B1 (en) Method and system for streaming data from portable storage devices

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 13/09/2023)

122 Ep: pct application non-entry in european phase

Ref document number: 20955008

Country of ref document: EP

Kind code of ref document: A1