+

CN118426963A - Distributed cache hot spot data processing method and device - Google Patents

Distributed cache hot spot data processing method and device Download PDF

Info

Publication number
CN118426963A
CN118426963A CN202410597923.3A CN202410597923A CN118426963A CN 118426963 A CN118426963 A CN 118426963A CN 202410597923 A CN202410597923 A CN 202410597923A CN 118426963 A CN118426963 A CN 118426963A
Authority
CN
China
Prior art keywords
data
server
hot spot
information
instruction
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.)
Granted
Application number
CN202410597923.3A
Other languages
Chinese (zh)
Other versions
CN118426963B (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 Mospatiotemporal Technology Co ltd
Original Assignee
Beijing Moxingxing 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 Moxingxing Technology Co ltd filed Critical Beijing Moxingxing Technology Co ltd
Priority to CN202410597923.3A priority Critical patent/CN118426963B/en
Publication of CN118426963A publication Critical patent/CN118426963A/en
Application granted granted Critical
Publication of CN118426963B publication Critical patent/CN118426963B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0656Data buffering arrangements
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]

Landscapes

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

Abstract

本申请公开了一种分布式缓存热点数据处理方法及装置。所述分布式缓存热点数据处理方法包括:获取各个服务器上传的待测key;判断各个服务器上传的待测key是否为热点数据,若是,则获取属于热点数据的待测key所对应的事件信息;根据属于热点数据的待测key所对应的事件信息或热点数据向各个服务器发送处理指令。本申请的分布式缓存热点数据处理方法在待测key为热点数据后,根据待测key所对应的事件信息或热点数据来进行对应的处理指令,从而能够使得不同的服务器在应对不同的事件信息或热点数据能够具有不同的处理措施,而并非规划单一的规则让各个服务器来使用。

The present application discloses a distributed cache hotspot data processing method and device. The distributed cache hotspot data processing method includes: obtaining the key to be tested uploaded by each server; determining whether the key to be tested uploaded by each server is hotspot data, and if so, obtaining the event information corresponding to the key to be tested belonging to the hotspot data; and sending processing instructions to each server according to the event information or hotspot data corresponding to the key to be tested belonging to the hotspot data. The distributed cache hotspot data processing method of the present application performs corresponding processing instructions according to the event information or hotspot data corresponding to the key to be tested after the key to be tested is hotspot data, so that different servers can have different processing measures in response to different event information or hotspot data, rather than planning a single rule for each server to use.

Description

一种分布式缓存热点数据处理方法及装置A distributed cache hotspot data processing method and device

技术领域Technical Field

本申请涉及热点数据处理技术领域,具体涉及一种分布式缓存热点数据处理方法以及分布式缓存热点数据处理装置。The present application relates to the technical field of hotspot data processing, and in particular to a distributed cache hotspot data processing method and a distributed cache hotspot data processing device.

背景技术Background technique

热数据(Hot Data):指在分布式系统中频繁访问的数据。Hot Data: refers to data that is frequently accessed in a distributed system.

自动降级(Auto Degradation):在系统负载过高时,自动采取措施降低系统性能要求的操作。Auto Degradation: Automatically taking measures to reduce system performance requirements when the system load is too high.

面对海量爆发的数据,传统集中式存储系统已经不是最优选了,现在更多是采用分布式存储系统来存储海量爆发的数据。分布式存储系统,采用Scale-out(横向扩展)架构,可实现超大集群规模的部署,从3节点存储集群起步,可实现灵活地扩展至数千节点。存储容量可实现一个集群EB(Exa Byte,艾字节,一种存储单位)级数据空间。同时由于分布式架构,每一个存储节点都可以提供独立的性能支撑,在高并发的数据处理中,可以实现更高的存储性能,更高的带宽吞吐和IOPS(Input/Output Operations Per Second,每秒的读写次数),有效地解决了海量数据高扩展和高性能的存储需求。Faced with massive data explosion, traditional centralized storage systems are no longer the best choice. Distributed storage systems are now more commonly used to store massive data explosions. Distributed storage systems use a scale-out architecture to achieve ultra-large cluster deployment, starting with a 3-node storage cluster and flexibly expanding to thousands of nodes. The storage capacity can achieve a cluster EB (Exa Byte, a storage unit) level data space. At the same time, due to the distributed architecture, each storage node can provide independent performance support. In high-concurrency data processing, higher storage performance, higher bandwidth throughput and IOPS (Input/Output Operations Per Second, read and write times per second) can be achieved, effectively solving the high-scalability and high-performance storage requirements for massive data.

然而,即使是分布式存储系统,在面对热数据时,也会出现缓存空间不够等问题,传统的解决方案往往依赖于定时任务或者预先设定的规则实时进行数据的降级处理,这在面对突发流量时显得不够灵活和高效。However, even distributed storage systems may encounter problems such as insufficient cache space when faced with hot data. Traditional solutions often rely on scheduled tasks or pre-set rules to perform data degradation in real time, which is not flexible and efficient enough when faced with burst traffic.

发明内容Summary of the invention

本发明的目的在于提供一种分布式缓存热点数据处理方法来至少解决上述的一个技术问题。The object of the present invention is to provide a distributed cache hotspot data processing method to solve at least one of the above-mentioned technical problems.

本发明的一个方面,提供一种分布式缓存热点数据处理方法,所述分布式缓存热点数据处理方法包括:One aspect of the present invention provides a distributed cache hotspot data processing method, the distributed cache hotspot data processing method comprising:

获取各个服务器上传的待测key;Get the key to be tested uploaded by each server;

判断各个服务器上传的待测key是否为热点数据,若是,则Determine whether the key to be tested uploaded by each server is hot data. If so,

获取属于热点数据的待测key所对应的事件信息;Get the event information corresponding to the key to be tested belonging to the hot data;

根据属于热点数据的待测key所对应的事件信息或热点数据向各个服务器发送处理指令,从而使得各个服务器中的一个或多个根据获取的处理指令进行存储调整。A processing instruction is sent to each server according to event information or hot data corresponding to the key to be tested belonging to the hot data, so that one or more of the servers perform storage adjustment according to the obtained processing instruction.

可选地,所述判断服务器上传的待测key是否为热点数据包括:Optionally, determining whether the key to be tested uploaded by the server is hotspot data includes:

判断在预设时间段内,是否有任意一个服务器上传的相同的待测key的数量超过第一预设阈值,若是,则判断该待测key为第一热点数据;Determine whether the number of the same key to be tested uploaded by any server exceeds a first preset threshold within a preset time period, and if so, determine that the key to be tested is the first hotspot data;

所述判断服务器上传的待测key是否为热点数据包括:The step of determining whether the key to be tested uploaded by the server is hotspot data includes:

判断在预设时间段内,是否有任意多个服务器上传的相同的待测key的数量超过第二预设阈值,若是,则判断该待测key为第二热点数据。It is determined whether the number of the same key to be tested uploaded by any multiple servers exceeds a second preset threshold within a preset time period. If so, it is determined that the key to be tested is the second hotspot data.

可选地,所述获取待测key所对应的事件信息包括:Optionally, the obtaining of event information corresponding to the key to be tested includes:

获取对应关联关系数据库,所述对应关联关系数据库包括至少一个预设待测key以及每个预设待测key所对应的事件信息;Acquire a corresponding association relationship database, wherein the corresponding association relationship database includes at least one preset key to be tested and event information corresponding to each preset key to be tested;

获取与属于热点数据的待测key相同的预设待测key所对应的事件信息。Get the event information corresponding to the preset key to be tested that is the same as the key to be tested belonging to the hot data.

可选地,所述热点数据包括热点信息、热用户信息和热接口信息;Optionally, the hotspot data includes hotspot information, hot user information and hot interface information;

当所述热点数据为第一热点数据且所述热点数据为热点信息时,所述根据属于热点数据的待测key所对应的事件信息向各个服务器发送处理指令,从而使得各个服务器中的一个或多个根据获取的处理指令进行存储调整包括:When the hotspot data is first hotspot data and the hotspot data is hotspot information, sending a processing instruction to each server according to the event information corresponding to the key to be tested belonging to the hotspot data, so that one or more of the servers perform storage adjustment according to the acquired processing instruction includes:

根据所述事件信息获取传递所述第一热点数据的服务器分别与其他服务器之间的关系信息,所述关系信息包括第一亲密关系、第一一般关系;Acquire, according to the event information, relationship information between the server transmitting the first hotspot data and other servers respectively, wherein the relationship information includes a first intimate relationship and a first general relationship;

若获取第一热点数据的服务器分别与其他服务器之间的关系信息包括亲密关系以及一般关系,则If the relationship information between the server that obtains the first hotspot data and other servers includes intimate relationships and general relationships, then

生成短时熔断指令、第一迁移指令以及第二迁移指令;Generate a short-time fuse instruction, a first migration instruction, and a second migration instruction;

将所述短时熔断指令发送至传递所述获取第一热点数据的服务器;Sending the short-time fuse instruction to the server that transmits the first hotspot data;

将所述第一迁移指令传递给与获取的第一热点数据的服务器的关系为第一亲密关系的服务器;Transmitting the first migration instruction to a server having a first intimate relationship with the server of the acquired first hotspot data;

将所述第二迁移指令传递给与获取的第一热点数据的服务器的关系为第一一般关系的服务器。The second migration instruction is transmitted to a server having a first general relationship with the server of the acquired first hotspot data.

可选地,当所述热点数据为第一热点数据且所述热点数据为热接口信息时,所述根据属于热点数据的待测key所对应的热点数据向各个服务器发送处理指令,从而使得各个服务器中的一个或多个根据获取的处理指令进行存储调整包括:Optionally, when the hotspot data is first hotspot data and the hotspot data is thermal interface information, sending a processing instruction to each server according to the hotspot data corresponding to the key to be tested belonging to the hotspot data, so that one or more of the servers perform storage adjustment according to the acquired processing instruction includes:

根据所述热接口信息获取其他服务器与所述热接口信息之间的关系信息,所述关系信息包括第二亲密关系、第二一般关系;Acquire relationship information between other servers and the thermal interface information according to the thermal interface information, wherein the relationship information includes a second intimate relationship and a second general relationship;

若其他服务器与所述热接口信息之间的关系信息包括第二亲密关系以及第二一般关系,则If the relationship information between the other servers and the hot interface information includes a second intimate relationship and a second general relationship, then

生成短时熔断指令、第一迁移指令以及第二迁移指令;Generate a short-time fuse instruction, a first migration instruction, and a second migration instruction;

将所述短时熔断指令发送至传递所述获取第一热点数据的服务器;Sending the short-time fuse instruction to the server that transmits the first hotspot data;

将所述第一迁移指令传递给与所述热接口信息之间的关系信息为第二亲密关系的服务器;Transmitting the first migration instruction to a server having a second intimate relationship with the hot interface information;

将所述第二迁移指令传递给与所述热接口信息之间的关系信息为第二一般关系的服务器。The second migration instruction is transmitted to a server whose relationship information with the hot interface information is a second general relationship.

可选地,当所述热点数据为第一热点数据且所述热点数据为热用户信息时,所述根据属于热点数据的待测key所对应的热点数据向各个服务器发送处理指令,从而使得各个服务器中的一个或多个根据获取的处理指令进行存储调整包括:Optionally, when the hotspot data is first hotspot data and the hotspot data is hot user information, sending a processing instruction to each server according to the hotspot data corresponding to the key to be tested belonging to the hotspot data, so that one or more of the servers perform storage adjustment according to the acquired processing instruction includes:

根据所述热用户信息获取其他服务器与所述热用户信息之间的关系信息,所述关系信息包括第三亲密关系、第三一般关系;Acquire relationship information between other servers and the hot user information according to the hot user information, wherein the relationship information includes a third intimate relationship and a third general relationship;

若其他服务器与所述热用户信息之间的关系信息包括第三亲密关系以及第三一般关系,则If the relationship information between other servers and the hot user information includes a third intimate relationship and a third general relationship, then

生成短时熔断指令、第一迁移指令以及第二迁移指令;Generate a short-time fuse instruction, a first migration instruction, and a second migration instruction;

将所述短时熔断指令发送至传递所述获取第一热点数据的服务器;Sending the short-time fuse instruction to the server that transmits the first hotspot data;

将所述第一迁移指令传递给与所述热用户信息之间的关系信息为第三亲密关系的服务器;Transmitting the first migration instruction to a server having a third intimate relationship with the hot user information;

将所述第二迁移指令传递给与所述热用户信息之间的关系信息为第三一般关系的服务器。The second migration instruction is transmitted to a server whose relationship information with the hot user information is a third general relationship.

可选地,当所述热点数据为第二热点数据且所述热点数据为热点信息时,所述根据属于热点数据的待测key所对应的热点数据向各个服务器发送处理指令,从而使得各个服务器中的一个或多个根据获取的处理指令进行存储调整包括:Optionally, when the hotspot data is second hotspot data and the hotspot data is hotspot information, sending a processing instruction to each server according to the hotspot data corresponding to the key to be tested belonging to the hotspot data, so that one or more of the servers perform storage adjustment according to the acquired processing instruction includes:

生成短时熔断指令、第一迁移指令;Generate a short-time fuse instruction and a first migration instruction;

将所述短时熔断指令发送至传递所述获取第二热点数据的服务器;Sending the short-time fuse instruction to the server that transmits the second hotspot data;

将所述第一迁移指令传递给其他的服务器。The first migration instruction is transmitted to other servers.

可选地,所述第一迁移指令包括:Optionally, the first migration instruction includes:

将一级缓存内的至少部分缓存数据存入二级缓存;storing at least a portion of cache data in the first-level cache into the second-level cache;

所述第二迁移指令包括:The second migration instruction includes:

将二级缓存内的至少部分缓存数据迁移至数据池中。At least part of the cached data in the secondary cache is migrated to the data pool.

可选地,所述一级缓存使用内存型缓存;Optionally, the first-level cache uses a memory-type cache;

所述二级缓存使用文档型数据库进行存储。The secondary cache is stored using a document-based database.

本申请还提供了一种分布式缓存热点数据处理装置,所述分布式缓存热点数据处理装置包括:The present application also provides a distributed cache hotspot data processing device, the distributed cache hotspot data processing device comprising:

待测key获取模块,所述待测key获取模块用于获取各个服务器上传的待测key;A key acquisition module to be tested, which is used to obtain the key to be tested uploaded by each server;

热点数据判断模块,所述热点数据判断模块用于判断各个服务器上传的待测key是否为热点数据;A hot data judgment module, which is used to judge whether the key to be tested uploaded by each server is hot data;

事件信息获取模块,所述事件信息获取模块用于在所述热点数据判断模块判断为是时获取属于热点数据的待测key所对应的事件信息;An event information acquisition module, wherein the event information acquisition module is used to acquire event information corresponding to the key to be tested belonging to the hot data when the hot data judgment module judges that it is yes;

处理模块,所述处理模块用于根据属于热点数据的待测key所对应的事件信息或热点数据向各个服务器发送处理指令,从而使得各个服务器中的一个或多个根据获取的处理指令进行存储调整。A processing module is used to send processing instructions to each server according to event information or hot data corresponding to the key to be tested belonging to the hot data, so that one or more of the servers perform storage adjustment according to the obtained processing instructions.

有益效果Beneficial Effects

本申请的分布式缓存热点数据处理方法在待测key为热点数据后,根据待测key所对应的事件信息或热点数据来进行对应的处理指令,从而能够使得不同的服务器在应对不同的事件信息或热点数据能够具有不同的处理措施,而并非规划单一的规则让各个服务器来使用。The distributed cache hotspot data processing method of the present application performs corresponding processing instructions according to the event information or hotspot data corresponding to the key to be tested after the key to be tested is hotspot data, so that different servers can have different processing measures in response to different event information or hotspot data, rather than planning a single rule for each server to use.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1是本申请一实施例的分布式缓存热点数据处理方法的流程示意图。FIG1 is a flow chart of a distributed cache hotspot data processing method according to an embodiment of the present application.

图2是用于实现图1所示的分布式缓存热点数据处理方法的电子设备示意图。FIG. 2 is a schematic diagram of an electronic device for implementing the distributed cache hotspot data processing method shown in FIG. 1 .

具体实施方式Detailed ways

为使本申请实施的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行更加详细的描述。在附图中,自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。所描述的实施例是本申请一部分实施例,而不是全部的实施例。下面通过参考附图描述的实施例是示例性的,旨在用于解释本申请,而不能理解为对本申请的限制。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。下面结合附图对本申请的实施例进行详细说明。In order to make the purpose, technical scheme and advantages of the implementation of this application clearer, the technical scheme in the embodiment of this application will be described in more detail below in conjunction with the drawings in the embodiment of this application. In the drawings, the same or similar reference numerals throughout represent the same or similar elements or elements with the same or similar functions. The described embodiments are part of the embodiments of this application, not all of them. The embodiments described below with reference to the drawings are exemplary and are intended to be used to explain this application, and should not be construed as limitations on this application. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application. The embodiments of this application are described in detail below in conjunction with the drawings.

图1是本申请一实施例的分布式缓存热点数据处理方法的流程示意图。FIG1 is a flow chart of a distributed cache hotspot data processing method according to an embodiment of the present application.

如图1所示的分布式缓存热点数据处理方法包括:The distributed cache hotspot data processing method shown in FIG1 includes:

步骤1:获取各个服务器上传的待测key;Step 1: Get the key to be tested uploaded by each server;

步骤2:判断各个服务器上传的待测key是否为热点数据,若是,则Step 2: Determine whether the key to be tested uploaded by each server is hot data. If so,

步骤3:获取属于热点数据的待测key所对应的热点数据;Step 3: Obtain the hotspot data corresponding to the key to be tested that belongs to the hotspot data;

步骤4:根据属于热点数据的待测key所对应的热点数据向各个服务器发送处理指令,从而使得各个服务器中的一个或多个根据获取的处理指令进行存储调整。Step 4: Send processing instructions to each server according to the hot data corresponding to the key to be tested belonging to the hot data, so that one or more of the servers perform storage adjustment according to the obtained processing instructions.

本申请的分布式缓存热点数据处理方法在待测key为热点数据后,根据待测key所对应的事件信息或热点数据来进行对应的处理指令,从而能够使得不同的服务器在应对不同的事件信息或热点数据能够具有不同的处理措施,而并非规划单一的规则让各个服务器来使用。The distributed cache hotspot data processing method of the present application performs corresponding processing instructions according to the event information or hotspot data corresponding to the key to be tested after the key to be tested is hotspot data, so that different servers can have different processing measures in response to different event information or hotspot data, rather than planning a single rule for each server to use.

在本实施例中,所述判断服务器上传的待测key是否为热点数据包括:In this embodiment, determining whether the key to be tested uploaded by the server is hotspot data includes:

判断在预设时间段内,是否有任意一个服务器上传的相同的待测key的数量超过第一预设阈值,若是,则判断该待测key为第一热点数据;Determine whether the number of the same key to be tested uploaded by any server exceeds a first preset threshold within a preset time period, and if so, determine that the key to be tested is the first hotspot data;

所述判断服务器上传的待测key是否为热点数据包括:The step of determining whether the key to be tested uploaded by the server is hotspot data includes:

判断在预设时间段内,是否有任意多个服务器上传的相同的待测key的数量超过第二预设阈值,若是,则判断该待测key为第二热点数据。It is determined whether the number of the same key to be tested uploaded by any multiple servers exceeds a second preset threshold within a preset time period. If so, it is determined that the key to be tested is the second hotspot data.

在本实施例中,第一预设阈值以及第二预设阈值可以根据自身需求而自行设定。In this embodiment, the first preset threshold and the second preset threshold can be set according to one's own needs.

举例来说,可以根据访问次数设定数据热度hot_spot,数据热度会随着时间持续降低,热度降低到一定值数据变为冷数据。数据热度是变化的,例如,根据访问次数设定一数据的数据热度为10,之后每访问一次该数据,该数据的数据热度加1,若数据超过第一预设阈值,则认为该待测key为热点数据。For example, the data heat can be set to hot_spot according to the number of accesses. The data heat will continue to decrease over time. When the heat drops to a certain value, the data becomes cold data. The data heat is variable. For example, the data heat of a data is set to 10 according to the number of accesses. After that, each time the data is accessed, the data heat of the data increases by 1. If the data exceeds the first preset threshold, the key to be tested is considered to be hot data.

在本实施例中,所述获取待测key所对应的事件信息包括:In this embodiment, obtaining the event information corresponding to the key to be tested includes:

获取对应关联关系数据库,所述对应关联关系数据库包括至少一个预设待测key以及每个预设待测key所对应的事件信息;Acquire a corresponding association relationship database, wherein the corresponding association relationship database includes at least one preset key to be tested and event information corresponding to each preset key to be tested;

获取与属于热点数据的待测key相同的预设待测key所对应的事件信息。Get the event information corresponding to the preset key to be tested that is the same as the key to be tested belonging to the hot data.

例如,key:goods前缀的就是商品详情(例如,方便面、牛奶),而方便面、牛奶即为事件信息的一部分,可以理解的是,事件信息还可以是别的,例如某个人名、某个热点词等。For example, the prefix of key:goods is the product details (for example, instant noodles, milk), and instant noodles and milk are part of the event information. It is understandable that the event information can also be other things, such as a person's name, a hot word, etc.

在本实施例中,所述热点数据包括热点信息、热用户信息和热接口信息;In this embodiment, the hotspot data includes hotspot information, hot user information and hot interface information;

当所述热点数据为第一热点数据且所述热点数据为热点信息时,所述根据属于热点数据的待测key所对应的事件信息向各个服务器发送处理指令,从而使得各个服务器中的一个或多个根据获取的处理指令进行存储调整包括:When the hotspot data is first hotspot data and the hotspot data is hotspot information, sending a processing instruction to each server according to the event information corresponding to the key to be tested belonging to the hotspot data, so that one or more of the servers perform storage adjustment according to the acquired processing instruction includes:

根据所述事件信息获取传递所述第一热点数据的服务器分别与其他服务器之间的关系信息,所述关系信息包括第一亲密关系、第一一般关系;Acquire, according to the event information, relationship information between the server transmitting the first hotspot data and other servers respectively, wherein the relationship information includes a first intimate relationship and a first general relationship;

若获取第一热点数据的服务器分别与其他服务器之间的关系信息包括亲密关系以及一般关系,则If the relationship information between the server that obtains the first hotspot data and other servers includes intimate relationships and general relationships, then

生成短时熔断指令、第一迁移指令以及第二迁移指令;Generate a short-time fuse instruction, a first migration instruction, and a second migration instruction;

将所述短时熔断指令发送至传递所述获取第一热点数据的服务器;Sending the short-time fuse instruction to the server that transmits the first hotspot data;

将所述第一迁移指令传递给与获取的第一热点数据的服务器的关系为第一亲密关系的服务器;Transmitting the first migration instruction to a server having a first intimate relationship with the server of the acquired first hotspot data;

将所述第二迁移指令传递给与获取的第一热点数据的服务器的关系为第一一般关系的服务器。The second migration instruction is transmitted to a server having a first general relationship with the server of the acquired first hotspot data.

采用这种方式,可以根据服务器与服务器之间的关系来确定是否需要因为其中一个服务器进行的频繁操作而对别的服务器进行指令的控制。In this way, it can be determined based on the relationship between the servers whether it is necessary to control the instructions of other servers due to frequent operations performed by one of the servers.

举例来说,以社交网站为例,如果因为出现了某个热点事件,从而导致某个服务器频繁的搜索一些关键词,又或者某个服务器通过一些刷事件的软件在进行刷单,此时,虽然对于该服务器来说,需要进行降级、迁移等操作,但是可能并不会影响其他服务器,又或者可能只会影响某几个跟该服务器有关联的服务器,此时,就不需要为所有服务器都进行统一的调配。For example, taking a social networking site as an example, if a hot event occurs, causing a server to frequently search for certain keywords, or a server is brushing orders through some event-brushing software, at this time, although the server needs to be downgraded, migrated, etc., it may not affect other servers, or it may only affect a few servers related to the server. At this time, there is no need to make unified arrangements for all servers.

例如,某个游戏在全球设置有多个服务器,此时,该游戏出现了一个BUG,但是该BUG只有亚洲服务器上有,那么,可能此时会使得部署在亚洲的各个亚洲服务器上出现热点信息,但是可能欧洲、美洲等服务器并不会出现这种热点信息,此时,只要调整亚洲服务器即可。For example, a game has multiple servers set up around the world. At this time, a BUG appears in the game, but the BUG only exists on the Asian server. Then, hotspot information may appear on the Asian servers deployed in Asia, but this hotspot information may not appear on servers in Europe, America, etc. At this time, you only need to adjust the Asian server.

在本实施例中,各个服务器之间的关系可以提前设定,也可以根据历史情况进行设定。In this embodiment, the relationship between the servers can be set in advance or according to historical circumstances.

举例来说,如果在历史的一个或者多个事件中,一旦某个服务器中出现热点数据,则必定有几个服务器会紧跟着出现热点数据,则此时,可以设定那几个紧跟着出现热点数据的服务器为亲密关系。For example, if in one or more historical events, once hot data appears in a server, there must be several servers that will appear hot data immediately afterwards. At this time, the servers that appear hot data immediately afterwards can be set as close relationships.

而相对的,不会跟着出现热点数据的服务器则可以设置为一般关系。In contrast, servers that do not have hotspot data can be set to general relationships.

在本实施例中,还可以根据事件信息进行进一步细分,举例来说,以某购物平台为例,该购物平台在某一天会举行西方商品特价活动,此时,与西方商品相关联的关键词(例如,十字架)搜索会大幅度提高,从而可能会出现热点信息,但是,由于西方商品具有一定局限性(例如,对于西方人来说,西方商品的购买欲望比较强,而对于东方人来说,则购买欲望不会那么强烈),此时,就会出现某几个主要用于服务西方人的服务器出现压力增大的情况,而主要服务于东方人的服务器则可能就不会出现,此时,各个服务西方人的服务器之间可能就是亲密关系,而服务东方人的服务器与服务西方人得服务器之间就是一般关系。In this embodiment, further subdivision can be performed based on event information. For example, taking a certain shopping platform as an example, the shopping platform will hold a special event for Western products on a certain day. At this time, the search for keywords related to Western products (for example, the cross) will increase significantly, so that hot information may appear. However, since Western products have certain limitations (for example, for Westerners, the desire to buy Western products is relatively strong, while for Easterners, the desire to buy is not so strong), at this time, some servers mainly used to serve Westerners will appear to be under increased pressure, while servers mainly serving Easterners may not appear. At this time, the servers serving Westerners may have a close relationship, while the servers serving Easterners and the servers serving Westerners have a general relationship.

可以理解的是,上述的各种关系信息可以提前设定,通过设置成数据库的方式来体现,从而在查找某个服务器与其他服务器之间的关系时可以确定两者的关系,另外,该数据库可以随时进行更新,从而使得各个服务器之间的关系更为准确。It is understandable that the above-mentioned various relationship information can be set in advance and reflected by being set as a database, so that the relationship between a server and other servers can be determined when searching for the relationship between the two. In addition, the database can be updated at any time to make the relationship between each server more accurate.

在本实施例中,当所述热点数据为第一热点数据且所述热点数据为热接口信息时,所述根据属于热点数据的待测key所对应的热点数据向各个服务器发送处理指令,从而使得各个服务器中的一个或多个根据获取的处理指令进行存储调整包括:In this embodiment, when the hotspot data is the first hotspot data and the hotspot data is the thermal interface information, the hotspot data corresponding to the key to be tested belonging to the hotspot data is sent to each server as a processing instruction, so that one or more of the servers perform storage adjustment according to the obtained processing instruction, including:

根据所述热接口信息获取其他服务器与所述热接口信息之间的关系信息,所述关系信息包括第二亲密关系、第二一般关系;Acquire relationship information between other servers and the thermal interface information according to the thermal interface information, wherein the relationship information includes a second intimate relationship and a second general relationship;

若其他服务器与所述热接口信息之间的关系信息包括第二亲密关系以及第二一般关系,则If the relationship information between the other servers and the hot interface information includes a second intimate relationship and a second general relationship, then

生成短时熔断指令、第一迁移指令以及第二迁移指令;Generate a short-time fuse instruction, a first migration instruction, and a second migration instruction;

将所述短时熔断指令发送至传递所述获取第一热点数据的服务器;Sending the short-time fuse instruction to the server that transmits the first hotspot data;

将所述第一迁移指令传递给与所述热接口信息之间的关系信息为第二亲密关系的服务器;Transmitting the first migration instruction to a server having a second intimate relationship with the hot interface information;

将所述第二迁移指令传递给与所述热接口信息之间的关系信息为第二一般关系的服务器。The second migration instruction is transmitted to a server whose relationship information with the hot interface information is a second general relationship.

如果热点数据是热接口信息时,此时,就不用考虑事件信息是什么样的事件了,因为,不管发生了什么情况,频繁要求与某个接口连接的请求是不需要靠事件来区分的,此时,只要从历史记录中,查找在某一服务器的某给接口被频繁请求时,其他服务器是否该接口在历史记录中也被频繁请求,如果是,这两个服务器之间即为亲密关系,如果不是,则可以是一般关系。If the hot data is hot interface information, then there is no need to consider what kind of event the event information is, because no matter what happens, frequent requests to connect to a certain interface do not need to be distinguished by events. At this time, just look up from the historical records whether a certain interface of a certain server is frequently requested, and whether the interface of other servers is also frequently requested in the historical records. If so, the two servers have a close relationship. If not, it can be a general relationship.

在本实施例中,当所述热点数据为第一热点数据且所述热点数据为热用户信息时,所述根据属于热点数据的待测key所对应的热点数据向各个服务器发送处理指令,从而使得各个服务器中的一个或多个根据获取的处理指令进行存储调整包括:In this embodiment, when the hotspot data is the first hotspot data and the hotspot data is hot user information, sending a processing instruction to each server according to the hotspot data corresponding to the key to be tested belonging to the hotspot data, so that one or more of the servers perform storage adjustment according to the acquired processing instruction includes:

根据所述热用户信息获取其他服务器与所述热用户信息之间的关系信息,所述关系信息包括第三亲密关系、第三一般关系;Acquire relationship information between other servers and the hot user information according to the hot user information, wherein the relationship information includes a third intimate relationship and a third general relationship;

若其他服务器与所述热用户信息之间的关系信息包括第三亲密关系以及第三一般关系,则If the relationship information between other servers and the hot user information includes a third intimate relationship and a third general relationship, then

生成短时熔断指令、第一迁移指令以及第二迁移指令;Generate a short-time fuse instruction, a first migration instruction, and a second migration instruction;

将所述短时熔断指令发送至传递所述获取第一热点数据的服务器;Sending the short-time fuse instruction to the server that transmits the first hotspot data;

将所述第一迁移指令传递给与所述热用户信息之间的关系信息为第三亲密关系的服务器;Transmitting the first migration instruction to a server having a third intimate relationship with the hot user information;

将所述第二迁移指令传递给与所述热用户信息之间的关系信息为第三一般关系的服务器。The second migration instruction is transmitted to a server whose relationship information with the hot user information is a third general relationship.

如果热点数据是热用户信息时,此时,也不用考虑事件信息是什么样的事件,此时,只要从历史记录中,查找在某一服务器一直被某用户进行访问或者进行其他操作时,其他服务器是否也曾经被该用户访问或者操作过,若是,则两个服务器之间为亲密关系,若否,则为一般关系。If the hot data is hot user information, then there is no need to consider what kind of event the event information is. At this time, just look for historical records to find out whether other servers have been visited or operated by a user when a certain server has been visited or operated by the user. If so, the two servers have a close relationship, if not, they have a general relationship.

在本实施例中,当所述热点数据为第二热点数据且所述热点数据为热点信息时,所述根据属于热点数据的待测key所对应的热点数据向各个服务器发送处理指令,从而使得各个服务器中的一个或多个根据获取的处理指令进行存储调整包括:In this embodiment, when the hotspot data is the second hotspot data and the hotspot data is the hotspot information, sending a processing instruction to each server according to the hotspot data corresponding to the key to be tested belonging to the hotspot data, so that one or more of the servers perform storage adjustment according to the acquired processing instruction includes:

生成短时熔断指令、第一迁移指令;Generate a short-time fuse instruction and a first migration instruction;

将所述短时熔断指令发送至传递所述获取第二热点数据的服务器;Sending the short-time fuse instruction to the server that transmits the second hotspot data;

将所述第一迁移指令传递给其他的服务器。The first migration instruction is transmitted to other servers.

如果当有多个服务器都出现热点信息时,说明这些服务器之间本身就属于有亲密关系(即在后续都会承受压力),此时,将所述短时熔断指令发送至传递所述获取第二热点数据的服务器。If hotspot information appears on multiple servers, it means that these servers have a close relationship (that is, they will be under pressure later). At this time, the short-term fuse instruction is sent to the server that transmits the second hotspot data.

在本实施例中,所述第一迁移指令包括:In this embodiment, the first migration instruction includes:

将一级缓存内的至少部分缓存数据存入二级缓存;storing at least a portion of cache data in the first-level cache into the second-level cache;

所述第二迁移指令包括:The second migration instruction includes:

将二级缓存内的至少部分缓存数据迁移至数据池中。At least part of the cached data in the secondary cache is migrated to the data pool.

在本实施例中,所述一级缓存使用内存型缓存;所述二级缓存使用文档型数据库进行存储。In this embodiment, the first-level cache uses a memory-type cache; the second-level cache uses a document-type database for storage.

本申请之所以设置一级缓存以及二级缓存,并且将他们用在不同的关系(亲密关系、一般关系)上,是因为,通过将一级缓存内的部分缓存数据存入二级缓存,并将所述部分缓存数据在一级缓存中的value值修改为所述部分缓存数据在二级缓存中的key值的技术手段,解决了现有技术中在大数据量和长时效需求下缓存降级策略带来的性能下降的技术问题。本申请对缓存分层,内存型缓存作为一级缓存,文档型缓存作为二级缓存。同时分离了一级缓存和二级缓存的计算资源,命中一级缓存只在内存型缓存检索,命中二级缓存主要计算在文档型缓存,避免在同一节点进行密集计算。The reason why the present application sets up a first-level cache and a second-level cache, and uses them in different relationships (close relationships, general relationships), is that, by storing part of the cache data in the first-level cache into the second-level cache, and modifying the value of the said part of the cache data in the first-level cache to the key value of the said part of the cache data in the second-level cache, the technical problem of performance degradation caused by the cache degradation strategy under large data volume and long-term requirements in the prior art is solved. The present application layers the cache, with the memory cache as the first-level cache and the document cache as the second-level cache. At the same time, the computing resources of the first-level cache and the second-level cache are separated. Hitting the first-level cache is only retrieved in the memory cache, and hitting the second-level cache is mainly calculated in the document cache, avoiding intensive calculations on the same node.

尤其是,本申请将关系设置为亲密关系以及一般关系,是认为,如果是亲密关系,则认为当相互为亲密关系中的一个服务器如果出现了热点信息,则很有可能其他有亲密关系的服务器也会随之出现热点信息,从而使得这些服务器在未来一段时间需要承压,从而需要进行数据的迁移,防止突然大量数据的涌入使得服务器瘫痪。In particular, the present application sets the relationship as a close relationship and a general relationship, believing that if it is a close relationship, then if hot information appears on one of the servers in the close relationship, it is very likely that other servers in the close relationship will also have hot information, which will cause these servers to be under pressure for a period of time in the future, and thus data migration is required to prevent the sudden influx of large amounts of data from paralyzing the server.

而如果关系为一般的服务器,则代表短时间可能还不会出现呈压状态,此时,实际上不需要进行特殊操作,但是由于一些服务器已经出现了热点数据,所以导致不确定这些关系为一般的服务器后续是不是也可能出现,则先将二级缓存内的缓存数据迁移至数据池,从而先空出二级缓存来,这样,一旦也出现压力变大的情况,防止二级缓存地方不够,无法为一级缓存来进行数据迁移。If the relationship is a general server, it means that the pressure state may not appear in a short time. At this time, no special operation is actually required. However, since some servers have already had hot data, it is uncertain whether these general servers may appear in the future. In this case, the cached data in the second-level cache is first migrated to the data pool to free up the second-level cache. In this way, once the pressure increases, it can prevent the second-level cache from being insufficient and unable to migrate data for the first-level cache.

在本实施例中,数据池可以由叠瓦盘(Shingled Magnetic Recording,简称SMR)组成,以此在相同存储节点数量的情况下来提高分布式存储系统的存储容量,降低了缓存池的延迟。In this embodiment, the data pool may be composed of Shingled Magnetic Recording (SMR) disks, so as to increase the storage capacity of the distributed storage system with the same number of storage nodes and reduce the latency of the cache pool.

在本实施例中,会实时监测二级缓存、数据池的容量,如果一旦二级缓存达到存储上限或者一个阈值,则不论是否出现热点数据,都将二级缓存的部分数据放入到数据池。In this embodiment, the capacity of the secondary cache and the data pool is monitored in real time. Once the secondary cache reaches a storage upper limit or a threshold, part of the data in the secondary cache is put into the data pool regardless of whether hot data appears.

在本实施例中,当数据池达到上限或者一个阈值,也可以通过删除数据的方式来腾出地方。In this embodiment, when the data pool reaches an upper limit or a threshold, space can be made by deleting data.

本申请还提供了一种分布式缓存热点数据处理装置,所述分布式缓存热点数据处理装置包括待测key获取模块、热点数据判断模块、事件信息获取模块以及处理模块,其中,The present application also provides a distributed cache hotspot data processing device, which includes a key acquisition module to be tested, a hotspot data judgment module, an event information acquisition module and a processing module, wherein:

待测key获取模块用于获取各个服务器上传的待测key;The key acquisition module to be tested is used to obtain the key to be tested uploaded by each server;

热点数据判断模块用于判断各个服务器上传的待测key是否为热点数据;The hot data judgment module is used to judge whether the key to be tested uploaded by each server is hot data;

事件信息获取模块用于在所述热点数据判断模块判断为是时获取属于热点数据的待测key所对应的事件信息;The event information acquisition module is used to obtain the event information corresponding to the key to be tested belonging to the hot data when the hot data judgment module judges that it is yes;

处理模块用于根据属于热点数据的待测key所对应的事件信息或热点数据向各个服务器发送处理指令,从而使得各个服务器中的一个或多个根据获取的处理指令进行存储调整。The processing module is used to send processing instructions to each server according to the event information or hot data corresponding to the key to be tested belonging to the hot data, so that one or more of the servers perform storage adjustment according to the obtained processing instructions.

需要说明的是,前述对方法实施例的解释说明也适用于本实施例的装置,此处不再赘述。It should be noted that the above explanations of the method embodiment are also applicable to the device of this embodiment and will not be repeated here.

本申请还提供了一种电子设备,包括存储器、处理器以及存储在存储器中并能够在处理器上运行的计算机程序,处理器执行计算机程序时实现如上的分布式缓存热点数据处理方法。The present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor. When the processor executes the computer program, the above-mentioned distributed cache hotspot data processing method is implemented.

本申请还提供了一种计算机可读存储介质,计算机可读存储介质存储有计算机程序,计算机程序被处理器执行时能够实现如上的分布式缓存热点数据处理方法。The present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it can implement the above distributed cache hotspot data processing method.

图2是能够实现根据本申请一个实施例提供的分布式缓存热点数据处理方法的电子设备的示例性结构图。FIG. 2 is an exemplary structural diagram of an electronic device capable of implementing the distributed cache hotspot data processing method provided according to an embodiment of the present application.

如图2所示,电子设备包括输入设备501、输入接口502、中央处理器503、存储器504、输出接口505以及输出设备506。其中,输入接口502、中央处理器503、存储器504以及输出接口505通过总线507相互连接,输入设备501和输出设备506分别通过输入接口502和输出接口505与总线507连接,进而与电子设备的其他组件连接。具体地,输入设备501接收来自外部的输入信息,并通过输入接口502将输入信息传送到中央处理器503;中央处理器503基于存储器504中存储的计算机可执行指令对输入信息进行处理以生成输出信息,将输出信息临时或者永久地存储在存储器504中,然后通过输出接口505将输出信息传送到输出设备506;输出设备506将输出信息输出到电子设备的外部供用户使用。As shown in FIG2 , the electronic device includes an input device 501, an input interface 502, a central processing unit 503, a memory 504, an output interface 505, and an output device 506. The input interface 502, the central processing unit 503, the memory 504, and the output interface 505 are interconnected through a bus 507, and the input device 501 and the output device 506 are connected to the bus 507 through the input interface 502 and the output interface 505, respectively, and then connected to other components of the electronic device. Specifically, the input device 501 receives input information from the outside, and transmits the input information to the central processing unit 503 through the input interface 502; the central processing unit 503 processes the input information based on the computer executable instructions stored in the memory 504 to generate output information, temporarily or permanently stores the output information in the memory 504, and then transmits the output information to the output device 506 through the output interface 505; the output device 506 outputs the output information to the outside of the electronic device for use by the user.

也就是说,图2所示的电子设备也可以被实现为包括:存储有计算机可执行指令的存储器;以及一个或多个处理器,该一个或多个处理器在执行计算机可执行指令时可以实现结合图1描述的分布式缓存热点数据处理方法。That is to say, the electronic device shown in Figure 2 can also be implemented to include: a memory storing computer executable instructions; and one or more processors, which can implement the distributed cache hotspot data processing method described in combination with Figure 1 when executing the computer executable instructions.

在一个实施例中,图2所示的电子设备可以被实现为包括:存储器504,被配置为存储可执行程序代码;一个或多个处理器,被配置为运行存储器504中存储的可执行程序代码,以执行上述实施例中的分布式缓存热点数据处理方法。In one embodiment, the electronic device shown in Figure 2 can be implemented to include: a memory 504, configured to store executable program code; one or more processors, configured to run the executable program code stored in the memory 504 to execute the distributed cache hotspot data processing method in the above embodiment.

在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。In a typical configuration, a computing device includes one or more processors (CPU), input/output interfaces, network interfaces, and memory.

内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and/or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

计算机可读介质包括永久性和非永久性、可移动和非可移动,媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数据多功能光盘(DVD)或其他光学存储、磁盒式磁带、磁带磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。Computer readable media include permanent and non-permanent, removable and non-removable, and the media can be implemented by any method or technology to store information. The information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), data versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.

附图中的流程图和框图,图示了按照本申请各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,模块、程序段、或代码的一部分包括一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地标识的方框实际上可以基本并行地执行,他们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或总流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and a module, a program segment or a part of a code includes one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes identified in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and/or flow chart, and the combination of the square boxes in the block diagram and/or the overall flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

在本实施例中所称处理器可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The processor referred to in this embodiment may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.

存储器可用于存储计算机程序和/或模块,处理器通过运行或执行存储在存储器内的计算机程序和/或模块,以及调用存储在存储器内的数据,实现装置/终端设备的各种功能。存储器可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器可以包括高速随机存取存储器,还可以包括非易失性存储器,例如硬盘、内存、插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)、至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory can be used to store computer programs and/or modules. The processor realizes various functions of the device/terminal equipment by running or executing the computer programs and/or modules stored in the memory and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

在本实施例中,装置/终端设备集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明实现上述实施例方法中的全部或部分流程,也可以通过计算机程序来指令相关的硬件来完成,的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,计算机程序包括计算机程序代码,计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。计算机可读介质可以包括:能够携带计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减。本申请虽然以较佳实施例公开如上,但其实并不是用来限定本申请,任何本领域技术人员在不脱离本申请的精神和范围内,都可以做出可能的变动和修改,因此,本申请的保护范围应当以本申请权利要求所界定的范围为准。In this embodiment, if the module/unit integrated in the device/terminal equipment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device that can carry computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. Although the present application is disclosed as above in terms of a preferred embodiment, it is not intended to limit the present application. Any person skilled in the art may make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.

本领域技术人员应明白,本申请的实施例可提供为方法、系统或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

此外,显然“包括”一词不排除其他单元或步骤。装置权利要求中陈述的多个单元、模块或装置也可以由一个单元或总装置通过软件或硬件来实现。In addition, it is obvious that the word "comprising" does not exclude other units or steps. Multiple units, modules or devices stated in the device claims can also be implemented by one unit or the overall device through software or hardware.

虽然,上文中已经用一般性说明及具体实施方案对本发明作了详尽的描述,但在本发明基础上,可以对之作一些修改或改进,这对本领域技术人员而言是显而易见的。因此,在不偏离本发明精神的基础上所做的这些修改或改进,均属于本发明要求保护的范围。Although the present invention has been described in detail above with general descriptions and specific embodiments, it is obvious to those skilled in the art that some modifications or improvements may be made thereto based on the present invention. Therefore, these modifications or improvements made without departing from the spirit of the present invention all fall within the scope of protection claimed by the present invention.

Claims (10)

1. The distributed cache hot spot data processing method is characterized by comprising the following steps of:
obtaining to-be-detected keys uploaded by each server;
Judging whether the key to be tested uploaded by each server is hot spot data or not, if so, then
Acquiring event information corresponding to a key to be detected belonging to hot spot data;
and sending processing instructions to each server according to event information or hot spot data corresponding to the to-be-detected key belonging to the hot spot data, so that one or more of the servers can be stored and adjusted according to the acquired processing instructions.
2. The method for processing distributed cache hot spot data according to claim 1, wherein the determining whether the key to be tested uploaded by the server is hot spot data comprises:
judging whether the number of the same to-be-detected keys uploaded by any one server exceeds a first preset threshold value in a preset time period, if so, judging that the to-be-detected keys are first hot spot data;
the step of judging whether the key to be detected uploaded by the server is hot spot data comprises the following steps:
Judging whether the number of the same to-be-detected keys uploaded by any plurality of servers exceeds a second preset threshold value in a preset time period, and if so, judging that the to-be-detected keys are second hot spot data.
3. The method for processing distributed cache hot spot data according to claim 2, wherein the obtaining event information corresponding to the key to be detected includes:
Acquiring a corresponding association relation database, wherein the corresponding association relation database comprises at least one preset key to be detected and event information corresponding to each preset key to be detected;
and acquiring event information corresponding to the preset to-be-detected key which is the same as the to-be-detected key belonging to the hot spot data.
4. The digital intelligent wind farm fan abnormal current monitoring method of claim 3, wherein the hot spot data comprises hot spot information, hot user information and hot interface information;
When the hotspot data is first hotspot data and the hotspot data is hotspot information, the processing instructions are sent to each server according to event information corresponding to the to-be-detected key belonging to the hotspot data, so that one or more of the servers can store and adjust according to the acquired processing instructions, and the method comprises the following steps:
Acquiring relation information between the server for transmitting the first hot spot data and other servers according to the event information, wherein the relation information comprises a first intimate relation and a first general relation;
If the relationship information between the server acquiring the first hot spot data and the other servers respectively comprises an intimate relationship and a general relationship, then
Generating a short-time fusing instruction, a first migration instruction and a second migration instruction;
the short-time fusing instruction is sent to a server for transmitting the acquired first hot spot data;
transmitting the first migration instruction to a server which has a first affinity relationship with the acquired server of the first hot spot data;
and transmitting the second migration instruction to a server which has a first general relation with the acquired server of the first hot spot data.
5. The method of claim 4, wherein when the hotspot data is first hotspot data and the hotspot data is thermal interface information, the sending a processing instruction to each server according to the hotspot data corresponding to the to-be-detected key belonging to the hotspot data, so that one or more of the servers performs storage adjustment according to the acquired processing instruction includes:
Acquiring relationship information between other servers and the thermal interface information according to the thermal interface information, wherein the relationship information comprises a second intimate relationship and a second general relationship;
If the relationship information between the other server and the hot interface information comprises a second intimate relationship and a second general relationship, then
Generating a short-time fusing instruction, a first migration instruction and a second migration instruction;
the short-time fusing instruction is sent to a server for transmitting the acquired first hot spot data;
transmitting the first migration instruction to a server which has the relationship information between the first migration instruction and the hot interface information as a second affinity;
and transmitting the second migration instruction to a server which has the relationship information between the second migration instruction and the hot interface information as a second general relationship.
6. The method of claim 5, wherein when the hotspot data is first hotspot data and the hotspot data is hot user information, the sending a processing instruction to each server according to the hotspot data corresponding to the to-be-detected key belonging to the hotspot data, so that one or more of the servers performs storage adjustment according to the acquired processing instruction includes:
acquiring relationship information between other servers and the hot user information according to the hot user information, wherein the relationship information comprises a third intimate relationship and a third general relationship;
If the relationship information between the other servers and the hot user information comprises a third intimate relationship and a third general relationship, then
Generating a short-time fusing instruction, a first migration instruction and a second migration instruction;
the short-time fusing instruction is sent to a server for transmitting the acquired first hot spot data;
transmitting the first migration instruction to a server with the relation information between the first migration instruction and the hot user information being a third close relation;
and transmitting the second migration instruction to a server which has third general relation with relation information between the hot user information.
7. The method of claim 6, wherein when the hotspot data is second hotspot data and the hotspot data is hotspot information, the sending a processing instruction to each server according to the hotspot data corresponding to the to-be-detected key belonging to the hotspot data, so that one or more of the servers performs storage adjustment according to the acquired processing instruction includes:
generating a short-time fusing instruction and a first migration instruction;
Sending the short-time fusing instruction to a server for transmitting the acquired second hot spot data;
and transmitting the first migration instruction to other servers.
8. The distributed cache hot spot data processing method of claim 7, wherein the first migration instruction comprises:
storing at least part of cache data in the first-level cache into the second-level cache;
The second migration instruction includes:
and migrating at least part of the cache data in the secondary cache to a data pool.
9. The method for processing distributed cache hot spot data according to claim 8, wherein the first level cache uses a memory type cache;
the secondary cache is stored using a document database.
10. A distributed cache hot spot data processing apparatus, the distributed cache hot spot data processing apparatus comprising:
the to-be-detected key acquisition module is used for acquiring to-be-detected keys uploaded by each server;
the hot spot data judging module is used for judging whether the to-be-detected key uploaded by each server is hot spot data or not;
the event information acquisition module is used for acquiring event information corresponding to the key to be detected belonging to the hot spot data when the hot spot data judgment module judges that the hot spot data judgment module is yes;
And the processing module is used for sending processing instructions to each server according to event information or hot spot data corresponding to the to-be-detected key belonging to the hot spot data, so that one or more of the servers can be stored and adjusted according to the acquired processing instructions.
CN202410597923.3A 2024-05-14 2024-05-14 A distributed cache hotspot data processing method and device Active CN118426963B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410597923.3A CN118426963B (en) 2024-05-14 2024-05-14 A distributed cache hotspot data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410597923.3A CN118426963B (en) 2024-05-14 2024-05-14 A distributed cache hotspot data processing method and device

Publications (2)

Publication Number Publication Date
CN118426963A true CN118426963A (en) 2024-08-02
CN118426963B CN118426963B (en) 2024-11-22

Family

ID=92324727

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410597923.3A Active CN118426963B (en) 2024-05-14 2024-05-14 A distributed cache hotspot data processing method and device

Country Status (1)

Country Link
CN (1) CN118426963B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160350292A1 (en) * 2015-05-27 2016-12-01 Alibaba Group Holding Limited Method and apparatus for real-time data migration
CN109729108A (en) * 2017-10-27 2019-05-07 阿里巴巴集团控股有限公司 A kind of method, associated server and system for preventing caching from puncturing
CN111562889A (en) * 2020-05-14 2020-08-21 杭州海康威视系统技术有限公司 Data processing method, device, system and storage medium
CN111885184A (en) * 2020-07-29 2020-11-03 深圳壹账通智能科技有限公司 Method and device for processing hot spot access keywords in high concurrency scene
CN111930315A (en) * 2020-08-21 2020-11-13 北京天融信网络安全技术有限公司 Data access method, data access device and storage medium
CN112578997A (en) * 2019-09-30 2021-03-30 华为技术有限公司 Data migration method, system and related equipment
US20210165840A1 (en) * 2019-11-29 2021-06-03 Amazon Technologies, Inc. Warm tier storage for search service
CN113225338A (en) * 2021-05-07 2021-08-06 京东数科海益信息科技有限公司 Hotspot access request processing method, server, terminal and program product
CN117591039A (en) * 2024-01-18 2024-02-23 济南浪潮数据技术有限公司 Distributed storage methods, systems, equipment and media

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160350292A1 (en) * 2015-05-27 2016-12-01 Alibaba Group Holding Limited Method and apparatus for real-time data migration
CN109729108A (en) * 2017-10-27 2019-05-07 阿里巴巴集团控股有限公司 A kind of method, associated server and system for preventing caching from puncturing
CN112578997A (en) * 2019-09-30 2021-03-30 华为技术有限公司 Data migration method, system and related equipment
US20210165840A1 (en) * 2019-11-29 2021-06-03 Amazon Technologies, Inc. Warm tier storage for search service
CN111562889A (en) * 2020-05-14 2020-08-21 杭州海康威视系统技术有限公司 Data processing method, device, system and storage medium
CN111885184A (en) * 2020-07-29 2020-11-03 深圳壹账通智能科技有限公司 Method and device for processing hot spot access keywords in high concurrency scene
CN111930315A (en) * 2020-08-21 2020-11-13 北京天融信网络安全技术有限公司 Data access method, data access device and storage medium
CN113225338A (en) * 2021-05-07 2021-08-06 京东数科海益信息科技有限公司 Hotspot access request processing method, server, terminal and program product
CN117591039A (en) * 2024-01-18 2024-02-23 济南浪潮数据技术有限公司 Distributed storage methods, systems, equipment and media

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李璐璐;华佳烽;万盛;朱辉;李凤华;: "基于高效信息缓存的位置隐私保护方案", 通信学报, no. 06, 25 June 2017 (2017-06-25) *

Also Published As

Publication number Publication date
CN118426963B (en) 2024-11-22

Similar Documents

Publication Publication Date Title
CN114528231B (en) A method, device, electronic device and storage medium for dynamic data storage
US9628438B2 (en) Consistent ring namespaces facilitating data storage and organization in network infrastructures
CN111858520B (en) Method and device for separately storing block chain node data
CN114625767B (en) A data query method, device, equipment and readable medium
US10263876B2 (en) Adaptive service timeouts
CN108733507A (en) The method and apparatus of file backup and recovery
JP7514336B2 (en) Cluster capacity reduction/expansion method and system, capacity reduction/expansion control terminal, and medium
US20210160054A1 (en) Methods and systems for reading data based on plurality of blockchain networks
JP2022550401A (en) Data upload method, system, device and electronic device
CN111083179B (en) Internet of Things cloud platform, device interaction method and device based on Internet of Things cloud platform
CN112839076B (en) Data storage method, data reading method, gateway, electronic equipment and storage medium
CN111104232A (en) A method, device and medium for accelerating message queue writing
CN110781156A (en) Data node distribution method, equipment and medium
CN111866123A (en) A method and device for data storage based on blockchain
CN107180118A (en) A kind of file system cache data managing method and device
CN112583941A (en) Method for supporting access of multiple power terminals, unit node and power Internet of things
CN114285903B (en) Request processing method, device, system and electronic device
CN111506254B (en) Distributed storage system and management method and device thereof
CN116069529B (en) Dynamic caching method and device, electronic equipment and computer readable medium
CN118426963A (en) Distributed cache hot spot data processing method and device
CN113301173A (en) Domain name updating system and method, message forwarding method and server
CN117555697A (en) A cache loading system, method, device and equipment for distributed training
US11086849B2 (en) Methods and systems for reading data based on plurality of blockchain networks
CN112637327B (en) Data processing method, device and system
CN116166747A (en) Block chain intelligent contract data processing method and device

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20250324

Address after: 909-293, 9th Floor, Building 17, No. 30 Shixing Street, Shijingshan District, Beijing (Cluster Registration)

Patentee after: Beijing Mospatiotemporal Technology Co.,Ltd.

Country or region after: China

Address before: 119-106, 1st Floor, Building B, No. 9 Dazhongsi East Road, Haidian District, Beijing, 100000

Patentee before: Beijing Moxingxing Technology Co.,Ltd.

Country or region before: China

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载