[go: up one dir, main page]

CN111338834B - Data storage method and device - Google Patents

Data storage method and device Download PDF

Info

Publication number
CN111338834B
CN111338834B CN202010106307.5A CN202010106307A CN111338834B CN 111338834 B CN111338834 B CN 111338834B CN 202010106307 A CN202010106307 A CN 202010106307A CN 111338834 B CN111338834 B CN 111338834B
Authority
CN
China
Prior art keywords
metadata
data set
message queue
dataset
key
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010106307.5A
Other languages
Chinese (zh)
Other versions
CN111338834A (en
Inventor
席涛
段立国
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202010106307.5A priority Critical patent/CN111338834B/en
Publication of CN111338834A publication Critical patent/CN111338834A/en
Application granted granted Critical
Publication of CN111338834B publication Critical patent/CN111338834B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0706Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
    • G06F11/0727Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment in a storage system, e.g. in a DASD or network based storage system
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0793Remedial or corrective actions
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/22Indexing; Data structures therefor; Storage structures
    • G06F16/2291User-Defined Types; Storage management thereof
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Quality & Reliability (AREA)
  • Computing Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application discloses a data storage method and device. One embodiment of the method comprises the following steps: acquiring data sent by target terminal equipment and generating metadata of the data; storing the metadata to a key-value dataset and storing the metadata to a relational dataset; if the metadata is determined to have a fault in the storage of any one of the key value data set and the relational data set, the metadata stored in the key value data set and the relational data set is stored in a preset message queue. According to the method and the device for processing the cloud service, a temporary storage function can be achieved by introducing the message queue, and the data set with storage faults is replaced to provide service for the terminal device, so that normal interaction between the terminal device and the server is ensured, and the safety of the cloud service is improved. In addition, the backup device is not needed, so that the reading flow of the data is not needed to be modified, and cost consumption caused by the backup device can be avoided while the stability of cloud service is improved.

Description

数据存储方法和装置Data storage method and device

技术领域technical field

本申请实施例涉及计算机技术领域,具体涉及互联网技术领域,尤其涉及数据存储方法和装置。The embodiments of the present application relate to the field of computer technology, specifically to the field of Internet technology, and especially to a data storage method and device.

背景技术Background technique

随着互联网技术的发展,每天都会产生海量的网络数据。网络设备集群中的不同设备,可以实现不同的功能。然而,在昼夜不停运转中的网络设备,存在着出现宕机等故障的概率。一旦出现故障,可能会出现一台设备甚至多台设备无法提供服务的情况。With the development of Internet technology, massive amounts of network data are generated every day. Different devices in the network device cluster can implement different functions. However, there is a possibility of failures such as downtime in network equipment that is running around the clock. Once a failure occurs, there may be a situation where one device or even multiple devices cannot provide services.

为了减小设备故障带来的影响,相关技术会预先设置用于数据备份的设备集群,但是,该集群往往使用率较低,且维护成本较高。In order to reduce the impact of equipment failures, related technologies pre-configure equipment clusters for data backup, but the clusters often have a low utilization rate and high maintenance costs.

发明内容Contents of the invention

本申请实施例提出了数据存储方法和装置。The embodiments of the present application provide a data storage method and device.

第一方面,本申请实施例提供了一种数据存储方法,包括:获取目标终端设备发送的数据,生成数据的元数据;向键值数据集存储元数据,并向关系型数据集存储元数据;若确定元数据在键值数据集和关系型数据集中任一者的存储发生故障,则将向该者存储的元数据,向预设的消息队列存储,其中,消息队列中的元数据用于与终端设备进行交互。In the first aspect, the embodiment of the present application provides a data storage method, including: acquiring the data sent by the target terminal device, generating metadata of the data; storing the metadata in the key-value dataset, and storing the metadata in the relational dataset ; If it is determined that the storage of metadata in any one of the key-value data set and the relational data set fails, the metadata stored in the person will be stored in the preset message queue, wherein the metadata in the message queue is used for interacting with terminal devices.

在一些实施例中,键值数据集、关系型数据集,以及消息队列,存在于分布式设备集群中。In some embodiments, key-value datasets, relational datasets, and message queues exist in a distributed device cluster.

在一些实施例中,若确定元数据在键值数据集和关系型数据集中任一者的存储发生故障,则将向该者存储的元数据,向预设的消息队列存储,包括:若确定元数据在键值数据集的存储发生故障,同步将向键值数据集存储的元数据转换为二进制的元数据,得到第一二进制元数据,并向消息队列存储第一二进制元数据;或若确定元数据在关系型数据集的存储发生故障,同步将向关系型数据集存储的元数据转换为二进制的元数据,得到第二二进制元数据,并向消息队列存储第二二进制元数据。In some embodiments, if it is determined that the storage of metadata in any one of the key-value data set and the relational data set fails, the metadata stored in that one will be stored in a preset message queue, including: if it is determined If the storage of metadata fails in the key-value dataset, the metadata stored in the key-value dataset will be converted into binary metadata synchronously, the first binary metadata will be obtained, and the first binary metadata will be stored in the message queue data; or if it is determined that the storage of metadata in the relational dataset fails, synchronously convert the metadata stored in the relational dataset into binary metadata, obtain the second binary metadata, and store the second binary metadata in the message queue Two binary metadata.

在一些实施例中,向键值数据集存储元数据,并向关系型数据集存储元数据,包括:向键值数据集存储元数据;响应于向键值数据集存储元数据成功,向关系型数据集存储元数据;其中,键值数据集、关系型数据集,以及消息队列均存在至少一个数据备份。In some embodiments, storing metadata to the key-value data set and storing metadata to the relational data set includes: storing metadata to the key-value data set; Data sets store metadata; among them, key-value data sets, relational data sets, and message queues all have at least one data backup.

在一些实施例中,方法还包括:响应于确定向消息队列存储元数据成功,将向消息队列存储的元数据写入分布式缓存区;响应于接收到终端设备的数据请求,在分布式缓存区中查找数据请求对应的元数据,基于查找到的元数据向该终端设备进行反馈;响应于接收到终端设备的数据请求,在分布式缓存区中查找数据请求对应的元数据,若未查找到,在消息队列中查找数据请求对应的元数据,基于在消息队列中查找到的元数据向该终端设备进行反馈。In some embodiments, the method further includes: in response to determining that the metadata stored in the message queue is successful, writing the metadata stored in the message queue into the distributed cache; in response to receiving a data request from the terminal device, storing the metadata in the distributed cache Look up the metadata corresponding to the data request in the area, and feed back to the terminal device based on the found metadata; in response to receiving the data request from the terminal device, look up the metadata corresponding to the data request in the distributed cache, if not found After that, the metadata corresponding to the data request is searched in the message queue, and feedback is sent to the terminal device based on the metadata found in the message queue.

在一些实施例中,方法还包括:响应于监听到消息队列中加入了新的元数据,利用退避算法,向发生故障的数据集异步存储新的元数据,其中,异步存储成功时,发生故障的数据集已恢复存储功能。In some embodiments, the method further includes: in response to detecting that new metadata has been added to the message queue, using a backoff algorithm to asynchronously store new metadata to the failed dataset, wherein, when the asynchronous storage is successful, the failure occurs The data set of has restored storage function.

在一些实施例中,在向发生故障的数据集异步存储消息队列中的元数据之后,方法还包括:对键值数据集和关系型数据集,进行元数据的一致性校验;若校验结果为不一致,将关系型数据集中的元数据,更新为键值数据集中的元数据。In some embodiments, after asynchronously storing the metadata in the message queue to the faulty dataset, the method further includes: performing a metadata consistency check on the key-value dataset and the relational dataset; If the result is inconsistent, update the metadata in the relational dataset to the metadata in the key-value dataset.

第二方面,本申请实施例提供了一种数据存储装置,包括:获取单元,被配置成获取目标终端设备发送的数据,生成数据的元数据;存储单元,被配置成向键值数据集存储元数据,并向关系型数据集存储元数据;队列加入单元,被配置成若确定元数据在键值数据集和关系型数据集中任一者的存储发生故障,则将向该者存储的元数据,向预设的消息队列存储,其中,消息队列中的元数据用于与终端设备进行交互。In the second aspect, the embodiment of the present application provides a data storage device, including: an acquisition unit configured to acquire data sent by the target terminal device, and generate metadata of the data; a storage unit configured to store the data in the key-value data set Metadata, and store metadata in the relational dataset; the queue join unit is configured to store the metadata in the key-value dataset and the relational dataset if it is determined that the storage of the metadata fails. The data is stored in a preset message queue, wherein the metadata in the message queue is used to interact with the terminal device.

在一些实施例中,队列加入单元,进一步被配置成:若确定元数据在键值数据集的存储发生故障,同步将向键值数据集存储的元数据转换为二进制的元数据,得到第一二进制元数据,并向消息队列存储第一二进制元数据;或若确定元数据在关系型数据集的存储发生故障,同步将向关系型数据集存储的元数据转换为二进制的元数据,得到第二二进制元数据,并向消息队列存储第二二进制元数据。In some embodiments, the queue adding unit is further configured to: if it is determined that the storage of metadata in the key-value data set fails, synchronously convert the metadata stored in the key-value data set into binary metadata, and obtain the first Binary metadata, and store the first binary metadata to the message queue; or if it is determined that the storage of metadata in the relational dataset fails, synchronously convert the metadata stored in the relational dataset into binary metadata data, obtain second binary metadata, and store the second binary metadata in the message queue.

在一些实施例中,存储单元,进一步被配置成:向键值数据集存储元数据;响应于向键值数据集存储元数据成功,向关系型数据集存储元数据;其中,键值数据集、关系型数据集,以及消息队列均存在至少一个数据备份。In some embodiments, the storage unit is further configured to: store metadata in the key-value dataset; store metadata in the relational dataset in response to success in storing metadata in the key-value dataset; wherein, the key-value dataset , relational data sets, and message queues all have at least one data backup.

在一些实施例中,装置还包括:写入单元,被配置成响应于确定向消息队列存储元数据成功,将向消息队列存储的元数据写入分布式缓存区;第一查找单元,被配置成响应于接收到终端设备的数据请求,在分布式缓存区中查找数据请求对应的元数据,基于查找到的元数据向该终端设备进行反馈;第二查找单元,被配置成响应于接收到终端设备的数据请求,在分布式缓存区中查找数据请求对应的元数据,若未查找到,在消息队列中查找数据请求对应的元数据,基于在消息队列中查找到的元数据向该终端设备进行反馈。In some embodiments, the device further includes: a writing unit configured to write the metadata stored in the message queue into the distributed cache in response to determining that the metadata stored in the message queue is successful; the first search unit is configured In response to receiving a data request from a terminal device, search for metadata corresponding to the data request in the distributed cache, and feed back to the terminal device based on the found metadata; the second search unit is configured to respond to receiving For the data request of the terminal device, search for the metadata corresponding to the data request in the distributed buffer area, if not found, search for the metadata corresponding to the data request in the message queue, and send the data to the terminal based on the metadata found in the message queue The device gives feedback.

在一些实施例中,装置还包括:退避单元,被配置成响应于监听到消息队列中加入了新的元数据,利用退避算法,向发生故障的数据集异步存储新的元数据,其中,异步存储成功时,发生故障的数据集已恢复存储功能。In some embodiments, the device further includes: a backoff unit configured to store new metadata asynchronously to the failed dataset by using a backoff algorithm in response to detecting that new metadata has been added to the message queue, wherein the asynchronous When storage succeeds, the failed dataset has restored storage functionality.

在一些实施例中,装置还包括:校验单元,被配置成在向发生故障的数据集异步存储消息队列中的元数据之后,对键值数据集和关系型数据集,进行元数据的一致性校验;更新单元,被配置成若校验结果为不一致,将关系型数据集中的元数据,更新为键值数据集中的元数据。In some embodiments, the device further includes: a verification unit configured to, after asynchronously storing the metadata in the message queue to the failed dataset, perform metadata consistency on the key-value dataset and the relational dataset consistency check; the update unit is configured to update the metadata in the relational dataset to the metadata in the key-value dataset if the check result is inconsistent.

第三方面,本申请实施例提供了一种电子设备,包括:一个或多个处理器;存储装置,用于存储一个或多个程序,当一个或多个程序被一个或多个处理器执行,使得一个或多个处理器实现如数据存储方法中任一实施例的方法。In a third aspect, the embodiment of the present application provides an electronic device, including: one or more processors; a storage device for storing one or more programs, when one or more programs are executed by one or more processors , so that one or more processors implement the method in any embodiment of the data storage method.

第四方面,本申请实施例提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如数据存储方法中任一实施例的方法。In a fourth aspect, the embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the method in any embodiment of the data storage method is implemented.

本申请实施例提供的数据存储方案,首先,获取目标终端设备发送的数据,生成数据的元数据。之后,向键值数据集存储元数据,并向关系型数据集存储元数据。最后,若确定元数据在键值数据集和关系型数据集中任一者的存储发生故障,则将向该者存储的元数据,向预设的消息队列存储,其中,消息队列中的元数据用于与终端设备进行交互。本申请实施例可以引入消息队列实现临时的存储功能,替代发生存储故障的数据集向终端设备提供服务,从而确保终端设备与服务器之间的正常交互,提高了云端服务的安全性。并且,本申请实施例无需使用备份设备,从而无需修改数据的读取流程,这样,在提高云端服务的稳定性的同时,可以避免备份设备带来的成本消耗。In the data storage solution provided by the embodiment of the present application, firstly, the data sent by the target terminal device is acquired, and metadata of the data is generated. After that, store metadata to key-value datasets and store metadata to relational datasets. Finally, if it is determined that the storage of metadata in any one of the key-value data set and the relational data set fails, the metadata stored in the data set will be stored in the preset message queue, wherein the metadata in the message queue Used to interact with end devices. The embodiment of the present application can introduce a message queue to implement a temporary storage function, and provide services to the terminal device instead of a data set that has a storage failure, thereby ensuring normal interaction between the terminal device and the server, and improving the security of cloud services. Moreover, the embodiment of the present application does not need to use a backup device, so that there is no need to modify the data reading process. In this way, while improving the stability of the cloud service, the cost consumption caused by the backup device can be avoided.

附图说明Description of drawings

通过阅读参照以下附图所作的对非限制性实施例所作的详细描述,本申请的其它特征、目的和优点将会变得更明显:Other characteristics, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:

图1是本申请一些实施例可以应用于其中的示例性系统架构图;FIG. 1 is an exemplary system architecture diagram to which some embodiments of the present application can be applied;

图2是根据本申请的数据存储方法的一个实施例的流程图;Fig. 2 is a flow chart according to an embodiment of the data storage method of the present application;

图3是根据本申请的数据存储方法的一个应用场景的示意图;Fig. 3 is a schematic diagram of an application scenario according to the data storage method of the present application;

图4是根据本申请的数据存储方法的又一个实施例的流程图;Fig. 4 is the flowchart according to another embodiment of the data storage method of the present application;

图5是根据本申请的数据存储装置的一个实施例的结构示意图;FIG. 5 is a schematic structural diagram of an embodiment of a data storage device according to the present application;

图6是适于用来实现本申请一些实施例的电子设备的计算机系统的结构示意图。FIG. 6 is a schematic structural diagram of a computer system suitable for implementing electronic devices according to some embodiments of the present application.

具体实施方式Detailed ways

下面结合附图和实施例对本申请作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释相关发明,而非对该发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与有关发明相关的部分。The application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain related inventions, rather than to limit the invention. It should also be noted that, for the convenience of description, only the parts related to the related invention are shown in the drawings.

需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本申请。It should be noted that, in the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and embodiments.

图1示出了可以应用本申请的数据存储方法或数据存储装置的实施例的示例性系统架构100。FIG. 1 shows an exemplary system architecture 100 to which embodiments of the data storage method or data storage device of the present application can be applied.

如图1所示,系统架构100可以包括终端设备101、102、103,网络104和服务器105。网络104用以在终端设备101、102、103和服务器105之间提供通信链路的介质。网络104可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。As shown in FIG. 1 , a system architecture 100 may include terminal devices 101 , 102 , 103 , a network 104 and a server 105 . The network 104 is used as a medium for providing communication links between the terminal devices 101 , 102 , 103 and the server 105 . Network 104 may include various connection types, such as wires, wireless communication links, or fiber optic cables, among others.

用户可以使用终端设备101、102、103通过网络104与服务器105交互,以接收或发送消息等。终端设备101、102、103上可以安装有各种通讯客户端应用,例如视频类应用、直播应用、即时通信工具、邮箱客户端、社交平台软件等。Users can use terminal devices 101 , 102 , 103 to interact with server 105 via network 104 to receive or send messages and the like. Various communication client applications can be installed on the terminal devices 101, 102, 103, such as video applications, live broadcast applications, instant messaging tools, email clients, social platform software, and the like.

这里的终端设备101、102、103可以是硬件,也可以是软件。当终端设备101、102、103为硬件时,可以是具有显示屏的各种电子设备,包括但不限于智能手机、平板电脑、电子书阅读器、膝上型便携计算机和台式计算机等等。当终端设备101、102、103为软件时,可以安装在上述所列举的电子设备中。其可以实现成多个软件或软件模块(例如用来提供分布式服务的多个软件或软件模块),也可以实现成单个软件或软件模块。在此不做具体限定。The terminal devices 101, 102, and 103 here may be hardware or software. When the terminal devices 101, 102, 103 are hardware, they may be various electronic devices with display screens, including but not limited to smartphones, tablet computers, e-book readers, laptop computers, desktop computers, and the like. When the terminal devices 101, 102, 103 are software, they can be installed in the electronic devices listed above. It may be implemented as multiple software or software modules (for example, multiple software or software modules for providing distributed services), or as a single software or software module. No specific limitation is made here.

服务器105可以是提供各种服务的服务器,例如对终端设备101、102、103提供支持的后台服务器。后台服务器可以对接收到的目标终端设备发送的数据请求等数据进行分析等处理,并将处理结果(例如数据请求对应的数据)反馈给终端设备。The server 105 may be a server providing various services, for example, a background server providing support for the terminal devices 101 , 102 , 103 . The background server can analyze and process the received data such as the data request sent by the target terminal device, and feed back the processing result (for example, the data corresponding to the data request) to the terminal device.

需要说明的是,本申请实施例所提供的数据存储方法可以由服务器105或者终端设备101、102、103执行,相应地,数据存储装置可以设置于服务器105或者终端设备101、102、103中。It should be noted that the data storage method provided in the embodiment of the present application can be executed by the server 105 or the terminal equipment 101, 102, 103, and correspondingly, the data storage device can be set in the server 105 or the terminal equipment 101, 102, 103.

应该理解,图1中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。It should be understood that the numbers of terminal devices, networks and servers in Fig. 1 are only illustrative. According to the implementation needs, there can be any number of terminal devices, networks and servers.

继续参考图2,示出了根据本申请的数据存储方法的一个实施例的流程200。该数据存储方法,包括以下步骤:Continuing to refer to FIG. 2 , a flow 200 of an embodiment of the data storage method according to the present application is shown. The data storage method comprises the following steps:

步骤201,获取目标终端设备发送的数据,生成数据的元数据。Step 201, acquire data sent by a target terminal device, and generate metadata of the data.

在本实施例中,数据存储方法的执行主体(例如图1所示的服务器或终端设备)可以获取目标终端设备发送的数据,并生成该数据的元数据(metadata)。元数据可以被称作“关于数据(data)的数据”,即用于描述其它数据的数据。元数据是结构化的数据,在存储系统中,用来支持如指示存储位置、历史数据、资源查找、文件记录等功能。例如,用户的某个文件称为“数据”,在存储系统中,这个文件的元数据可以用于指示这个文件的名称、大小、创建时间、修改时间、所属用户、存储位置等。元数据可以是关于用户的基本信息、数据上传时间、用户IP(Internet Protocol,网际互连协议)、数据的索引等。对于服务器来说,该服务器可以为多个不同应用提供数据访问服务,不同应用的终端设备可以通过不同类型的服务接口向服务器发送元数据访问请求,以获取元数据。In this embodiment, the execution subject of the data storage method (such as the server or the terminal device shown in FIG. 1 ) can obtain the data sent by the target terminal device, and generate metadata of the data. Metadata may be referred to as "data about data", ie, data used to describe other data. Metadata is structured data that is used in storage systems to support functions such as indicating storage locations, historical data, resource lookup, and file records. For example, a user's file is called "data". In the storage system, the metadata of this file can be used to indicate the name, size, creation time, modification time, user, storage location, etc. of the file. Metadata may be basic information about the user, data upload time, user IP (Internet Protocol, Internet Protocol), data index, and the like. For the server, the server can provide data access services for multiple different applications, and terminal devices of different applications can send metadata access requests to the server through different types of service interfaces to obtain metadata.

步骤202,向键值数据集存储元数据,并向关系型数据集存储元数据。Step 202, storing metadata in key-value datasets, and storing metadata in relational datasets.

在本实施例中,上述执行主体可以向键值数据集存储上述元数据,并向关系型数据集存储上述元数据。键值数据集和关系型数据集可以设置于同一台服务器,也可以设置于服务器集群中的不同服务器中。键值(key-value,K-V)数据集中的数据以键值对的形式排列。关系型数据集可以实现元数据的枚举,比如关系型数据集可以是mysql数据库。In this embodiment, the execution subject may store the metadata in the key-value dataset, and store the metadata in the relational dataset. Key-value datasets and relational datasets can be set on the same server, or on different servers in the server cluster. The data in the key-value (key-value, K-V) dataset is arranged in the form of key-value pairs. Relational datasets can implement metadata enumeration, for example, relational datasets can be mysql databases.

在实践中,上述执行主体可以按照各种顺序,向键值数据集和关系型数据集中存储元数据。比如,上述执行主体可以同时向这两个数据集中存储元数据。In practice, the above execution subjects can store metadata in key-value datasets and relational datasets in various orders. For example, the above execution subject may store metadata in the two data sets at the same time.

存储于键值数据集中的元数据和存储于关系型数据集中的元数据的数据结构不同,此外,所存储的元数据的呈现方式也可以存在差异。比如,键值数据集的存储性能优异、吞吐量大,但是其中不存在枚举的清单(list)且无法实现枚举功能。The data structure of the metadata stored in the key-value dataset is different from the metadata stored in the relational dataset. In addition, the presentation methods of the stored metadata may also be different. For example, the key-value data set has excellent storage performance and high throughput, but there is no enumeration list (list) in it and the enumeration function cannot be realized.

步骤203,若确定元数据在键值数据集和关系型数据集中任一者的存储发生故障,则将向该者存储的元数据,向预设的消息队列存储,其中,消息队列中的元数据用于与终端设备进行交互。Step 203, if it is determined that the storage of metadata in any one of the key-value data set and the relational data set fails, store the metadata stored in the one in the preset message queue, wherein the metadata in the message queue The data is used to interact with end devices.

在本实施例中,若确定在上述存储元数据的过程中,向键值数据集存储元数据的过程发生故障,则上述执行主体可以将向键值数据集存储的元数据,存储至预设的消息队列中。若确定在上述存储元数据的过程中,向关系型数据集存储元数据的过程发生故障,则上述执行主体可以将向该关系型数据集存储的元数据,存储至预设的消息队列中。In this embodiment, if it is determined that the process of storing metadata to the key-value dataset fails during the process of storing metadata, the execution subject may store the metadata stored in the key-value dataset to the preset in the message queue. If it is determined that the process of storing metadata to the relational dataset fails during the process of storing metadata, the execution subject may store the metadata stored in the relational dataset into a preset message queue.

消息队列中的元数据可以用于与终端设备进行元数据的交互。在上述执行主体向消息队列存储元数据之后,终端设备可以从消息队列中获取上述元数据。比如,上述终端设备可以上传用于请求元数据的数据请求,上述执行主体可以在消息队列中查找该元数据。The metadata in the message queue can be used to exchange metadata with the terminal device. After the execution subject stores the metadata in the message queue, the terminal device can obtain the metadata from the message queue. For example, the above-mentioned terminal device may upload a data request for requesting metadata, and the above-mentioned execution subject may search for the metadata in a message queue.

本实施例可以引入消息队列实现临时的存储功能,替代发生存储故障的数据集向终端设备提供服务,从而确保终端设备与服务器之间的正常交互,提高了云端服务的安全性。并且,本实施例无需使用备份设备,从而无需修改数据的读取流程,这样,在提高云端服务的稳定性的同时,可以避免备份设备带来的成本消耗。In this embodiment, a message queue can be introduced to implement a temporary storage function, and provide services to the terminal device instead of a data set that has a storage failure, thereby ensuring normal interaction between the terminal device and the server, and improving the security of cloud services. Moreover, this embodiment does not need to use a backup device, so that there is no need to modify the data reading process. In this way, while improving the stability of the cloud service, the cost consumption caused by the backup device can be avoided.

继续参见图3,图3是根据本实施例的数据存储方法的应用场景的一个示意图。在图3的应用场景中,执行主体301可以获取张三的终端设备发送的数据302,生成数据的元数据303。执行主体301向键值数据集304存储元数据303,并向关系型数据集305存储元数据303。执行主体301若确定元数据在键值数据集和关系型数据集中任一者的存储发生故障,将向该者存储的元数据,存储至预设的消息队列306,其中,消息队列中的元数据用于与终端设备进行交互。Continue referring to FIG. 3 , which is a schematic diagram of an application scenario of the data storage method according to this embodiment. In the application scenario of FIG. 3 , the execution subject 301 can obtain the data 302 sent by Zhang San's terminal device, and generate metadata 303 of the data. The execution subject 301 stores the metadata 303 in the key-value dataset 304 and stores the metadata 303 in the relational dataset 305 . If the execution subject 301 determines that the storage of metadata in any one of the key-value data set and the relational data set fails, it will store the metadata stored in the person in the preset message queue 306, wherein the metadata in the message queue The data is used to interact with end devices.

进一步参考图4,其示出了数据存储方法的又一个实施例的流程400。该数据存储方法的流程400,包括以下步骤:Further referring to FIG. 4 , it shows a flow 400 of another embodiment of the data storage method. The process 400 of the data storage method includes the following steps:

步骤401,获取目标终端设备发送的数据,生成数据的元数据。Step 401, acquire data sent by a target terminal device, and generate metadata of the data.

在本实施例中,数据存储方法的执行主体(例如图1所示的服务器或终端设备)可以获取目标终端设备发送的数据,并生成该数据的元数据。元数据可以被称作“关于数据的数据”,即用于描述其它数据的数据。元数据是结构化的数据,在存储系统中,用来支持如指示存储位置、历史数据、资源查找、文件记录等功能。例如,用户的某个文件称为“数据”,在存储系统中,这个文件的元数据一般用于指示这个文件的名称、大小、创建时间、修改时间、所属用户、存储位置等。In this embodiment, the execution body of the data storage method (such as the server or the terminal device shown in FIG. 1 ) can obtain the data sent by the target terminal device, and generate metadata of the data. Metadata may be referred to as "data about data", ie, data used to describe other data. Metadata is structured data that is used in storage systems to support functions such as indicating storage locations, historical data, resource lookup, and file records. For example, a user's file is called "data". In the storage system, the metadata of this file is generally used to indicate the name, size, creation time, modification time, user, storage location, etc. of the file.

步骤402,向键值数据集存储元数据,并向关系型数据集存储元数据。Step 402, storing metadata in key-value datasets, and storing metadata in relational datasets.

在本实施例中,上述执行主体可以向键值数据集存储上述元数据,并向关系型数据集存储上述元数据。键值数据集和关系型数据集可以设置于同一台服务器,也可以设置于服务器集群中的不同服务器中。键值数据集中的数据以键值对的形式排列。关系型数据集可以实现元数据的枚举,比如关系型数据集可以是mysql数据库。In this embodiment, the execution subject may store the metadata in the key-value dataset, and store the metadata in the relational dataset. Key-value datasets and relational datasets can be set on the same server, or on different servers in the server cluster. Data in a key-value dataset is arranged in key-value pairs. Relational datasets can implement metadata enumeration, for example, relational datasets can be mysql databases.

步骤403,若确定元数据在键值数据集和关系型数据集中任一者的存储发生故障,将向该者存储的元数据,存储至预设的消息队列,其中,消息队列中的元数据用于与终端设备进行交互。Step 403, if it is determined that the storage of metadata in any one of the key-value data set and the relational data set fails, store the metadata stored in the person in the preset message queue, wherein the metadata in the message queue Used to interact with end devices.

在本实施例中,若确定在上述存储元数据的过程中,向键值数据集存储元数据的过程发生故障,则可以将向键值数据集存储的元数据,存储至预设的消息队列中。若确定在上述存储元数据的过程中,向关系型数据集存储元数据的过程发生故障,则可以将向该关系型数据集存储的元数据,存储至预设的消息队列中。In this embodiment, if it is determined that in the above process of storing metadata, the process of storing metadata to the key-value data set fails, the metadata stored in the key-value data set can be stored in the preset message queue middle. If it is determined that the process of storing metadata to the relational dataset fails during the above process of storing metadata, the metadata stored in the relational dataset may be stored in a preset message queue.

步骤404,响应于监听到消息队列中加入了新的元数据,利用退避算法,向发生故障的数据集异步存储新的元数据,其中,异步存储成功时,发生故障的数据集已恢复存储功能。Step 404, in response to hearing that new metadata has been added to the message queue, use the backoff algorithm to asynchronously store new metadata to the failed dataset, wherein, when the asynchronous storage is successful, the failed dataset has resumed its storage function .

在本实施例中,上述执行主体若监听到消息队列中新加入了元数据,则可以利用退避算法,异步地将消息队列中的元数据,向发生故障的数据集(也即键值数据集或关系型数据集)存储。具体地,上述执行主体可以将消息队列中的二进制的元数据,转换为非二进制的、用于向键值数据集或关系型数据集存储的元数据,并将转换得到的元数据存储到该数据集中。该存储过程的结果可以是成功或者不成功。In this embodiment, if the above-mentioned executive body detects that metadata has been added to the message queue, it can use the backoff algorithm to asynchronously transfer the metadata in the message queue to the failed data set (that is, the key-value data set) or relational data set) storage. Specifically, the above-mentioned executive body can convert the binary metadata in the message queue into non-binary metadata for storage in key-value datasets or relational datasets, and store the converted metadata in the data set. The result of this stored procedure can be successful or unsuccessful.

在实践中,上述执行主体可以向发生故障的数据集存储消息队列中的元数据。此时该数据集的存储功能可能未恢复,这样可能造成写入的失败。上述执行主体会(定时)按照退避算法,尝试向该数据集进行元数据的存储,直到元数据存储成功。In practice, the above execution subject can store the metadata in the message queue to the failed dataset. At this time, the storage function of the data set may not be restored, which may cause the failure of writing. The above execution subject will (timingly) try to store metadata in the data set according to the back-off algorithm until the metadata storage is successful.

本实施例中利用退避算法在数据集恢复存储功能的情况下,及时恢复元数据在该数据集的存储,从而让服务设备恢复正常运行。并且,异步存储可以避免运行资源的过多占用,节约运行资源。In this embodiment, the back-off algorithm is used to restore the storage of metadata in the data set in time when the data set restores the storage function, so that the service device can resume normal operation. Moreover, asynchronous storage can avoid excessive occupation of operating resources and save operating resources.

在本实施例的一些可选的实现方式中,在步骤404之后,上述方法还可以包括:对键值数据集和关系型数据集,进行元数据的一致性校验;若校验结果为不一致,将关系型数据集中的元数据,更新为键值数据集中的元数据。In some optional implementations of this embodiment, after step 404, the above method may further include: performing metadata consistency check on the key-value dataset and the relational dataset; if the check result is inconsistent , to update the metadata in the relational dataset to the metadata in the key-value dataset.

在这些可选的实现方式中,上述执行主体可以对键值数据集中的元数据,和关系型数据集中的元数据进行一致性校验。如果校验的结果为不一致,则上述执行主体可以依照键值数据集中的元数据,对关系型数据集中的元数据进行更新。具体地,上述执行主体可以对关系型数据集中的元数据进行更新,以使更新后的关系型数据集中的元数据与键值数据集中的元数据一致。In these optional implementation manners, the above execution subject may perform consistency check on the metadata in the key-value dataset and the metadata in the relational dataset. If the result of the verification is inconsistent, the execution subject may update the metadata in the relational dataset according to the metadata in the key-value dataset. Specifically, the execution subject may update the metadata in the relational dataset, so that the updated metadata in the relational dataset is consistent with the metadata in the key-value dataset.

这些实现方式可以避免键值数据集中的元数据与关系型数据集中的元数据的不一致所导致的服务出错,确保两个数据集的元数据之间的一致性。These implementations can avoid service errors caused by the inconsistency between the metadata in the key-value dataset and the metadata in the relational dataset, and ensure the consistency between the metadata of the two datasets.

在上述任一实施例的一些可选的实现方式中,上述向键值数据集存储元数据,并向关系型数据集存储元数据,可以包括:向键值数据集存储元数据;响应于向键值数据集存储元数据成功,向关系型数据集存储元数据;其中,键值数据集、关系型数据集,以及消息队列均存在至少一个数据备份。In some optional implementations of any of the above embodiments, storing metadata to the key-value dataset and storing metadata to the relational dataset may include: storing metadata to the key-value dataset; responding to The key-value dataset stores metadata successfully, and stores metadata to the relational dataset; wherein, there is at least one data backup in the key-value dataset, relational dataset, and message queue.

在这些可选的实现方式中,上述执行主体可以依次向键值数据集和关系型数据集中存储元数据。具体地,上述执行主体可以在向键值数据集存储元数据成功,即存储元数据完毕的情况下,再向上述关系型数据集存储相关的元数据。In these optional implementation manners, the above execution subject may sequentially store metadata in the key-value dataset and the relational dataset. Specifically, the execution subject may store related metadata in the relational dataset after the metadata is successfully stored in the key-value dataset, that is, the metadata is stored.

键值数据集可以是用于与终端设备进行交互的数据集,上述执行主体或者其他执行主体可以在键值数据集中查找终端设备的数据请求所请求的元数据。而关系型数据集可以并不用于与终端设备进行交互,仅仅用于元数据的详细存储。The key-value data set may be a data set for interacting with the terminal device, and the above execution subject or other execution subjects may search the key-value data set for the metadata requested by the data request of the terminal device. The relational data set may not be used for interaction with terminal devices, but only for detailed storage of metadata.

这些实现方式可以首先向键值数据集存储元数据,从而确保及时向用户提供与该元数据相关的服务。而如果首先向关系型数据集存储元数据,所存储的元数据并不能用于与终端设备进行交互,可能造成向用户返回数据的延迟。此外,通过在分布式设备集群中存储元数据的数据备份,可以确保元数据的安全性。These implementations can first store metadata to the key-value dataset, so as to ensure that services related to the metadata are provided to users in a timely manner. However, if the metadata is first stored in the relational dataset, the stored metadata cannot be used to interact with the terminal device, which may cause a delay in returning data to the user. In addition, metadata security can be ensured by storing data backups of metadata in distributed device clusters.

在上述任一实施例的一些可选的实现方式中,键值数据集、关系型数据集,以及消息队列,存在于分布式设备集群中。In some optional implementation manners of any of the foregoing embodiments, the key-value data set, the relational data set, and the message queue exist in a distributed device cluster.

在这些可选的实现方式中,键值数据集、关系型数据集和消息队列可以在同一个分布式设备集群中。这样,无需采用其他的备份数据,仅采用分布式设备集群内的设备即可以实现元数据的临时存储,提高分布式设备集群的服务的稳定性。In these optional implementations, key-value datasets, relational datasets, and message queues can be in the same distributed device cluster. In this way, temporary storage of metadata can be realized only by using devices in the distributed device cluster without using other backup data, and the service stability of the distributed device cluster can be improved.

在上述任一实施例的一些可选的实现方式中,上述若确定元数据在键值数据集和关系型数据集中任一者的存储发生故障,则将向该者存储的元数据,向预设的消息队列存储,可以包括:若确定元数据在键值数据集的存储发生故障,同步将向键值数据集存储的元数据转换为二进制的元数据,得到第一二进制元数据,并向消息队列存储第一二进制元数据;或若确定元数据在关系型数据集的存储发生故障,同步将向关系型数据集存储的元数据转换为二进制的元数据,得到第二二进制元数据,并向消息队列存储第二二进制元数据。In some optional implementations of any of the above embodiments, if it is determined that the storage of metadata in any one of the key-value data set and the relational data set fails, the metadata stored in that one will be sent to the preset The set message queue storage may include: if it is determined that the storage of the metadata in the key-value data set fails, synchronously converting the metadata stored in the key-value data set into binary metadata to obtain the first binary metadata, And store the first binary metadata to the message queue; or if it is determined that the storage of the metadata in the relational dataset fails, synchronously convert the metadata stored in the relational dataset into binary metadata to obtain the second binary metadata binary metadata, and store the second binary metadata in the message queue.

在这些可选的实现方式中,上述执行主体可以同步向消息队列中存储元数据。所存储的元数据可以是二进制的。具体地,若向上述键值数据集存储元数据的过程发生故障,上述执行主体可以将向数值数据集存储的元数据,转换为二进制,从而得到二进制的元数据,将该二进制的元数据作为第一二进制元数据。上述执行主体可以将该第一二进制元数据存储至消息队列中。此外,如果向上述关系型数据集存储元数据的过程发送故障,上述执行主体可以向该关系型数据集存储的元数据,转换为二进制,得到二进制的元数据,并将该二进制的元数据作为第二二进制元数据。上述执行主体可以将该第二二进制元数据存储至消息队列中。In these optional implementation manners, the execution subject may store metadata in the message queue synchronously. The stored metadata may be binary. Specifically, if the process of storing metadata to the above-mentioned key-value data set fails, the above-mentioned executive body can convert the metadata stored in the value data set into binary to obtain binary metadata, and use the binary metadata as First binary metadata. The aforementioned execution subject may store the first binary metadata in a message queue. In addition, if a failure is sent to the process of storing metadata in the relational dataset, the execution subject can convert the metadata stored in the relational dataset into binary to obtain binary metadata, and use the binary metadata as Second binary metadata. The above execution subject may store the second binary metadata in a message queue.

在这些实现方式中,向消息队列中存储元数据的过程可以为同步存储,从而确保及时向消息队列中存储元数据,进而用于与终端设备进行实时交互。通过转换为二进制进行存储,可以实现消息队列中元数据的形式的相对统一。In these implementation manners, the process of storing metadata in the message queue may be synchronous storage, so as to ensure that the metadata is stored in the message queue in a timely manner, and then used for real-time interaction with the terminal device. By converting to binary for storage, the relative unity of the form of metadata in the message queue can be achieved.

在上述任一实施例的一些可选的实现方式中,上述方法还可以包括:响应于确定向消息队列存储元数据成功,将向消息队列存储的元数据写入分布式缓存区;响应于接收到终端设备的数据请求,在分布式缓存区中查找数据请求对应的元数据,基于查找到的元数据向该终端设备进行反馈;响应于接收到终端设备的数据请求,在分布式缓存区中查找数据请求对应的元数据,若未查找到,在消息队列中查找数据请求对应的元数据,基于在消息队列中查找到的元数据向该终端设备进行反馈。In some optional implementations of any of the above embodiments, the above method may further include: in response to determining that the metadata stored in the message queue is successful, writing the metadata stored in the message queue into the distributed cache; in response to receiving For the data request to the terminal device, look up the metadata corresponding to the data request in the distributed cache, and feed back to the terminal device based on the found metadata; in response to receiving the data request from the terminal device, in the distributed cache Search for the metadata corresponding to the data request, if not found, search for the metadata corresponding to the data request in the message queue, and feed back to the terminal device based on the metadata found in the message queue.

在这些可选的实现方式中,上述执行主体可以将写入消息队列的元数据,写入分布式缓存区(cache)中。分布式缓存区可以是消息队列所在设备上的缓存区,也可以是消息队列所在的分布式设备集群中的分布式缓存区。具体地,上述执行主体可以响应于向消息队列存储元数据成功,再向分布式缓存区中存储元数据。在这里,向分布式缓存区中存储的元数据,可以是非二进制的元数据,比如分布式缓存区中存储的元数据的形式可以为向故障的数据集中存储的元数据的形式。In these optional implementation manners, the execution subject may write the metadata written into the message queue into a distributed cache (cache). The distributed cache area may be a cache area on the device where the message queue is located, or a distributed cache area in a distributed device cluster where the message queue is located. Specifically, the execution subject may store the metadata in the distributed cache in response to the success of storing the metadata in the message queue. Here, the metadata stored in the distributed cache may be non-binary metadata, for example, the metadata stored in the distributed cache may be in the form of metadata stored in the faulty dataset.

在实践中,上述执行主体在接收到终端设备发送的,或者其他设备转发的数据请求之后,可以优先在分布式缓存区中查找数据请求所请求的元数据。如果查找到了,则上述执行主体可以向终端设备返回查找到的元数据。如果未查找到,则上述执行主体可以在消息队列中查找数据请求所请求的元数据。之后,上述执行主体可以将查找到的元数据反馈给发送数据请求的终端设备,或者对查找到的元数据进行预设的处理(比如压缩、打包等),将处理结果反馈给该终端设备。In practice, after receiving the data request sent by the terminal device or forwarded by other devices, the execution subject may preferentially look up the metadata requested by the data request in the distributed cache. If found, the execution subject may return the found metadata to the terminal device. If not found, the above execution subject may search the message queue for the metadata requested by the data request. Afterwards, the execution subject may feed back the found metadata to the terminal device that sent the data request, or perform preset processing (such as compression, packaging, etc.) on the found metadata, and feed back the processing result to the terminal device.

这些实现方式可以优先从缓存区中查找终端设备所需的元数据,从而能够利用缓存区提高向终端设备反馈元数据的效率。并且,这些实现方式利用了分布式缓存区,可以系统地向缓存中存储多样而丰富的数据。These implementation manners can preferentially search the metadata required by the terminal device from the cache area, so that the cache area can be used to improve the efficiency of feeding back metadata to the terminal device. Moreover, these implementations utilize the distributed cache area, which can systematically store various and rich data in the cache.

进一步参考图5,作为对上述各图所示方法的实现,本申请提供了一种数据存储装置的一个实施例,该装置实施例与图2所示的方法实施例相对应,除下面所记载的特征外,该装置实施例还可以包括与图2所示的方法实施例相同或相应的特征或效果。该装置具体可以应用于各种电子设备中。With further reference to Figure 5, as an implementation of the methods shown in the above figures, the present application provides an embodiment of a data storage device, which corresponds to the method embodiment shown in Figure 2, except for the following In addition to the features, the device embodiment may also include the same or corresponding features or effects as those of the method embodiment shown in FIG. 2 . The device can be specifically applied to various electronic devices.

如图5所示,本实施例的数据存储装置500包括:获取单元501、存储单元502和队列加入单元503。其中,获取单元501,被配置成获取目标终端设备发送的数据,生成数据的元数据;存储单元502,被配置成向键值数据集存储元数据,并向关系型数据集存储元数据;队列加入单元503,被配置成若确定元数据在键值数据集和关系型数据集中任一者的存储发生故障,则将向该者存储的元数据,向预设的消息队列存储,其中,消息队列中的元数据用于与终端设备进行交互。As shown in FIG. 5 , the data storage device 500 of this embodiment includes: an obtaining unit 501 , a storage unit 502 and a queue adding unit 503 . Among them, the acquisition unit 501 is configured to acquire the data sent by the target terminal device, and generate metadata of the data; the storage unit 502 is configured to store metadata to the key-value dataset, and store metadata to the relational dataset; queue The adding unit 503 is configured to store the metadata stored in the key-value data set and the relational data set in a preset message queue if it is determined that the storage of the metadata fails in the key-value data set or the relational data set, wherein the message The metadata in the queue is used to interact with end devices.

在一些实施例中,数据存储装置500的获取单元501以获取目标终端设备发送的数据,并生成该数据的元数据。元数据可以被称作“关于数据的数据”,即用于描述其它数据的数据。元数据是结构化的数据,在存储系统中,用来支持如指示存储位置、历史数据、资源查找、文件记录等功能。In some embodiments, the acquiring unit 501 of the data storage device 500 acquires data sent by a target terminal device, and generates metadata of the data. Metadata may be referred to as "data about data", ie, data used to describe other data. Metadata is structured data that is used in storage systems to support functions such as indicating storage locations, historical data, resource lookup, and file records.

在一些实施例中,存储单元502可以向键值数据集存储上述元数据,并向关系型数据集存储上述元数据。键值数据集和关系型数据集可以设置于同一台服务器,也可以设置于服务器集群中的不同服务器中。键值数据集中的数据以键值对的形式排列。In some embodiments, the storage unit 502 may store the above-mentioned metadata in key-value datasets, and store the above-mentioned metadata in relational datasets. Key-value datasets and relational datasets can be set on the same server, or on different servers in the server cluster. Data in a key-value dataset is arranged in key-value pairs.

在一些实施例中,队列加入单元503可以将向键值数据集存储的元数据,存储至预设的消息队列中。若确定在上述存储元数据的过程中,向关系型数据集存储元数据的过程发生故障,则上述执行主体可以将向该关系型数据集存储的元数据,存储至预设的消息队列中。In some embodiments, the queue adding unit 503 may store the metadata stored in the key-value data set into a preset message queue. If it is determined that the process of storing metadata to the relational dataset fails during the process of storing metadata, the execution subject may store the metadata stored in the relational dataset into a preset message queue.

在本实施例的一些可选的实现方式中,键值数据集、关系型数据集,以及消息队列,存在于分布式设备集群中。In some optional implementations of this embodiment, the key-value data set, the relational data set, and the message queue exist in a distributed device cluster.

在本实施例的一些可选的实现方式中,队列加入单元,进一步被配置成:若确定元数据在键值数据集的存储发生故障,同步将向键值数据集存储的元数据转换为二进制的元数据,得到第一二进制元数据,并向消息队列存储第一二进制元数据;或若确定元数据在关系型数据集的存储发生故障,同步将向关系型数据集存储的元数据转换为二进制的元数据,得到第二二进制元数据,并向消息队列存储第二二进制元数据。In some optional implementations of this embodiment, the queue joining unit is further configured to: if it is determined that the storage of metadata in the key-value dataset fails, synchronously convert the metadata stored in the key-value dataset into binary metadata, get the first binary metadata, and store the first binary metadata in the message queue; or if it is determined that the storage of the metadata in the relational dataset fails, the synchronization will store the metadata in the relational dataset The metadata is converted into binary metadata to obtain second binary metadata, and the second binary metadata is stored in the message queue.

在本实施例的一些可选的实现方式中,存储单元,进一步被配置成:向键值数据集存储元数据;响应于向键值数据集存储元数据成功,向关系型数据集存储元数据;其中,键值数据集、关系型数据集,以及消息队列均存在至少一个数据备份。In some optional implementations of this embodiment, the storage unit is further configured to: store metadata in the key-value dataset; store metadata in the relational dataset in response to success in storing metadata in the key-value dataset ; Among them, there is at least one data backup in the key-value data set, the relational data set, and the message queue.

在本实施例的一些可选的实现方式中,装置还包括:写入单元,被配置成响应于确定向消息队列存储元数据成功,将向消息队列存储的元数据写入分布式缓存区;第一查找单元,被配置成响应于接收到终端设备的数据请求,在分布式缓存区中查找数据请求对应的元数据,基于查找到的元数据向该终端设备进行反馈;第二查找单元,被配置成响应于接收到终端设备的数据请求,在分布式缓存区中查找数据请求对应的元数据,若未查找到,在消息队列中查找数据请求对应的元数据,基于在消息队列中查找到的元数据向该终端设备进行反馈。In some optional implementations of this embodiment, the device further includes: a writing unit configured to, in response to determining that the metadata is successfully stored in the message queue, write the metadata stored in the message queue into the distributed cache; The first search unit is configured to, in response to receiving a data request from a terminal device, search for metadata corresponding to the data request in the distributed cache, and feed back to the terminal device based on the found metadata; the second search unit, It is configured to search the metadata corresponding to the data request in the distributed cache in response to receiving the data request from the terminal device, and if not found, search the message queue for the metadata corresponding to the data request, based on the search in the message queue The received metadata is fed back to the terminal device.

在本实施例的一些可选的实现方式中,装置还包括:退避单元,被配置成响应于监听到消息队列中加入了新的元数据,利用退避算法,向发生故障的数据集异步存储新的元数据,其中,异步存储成功时,发生故障的数据集已恢复存储功能。In some optional implementations of this embodiment, the device further includes: a backoff unit configured to, in response to detecting that new metadata has been added to the message queue, use a backoff algorithm to asynchronously store new metadata to the failed dataset. Metadata where, when asynchronous storage succeeds, the failed dataset has restored storage functionality.

在本实施例的一些可选的实现方式中,装置还包括:校验单元,被配置成在向发生故障的数据集异步存储消息队列中的元数据之后,对键值数据集和关系型数据集,进行元数据的一致性校验;更新单元,被配置成若校验结果为不一致,将关系型数据集中的元数据,更新为键值数据集中的元数据。In some optional implementations of this embodiment, the device further includes: a checking unit configured to check the key-value dataset and the relational data The set is used to verify the consistency of the metadata; the update unit is configured to update the metadata in the relational dataset to the metadata in the key-value dataset if the verification result is inconsistent.

本实施例可以引入消息队列实现临时的存储功能,替代发生存储故障的数据集向终端设备提供服务,从而确保终端设备与服务器之间的正常交互,提高了云端服务的安全性。并且,本实施例无需使用备份设备,从而无需修改数据的读取流程,这样,在提高云端服务的稳定性的同时,可以避免备份设备带来的成本消耗。In this embodiment, a message queue can be introduced to implement a temporary storage function, and provide services to the terminal device instead of a data set that has a storage failure, thereby ensuring normal interaction between the terminal device and the server, and improving the security of cloud services. Moreover, this embodiment does not need to use a backup device, so that there is no need to modify the data reading process. In this way, while improving the stability of the cloud service, the cost consumption caused by the backup device can be avoided.

如图6所示,电子设备600可以包括处理装置(例如中央处理器、图形处理器等)601,其可以根据存储在只读存储器(ROM)602中的程序或者从存储装置608加载到随机访问存储器(RAM)603中的程序而执行各种适当的动作和处理。在RAM 603中,还存储有电子设备600操作所需的各种程序和数据。处理装置601、ROM 602以及RAM603通过总线604彼此相连。输入/输出(I/O)接口605也连接至总线604。As shown in FIG. 6, an electronic device 600 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 601, which may be randomly accessed according to a program stored in a read-only memory (ROM) 602 or loaded from a storage device 608. Various appropriate actions and processes are executed by programs in the memory (RAM) 603 . In the RAM 603, various programs and data necessary for the operation of the electronic device 600 are also stored. The processing device 601 , ROM 602 , and RAM 603 are connected to each other through a bus 604 . An input/output (I/O) interface 605 is also connected to the bus 604 .

通常,以下装置可以连接至I/O接口605:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置606;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置607;包括例如磁带、硬盘等的存储装置608;以及通信装置609。通信装置609可以允许电子设备600与其他设备进行无线或有线通信以交换数据。虽然图6示出了具有各种装置的电子设备600,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。图6中示出的每个方框可以代表一个装置,也可以根据需要代表多个装置。Typically, the following devices can be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a liquid crystal display (LCD), speaker, vibration an output device 607 such as a computer; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While FIG. 6 shows electronic device 600 having various means, it should be understood that implementing or having all of the means shown is not a requirement. More or fewer means may alternatively be implemented or provided. Each block shown in FIG. 6 may represent one device, or may represent multiple devices as required.

特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置609从网络上被下载和安装,或者从存储装置608被安装,或者从ROM 602被安装。在该计算机程序被处理装置601执行时,执行本公开的实施例的方法中限定的上述功能。需要说明的是,本公开的实施例的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开的实施例中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开的实施例中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, where the computer program includes program codes for executing the methods shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via communication means 609 , or from storage means 608 , or from ROM 602 . When the computer program is executed by the processing device 601, the above-mentioned functions defined in the methods of the embodiments of the present disclosure are executed. It should be noted that the computer-readable medium in the embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two. A computer readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable Programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above. In the embodiments of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the embodiments of the present disclosure, however, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code therein. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can transmit, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device . Program code embodied on a computer readable medium may be transmitted by any appropriate medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

附图中的流程图和框图,图示了按照本申请各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in a flowchart or block diagram may represent a module, program segment, or portion of code that contains one or more logical functions for implementing specified executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved. It should also be noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by a dedicated hardware-based system that performs the specified functions or operations , or may be implemented by a combination of dedicated hardware and computer instructions.

描述于本申请实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的单元也可以设置在处理器中,例如,可以描述为:一种处理器包括获取单元、存储单元和队列加入单元。其中,这些单元的名称在某种情况下并不构成对该单元本身的限定,例如,获取单元还可以被描述为“获取目标终端设备发送的数据,生成数据的元数据的单元”。The units involved in the embodiments described in the present application may be implemented by means of software or by means of hardware. The described units may also be set in a processor, for example, it may be described as: a processor includes an acquisition unit, a storage unit, and a queue adding unit. Wherein, the names of these units do not constitute a limitation on the unit itself under certain circumstances, for example, the acquisition unit may also be described as "a unit that acquires data sent by the target terminal device and generates metadata of the data".

作为另一方面,本申请还提供了一种计算机可读介质,该计算机可读介质可以是上述实施例中描述的装置中所包含的;也可以是单独存在,而未装配入该装置中。上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该装置执行时,使得该装置:获取目标终端设备发送的数据,生成数据的元数据;向键值数据集存储元数据,并向关系型数据集存储元数据;若确定元数据在键值数据集和关系型数据集中任一者的存储发生故障,则将向该者存储的元数据,向预设的消息队列存储,其中,消息队列中的元数据用于与终端设备进行交互。As another aspect, the present application also provides a computer-readable medium. The computer-readable medium may be included in the device described in the above embodiments, or it may exist independently without being assembled into the device. The above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the device, the device: acquires the data sent by the target terminal device, generates metadata of the data; stores the data in the key-value data set Metadata, and store metadata in relational datasets; if it is determined that the storage of metadata in any one of the key-value datasets and relational datasets fails, the metadata stored in that one will be sent to the preset message Queue storage, where metadata in message queues is used to interact with end devices.

以上描述仅为本申请的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本申请中所涉及的发明范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述发明构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本申请中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。The above description is only a preferred embodiment of the present application and an illustration of the applied technical principles. Those skilled in the art should understand that the scope of the invention involved in this application is not limited to the technical solution formed by the specific combination of the above-mentioned technical features, and should also cover the technical solution formed by the above-mentioned technical features or Other technical solutions formed by any combination of equivalent features. For example, a technical solution formed by replacing the above-mentioned features with technical features with similar functions disclosed in (but not limited to) this application.

Claims (15)

1. A method of data storage, the method comprising:
acquiring data sent by target terminal equipment and generating metadata of the data;
storing the metadata to a key-value dataset and storing the metadata to a relational dataset;
if the metadata is determined to have a fault in the storage of any one of the key value data set and the relational data set, storing the metadata stored to the corresponding key value data set and the relational data set into a preset message queue, wherein the metadata in the message queue are used for interaction with terminal equipment;
the storing the metadata to a key-value dataset and storing the metadata to a relational dataset includes:
storing the metadata to the key-value dataset;
in response to successful storage of the metadata to the key-value dataset, the metadata is stored to the relational dataset.
2. The method of claim 1, wherein,
the key-value dataset, the relational dataset, and the message queue are present in a distributed device cluster.
3. The method of claim 1, wherein if it is determined that the metadata fails to store in any one of the key-value data set and the relational data set, storing the metadata stored to the one in a preset message queue, including:
If the metadata are determined to have faults in the storage of the key value data set, the metadata stored in the key value data set are synchronously converted into binary metadata, first binary metadata are obtained, and the first binary metadata are stored in the message queue;
or (b)
If the metadata are determined to have faults in the storage of the relational data set, the metadata stored in the relational data set are synchronously converted into binary metadata, second binary metadata are obtained, and the second binary metadata are stored in the message queue.
4. The method of claim 1, wherein the key-value dataset, the relational dataset, and the message queue each have at least one data backup.
5. The method of claim 1, wherein the method further comprises:
writing the metadata stored to the message queue to a distributed cache in response to determining that the metadata was successfully stored to the message queue;
responding to a received data request of the terminal equipment, searching metadata corresponding to the data request in the distributed cache area, and feeding back to the terminal equipment based on the searched metadata;
And searching metadata corresponding to the data request in the distributed cache area in response to receiving the data request of the terminal equipment, and if the metadata corresponding to the data request is not searched, searching the metadata corresponding to the data request in the message queue, and feeding back the metadata searched in the message queue to the terminal equipment.
6. The method of claim 1, wherein the method further comprises:
and in response to the fact that new metadata is added into the message queue, asynchronously storing the new metadata into the data set with faults by utilizing a back-off algorithm, wherein the data set with faults has restored the storage function when asynchronous storage is successful.
7. The method of claim 6, wherein after asynchronously storing metadata in the message queue to the failed dataset, the method further comprises:
performing consistency verification on metadata on the key value data set and the relational data set;
and if the verification result is inconsistent, updating the metadata in the relational data set into the metadata in the key value data set.
8. A data storage device, the device comprising:
An acquisition unit configured to acquire data transmitted by a target terminal device, and generate metadata of the data;
a storage unit configured to store the metadata to a key-value dataset and store the metadata to a relational dataset;
a queue adding unit configured to store metadata stored to any one of the key value data set and the relational data set into a preset message queue if it is determined that the metadata is stored in the one of the key value data set and the relational data set fails, wherein the metadata in the message queue is used for interaction with a terminal device;
the memory unit is further configured to:
storing the metadata to the key-value dataset;
in response to successful storage of the metadata to the key-value dataset, the metadata is stored to the relational dataset.
9. The apparatus of claim 8, wherein the queue joining unit is further configured to:
if the metadata are determined to have faults in the storage of the key value data set, the metadata stored in the key value data set are synchronously converted into binary metadata, first binary metadata are obtained, and the first binary metadata are stored in the message queue;
Or (b)
If the metadata are determined to have faults in the storage of the relational data set, the metadata stored in the relational data set are synchronously converted into binary metadata, second binary metadata are obtained, and the second binary metadata are stored in the message queue.
10. The apparatus of claim 8, wherein the key-value dataset, the relational dataset, and the message queue each have at least one data backup.
11. The apparatus of claim 8, wherein the apparatus further comprises:
a writing unit configured to write metadata stored to the message queue to a distributed cache area in response to determining that the metadata is successfully stored to the message queue;
the first searching unit is configured to respond to the received data request of the terminal equipment, search metadata corresponding to the data request in the distributed cache area, and feed back the metadata to the terminal equipment based on the searched metadata;
and the second searching unit is configured to respond to the received data request of the terminal equipment, search the metadata corresponding to the data request in the distributed cache area, and if not, search the metadata corresponding to the data request in the message queue, and feed back the metadata searched in the message queue to the terminal equipment.
12. The apparatus of claim 8, wherein the apparatus further comprises:
and the back-off unit is configured to asynchronously store the new metadata into the data set with faults by utilizing a back-off algorithm in response to the fact that the new metadata is added into the message queue is monitored, wherein the data set with faults is restored to the storage function when the asynchronous storage is successful.
13. The apparatus of claim 12, wherein the apparatus further comprises:
a verification unit configured to perform consistency verification of metadata on the key-value dataset and the relational dataset after asynchronously storing the metadata in the message queue to the failed dataset;
and the updating unit is configured to update the metadata in the relational data set into the metadata in the key value data set if the verification result is inconsistent.
14. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs,
when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-7.
15. A computer readable storage medium having stored thereon a computer program, wherein the program when executed by a processor implements the method of any of claims 1-7.
CN202010106307.5A 2020-02-21 2020-02-21 Data storage method and device Active CN111338834B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010106307.5A CN111338834B (en) 2020-02-21 2020-02-21 Data storage method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010106307.5A CN111338834B (en) 2020-02-21 2020-02-21 Data storage method and device

Publications (2)

Publication Number Publication Date
CN111338834A CN111338834A (en) 2020-06-26
CN111338834B true CN111338834B (en) 2023-06-30

Family

ID=71184145

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010106307.5A Active CN111338834B (en) 2020-02-21 2020-02-21 Data storage method and device

Country Status (1)

Country Link
CN (1) CN111338834B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111752960B (en) * 2020-06-28 2023-07-28 北京百度网讯科技有限公司 Data processing method and device
CN113220230B (en) * 2021-05-11 2023-07-25 北京百度网讯科技有限公司 Data export method and device, electronic equipment and storage medium
CN113627998B (en) * 2021-08-17 2025-04-15 北京沃东天骏信息技术有限公司 Order data processing method, device, electronic device and computer readable medium
CN115510036A (en) * 2022-10-14 2022-12-23 北京百度网讯科技有限公司 Data migration method, device, equipment and storage medium
CN120233954B (en) * 2025-05-29 2025-08-05 济南浪潮数据技术有限公司 Data storage method, device, system, equipment, medium and program product

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA1107401A (en) * 1978-12-08 1981-08-18 Frederick H. Rees Data storage systems
US5961606A (en) * 1997-06-30 1999-10-05 Sun Microsystems, Inc. System and method for remote buffer allocation in exported memory segments and message passing between network nodes
CN101699824A (en) * 2009-11-16 2010-04-28 中兴通讯股份有限公司 Device and method for failure recovery
CN106357452A (en) * 2016-09-29 2017-01-25 上海和付信息技术有限公司 High-availability framework system with single-point heterogeneous data storage function and realizing method thereof
CN110109873A (en) * 2019-05-08 2019-08-09 重庆大学 A kind of file management method for message queue
CN110633320A (en) * 2018-05-30 2019-12-31 北京京东尚科信息技术有限公司 Processing method, system, equipment and storage medium of distributed data service

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA1107401A (en) * 1978-12-08 1981-08-18 Frederick H. Rees Data storage systems
US5961606A (en) * 1997-06-30 1999-10-05 Sun Microsystems, Inc. System and method for remote buffer allocation in exported memory segments and message passing between network nodes
CN101699824A (en) * 2009-11-16 2010-04-28 中兴通讯股份有限公司 Device and method for failure recovery
CN106357452A (en) * 2016-09-29 2017-01-25 上海和付信息技术有限公司 High-availability framework system with single-point heterogeneous data storage function and realizing method thereof
CN110633320A (en) * 2018-05-30 2019-12-31 北京京东尚科信息技术有限公司 Processing method, system, equipment and storage medium of distributed data service
CN110109873A (en) * 2019-05-08 2019-08-09 重庆大学 A kind of file management method for message queue

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
Modeling Message Queueing Services with Reliability Guarantee in Cloud Computing Environment Using Colored Petri Nets;Li Jing等;《Mathematical Problems in Engineering》;20151231;第2015卷(第9期);第1-20页 *
基于Agent的集装箱码头实时调度系统的研究;徐斌;《中国博士学位论文全文数据库 工程科技Ⅱ辑》;20100915(第09期);第C034-37页 *
基于RAM/Disk混合设备模型的FC-SAN存储系统;付长冬等;《计算机研究与发展》;20040316;第41卷(第03期);121-127 *
基于μC/OS-Ⅲ的供电综保数据采集处理系统设计;郭亚楠等;《电子科技》;20191017;第33卷(第07期);1-5 *
移动终端的设施农业物联网环境监控系统设计;王君君等;《传感器与微系统》;20160820;第35卷(第08期);93-95+99 *

Also Published As

Publication number Publication date
CN111338834A (en) 2020-06-26

Similar Documents

Publication Publication Date Title
US12019652B2 (en) Method and device for synchronizing node data
CN111338834B (en) Data storage method and device
CN109951331B (en) Method, apparatus and computing cluster for sending information
CN106980625B (en) Data synchronization method, device and system
CN109522363B (en) Cloud platform synchronization method, system, equipment and storage medium based on block chain
US10180945B2 (en) Data replication from a cloud-based storage resource
US10069942B2 (en) Method and apparatus for changing configurations
CN111309747A (en) Data synchronization method, system and device
US9589153B2 (en) Securing integrity and consistency of a cloud storage service with efficient client operations
CN104202387B (en) A kind of metadata restoration methods and relevant apparatus
CN112825525B (en) Method and apparatus for processing transactions
TWI716822B (en) Method and device for correcting transaction causality, and electronic equipment
CN111444148B (en) Data transmission method and device based on MapReduce
CN113760862A (en) Incremental data breakpoint continuous transmission method, device, equipment and storage medium
CN115167769A (en) Method, device and system for writing data
EP3349416B1 (en) Relationship chain processing method and system, and storage medium
CN110196832A (en) For obtaining the method and device of SNAPSHOT INFO
CN114047943A (en) Information processing method, apparatus, device, storage medium and computer program product
CN113761056B (en) A distributed service processing method, device and system
CN114500485B (en) Data processing method and device
CN112749042B (en) Application running method and device
CN113761548B (en) Data transmission method and device for Shuffle process
CN110011767B (en) Method and apparatus for TCP connection backup
CN109446183B (en) Global anti-duplication method and device
CN114840144A (en) A system and method for storing data

Legal Events

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