WO2021179488A1 - Monitoring data storage method and device, server and storage medium - Google Patents

Monitoring data storage method and device, server and storage medium Download PDF

Info

Publication number
WO2021179488A1
WO2021179488A1 PCT/CN2020/099395 CN2020099395W WO2021179488A1 WO 2021179488 A1 WO2021179488 A1 WO 2021179488A1 CN 2020099395 W CN2020099395 W CN 2020099395W WO 2021179488 A1 WO2021179488 A1 WO 2021179488A1
Authority
WO
WIPO (PCT)
Prior art keywords
performance information
monitoring performance
preset
target
target monitoring
Prior art date
Application number
PCT/CN2020/099395
Other languages
French (fr)
Chinese (zh)
Inventor
林水明
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021179488A1 publication Critical patent/WO2021179488A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/064Management of blocks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0653Monitoring storage devices or systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0674Disk device
    • G06F3/0676Magnetic disk device

Definitions

  • This application belongs to the field of data monitoring technology, and in particular relates to a monitoring data storage method, device, server, and storage medium.
  • the inventor realized that the current monitoring system requires high timeliness of data query and frequent read and write operations. Therefore, when storing monitoring data, the timeliness of query and read and write operations need to be considered. Convenience.
  • the embodiments of the present application provide a monitoring data storage method, a server, a computing device, and a storage medium, which can avoid the problem of continuous disk write operations when storing massive monitoring data.
  • the first aspect of the embodiments of the present application provides a monitoring data storage method, including:
  • monitoring data corresponding to at least one monitoring item of the device to be monitored within a preset time period, where the monitoring data includes monitoring performance information and time stamp information;
  • the time stamp information corresponding to each target monitoring performance information set and the monitoring performance information are respectively associated and stored in the preset storage node corresponding to each target monitoring performance information set.
  • a second aspect of the embodiments of the present application provides a monitoring data storage device, including:
  • An acquiring module configured to acquire monitoring data corresponding to at least one monitoring item of the equipment to be monitored within a preset time period, where the monitoring data includes monitoring performance information and time stamp information;
  • a dividing module configured to divide the monitoring performance information based on the time stamp information to obtain a plurality of target monitoring performance information sets, each of the target monitoring performance information sets includes a plurality of continuous monitoring performance information;
  • the determining module is configured to use a preset consistency algorithm to separately determine the preset storage node corresponding to each of the target monitoring performance information sets;
  • the storage module is configured to associate and store the time stamp information and the monitoring performance information corresponding to each target monitoring performance information set to the preset storage node corresponding to each target monitoring performance information set.
  • the third aspect of the embodiments of the present application provides a server, including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program When implementing the following steps:
  • monitoring data corresponding to at least one monitoring item of the device to be monitored within a preset time period, where the monitoring data includes monitoring performance information and time stamp information;
  • the time stamp information corresponding to each target monitoring performance information set and the monitoring performance information are respectively associated and stored in the preset storage node corresponding to each target monitoring performance information set.
  • the fourth aspect of the application embodiments provides a computer-readable storage medium storing a computer program, wherein the computer program is executed by a processor to implement the following steps:
  • monitoring data corresponding to at least one monitoring item of the device to be monitored within a preset time period, where the monitoring data includes monitoring performance information and time stamp information;
  • the time stamp information corresponding to each target monitoring performance information set and the monitoring performance information are respectively associated and stored in the preset storage node corresponding to each target monitoring performance information set.
  • This application divides the monitoring performance information based on the time stamp information to obtain multiple target monitoring performance information sets; and uses a preset consistency algorithm to determine the preset storage node corresponding to each target monitoring performance information set, and The time stamp information and monitoring performance information corresponding to each of the target monitoring performance information sets are stored in association with the corresponding preset storage node, which can avoid the problem of continuous disk write operations when storing massive monitoring data.
  • FIG. 1 is an implementation flowchart of the monitoring data storage method provided by the first embodiment of the present application
  • FIG. 2 is a specific implementation flow chart of S103 in Figure 1;
  • FIG. 3 is a schematic diagram of a structure in which the first hash value and the second hash value are respectively mapped on a hash circle;
  • FIG. 4 is an implementation flowchart of the monitoring data storage method provided by the second embodiment of the application.
  • FIG. 5 is an implementation flowchart of the monitoring data storage method provided by the third embodiment of the present application.
  • FIG. 6 is an implementation flowchart of the monitoring data storage method provided by the fourth embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of a monitoring data storage device provided by an embodiment of the present application.
  • Fig. 8 is a schematic structural diagram of a server provided by an embodiment of the present application.
  • FIG. 1 it is an implementation flowchart of the monitoring data storage method provided by the first embodiment of the present application.
  • This embodiment may be implemented by hardware or software of a monitoring data storage device, and the monitoring data storage device may be a server. Specifically, the details are as follows:
  • S101 Obtain monitoring data corresponding to at least one monitoring item of a device to be monitored within a preset time period, where the monitoring data includes monitoring performance information and time stamp information.
  • the equipment to be monitored usually includes multiple monitoring items, and each of the monitoring items corresponds to preset performance information. Understandably, the monitoring items can be determined according to monitoring strategies, and different monitoring strategies correspond to different There are no specific restrictions on the monitoring items.
  • the monitoring data includes monitoring performance information and time stamp information.
  • a time stamp indicates that a piece of data has existed before a certain time, is complete and verifiable.
  • Data usually a sequence of characters, is used to uniquely identify a certain moment of time.
  • monitoring data is closely related to monitoring time
  • a preset time period is required.
  • the monitoring data will also increase.
  • the number increases to a certain extent, to store the monitoring data, it is necessary to consider the convenience of read and write operations and the timeliness of query.
  • S102 Divide the monitoring performance information based on the timestamp information to obtain multiple target monitoring performance information sets, each of the target monitoring performance information sets includes a plurality of continuous monitoring performance information.
  • the monitoring performance information is continuous information.
  • the same time stamp information usually corresponds to multiple continuous monitoring performance information.
  • the monitoring performance information can be divided based on the time stamp information.
  • the dividing the monitoring performance information based on the time stamp information to obtain multiple target monitoring performance information sets includes: dividing the monitoring performance information with the same time stamp information into the same target Monitor performance information to obtain multiple sets of target monitoring performance information.
  • each of the target monitoring performance information sets includes multiple contacted monitoring performance information.
  • S103 Using a preset consistency algorithm, respectively determine a preset storage node corresponding to each of the target monitoring performance information sets.
  • the consistency algorithm is a consistent hash algorithm
  • the preset consistency algorithm is used to separately determine the preset storage nodes corresponding to each of the target monitoring performance information sets, include:
  • the preset storage nodes corresponding to each of the target monitoring performance information sets are respectively determined.
  • S103 includes:
  • S1031 Calculate the first hash value corresponding to each of the target monitoring performance information sets and the second hash value corresponding to each of the preset storage nodes by using a preset hash algorithm.
  • the preset hash algorithm includes MD5 algorithm, hash algorithm, etc.
  • the preset hash algorithm is the MD5 algorithm
  • the MD5 algorithm is used to calculate the corresponding information of each target monitoring performance information set.
  • the first hash value for example, the first hash value is respectively expressed as: key1, key2, ..., key(n-1), where n is an integer.
  • the MD5 algorithm is used to calculate the second hash value corresponding to each of the preset storage nodes.
  • the second hash value is expressed as: KEY1, KEY2, ..., KEY(nk), where k ⁇ n .
  • S1032 Map the first hash value and the second hash value on a hash circle with a preset number space according to a preset mapping rule to obtain the first hash value and The first mapping relationship between the second hash values.
  • the preset mapping rule is to determine the starting position of the mapping, and then from the starting position to search the preset number space corresponding to the hash circle clockwise, for example, in this example, the hash
  • the ring has 2 n digital spaces, and the first hash value and the second hash value are respectively mapped to the corresponding digital spaces to obtain one of the first hash value and the second hash value
  • FIG. 3 it is a schematic structural diagram in which the first hash value and the second hash value are respectively mapped on a hash circle.
  • 0 is the starting position of the mapping, corresponding to the first digital space
  • 2 n is the ending position of the mapping, corresponding to the 2 n- th digital space.
  • the first hash value and the second hash value are not mapped at the 2n position.
  • FIG. 3 there is a one-to-one mapping relationship between the first hash value and the second hash value. Understandably, when the number of the target monitoring performance information set exceeds the number of the number space preset by the hash circle, starting from the starting position, the hash circle is searched again clockwise The preset digital space corresponding to the ring remaps the first hash value corresponding to the redundant target monitoring performance information set on the hash circle to cover the previous first hash value.
  • S1033 Determine the preset storage node corresponding to each target monitoring performance information set according to the first mapping relationship.
  • each of the target monitoring performance information sets corresponds to a unique first hash value
  • each of the preset storage nodes also corresponds to a unique second hash value. Therefore, according to the first The mapping relationship can respectively determine the preset storage node corresponding to each target monitoring performance information set.
  • the time stamp information corresponding to each target monitoring performance information set and the monitoring performance information are respectively associated and stored in the preset storage node corresponding to each target monitoring performance information set.
  • the monitoring data storage method divides the monitoring performance information based on the time stamp information to obtain multiple target monitoring performance information sets; and uses a preset consistency algorithm to determine each The preset storage node corresponding to the target monitoring performance information set, associates the time stamp information and monitoring performance information corresponding to each target monitoring performance information set to the corresponding preset storage node, which can avoid storing massive monitoring data The problem of continuous disk write operations.
  • FIG. 4 it is a flowchart of the implementation of the monitoring data storage method provided by the second embodiment of the application. It can be seen from FIG. 4 that compared with the embodiment shown in FIG. 1, the specific implementation process of S401 ⁇ S404 is the same as that of S101 ⁇ S104. The difference is that S405, S404 and S405 are included after S404. To execute the relationship sequentially, specifically, the detailed process of S405 is as follows:
  • S405 Perform read and write operations on the monitored performance information stored by the preset storage node based on the time stamp information.
  • the monitoring performance information stored by each of the preset storage nodes is the monitoring performance information included in the same target monitoring performance information set, and the same target monitoring performance information set corresponds to the same time stamp information. Therefore, Performing read and write operations on the monitoring performance information stored by the preset storage node directly based on the time stamp information to improve the convenience of the read and write operations.
  • FIG. 5 it is a flow chart of the implementation of the monitoring data storage method provided by the third embodiment of the present application.
  • the specific implementation process of S501 ⁇ S504 is the same as the specific implementation process of S101 ⁇ S104.
  • S504 also includes S505 ⁇ S506.
  • S505 and S504 are in a sequential execution relationship.
  • the specific implementation process of S505 ⁇ S506 is as follows:
  • S505 Establish index information corresponding to each of the target performance information sets.
  • the index information corresponding to each target performance information set is unique.
  • the index information corresponding to each target performance information set may be each target performance information set.
  • the corresponding timestamp information, or the first hash value, or can be identified by a preset index term, which is not specifically limited here.
  • S506 Generate a second mapping relationship between the index information and the preset storage node.
  • the first mapping relationship and each target performance information set may be established according to the first mapping relationship and each target performance information set.
  • the index information corresponding to the target performance information set is used to generate a second mapping relationship between the index information and the preset storage node.
  • this embodiment establishes index information corresponding to each of the target performance sets, and generates a relationship between the index information and the preset storage node.
  • the second mapping relationship In the query process, the corresponding target monitoring performance information set may be queried from the preset storage node based on the second mapping relationship, so as to improve the timeliness of query.
  • FIG. 6 it is an implementation flowchart of the monitoring data storage method provided by the fourth embodiment of the present application. It can be seen from FIG. 6 that compared with the embodiment shown in FIG. 5, the specific implementation process of S601 ⁇ S606 is the same as the specific implementation process of S501 ⁇ S506. The difference is that after S606 it also includes S607, S607 and S606. For the sequential execution relationship, the details are as follows:
  • the embodiment of the present application searches for all corresponding index information in the query request information from the preset storage node based on the second mapping relationship.
  • the target monitoring performance information collection improve the timeliness of monitoring data query.
  • Fig. 7 is a schematic structural diagram of a monitoring data storage device provided by an embodiment of the present application. It can be seen from FIG. 7 that the monitoring data storage device 7 provided by the embodiment of the present application includes:
  • the obtaining module 701 is configured to obtain monitoring data corresponding to at least one monitoring item of the device to be monitored within a preset time period, where the monitoring data includes monitoring performance information and time stamp information;
  • the dividing module 702 is configured to divide the monitoring performance information based on the time stamp information to obtain a plurality of target monitoring performance information sets, each of the target monitoring performance information sets includes a plurality of continuous monitoring performance information;
  • the determining module 703 is configured to use a preset consistency algorithm to separately determine the preset storage node corresponding to each of the target monitoring performance information sets;
  • the storage module 704 is configured to associate the time stamp information and the monitoring performance information corresponding to each target monitoring performance information set to the preset storage node corresponding to each target monitoring performance information set. .
  • the read and write module is configured to perform read and write operations on the monitored performance information stored by the preset storage node based on the time stamp information.
  • the division module is specifically configured to:
  • the monitoring performance information with the same time stamp information is divided into the same target monitoring performance information, and multiple target monitoring performance information sets are obtained.
  • the determining module is specifically configured to:
  • the preset storage nodes corresponding to each of the target monitoring performance information sets are respectively determined.
  • the determining module includes:
  • a calculation unit configured to use a preset hash algorithm to separately calculate a first hash value corresponding to each of the target monitoring performance information sets, and a second hash value corresponding to each of the preset storage nodes;
  • the mapping unit is configured to respectively map the first hash value and the second hash value on a hash circle with a preset number space according to a preset mapping rule to obtain the first hash value.
  • the determining unit is configured to separately determine the preset storage node corresponding to each target monitoring performance information set according to the first mapping relationship.
  • An establishment module configured to separately establish index information corresponding to each of the target performance information sets
  • the generating module is configured to generate a second mapping relationship between the index information and the preset storage node.
  • the query module is configured to query the target monitoring performance information set corresponding to the index information in the query request information from the preset storage node based on the second mapping relationship when the query request information is detected .
  • Fig. 8 is a schematic structural diagram of a server provided by an embodiment of the present application.
  • the server 8 of this embodiment includes a processor 80, a memory 81, and a computer program 82 stored in the memory 81 and running on the processor 80, such as a monitoring data storage program.
  • the processor 80 implements the steps in the foregoing embodiments of the monitoring data storage method when the computer program 82 is executed, such as steps 101 to 104 shown in FIG. 1.
  • the computer program 82 may be divided into one or more modules/units, and the one or more modules/units are stored in the memory 81 and executed by the processor 80 to complete the application.
  • the one or more modules/units may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program 82 in the server 8.
  • the computer program 82 can be divided into an acquisition module, a division module, a determination module, and a storage module (modules in the virtual device), and the specific functions of each module are as follows:
  • An acquisition module configured to acquire monitoring data corresponding to at least one monitoring item of the equipment to be monitored within a preset time period, where the monitoring data includes monitoring performance information and time stamp information;
  • a dividing module configured to divide the monitoring performance information based on the time stamp information to obtain a plurality of target monitoring performance information sets, each of the target monitoring performance information sets includes a plurality of continuous monitoring performance information;
  • the determining module is configured to use a preset consistency algorithm to separately determine the preset storage node corresponding to each of the target monitoring performance information sets;
  • the storage module is configured to associate and store the time stamp information and the monitoring performance information corresponding to each target monitoring performance information set to the preset storage node corresponding to each target monitoring performance information set.
  • the disclosed device/terminal device and method may be implemented in other ways.
  • the device/terminal device embodiments described above are only illustrative.
  • the division of the modules or units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units.
  • components can be combined or integrated into another system, or some features can be omitted or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple communication units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
  • the integrated module/unit 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.
  • this application implements all or part of the procedures in the above-mentioned embodiments and methods, and can also be completed by instructing relevant hardware through a computer program.
  • the computer program can be stored in a computer-readable storage medium.
  • the computer-readable storage medium may be non-volatile or volatile; when the computer program is executed by the processor, the steps of the foregoing method embodiments may be implemented.
  • the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file, or some intermediate forms.
  • the computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory) , Random Access Memory (RAM, Random Access Memory), electrical carrier signal, telecommunications signal, and software distribution media, etc.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • electrical carrier signal telecommunications signal
  • software distribution media etc.
  • the content contained in the computer-readable medium can be appropriately added or deleted according to the requirements of the legislation and patent practice in the jurisdiction.
  • the computer-readable medium Does not include electrical carrier signals and telecommunication signals.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

Disclosed is a monitoring data storage method. The method comprises: acquiring monitoring data, which corresponds, within a preset duration, to a monitoring item of a device to be monitored (S101); dividing monitoring performance information on the basis of timestamp information to obtain a plurality of target monitoring performance information sets (S102); respectively determining a preset storage node corresponding to each target monitoring performance information set by using a preset consistency algorithm (S103); and storing, in an associated manner and in the preset storage node corresponding to each target monitoring performance information set, timestamp information and monitoring performance information corresponding to each target monitoring performance information set (S104). A preset storage node corresponding to each target monitoring performance information set is determined by means of a preset consistency algorithm, and timestamp information and monitoring performance information corresponding to each target monitoring performance information set are stored in an associated manner in the corresponding preset storage node, such that the problem of continuous disk write-in operations during the storage of massive monitoring data can be avoided.

Description

监控数据存储方法、设备、服务器及存储介质Monitoring data storage method, equipment, server and storage medium
本申请要求于2020年3月11日提交中国专利局、申请号为202010165126.X,发明名称为“监控数据存储方法、设备、服务器及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on March 11, 2020, the application number is 202010165126.X, and the invention title is "Monitoring Data Storage Methods, Equipment, Servers and Storage Media". The entire content of the application is approved The reference is incorporated in this application.
技术领域Technical field
本申请属于数据监控技术领域,尤其涉及一种监控数据存储方法、设备、服务器及存储介质。This application belongs to the field of data monitoring technology, and in particular relates to a monitoring data storage method, device, server, and storage medium.
背景技术Background technique
在进行数据监控时,发明人意识到目前监控系统对数据的查询时效性要求较高,且需要频繁进行读写操作,因此在对监控数据存储时,需要考虑查询的时效性以及读写操作的方便性。When performing data monitoring, the inventor realized that the current monitoring system requires high timeliness of data query and frequent read and write operations. Therefore, when storing monitoring data, the timeliness of query and read and write operations need to be considered. Convenience.
目前,针对海量监控数据的存储方案,需要不断进行磁盘写入操作,导致在查询时无法方便读写,且在查询量较大的场景下,无法保证查询的时效性。At present, storage solutions for massive monitoring data require continuous disk write operations, which makes it difficult to read and write during queries, and in scenarios with large query volumes, the timeliness of queries cannot be guaranteed.
技术问题technical problem
针对海量监控数据的存储方案,需要不断进行磁盘写入操作,导致在查询时无法方便读写,且在查询量较大的场景下,无法保证查询的时效性。The storage solution for massive monitoring data requires continuous disk write operations, which makes it difficult to read and write during queries, and in scenarios with large query volumes, the timeliness of queries cannot be guaranteed.
技术解决方案Technical solutions
有鉴于此,本申请实施例提供了监控数据存储方法、服务器、计算设备及存储介质,能够避免针对海量监控数据进行存储时,不断进行磁盘写入操作的问题。In view of this, the embodiments of the present application provide a monitoring data storage method, a server, a computing device, and a storage medium, which can avoid the problem of continuous disk write operations when storing massive monitoring data.
本申请实施例的第一方面提供了一种监控数据存储方法,包括:The first aspect of the embodiments of the present application provides a monitoring data storage method, including:
获取待监控设备的至少一个监控项在预设时长内对应的监控数据,所述监控数据包括监控性能信息和时间戳信息;Acquiring monitoring data corresponding to at least one monitoring item of the device to be monitored within a preset time period, where the monitoring data includes monitoring performance information and time stamp information;
基于所述时间戳信息将所述监控性能信息进行划分,得到多个目标监控性能信息集合,每个所述目标监控性能信息集合包括多个连续的所述监控性能信息;Dividing the monitoring performance information based on the time stamp information to obtain a plurality of target monitoring performance information sets, each of the target monitoring performance information sets including a plurality of continuous monitoring performance information;
利用预设的一致性算法,分别确定每个所述目标监控性能信息集合对应的预设存储节点;Using a preset consistency algorithm to respectively determine the preset storage node corresponding to each of the target monitoring performance information sets;
将每个所述目标监控性能信息集合对应的时间戳信息和所述监控性能信息,分别关联存储至每个所述目标监控性能信息集合各自对应的所述预设存储节点。The time stamp information corresponding to each target monitoring performance information set and the monitoring performance information are respectively associated and stored in the preset storage node corresponding to each target monitoring performance information set.
本申请实施例的第二方面提供了一种监控数据存储设备,包括:A second aspect of the embodiments of the present application provides a monitoring data storage device, including:
获取模块,用于获取待监控设备的至少一个监控项在预设时长内对应的监控数据,所述监控数据包括监控性能信息和时间戳信息;An acquiring module, configured to acquire monitoring data corresponding to at least one monitoring item of the equipment to be monitored within a preset time period, where the monitoring data includes monitoring performance information and time stamp information;
划分模块,用于基于所述时间戳信息将所述监控性能信息进行划分,得到多个目标监控性能信息集合,每个所述目标监控性能信息集合包括多个连续的所述监控性能信息;A dividing module, configured to divide the monitoring performance information based on the time stamp information to obtain a plurality of target monitoring performance information sets, each of the target monitoring performance information sets includes a plurality of continuous monitoring performance information;
确定模块,用于利用预设的一致性算法,分别确定每个所述目标监控性能信息集合对应的预设存储节点;The determining module is configured to use a preset consistency algorithm to separately determine the preset storage node corresponding to each of the target monitoring performance information sets;
存储模块,用于将每个所述目标监控性能信息集合对应的时间戳信息和所述监控性能信息,分别关联存储至每个所述目标监控性能信息集合各自对应的所述预设存储节点。The storage module is configured to associate and store the time stamp information and the monitoring performance information corresponding to each target monitoring performance information set to the preset storage node corresponding to each target monitoring performance information set.
本申请实施例的第三方面提供了一种服务器,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时实现如下步骤:The third aspect of the embodiments of the present application provides a server, including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program When implementing the following steps:
获取待监控设备的至少一个监控项在预设时长内对应的监控数据,所述监控数据包括监控性能信息和时间戳信息;Acquiring monitoring data corresponding to at least one monitoring item of the device to be monitored within a preset time period, where the monitoring data includes monitoring performance information and time stamp information;
基于所述时间戳信息将所述监控性能信息进行划分,得到多个目标监控性能信息集合,每个所述目标监控性能信息集合包括多个连续的所述监控性能信息;Dividing the monitoring performance information based on the time stamp information to obtain a plurality of target monitoring performance information sets, each of the target monitoring performance information sets including a plurality of continuous monitoring performance information;
利用预设的一致性算法,分别确定每个所述目标监控性能信息集合对应的预设存储节点;Using a preset consistency algorithm to respectively determine the preset storage node corresponding to each of the target monitoring performance information sets;
将每个所述目标监控性能信息集合对应的时间戳信息和所述监控性能信息,分别关联存储至每个所述目标监控性能信息集合各自对应的所述预设存储节点。The time stamp information corresponding to each target monitoring performance information set and the monitoring performance information are respectively associated and stored in the preset storage node corresponding to each target monitoring performance information set.
申请实施例第四方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其中,所述计算机程序被处理器执行时实现如下步骤:The fourth aspect of the application embodiments provides a computer-readable storage medium storing a computer program, wherein the computer program is executed by a processor to implement the following steps:
获取待监控设备的至少一个监控项在预设时长内对应的监控数据,所述监控数据包括监控性能信息和时间戳信息;Acquiring monitoring data corresponding to at least one monitoring item of the device to be monitored within a preset time period, where the monitoring data includes monitoring performance information and time stamp information;
基于所述时间戳信息将所述监控性能信息进行划分,得到多个目标监控性能信息集合,每个所述目标监控性能信息集合包括多个连续的所述监控性能信息;Dividing the monitoring performance information based on the time stamp information to obtain a plurality of target monitoring performance information sets, each of the target monitoring performance information sets including a plurality of continuous monitoring performance information;
利用预设的一致性算法,分别确定每个所述目标监控性能信息集合对应的预设存储节点;Using a preset consistency algorithm to respectively determine the preset storage node corresponding to each of the target monitoring performance information sets;
将每个所述目标监控性能信息集合对应的时间戳信息和所述监控性能信息,分别关联存储至每个所述目标监控性能信息集合各自对应的所述预设存储节点。The time stamp information corresponding to each target monitoring performance information set and the monitoring performance information are respectively associated and stored in the preset storage node corresponding to each target monitoring performance information set.
有益效果Beneficial effect
本申请通过基于时间戳信息将监控性能信息进行划分,得到多个目标监控性能信息集合;并利用预设的一致性算法,分别确定每个目标监控性能信息集合对应的预设存储节点,将每个所述目标监控性能信息集合对应的时间戳信息和监控性能信息,关联存储至对应的预设存储节点,能够避免针对海量监控数据进行存储时,不断进行磁盘写入操作的问题。This application divides the monitoring performance information based on the time stamp information to obtain multiple target monitoring performance information sets; and uses a preset consistency algorithm to determine the preset storage node corresponding to each target monitoring performance information set, and The time stamp information and monitoring performance information corresponding to each of the target monitoring performance information sets are stored in association with the corresponding preset storage node, which can avoid the problem of continuous disk write operations when storing massive monitoring data.
附图说明Description of the drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly describe the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only of the present application. For some embodiments, for those of ordinary skill in the art, other drawings may be obtained based on these drawings without creative labor.
图1是本申请第一实施例提供的监控数据存储方法的实现流程图;FIG. 1 is an implementation flowchart of the monitoring data storage method provided by the first embodiment of the present application;
图2是图1中S103的具体实现流程图;Figure 2 is a specific implementation flow chart of S103 in Figure 1;
图3是将所述第一哈希值和所述第二哈希值分别映射在哈希圆环上的结构示意图;FIG. 3 is a schematic diagram of a structure in which the first hash value and the second hash value are respectively mapped on a hash circle;
图4是申请第二实施例提供的监控数据存储方法的实现流程图;FIG. 4 is an implementation flowchart of the monitoring data storage method provided by the second embodiment of the application;
图5是本申请第三实施例提供的监控数据存储方法的实现流程图;FIG. 5 is an implementation flowchart of the monitoring data storage method provided by the third embodiment of the present application;
图6是本申请第四实施例提供的监控数据存储方法的实现流程图;FIG. 6 is an implementation flowchart of the monitoring data storage method provided by the fourth embodiment of the present application;
图7是本申请实施例提供的监控数据存储设备的结构示意图;FIG. 7 is a schematic structural diagram of a monitoring data storage device provided by an embodiment of the present application;
图8是本申请实施例提供的服务器的结构示意图。Fig. 8 is a schematic structural diagram of a server provided by an embodiment of the present application.
本发明的实施方式Embodiments of the present invention
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本申请实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本申请。在其它情况中,省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本申请的描述。In the following description, for the purpose of illustration rather than limitation, specific details such as a specific system structure and technology are proposed for a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from obstructing the description of this application.
为了说明本申请所述的技术方案,下面通过具体实施例来进行说明。如图1所示,是本申请第一实施例提供的监控数据存储方法的实现流程图,本实施例可以监控数据存储设备的硬件或软件实现,所述监控数据存储设备可以是服务器。具体地,详述如下:In order to illustrate the technical solutions described in the present application, specific embodiments are used for description below. As shown in FIG. 1, it is an implementation flowchart of the monitoring data storage method provided by the first embodiment of the present application. This embodiment may be implemented by hardware or software of a monitoring data storage device, and the monitoring data storage device may be a server. Specifically, the details are as follows:
S101,获取待监控设备的至少一个监控项在预设时长内对应的监控数据,所述监控数据包括监控性能信息和时间戳信息。S101: Obtain monitoring data corresponding to at least one monitoring item of a device to be monitored within a preset time period, where the monitoring data includes monitoring performance information and time stamp information.
可以理解地,所述待监控设备通常包括多个监控项,每个所述监控项均对应有预设性能信息,可以理解地,所述监控项可以根据监控策略确定,不同的监控策略对应不同的监控项,在此不做具体限定。Understandably, the equipment to be monitored usually includes multiple monitoring items, and each of the monitoring items corresponds to preset performance information. Understandably, the monitoring items can be determined according to monitoring strategies, and different monitoring strategies correspond to different There are no specific restrictions on the monitoring items.
在所述待监控设备运行过程中,为了保证所述待监控设备的正常运行以及发生故障时,方便准确地进行故障定位,需要对每个监控项进行监控,得到与预设性能信息对应的监控性能信息。During the operation of the equipment to be monitored, in order to ensure the normal operation of the equipment to be monitored and when a failure occurs, it is necessary to monitor each monitoring item and obtain the monitoring corresponding to the preset performance information. Performance information.
其中,在本实施例中,所述监控数据包括监控性能信息和时间戳信息,具体地,时间戳(timestamp),表示一份数据在某个特定时间之前已经存在的、完整的、可验证的数据,通常是一个字符序列,用于唯一地标识某一刻的时间。Wherein, in this embodiment, the monitoring data includes monitoring performance information and time stamp information. Specifically, a time stamp (timestamp) indicates that a piece of data has existed before a certain time, is complete and verifiable. Data, usually a sequence of characters, is used to uniquely identify a certain moment of time.
可以理解地,由于监控数据与监控时间密切相关,因此,在分析监控数据时,需要预设时长,随着所述预设时长的增加,所述监控数据也会增加,当所述监控数据的数量增加到一定程度时,对所述监控数据进行存储,需要考虑读写操作的方便,以及查询的时效性。Understandably, since monitoring data is closely related to monitoring time, when analyzing monitoring data, a preset time period is required. As the preset time period increases, the monitoring data will also increase. When the number increases to a certain extent, to store the monitoring data, it is necessary to consider the convenience of read and write operations and the timeliness of query.
S102,基于所述时间戳信息将所述监控性能信息进行划分,得到多个目标监控性能信息集合,每个所述目标监控性能信息集合包括多个连续的所述监控性能信息。S102: Divide the monitoring performance information based on the timestamp information to obtain multiple target monitoring performance information sets, each of the target monitoring performance information sets includes a plurality of continuous monitoring performance information.
可以理解地,所述监控性能信息为连续信息,同一时间戳信息通常对应有多个连续的所述监控性能信息,可以基于时间戳信息将所述监控性能信息进行划分,例如,在一种可选的实现方式中,所述基于所述时间戳信息将所述监控性能信息进行划分,得到多个目标监控性能信息集合,包括:将具有相同时间戳信息的所述监控性能信息划分为同一目标监控性能信息,得到多个所述目标监控性能信息集合。可以理解地,每个所述目标监控性能信息集合包括多个联系的所述监控性能信息。Understandably, the monitoring performance information is continuous information. The same time stamp information usually corresponds to multiple continuous monitoring performance information. The monitoring performance information can be divided based on the time stamp information. For example, in a In an optional implementation manner, the dividing the monitoring performance information based on the time stamp information to obtain multiple target monitoring performance information sets includes: dividing the monitoring performance information with the same time stamp information into the same target Monitor performance information to obtain multiple sets of target monitoring performance information. Understandably, each of the target monitoring performance information sets includes multiple contacted monitoring performance information.
S103,利用预设的一致性算法,分别确定每个所述目标监控性能信息集合对应的预设存储节点。S103: Using a preset consistency algorithm, respectively determine a preset storage node corresponding to each of the target monitoring performance information sets.
在一种可选的实现方式中,所述一致性算法为一致性哈希算法,所述利用预设的一致性算法,分别确定每个所述目标监控性能信息集合对应的预设存储节点,包括:In an optional implementation manner, the consistency algorithm is a consistent hash algorithm, and the preset consistency algorithm is used to separately determine the preset storage nodes corresponding to each of the target monitoring performance information sets, include:
利用一致性哈希算法,分别确定每个所述目标监控性能信息集合对应的预设存储节点。Using a consistent hashing algorithm, the preset storage nodes corresponding to each of the target monitoring performance information sets are respectively determined.
具体地,如图2所示,是图1中S103的具体实现流程图。由图2可知,S103包括:Specifically, as shown in FIG. 2, it is a specific implementation flowchart of S103 in FIG. 1. It can be seen from Figure 2 that S103 includes:
S1031,利用预设的哈希算法分别计算每个所述目标监控性能信息集合对应的第一哈希值,以及每个所述预设存储节点对应的第二哈希值。S1031: Calculate the first hash value corresponding to each of the target monitoring performance information sets and the second hash value corresponding to each of the preset storage nodes by using a preset hash algorithm.
其中,预设的哈希算法包括MD5算法,散列算法等,在本实施例中,假设预设的哈希算法为MD5算法,利用MD5算法分别计算每个所述目标监控性能信息集合对应的第一哈希值,例如,所述第一哈希值分别表示为:key1、key2,…,key(n-1),其中,n为整数。Among them, the preset hash algorithm includes MD5 algorithm, hash algorithm, etc. In this embodiment, it is assumed that the preset hash algorithm is the MD5 algorithm, and the MD5 algorithm is used to calculate the corresponding information of each target monitoring performance information set. The first hash value, for example, the first hash value is respectively expressed as: key1, key2, ..., key(n-1), where n is an integer.
利用MD5算法分别计算每个所述预设存储节点对应的第二哈希值,例如,所述第二哈希值分别表示为:KEY1、KEY2,…,KEY(n-k),其中,k≤n。The MD5 algorithm is used to calculate the second hash value corresponding to each of the preset storage nodes. For example, the second hash value is expressed as: KEY1, KEY2, ..., KEY(nk), where k≤n .
S1032,根据预设的映射规则分别将所述第一哈希值和所述第二哈希值,映射在具有预设个数字空间的哈希圆环上,得到所述第一哈希值和所述第二哈希值之间的第一映射关系。S1032: Map the first hash value and the second hash value on a hash circle with a preset number space according to a preset mapping rule to obtain the first hash value and The first mapping relationship between the second hash values.
其中,预设的映射规则为确定映射的起始位置,然后从所述起始位置开始顺时针查找所述哈希圆环对应的预设数字空间,例如,在本实例中,所述哈希圆环具有2 n个数字空间,将所述第一哈希值和所述第二哈希值分别映射在对应的数字空间,得到所述第一哈希值和所述第二哈希值之间的第一映射关系。 Wherein, the preset mapping rule is to determine the starting position of the mapping, and then from the starting position to search the preset number space corresponding to the hash circle clockwise, for example, in this example, the hash The ring has 2 n digital spaces, and the first hash value and the second hash value are respectively mapped to the corresponding digital spaces to obtain one of the first hash value and the second hash value The first mapping relationship between.
具体地,如图3所示,是将所述第一哈希值和所述第二哈希值分别映射在哈希圆环上的结构示意图。图3中,0为映射的起始位置,对应为第一个数字空间;2 n为映射的结束位置,对应为第2 n个的数字空间。图3中,为了方便观察,在2 n位置处没有映射所述第一哈希值和所述第二哈希值。 Specifically, as shown in FIG. 3, it is a schematic structural diagram in which the first hash value and the second hash value are respectively mapped on a hash circle. In Figure 3, 0 is the starting position of the mapping, corresponding to the first digital space; 2 n is the ending position of the mapping, corresponding to the 2 n- th digital space. In FIG. 3, for convenience of observation, the first hash value and the second hash value are not mapped at the 2n position.
由图3可知,第一哈希值和第二哈希值之间具有一一映射的关系。可以理解地,当所述目标监控性能信息集合的数量超过了所述哈希圆环预设的数字空间的个数,则从所述起始位置开始,重新按照顺时针查找所述哈希圆环对应的预设数字空间,将多余的所述目标监控性能信息集合对应的所述第一哈希值重新映射在所述哈希圆环上,覆盖之前的所述第一哈希值。It can be seen from FIG. 3 that there is a one-to-one mapping relationship between the first hash value and the second hash value. Understandably, when the number of the target monitoring performance information set exceeds the number of the number space preset by the hash circle, starting from the starting position, the hash circle is searched again clockwise The preset digital space corresponding to the ring remaps the first hash value corresponding to the redundant target monitoring performance information set on the hash circle to cover the previous first hash value.
S1033,根据所述第一映射关系,分别确定每个所述目标监控性能信息集合对应的所述预设存储节点。S1033: Determine the preset storage node corresponding to each target monitoring performance information set according to the first mapping relationship.
可以理解地,由于每个所述目标监控性能信息集合对应有唯一的第一哈希值,每个所述预设存储节点也对应有唯一的第二哈希值,因此,根据所述第一映射关系,可以分别确定每个所述目标监控性能信息集合对应的所述预设存储节点。Understandably, since each of the target monitoring performance information sets corresponds to a unique first hash value, each of the preset storage nodes also corresponds to a unique second hash value. Therefore, according to the first The mapping relationship can respectively determine the preset storage node corresponding to each target monitoring performance information set.
S104,将每个所述目标监控性能信息集合对应的时间戳信息和所述监控性能信息,分别关联存储至每个所述目标监控性能信息集合各自对应的所述预设存储节点。S104. The time stamp information corresponding to each target monitoring performance information set and the monitoring performance information are respectively associated and stored in the preset storage node corresponding to each target monitoring performance information set.
由前面分析可知,本申请实施例提供的监控数据存储方法,通过基于时间戳信息将监控性能信息进行划分,得到多个目标监控性能信息集合;并利用预设的一致性算法,分别确定每个目标监控性能信息集合对应的预设存储节点,将每个所述目标监控性能信息集合对应的时间戳信息和监控性能信息,关联存储至对应的预设存储节点,能够避免针对海量监控数据进行存储时,不断进行磁盘写入操作的问题。From the foregoing analysis, it can be seen that the monitoring data storage method provided by the embodiment of the present application divides the monitoring performance information based on the time stamp information to obtain multiple target monitoring performance information sets; and uses a preset consistency algorithm to determine each The preset storage node corresponding to the target monitoring performance information set, associates the time stamp information and monitoring performance information corresponding to each target monitoring performance information set to the corresponding preset storage node, which can avoid storing massive monitoring data The problem of continuous disk write operations.
如图4所示,是申请第二实施例提供的监控数据存储方法的实现流程图。由图4可知,本实施例与图1所示实施例相比,S401~S404的具体实施过程与S101~S104的具体实施过程相同,不同之处在于,在S404之后还包括S405,S404与S405为顺序执行关系,具体地,对S405的详述过程如下:As shown in Figure 4, it is a flowchart of the implementation of the monitoring data storage method provided by the second embodiment of the application. It can be seen from FIG. 4 that compared with the embodiment shown in FIG. 1, the specific implementation process of S401~S404 is the same as that of S101~S104. The difference is that S405, S404 and S405 are included after S404. To execute the relationship sequentially, specifically, the detailed process of S405 is as follows:
S405,基于所述时间戳信息对所述预设存储节点存储的所述监控性能信息进行读写操作。S405: Perform read and write operations on the monitored performance information stored by the preset storage node based on the time stamp information.
可以理解地,每个所述预设存储节点存储的所述监控性能信息为同一目标监控性能信息集合包含的所述监控性能性息,同一目标监控性能信息集合对应同一时间戳信息,因此,可以直接基于所述时间戳信息对所述预设存储节点存储的所述监控性能信息进行读写操作以提高读写操作的方便性。Understandably, the monitoring performance information stored by each of the preset storage nodes is the monitoring performance information included in the same target monitoring performance information set, and the same target monitoring performance information set corresponds to the same time stamp information. Therefore, Performing read and write operations on the monitoring performance information stored by the preset storage node directly based on the time stamp information to improve the convenience of the read and write operations.
如图5所示,是本申请第三实施例提供的监控数据存储方法的实现流程图。由图5可知,本实施例与图1所示实施例相比,S501~S504的具体实现过程与S101~S104的具体实现过程相同,不同之处在于,在S504之后,还包括S505~S506,其中,S505与S504为顺序执行关系。具体地,S505~S506的具体实现过程如下:As shown in FIG. 5, it is a flow chart of the implementation of the monitoring data storage method provided by the third embodiment of the present application. It can be seen from FIG. 5 that compared with the embodiment shown in FIG. 1, the specific implementation process of S501~S504 is the same as the specific implementation process of S101~S104. The difference is that after S504, it also includes S505~S506. Among them, S505 and S504 are in a sequential execution relationship. Specifically, the specific implementation process of S505~S506 is as follows:
S505,分别建立每个所述目标性能信息集合对应的索引信息。S505: Establish index information corresponding to each of the target performance information sets.
其中,每个所述目标性能信息集合对应的所述索引信息具有唯一性,在本实例中,每个所述目标性能信息集合对应的所述索引信息可以是每个所述目标性能信息集合各自对应的所述时间戳信息、或者所述第一哈希值、或者可以用预设的索引词进行标识,在此不做具体限制。Wherein, the index information corresponding to each target performance information set is unique. In this example, the index information corresponding to each target performance information set may be each target performance information set. The corresponding timestamp information, or the first hash value, or can be identified by a preset index term, which is not specifically limited here.
S506,生成所述索引信息与所述预设存储节点之间的第二映射关系。S506: Generate a second mapping relationship between the index information and the preset storage node.
由于所述预设存储节点与所述目标性能信息集合之间具有第一映射关系,在建立每个所述目标性能信息集合对应的索引信息之后,可以根据所述第一映射关系以及每个所述目标性能信息集合对应的索引信息,生成所述索引信息与所述预设存储节点之间的第二映射关系。Since there is a first mapping relationship between the preset storage node and the target performance information set, after the index information corresponding to each target performance information set is established, the first mapping relationship and each target performance information set may be established according to the first mapping relationship and each target performance information set. The index information corresponding to the target performance information set is used to generate a second mapping relationship between the index information and the preset storage node.
由上述分析可知,本实施例在图1所示实施例的基础上,通过建立每个所述目标性能性集合对应的索引信息,并生成所述索引信息与所述预设存储节点之间的第二映射关系。可以在查询过程中,基于所述第二映射关系从预设存储节点中查询对应的所述目标监控性能信息集合,提高查询的时效性。It can be seen from the above analysis that, on the basis of the embodiment shown in FIG. 1, this embodiment establishes index information corresponding to each of the target performance sets, and generates a relationship between the index information and the preset storage node. The second mapping relationship. In the query process, the corresponding target monitoring performance information set may be queried from the preset storage node based on the second mapping relationship, so as to improve the timeliness of query.
具体地,如图6所示,是本申请第四实施例提供的监控数据存储方法的实现流程图。由图6可知,本实施例与图5所示实施例相比,S601~S606的具体实施过程与S501~S506的具体实施过程相同,不同之处在于,在S606之后还包括S607,S607与S606为顺序执行关系,详述如下:Specifically, as shown in FIG. 6, it is an implementation flowchart of the monitoring data storage method provided by the fourth embodiment of the present application. It can be seen from FIG. 6 that compared with the embodiment shown in FIG. 5, the specific implementation process of S601~S606 is the same as the specific implementation process of S501~S506. The difference is that after S606 it also includes S607, S607 and S606. For the sequential execution relationship, the details are as follows:
S607,当检测到查询请求信息时,基于所述第二映射关系从所述预设存储节点中,查询与所述查询请求信息中的索引信息对应的所述目标监控性能信息集合。S607: When the query request information is detected, query the target monitoring performance information set corresponding to the index information in the query request information from the preset storage node based on the second mapping relationship.
由上述分析可知,本申请实施例在图5所示实施例的基础上,基于所述第二映射关系从所述预设存储节点中,查询与所述查询请求信息中的索引信息对应的所述目标监控性能信息集合。提高对监控数据查询的时效性。It can be seen from the above analysis that, on the basis of the embodiment shown in FIG. 5, the embodiment of the present application searches for all corresponding index information in the query request information from the preset storage node based on the second mapping relationship. The target monitoring performance information collection. Improve the timeliness of monitoring data query.
图7是本申请实施例提供的监控数据存储设备的结构示意图。由图7可知,本申请实施例提供的监控数据存储设备7包括:Fig. 7 is a schematic structural diagram of a monitoring data storage device provided by an embodiment of the present application. It can be seen from FIG. 7 that the monitoring data storage device 7 provided by the embodiment of the present application includes:
获取模块701,用于获取待监控设备的至少一个监控项在预设时长内对应的监控数据,所述监控数据包括监控性能信息和时间戳信息;The obtaining module 701 is configured to obtain monitoring data corresponding to at least one monitoring item of the device to be monitored within a preset time period, where the monitoring data includes monitoring performance information and time stamp information;
划分模块702,用于基于所述时间戳信息将所述监控性能信息进行划分,得到多个目标监控性能信息集合,每个所述目标监控性能信息集合包括多个连续的所述监控性能信息;The dividing module 702 is configured to divide the monitoring performance information based on the time stamp information to obtain a plurality of target monitoring performance information sets, each of the target monitoring performance information sets includes a plurality of continuous monitoring performance information;
确定模块703,用于利用预设的一致性算法,分别确定每个所述目标监控性能信息集合对应的预设存储节点;The determining module 703 is configured to use a preset consistency algorithm to separately determine the preset storage node corresponding to each of the target monitoring performance information sets;
存储模块704,用于将每个所述目标监控性能信息集合对应的时间戳信息和所述监控性能信息,分别关联存储至每个所述目标监控性能信息集合各自对应的所述预设存储节点。The storage module 704 is configured to associate the time stamp information and the monitoring performance information corresponding to each target monitoring performance information set to the preset storage node corresponding to each target monitoring performance information set. .
在一种可选的实现方式中,还包括:In an optional implementation manner, it also includes:
读写模块,用于基于所述时间戳信息对所述预设存储节点存储的所述监控性能信息进行读写操作。The read and write module is configured to perform read and write operations on the monitored performance information stored by the preset storage node based on the time stamp information.
在一种可选的实现方式中,所述划分模块具体用于:In an optional implementation manner, the division module is specifically configured to:
将具有相同时间戳信息的所述监控性能信息划分为同一目标监控性能信息,得到多个所述目标监控性能信息集合。The monitoring performance information with the same time stamp information is divided into the same target monitoring performance information, and multiple target monitoring performance information sets are obtained.
在一种可选的实现方式中,所述确定模块具体用于:In an optional implementation manner, the determining module is specifically configured to:
利用一致性哈希算法,分别确定每个所述目标监控性能信息集合对应的预设存储节点。Using a consistent hashing algorithm, the preset storage nodes corresponding to each of the target monitoring performance information sets are respectively determined.
在一种可选的实现方式中,所述确定模块,包括:In an optional implementation manner, the determining module includes:
计算单元,用于利用预设的哈希算法分别计算每个所述目标监控性能信息集合对应的第一哈希值,以及每个所述预设存储节点对应的第二哈希值;A calculation unit, configured to use a preset hash algorithm to separately calculate a first hash value corresponding to each of the target monitoring performance information sets, and a second hash value corresponding to each of the preset storage nodes;
映射单元,用于根据预设的映射规则分别将所述第一哈希值和所述第二哈希值,映射在具有预设个数字空间的哈希圆环上,得到所述第一哈希值和所述第二哈希值之间的第一映射关系;The mapping unit is configured to respectively map the first hash value and the second hash value on a hash circle with a preset number space according to a preset mapping rule to obtain the first hash value. A first mapping relationship between the hope value and the second hash value;
确定单元,用于根据所述第一映射关系,分别确定每个所述目标监控性能信息集合对应的所述预设存储节点。The determining unit is configured to separately determine the preset storage node corresponding to each target monitoring performance information set according to the first mapping relationship.
在一种可选的实现方式中,还包括:In an optional implementation manner, it further includes:
建立模块,用于分别建立每个所述目标性能信息集合对应的索引信息;An establishment module, configured to separately establish index information corresponding to each of the target performance information sets;
生成模块,用于生成所述索引信息与所述预设存储节点之间的第二映射关系。The generating module is configured to generate a second mapping relationship between the index information and the preset storage node.
在一种可选的实现方式中,还包括:In an optional implementation manner, it also includes:
查询模块,用于在当检测到查询请求信息时,基于所述第二映射关系从所述预设存储节点中,查询与所述查询请求信息中的索引信息对应的所述目标监控性能信息集合。The query module is configured to query the target monitoring performance information set corresponding to the index information in the query request information from the preset storage node based on the second mapping relationship when the query request information is detected .
图8是本申请实施例提供的服务器的结构示意图。如图8所示,该实施例的服务器8包括:处理器80、存储器81以及存储在存储器81中并可在处理器80上运行的计算机程序82,例如监控数据存储程序。处理器80执行计算机程序82时实现上述各个监控数据存储方法实施例中的步骤,例如图1所示的步骤101至104。Fig. 8 is a schematic structural diagram of a server provided by an embodiment of the present application. As shown in FIG. 8, the server 8 of this embodiment includes a processor 80, a memory 81, and a computer program 82 stored in the memory 81 and running on the processor 80, such as a monitoring data storage program. The processor 80 implements the steps in the foregoing embodiments of the monitoring data storage method when the computer program 82 is executed, such as steps 101 to 104 shown in FIG. 1.
示例性的,计算机程序82可以被分割成一个或多个模块/单元,所述一个或者多个模块/单元被存储在存储器81中,并由处理器80执行,以完成本申请。所述一个或多个模块/单元可以是能够完成特定功能的一系列计算机程序指令段,该指令段用于描述计算机程序82在所述服务器8中的执行过程。例如,计算机程序82可以被分割成获取模块、划分模块、确定模块以及存储模块(虚拟装置中的模块),各模块具体功能如下:Exemplarily, the computer program 82 may be divided into one or more modules/units, and the one or more modules/units are stored in the memory 81 and executed by the processor 80 to complete the application. The one or more modules/units may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program 82 in the server 8. For example, the computer program 82 can be divided into an acquisition module, a division module, a determination module, and a storage module (modules in the virtual device), and the specific functions of each module are as follows:
获取模块,用于获取待监控设备的至少一个监控项在预设时长内对应的监控数据,所述监控数据包括监控性能信息和时间戳信息;An acquisition module, configured to acquire monitoring data corresponding to at least one monitoring item of the equipment to be monitored within a preset time period, where the monitoring data includes monitoring performance information and time stamp information;
划分模块,用于基于所述时间戳信息将所述监控性能信息进行划分,得到多个目标监控性能信息集合,每个所述目标监控性能信息集合包括多个连续的所述监控性能信息;A dividing module, configured to divide the monitoring performance information based on the time stamp information to obtain a plurality of target monitoring performance information sets, each of the target monitoring performance information sets includes a plurality of continuous monitoring performance information;
确定模块,用于利用预设的一致性算法,分别确定每个所述目标监控性能信息集合对应的预设存储节点;The determining module is configured to use a preset consistency algorithm to separately determine the preset storage node corresponding to each of the target monitoring performance information sets;
存储模块,用于将每个所述目标监控性能信息集合对应的时间戳信息和所述监控性能信息,分别关联存储至每个所述目标监控性能信息集合各自对应的所述预设存储节点。The storage module is configured to associate and store the time stamp information and the monitoring performance information corresponding to each target monitoring performance information set to the preset storage node corresponding to each target monitoring performance information set.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述系统中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and conciseness of description, only the division of the above functional units and modules is used as an example. In practical applications, the above functions can be allocated to different functional units and modules as needed. Module completion, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist alone physically, or two or more units can be integrated into one unit. The above-mentioned integrated units can be hardware-based Formal realization can also be realized in the form of a software functional unit. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the present application. For the specific working process of the units and modules in the foregoing system, reference may be made to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。In the above-mentioned embodiments, the description of each embodiment has its own focus. For parts that are not described in detail or recorded in an embodiment, reference may be made to related descriptions of other embodiments.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。A person of ordinary skill in the art may realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of this application.
在本申请所提供的实施例中,应该理解到,所揭露的装置/终端设备和方法,可以通过其它的方式实现。例如,以上所描述的装置/终端设备实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。In the embodiments provided in this application, it should be understood that the disclosed device/terminal device and method may be implemented in other ways. For example, the device/terminal device embodiments described above are only illustrative. For example, the division of the modules or units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units. Or components can be combined or integrated into another system, or some features can be omitted or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个通信单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple communication units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
所述集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一计算机可读存储介质中,所述计算机可读存储介质可以是非易失性,也可以是易失性;该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读介质不包括电载波信号和电信信号。If the integrated module/unit 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, this application implements all or part of the procedures in the above-mentioned embodiments and methods, and can also be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. The computer-readable storage medium may be non-volatile or volatile; when the computer program is executed by the processor, the steps of the foregoing method embodiments may be implemented. Wherein, the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file, or some intermediate forms. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory) , Random Access Memory (RAM, Random Access Memory), electrical carrier signal, telecommunications signal, and software distribution media, etc. It should be noted that the content contained in the computer-readable medium can be appropriately added or deleted according to the requirements of the legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to the legislation and patent practice, the computer-readable medium Does not include electrical carrier signals and telecommunication signals.
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。The above-mentioned embodiments are only used to illustrate the technical solutions of the present application, not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still implement the foregoing The technical solutions recorded in the examples are modified, or some of the technical features are equivalently replaced; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the application, and should be included in Within the scope of protection of this application.

Claims (20)

  1. 一种监控数据存储方法,其中,包括: A monitoring data storage method, which includes:
    获取待监控设备的至少一个监控项在预设时长内对应的监控数据,所述监控数据包括监控性能信息和时间戳信息;Acquiring monitoring data corresponding to at least one monitoring item of the device to be monitored within a preset time period, where the monitoring data includes monitoring performance information and time stamp information;
    基于所述时间戳信息将所述监控性能信息进行划分,得到多个目标监控性能信息集合,每个所述目标监控性能信息集合包括多个连续的所述监控性能信息;Dividing the monitoring performance information based on the time stamp information to obtain a plurality of target monitoring performance information sets, each of the target monitoring performance information sets including a plurality of continuous monitoring performance information;
    利用预设的一致性算法,分别确定每个所述目标监控性能信息集合对应的预设存储节点;Using a preset consistency algorithm to respectively determine the preset storage node corresponding to each of the target monitoring performance information sets;
    将每个所述目标监控性能信息集合对应的时间戳信息和所述监控性能信息,分别关联存储至每个所述目标监控性能信息集合各自对应的所述预设存储节点。The time stamp information corresponding to each target monitoring performance information set and the monitoring performance information are respectively associated and stored in the preset storage node corresponding to each target monitoring performance information set.
  2. 如权利要求1所述的监控数据存储方法,其中,在所述将每个所述目标监控性能信息集合对应的时间戳信息和包括的所述监控性能信息,分别关联存储至每个所述目标监控性能信息集合各自对应的所述预设存储节点之后,还包括: The monitoring data storage method according to claim 1, wherein the time stamp information corresponding to each of the target monitoring performance information sets and the included monitoring performance information are respectively stored in association with each of the targets. After monitoring the preset storage nodes corresponding to each of the performance information sets, the method further includes:
    基于所述时间戳信息对所述预设存储节点存储的所述监控性能信息进行读写操作。Perform read and write operations on the monitoring performance information stored by the preset storage node based on the time stamp information.
  3. 如权利要求2所述的监控数据存储方法,其中,所述基于所述时间戳信息将所述监控性能信息进行划分,得到多个目标监控性能信息集合,包括: 3. The monitoring data storage method according to claim 2, wherein the dividing the monitoring performance information based on the time stamp information to obtain multiple target monitoring performance information sets includes:
    将具有相同时间戳信息的所述监控性能信息划分为同一目标监控性能信息,得到多个所述目标监控性能信息集合。The monitoring performance information with the same time stamp information is divided into the same target monitoring performance information, and multiple target monitoring performance information sets are obtained.
  4. 如权利要求1至3任一项所述的监控数据存储方法,其中,所述利用预设的一致性算法,分别确定每个所述目标监控性能信息集合对应的预设存储节点,包括: The monitoring data storage method according to any one of claims 1 to 3, wherein the using a preset consistency algorithm to separately determine the preset storage nodes corresponding to each of the target monitoring performance information sets comprises:
    利用一致性哈希算法,分别确定每个所述目标监控性能信息集合对应的预设存储节点。Using a consistent hashing algorithm, the preset storage nodes corresponding to each of the target monitoring performance information sets are respectively determined.
  5. 如权利要求4所述的监控数据存储方法,其中,所述利用一致性哈希算法,分别确定每个所述目标监控性能信息集合对应的预设存储节点,包括: 8. The monitoring data storage method according to claim 4, wherein said using a consistent hashing algorithm to respectively determine the preset storage node corresponding to each said target monitoring performance information set comprises:
    利用预设的哈希算法分别计算每个所述目标监控性能信息集合对应的第一哈希值,以及每个所述预设存储节点对应的第二哈希值;Respectively calculating the first hash value corresponding to each of the target monitoring performance information sets and the second hash value corresponding to each of the preset storage nodes by using a preset hash algorithm;
    根据预设的映射规则分别将所述第一哈希值和所述第二哈希值,映射在具有预设个数字空间的哈希圆环上,得到所述第一哈希值和所述第二哈希值之间的第一映射关系;According to preset mapping rules, the first hash value and the second hash value are respectively mapped on a hash circle with a preset number space to obtain the first hash value and the The first mapping relationship between the second hash values;
    根据所述第一映射关系,分别确定每个所述目标监控性能信息集合对应的所述预设存储节点。According to the first mapping relationship, the preset storage nodes corresponding to each of the target monitoring performance information sets are respectively determined.
  6. 如权利要求5所述的监控数据存储方法,其中,在所述将每个所述目标性能信息集合对应的时间戳信息和包括的所述性能信息,分别关联存储至每个所述目标性能信息集合各自对应的所述预设存储节点之后,包括: The monitoring data storage method according to claim 5, wherein the time stamp information corresponding to each of the target performance information sets and the included performance information are respectively stored in association with each of the target performance information After the preset storage nodes corresponding to each of the collections, include:
    分别建立每个所述目标性能信息集合对应的索引信息;Respectively establishing index information corresponding to each of the target performance information sets;
    生成所述索引信息与所述预设存储节点之间的第二映射关系。Generate a second mapping relationship between the index information and the preset storage node.
  7. 如权利要求6所述的监控数据存储方法,其中,在所述生成所述索引信息与所述预设存储节点之间的第二映射关系之后,还包括:8. The monitoring data storage method according to claim 6, wherein after said generating the second mapping relationship between the index information and the preset storage node, the method further comprises:
    当检测到查询请求信息时,基于所述第二映射关系从所述预设存储节点中,查询与所述查询请求信息中的索引信息对应的所述目标监控性能信息集合。When the query request information is detected, query the target monitoring performance information set corresponding to the index information in the query request information from the preset storage node based on the second mapping relationship.
  8. 一种监控数据存储设备,其中,包括: A monitoring data storage device, which includes:
    获取模块,用于获取待监控设备的至少一个监控项在预设时长内对应的监控数据,所述监控数据包括监控性能信息和时间戳信息;An acquisition module, configured to acquire monitoring data corresponding to at least one monitoring item of the equipment to be monitored within a preset time period, where the monitoring data includes monitoring performance information and time stamp information;
    划分模块,用于基于所述时间戳信息将所述监控性能信息进行划分,得到多个目标监控性能信息集合,每个所述目标监控性能信息集合包括多个连续的所述监控性能信息;A dividing module, configured to divide the monitoring performance information based on the time stamp information to obtain a plurality of target monitoring performance information sets, each of the target monitoring performance information sets includes a plurality of continuous monitoring performance information;
    确定模块,用于利用预设的一致性算法,分别确定每个所述目标监控性能信息集合对应的预设存储节点;The determining module is configured to use a preset consistency algorithm to separately determine the preset storage node corresponding to each of the target monitoring performance information sets;
    存储模块,用于将每个所述目标监控性能信息集合对应的时间戳信息和所述监控性能信息,分别关联存储至每个所述目标监控性能信息集合各自对应的所述预设存储节点。The storage module is configured to associate and store the time stamp information and the monitoring performance information corresponding to each target monitoring performance information set to the preset storage node corresponding to each target monitoring performance information set.
  9. 一种服务器,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时实现如下步骤: A server includes a memory, a processor, and a computer program that is stored in the memory and can run on the processor, wherein the processor implements the following steps when the processor executes the computer program:
    获取待监控设备的至少一个监控项在预设时长内对应的监控数据,所述监控数据包括监控性能信息和时间戳信息;Acquiring monitoring data corresponding to at least one monitoring item of the device to be monitored within a preset time period, where the monitoring data includes monitoring performance information and time stamp information;
    基于所述时间戳信息将所述监控性能信息进行划分,得到多个目标监控性能信息集合,每个所述目标监控性能信息集合包括多个连续的所述监控性能信息;Dividing the monitoring performance information based on the time stamp information to obtain a plurality of target monitoring performance information sets, each of the target monitoring performance information sets including a plurality of continuous monitoring performance information;
    利用预设的一致性算法,分别确定每个所述目标监控性能信息集合对应的预设存储节点;Using a preset consistency algorithm to respectively determine the preset storage node corresponding to each of the target monitoring performance information sets;
    将每个所述目标监控性能信息集合对应的时间戳信息和所述监控性能信息,分别关联存储至每个所述目标监控性能信息集合各自对应的所述预设存储节点。The time stamp information corresponding to each target monitoring performance information set and the monitoring performance information are respectively associated and stored in the preset storage node corresponding to each target monitoring performance information set.
  10. 如权利要求9所述的服务器,其中,在所述将每个所述目标监控性能信息集合对应的时间戳信息和包括的所述监控性能信息,分别关联存储至每个所述目标监控性能信息集合各自对应的所述预设存储节点之后,还包括: The server according to claim 9, wherein the time stamp information corresponding to each of the target monitoring performance information sets and the included monitoring performance information are respectively stored in association with each of the target monitoring performance information After the preset storage nodes corresponding to each of the collections, the method further includes:
    基于所述时间戳信息对所述预设存储节点存储的所述监控性能信息进行读写操作。Perform read and write operations on the monitoring performance information stored by the preset storage node based on the time stamp information.
  11. 如权利要求10所述的服务器,其中,所述基于所述时间戳信息将所述监控性能信息进行划分,得到多个目标监控性能信息集合,包括: The server according to claim 10, wherein said dividing said monitoring performance information based on said time stamp information to obtain a plurality of target monitoring performance information sets comprises:
    将具有相同时间戳信息的所述监控性能信息划分为同一目标监控性能信息,得到多个所述目标监控性能信息集合。The monitoring performance information with the same time stamp information is divided into the same target monitoring performance information, and multiple target monitoring performance information sets are obtained.
  12. 如权利要求9至11任一项所述的服务器,其中,所述利用预设的一致性算法,分别确定每个所述目标监控性能信息集合对应的预设存储节点,包括: The server according to any one of claims 9 to 11, wherein said using a preset consistency algorithm to separately determine the preset storage node corresponding to each of the target monitoring performance information sets comprises:
    利用一致性哈希算法,分别确定每个所述目标监控性能信息集合对应的预设存储节点。Using a consistent hashing algorithm, the preset storage nodes corresponding to each of the target monitoring performance information sets are respectively determined.
  13. 如权利要求12所述的服务器,其中,所述利用一致性哈希算法,分别确定每个所述目标监控性能信息集合对应的预设存储节点,包括: The server according to claim 12, wherein said using a consistent hashing algorithm to respectively determine the preset storage nodes corresponding to each of said target monitoring performance information sets comprises:
    利用预设的哈希算法分别计算每个所述目标监控性能信息集合对应的第一哈希值,以及每个所述预设存储节点对应的第二哈希值;Respectively calculating the first hash value corresponding to each of the target monitoring performance information sets and the second hash value corresponding to each of the preset storage nodes by using a preset hash algorithm;
    根据预设的映射规则分别将所述第一哈希值和所述第二哈希值,映射在具有预设个数字空间的哈希圆环上,得到所述第一哈希值和所述第二哈希值之间的第一映射关系;According to preset mapping rules, the first hash value and the second hash value are respectively mapped on a hash circle with a preset number space to obtain the first hash value and the The first mapping relationship between the second hash values;
    根据所述第一映射关系,分别确定每个所述目标监控性能信息集合对应的所述预设存储节点。According to the first mapping relationship, the preset storage nodes corresponding to each of the target monitoring performance information sets are respectively determined.
  14. 如权利要求13所述的服务器,其中,在所述将每个所述目标性能信息集合对应的时间戳信息和包括的所述性能信息,分别关联存储至每个所述目标性能信息集合各自对应的所述预设存储节点之后,包括: The server according to claim 13, wherein the time stamp information corresponding to each of the target performance information sets and the included performance information are respectively stored in association with each of the target performance information sets corresponding to each of the target performance information sets. After the said preset storage node, it includes:
    分别建立每个所述目标性能信息集合对应的索引信息;Respectively establishing index information corresponding to each of the target performance information sets;
    生成所述索引信息与所述预设存储节点之间的第二映射关系。Generate a second mapping relationship between the index information and the preset storage node.
  15. 如权利要求14所述的服务器,其中,在所述生成所述索引信息与所述预设存储节点之间的第二映射关系之后,还包括: The server according to claim 14, wherein after said generating the second mapping relationship between the index information and the preset storage node, the method further comprises:
    当检测到查询请求信息时,基于所述第二映射关系从所述预设存储节点中,查询与所述查询请求信息中的索引信息对应的所述目标监控性能信息集合。When the query request information is detected, query the target monitoring performance information set corresponding to the index information in the query request information from the preset storage node based on the second mapping relationship.
  16. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其中,所述计算机程序被处理器执行时实现如下步骤:A computer-readable storage medium storing a computer program, wherein the computer program is executed by a processor to implement the following steps:
    获取待监控设备的至少一个监控项在预设时长内对应的监控数据,所述监控数据包括监控性能信息和时间戳信息;Acquiring monitoring data corresponding to at least one monitoring item of the device to be monitored within a preset time period, where the monitoring data includes monitoring performance information and time stamp information;
    基于所述时间戳信息将所述监控性能信息进行划分,得到多个目标监控性能信息集合,每个所述目标监控性能信息集合包括多个连续的所述监控性能信息;Dividing the monitoring performance information based on the time stamp information to obtain a plurality of target monitoring performance information sets, each of the target monitoring performance information sets including a plurality of continuous monitoring performance information;
    利用预设的一致性算法,分别确定每个所述目标监控性能信息集合对应的预设存储节点;Using a preset consistency algorithm to respectively determine the preset storage node corresponding to each of the target monitoring performance information sets;
    将每个所述目标监控性能信息集合对应的时间戳信息和所述监控性能信息,分别关联存储至每个所述目标监控性能信息集合各自对应的所述预设存储节点。The time stamp information corresponding to each target monitoring performance information set and the monitoring performance information are respectively associated and stored in the preset storage node corresponding to each target monitoring performance information set.
  17. 如权利要求16所述的存储介质,其中,在所述将每个所述目标监控性能信息集合对应的时间戳信息和包括的所述监控性能信息,分别关联存储至每个所述目标监控性能信息集合各自对应的所述预设存储节点之后,还包括: The storage medium according to claim 16, wherein the time stamp information corresponding to each of the target monitoring performance information sets and the included monitoring performance information are respectively stored in association with each of the target monitoring performance information sets. After the respective preset storage nodes corresponding to the information sets, it further includes:
    基于所述时间戳信息对所述预设存储节点存储的所述监控性能信息进行读写操作。Perform read and write operations on the monitoring performance information stored by the preset storage node based on the time stamp information.
  18. 如权利要求17所述的存储介质,其中,所述基于所述时间戳信息将所述监控性能信息进行划分,得到多个目标监控性能信息集合,包括: 17. The storage medium of claim 17, wherein the dividing the monitoring performance information based on the time stamp information to obtain multiple target monitoring performance information sets includes:
    将具有相同时间戳信息的所述监控性能信息划分为同一目标监控性能信息,得到多个所述目标监控性能信息集合。The monitoring performance information with the same time stamp information is divided into the same target monitoring performance information, and multiple target monitoring performance information sets are obtained.
  19. 如权利要求16至18任一项所述的存储介质,其中,所述利用预设的一致性算法,分别确定每个所述目标监控性能信息集合对应的预设存储节点,包括: 18. The storage medium according to any one of claims 16 to 18, wherein the respectively determining the preset storage node corresponding to each of the target monitoring performance information sets by using a preset consistency algorithm comprises:
    利用一致性哈希算法,分别确定每个所述目标监控性能信息集合对应的预设存储节点。Using a consistent hashing algorithm, the preset storage nodes corresponding to each of the target monitoring performance information sets are respectively determined.
  20. 如权利要求19所述的存储介质,其中,所述利用一致性哈希算法,分别确定每个所述目标监控性能信息集合对应的预设存储节点,包括: 22. The storage medium according to claim 19, wherein said using a consistent hashing algorithm to respectively determine the preset storage nodes corresponding to each of said target monitoring performance information sets comprises:
    利用预设的哈希算法分别计算每个所述目标监控性能信息集合对应的第一哈希值,以及每个所述预设存储节点对应的第二哈希值;Respectively calculating the first hash value corresponding to each of the target monitoring performance information sets and the second hash value corresponding to each of the preset storage nodes by using a preset hash algorithm;
    根据预设的映射规则分别将所述第一哈希值和所述第二哈希值,映射在具有预设个数字空间的哈希圆环上,得到所述第一哈希值和所述第二哈希值之间的第一映射关系;According to preset mapping rules, the first hash value and the second hash value are respectively mapped on a hash circle with a preset number space to obtain the first hash value and the The first mapping relationship between the second hash values;
    根据所述第一映射关系,分别确定每个所述目标监控性能信息集合对应的所述预设存储节点。According to the first mapping relationship, the preset storage nodes corresponding to each of the target monitoring performance information sets are respectively determined.
PCT/CN2020/099395 2020-03-11 2020-06-30 Monitoring data storage method and device, server and storage medium WO2021179488A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010165126.XA CN111475105B (en) 2020-03-11 2020-03-11 Monitoring data storage method, monitoring data storage device, monitoring data server and storage medium
CN202010165126.X 2020-03-11

Publications (1)

Publication Number Publication Date
WO2021179488A1 true WO2021179488A1 (en) 2021-09-16

Family

ID=71747278

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/099395 WO2021179488A1 (en) 2020-03-11 2020-06-30 Monitoring data storage method and device, server and storage medium

Country Status (2)

Country Link
CN (1) CN111475105B (en)
WO (1) WO2021179488A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114629824A (en) * 2022-03-24 2022-06-14 阿里巴巴(中国)有限公司 Packet loss positioning method, device, computing equipment and medium
CN116069788A (en) * 2023-03-24 2023-05-05 杭州趣链科技有限公司 Data processing method, database system, computer device, and storage medium

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113190623B (en) * 2021-05-14 2024-05-17 京东科技信息技术有限公司 Data processing method, device, server and storage medium
CN113282693B (en) * 2021-05-25 2021-12-28 江苏星月测绘科技股份有限公司 3 DGIS-based holographic data management method and system
CN113593074B (en) * 2021-07-15 2023-09-22 盛景智能科技(嘉兴)有限公司 Method and device for generating monitoring video

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106161120A (en) * 2016-10-08 2016-11-23 电子科技大学 The distributed meta-data management method of dynamic equalization load
US20170212940A1 (en) * 2016-01-21 2017-07-27 Electronics And Telecommunications Research Institute File system for supporting time-series analysis and operating method thereof
CN108256076A (en) * 2018-01-18 2018-07-06 广州大学 Distributed mass data processing method and processing device
CN109117087A (en) * 2018-07-19 2019-01-01 北京蜂盒科技有限公司 Acquire method, apparatus, storage medium and the electronic equipment of monitoring data
CN110633053A (en) * 2019-09-16 2019-12-31 北京马赫谷科技有限公司 Storage capacity balancing method, object storage method and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10346360B1 (en) * 2015-09-30 2019-07-09 EMP IP Holding Company LLC Managing prefetching of data in storage systems
CN105303456A (en) * 2015-10-16 2016-02-03 国家电网公司 Method for processing monitoring data of electric power transmission equipment
CN107515807B (en) * 2016-06-17 2021-05-07 阿里巴巴集团控股有限公司 Method and device for storing monitoring data
CN109799948B (en) * 2017-11-17 2023-05-16 航天信息股份有限公司 Data storage method and device
CN110336891A (en) * 2019-07-24 2019-10-15 中南民族大学 Data cached location mode, equipment, storage medium and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170212940A1 (en) * 2016-01-21 2017-07-27 Electronics And Telecommunications Research Institute File system for supporting time-series analysis and operating method thereof
CN106161120A (en) * 2016-10-08 2016-11-23 电子科技大学 The distributed meta-data management method of dynamic equalization load
CN108256076A (en) * 2018-01-18 2018-07-06 广州大学 Distributed mass data processing method and processing device
CN109117087A (en) * 2018-07-19 2019-01-01 北京蜂盒科技有限公司 Acquire method, apparatus, storage medium and the electronic equipment of monitoring data
CN110633053A (en) * 2019-09-16 2019-12-31 北京马赫谷科技有限公司 Storage capacity balancing method, object storage method and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114629824A (en) * 2022-03-24 2022-06-14 阿里巴巴(中国)有限公司 Packet loss positioning method, device, computing equipment and medium
CN114629824B (en) * 2022-03-24 2024-03-19 阿里巴巴(中国)有限公司 Packet loss positioning method, device, computing equipment and medium
CN116069788A (en) * 2023-03-24 2023-05-05 杭州趣链科技有限公司 Data processing method, database system, computer device, and storage medium
CN116069788B (en) * 2023-03-24 2023-06-20 杭州趣链科技有限公司 Data processing method, database system, computer device, and storage medium

Also Published As

Publication number Publication date
CN111475105B (en) 2024-05-03
CN111475105A (en) 2020-07-31

Similar Documents

Publication Publication Date Title
WO2021179488A1 (en) Monitoring data storage method and device, server and storage medium
US10628449B2 (en) Method and apparatus for processing database data in distributed database system
EP3767483A1 (en) Method, device, system, and server for image retrieval, and storage medium
CN110019004B (en) Data processing method, device and system
WO2020211569A1 (en) Method for constructing index of data record
CN108205577B (en) Array construction method, array query method, device and electronic equipment
WO2018095299A1 (en) Time sequence data management method, device and apparatus
US11762881B2 (en) Partition merging method and database server
CN110334094B (en) Data query method, system, device and equipment based on inverted index
WO2022241813A1 (en) Graph database construction method and apparatus based on graph compression, and related component
CN108205571B (en) Key value data table connection method and device
US20230267116A1 (en) Translation of tenant identifiers
CN113297171A (en) Database migration method and device and database cluster
CN107590160B (en) Method and device for monitoring internal structure of radix tree to realize test
CN117171161A (en) Data query method and device
CN115168499B (en) Database table fragmentation method and device, computer equipment and storage medium
CN116450607A (en) Data processing method, device and storage medium
CN111143006B (en) Method and device for acquiring command help information
CN111159197A (en) Data storage method, device and equipment and readable storage medium
WO2016069035A1 (en) Extended attribute storage
CN110275863A (en) File moving method, device and storage medium
EP3814927A1 (en) Identification of records for post-cloning tenant identifier translation
CN117131023B (en) Data table processing method, device, computer equipment and readable storage medium
CN108959546B (en) Distributed key value storage system data weak consistency measuring method based on reverse order pair
US20210200512A1 (en) Sorting unsorted rows of a composite dataset after a join operation

Legal Events

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

Ref document number: 20924268

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20924268

Country of ref document: EP

Kind code of ref document: A1