Data storage method and related equipment

By managing and driving asynchronous loading of performance data, and using analyzers, loaders and listeners for asynchronous processing and incremental storage, the problems of low efficiency and display delay in data reporting tasks in full performance data monitoring of servers are solved, and efficient performance data acquisition and storage are achieved.

CN115129556BActive Publication Date: 2025-05-16JINAN INSPUR DATA TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210879793.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-25
Publication Date
2025-05-16
Estimated Expiration
2042-07-25

AI Technical Summary

Technical Problem

In the monitoring of full performance data of servers, high-frequency data reporting tasks affect efficiency, resulting in complex and redundant reporting tasks, and delays in performance data display.

Method used

By managing and driving asynchronous loading of performance data, and using analyzers, loaders and listeners to asynchronous processing and incremental storage of data, efficient acquisition and storage of performance data is achieved and data display delays are avoided.

Benefits of technology

Without affecting the efficiency of reporting tasks, efficient acquisition and storage of performance data is achieved, the performance data display delay is reduced, and data processing efficiency is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115129556B_ABST
    Figure CN115129556B_ABST
Patent Text Reader

Abstract

The present application discloses a data storage method, including: using a management driver to asynchronously load performance data from a data reporting task, and sending the performance data to an analyzer; using the analyzer to select a target scheduling task from a preset scheduling task set, and using the target scheduling task to send the performance data to a loader; using the loader to parse the performance data to obtain incremental data, and sending the incremental data to a listener; using the listener to store the incremental data. By applying the technical solution provided in the present application, the acquisition and storage of performance data in the reporting task can be achieved without affecting the efficiency of the reporting task, while avoiding the delay problem caused by the reporting task in displaying the performance data. The present application also discloses a data storage device, an electronic device, and a computer-readable storage medium, which also have the above-mentioned beneficial effects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of storage technology, and in particular to a data storage method, and also to a data storage device, an electronic device, and a computer-readable storage medium. Background Art

[0002] As the requirements for monitoring the full amount of server performance data are increasing, at present, the server management software can install ISMD plug-ins (a server management driver) on the managed servers. The plug-in can report the full amount of server performance data to the management software at a high frequency, such as CPU (Central Processing Unit), TCP (Transmission Control Protocol) / UDP (User Datagram Protocol), file handles, hard disk IO (Input / Output), logical partitions, NFS (Network File System), network and micro-architecture, etc. These data will be stored in the reporting task, and the query performance data operation will be performed after waiting for the storage. However, this affects the efficiency of the reporting task, resulting in complex and redundant high-concurrency reporting task processes, or there is a problem of data display delay because the reporting process cannot display performance data in time for a long time.

[0003] Therefore, how to achieve the acquisition and storage of performance data in the reporting task without affecting the efficiency of the reporting task, while avoiding the delay problem caused by the reporting task in displaying the performance data is an urgent problem to be solved by technical personnel in this field. Summary of the invention

[0004] The purpose of the present application is to provide a data storage method, which can realize the acquisition and storage of performance data in the reporting task without affecting the efficiency of the reporting task, while avoiding the delay problem caused by the reporting task to the display of performance data; another purpose of the present application is to provide a data storage device, electronic device and computer-readable storage medium, all of which have the above-mentioned beneficial effects.

[0005] In a first aspect, the present application provides a data storage method, comprising:

[0006] Asynchronously load the performance data from the data reporting task using the management driver, and send the performance data to the analyzer;

[0007] Using the analyzer to select a target scheduling task from a preset scheduling task set, and using the target scheduling task to send the performance data to the loader;

[0008] parse the performance data using the loader to obtain incremental data, and send the incremental data to the listener;

[0009] The listener is used to store the incremental data.

[0010] Optionally, the asynchronously loading the performance data from the data reporting task using the management driver includes:

[0011] The target device is monitored in real time using the management driver, and when the data reporting task is detected, the performance data is extracted from the data reporting task using asynchronous loading technology.

[0012] Optionally, the selecting a target scheduling task from a preset scheduling task set by using the analyzer includes:

[0013] Calculate the priority of each scheduled task in the preset scheduled task set according to task parameters, wherein the task parameters include task deadline and / or task weight, and the task parameters are updated in real time;

[0014] The scheduling task with the highest priority is used as the target scheduling task.

[0015] Optionally, the storing the incremental data by using the listener includes:

[0016] Determine the data type of each incremental data;

[0017] Each incremental data is stored in a message queue according to the data type.

[0018] Optionally, before selecting a target scheduling task from a preset scheduling task set by using the analyzer and sending the performance data to the loader by using the target scheduling task, the method further includes:

[0019] The analyzer is used to filter the performance data to obtain target performance data of a specified data type.

[0020] Optionally, the data storage method further includes:

[0021] When receiving a data retrieval instruction, determining a retrieval index according to the data retrieval instruction;

[0022] Calculate the weight of all stored data according to the search index to obtain the weight of each stored data;

[0023] Sort the stored data in descending order of the weights to obtain a stored data sequence;

[0024] The retrieval result is obtained by extracting from the stored data sequence according to the preset extraction rules.

[0025] Optionally, the data storage method further includes:

[0026] determining a specified time period according to the data retrieval instruction;

[0027] Extracting target search results that meet the specified time period from all the search results;

[0028] The target search result is output to a display interface.

[0029] In a second aspect, the present application further discloses a data storage device, comprising:

[0030] A loading module, used to asynchronously load the performance data from the data reporting task using the management driver, and send the performance data to the analyzer;

[0031] A selection module, configured to select a target scheduling task from a preset scheduling task set using the analyzer, and send the performance data to a loader using the target scheduling task;

[0032] A parsing module, used for parsing the performance data using the loader to obtain incremental data, and sending the incremental data to a listener;

[0033] A storage module is used to store the incremental data using the listener.

[0034] In a third aspect, the present application further discloses an electronic device, comprising:

[0035] Memory for storing computer programs;

[0036] A processor is used to implement the steps of any one of the data storage methods described above when executing the computer program.

[0037] In a fourth aspect, the present application further discloses a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of any one of the data storage methods described above are implemented.

[0038] A data storage method provided in the present application includes using a management driver to asynchronously load performance data from a data reporting task, and sending the performance data to an analyzer; using the analyzer to select a target scheduling task from a preset scheduling task set, and using the target scheduling task to send the performance data to a loader; using the loader to parse the performance data to obtain incremental data, and sending the incremental data to a listener; and using the listener to store the incremental data.

[0039] By applying the technical solution provided in the present application, during the process of performing a data reporting task, the management driver is used to asynchronously load performance data from the data reporting task, thereby achieving independence between the data reporting task and the acquisition of performance data. This allows the acquisition and storage of performance data in the reporting task without affecting the efficiency of the reporting task, while avoiding delays in the display of performance data caused by the reporting task. In addition, the transmission of performance data is achieved through multiple scheduling tasks, and data storage is achieved through dynamic incremental operations, which can further reduce the problem of data display delays.

[0040] A data storage device, an electronic device, and a computer-readable storage medium provided in the present application all have the above-mentioned beneficial effects, which will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solutions in the prior art and the embodiments of the present application, the drawings required for use in the description of the prior art and the embodiments of the present application are briefly introduced below. Of course, the drawings described below in relation to the embodiments of the present application are only part of the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without creative work, and the obtained other drawings also belong to the protection scope of the present application.

[0042] Figure 1 A structural diagram of a data storage system provided by this application;

[0043] Figure 2 A schematic diagram of a data storage method provided by the present application;

[0044] Figure 3 A flowchart of data extraction and storage provided by this application;

[0045] Figure 4 A schematic diagram of the structure of a data storage device provided by this application;

[0046] Figure 5 A schematic diagram of the structure of an electronic device provided in this application. DETAILED DESCRIPTION

[0047] The core of the present application is to provide a data storage method, which can realize the acquisition and storage of performance data in the reporting task without affecting the efficiency of the reporting task, while avoiding the delay problem caused by the reporting task to the display of performance data; another core of the present application is to provide a data storage device, electronic device and computer-readable storage medium, which also have the above-mentioned beneficial effects.

[0048] In order to describe the technical solutions in the embodiments of the present application more clearly and completely, the technical solutions in the embodiments of the present application will be introduced below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0049] It should be noted that the data storage method provided in this application is applied to the data storage system, please refer to Figure 1 , Figure 1 This is a structural diagram of a data storage system provided by the present application, which mainly includes a server and a data storage device. Among them, a management driver (ISMD) is installed in the server, which is used to monitor the data reporting tasks occurring in the server, and extract performance data from it and send it to the data storage device; the data storage device includes an analyzer, a loader and a listener, which are used to realize the analysis and storage of performance data.

[0050] An embodiment of the present application provides a data storage method.

[0051] Please refer to Figure 2 , Figure 2 This is a flow chart of a data storage method provided in the present application. The data storage method includes the following S101 to S104.

[0052] S101: asynchronously load the performance data from the data reporting task using the management driver, and send the performance data to the analyzer;

[0053] This step aims to load and extract performance data, so as to asynchronously load and obtain performance data from the data reporting task. Specifically, a management driver can be pre-installed in the server to asynchronously load and obtain performance data in the data reporting task. Of course, the specific type of the management driver does not affect the implementation of this technical solution. In a possible implementation method, the following can be used: Figure 1 The ISMD shown; further, the performance data is sent to the analyzer for subsequent processing to facilitate performance data storage.

[0054] Among them, performance data refers to the attribute information of each device component in the current device, including but not limited to CPU utilization, memory utilization, total memory, one-minute load, hard disk read and write rate, response time, total partition amount, network transmission and reception rate, etc. The specific content can be set by technical personnel according to actual needs, and this application does not limit this.

[0055] It can be understood that asynchronous loading can automatically and asynchronously intercept performance data in the reported data during the data reporting task. This process does not affect the continued execution and result callback of the data reporting task. Therefore, the data reporting task and performance data acquisition are independent of each other based on asynchronous loading technology, so that the implementation processes of the two do not affect each other.

[0056] S102: using the analyzer to select a target scheduling task from a preset scheduling task set, and using the target scheduling task to send performance data to the loader;

[0057] This step aims to use the analyzer to realize the performance data transmission based on the scheduling task, so as to send the performance data to the loader for subsequent analysis and processing. Specifically, a scheduling task set can be created in advance to realize the storage of different scheduling tasks, and the scheduling tasks are used to realize the transmission of performance data. After the management driver sends the performance data obtained by asynchronous loading to the analyzer, the analyzer can select the target scheduling task from the preset scheduling task set, and the target scheduling task is the scheduling task used to realize the current performance data transmission, wherein the selection of the target scheduling task can be based on the preset selection strategy, and the target scheduling task is the scheduling task that best meets the actual needs, for example, it can be the scheduling task with the smallest current load or empty. Further, after selecting the target scheduling task from the preset scheduling task set, the target scheduling task can be used to send the performance data to the loader, and the loader continues to process it subsequently.

[0058] S103: using the loader to parse the performance data to obtain incremental data, and sending the incremental data to the listener;

[0059] This step aims to extract incremental data so as to realize incremental data storage. After the loader receives the performance data sent by the analyzer using the target scheduling task, it can parse the performance data to extract incremental data from it. The incremental data is the changed performance data, and further, the incremental data is sent to the listener for storage.

[0060] It can be understood that by extracting incremental data to achieve data storage, compared with full data storage, only part of the changed performance data needs to be extracted for storage, without storing all the performance data, which can effectively improve data storage efficiency.

[0061] S104: Use a listener to store the incremental data.

[0062] This step is to realize the data storage function. After the loader sends the incremental data to the listener, the listener can be used to store the incremental data. The storage method of the incremental data can be selected by the technician according to actual needs, and this application does not limit this.

[0063] It can be seen that the data storage method provided in the embodiment of the present application, during the process of performing the data reporting task, utilizes the management driver to asynchronously load and obtain performance data from the data reporting task, thereby realizing the independence between the data reporting task and the performance data acquisition, and can realize the acquisition and storage of performance data in the reporting task without affecting the efficiency of the reporting task, while avoiding the delay problem caused by the reporting task for the display of performance data; in addition, the transmission of performance data is realized through multiple scheduling tasks, and data storage is realized through dynamic incremental operations, which can further reduce the data display delay problem.

[0064] In one embodiment of the present application, the above-mentioned use of the management driver to asynchronously load the performance data from the data reporting task may include: using the management driver to monitor the target device in real time, and when the data reporting task is monitored, using asynchronous loading technology to extract the performance data from the data reporting task.

[0065] The embodiment of the present application provides a method for asynchronously loading performance data from a data reporting task. During the implementation process, the management driver can be used to monitor the target device in real time, wherein the target device is the device that needs to extract and store performance data, that is, the server device to which the management driver belongs; further, when the management driver monitors each data reporting task, it can use asynchronous loading technology to extract various performance data from the reported data in the data reporting task, thereby realizing the extraction of performance data. Among them, the monitoring of the data reporting task in the target device can also be timed monitoring, which can be selected and set by the technician according to actual needs, and this application does not limit this.

[0066] In one embodiment of the present application, the above-mentioned selection of the target scheduling task from the preset scheduling task set using the analyzer may include: calculating the priority of each scheduling task in the preset scheduling task set based on task parameters, the task parameters including the task deadline and / or task weight, and the task parameters are updated in real time; and taking the scheduling task with the highest priority as the target scheduling task.

[0067] The embodiment of the present application provides an implementation method for selecting a target scheduling task from a preset scheduling task set. During the implementation process, the priority of each scheduling task in the preset scheduling task set can be calculated so as to select the scheduling task with the highest priority as the target scheduling task, wherein the priority calculation of the scheduling task can be implemented in combination with the preset task parameters, and the task parameters may include the task deadline and / or task weight of the corresponding scheduling task. Of course, the values ​​of both are determined by the characteristics of the scheduling task itself, and in the actual operation process, the values ​​of both are changed in real time.

[0068] In one embodiment of the present application, the above-mentioned storage of incremental data using a listener may include: determining a data type of each incremental data; and storing each incremental data in a message queue according to the data type.

[0069] The embodiment of the present application provides an implementation method for storing incremental data, that is, incremental data storage can be implemented according to the quantity type of incremental data. In the implementation process, the data type of each incremental data can be determined first, and then the incremental data can be stored according to the data type, and when storing each incremental data, it can be selected to store it in the form of a message queue. Of course, the storage form of the message queue is only an implementation method provided by the embodiment of the present application, and other types of storage methods can also be selected according to actual needs, and the present application does not limit this.

[0070] In one embodiment of the present application, the above-mentioned use of the analyzer to select a target scheduling task from a preset scheduling task set, and before using the target scheduling task to send the performance data to the loader, it may also include: using the analyzer to filter from the performance data to obtain target performance data of a specified data type.

[0071] The data storage method provided in the embodiment of the present application supports the selection of specific types of performance data for extraction and storage. In the process of extracting performance data, it can be defaulted to extract the attribute information of all device components in the current device, and in the actual use process of the user, it can be further selected from all the extracted performance data for storage according to its actual needs. Therefore, after all the extracted performance data is sent to the analyzer using the management driver, and before the analyzer sends the performance data to the loader, the performance data of the specified data type can be first obtained from all the performance data according to the pre-set screening rules, that is, the above-mentioned target performance data, and then the target performance data is sent to the analyzer, thereby realizing the storage of specific types of performance data to meet the specific needs of different users.

[0072] In one embodiment of the present application, the data storage method may further include: when a data retrieval instruction is received, determining a retrieval index according to the data retrieval instruction; performing weight calculation on all stored data according to the retrieval index to obtain the weight of each stored data; sorting each stored data in descending order of weight to obtain a stored data sequence; and extracting retrieval results from the stored data sequence according to preset extraction rules.

[0073] The data storage method provided in the embodiment of the present application can further realize the data retrieval function, and has a higher data retrieval efficiency. In the embodiment of the present application, when data retrieval is needed, a retrieval instruction containing a retrieval index can be initiated by the user. Of course, the retrieval index is determined by the user's needs, wherein the retrieval index can be attached to the retrieval instruction in the form of a keyword, such as "utilization rate", "capacity", "time", etc., thereby, the keyword can be obtained by parsing the retrieval instruction, so as to realize data retrieval based on the keyword. Further, after parsing and obtaining the retrieval index, the retrieval index can be used to calculate the weight of each data (i.e., each stored data) that has been stored, and the weight of each stored data is obtained, and all the stored data are sorted in the storage space according to the order of weight from large to small, so as to obtain the sorted stored data sequence. Finally, the final retrieval result can be obtained from the stored data sequence according to the pre-set extraction rule, wherein the preset extraction rule is set by the technician according to the actual demand, for example, the stored data whose weight value exceeds the preset threshold can be selected as the retrieval result, and the first preset number of stored data in the stored data sequence can also be selected as the retrieval result, etc. Of course, the specific values ​​of the preset thresholds, preset quantities, etc. do not affect the implementation of the present technical solution, and the technical personnel may make customized settings according to actual needs, and this application does not impose any limitation on this.

[0074] In one embodiment of the present application, the data storage method may further include: determining a specified time period according to a data retrieval instruction; extracting target retrieval results that meet the specified time period from all retrieval results; and outputting the target retrieval results to a display interface.

[0075] The data storage method provided in the embodiment of the present application can further realize the data display function of the custom time period, that is, the performance data within the time period specified by the user can be displayed. In the implementation process, the user can also attach the specified time period to the data retrieval instruction, so that after parsing the data retrieval instruction to obtain the specified time period, the retrieval results within the specified time period can be extracted from all the retrieval results as the final retrieval results, that is, the above-mentioned target retrieval results, and finally, the target retrieval result can be input into the value display interface for visual display.

[0076] Based on the above embodiments, an embodiment of the present application provides another data storage method.

[0077] First, please refer to Figure 3 , Figure 3 which is a flowchart of data extraction and storage provided by the present application. Among them, the performance data is divided into two modules: time and metrics. The time value represents a time point, and the metrics include device components and component attributes (components such as CPU, memory, load, hard disk, partition, network, etc., and component attributes such as CPU utilization rate, memory utilization rate, total memory, one-minute load, hard disk read and write rate, response time, total partition, network sending and receiving rate, etc.).

[0078] Furthermore, when the management software queries the in-band performance data, information such as timestamps can be used as parameters to determine the time range of the performance data to be displayed on the page according to the start timestamp and the end timestamp; when viewing the current performance data, the performance data in the reporting task can be obtained through asynchronous loading.

[0079] Among them, when querying real-time performance data, first use the method of the analyzer to asynchronously load and monitor the ISMD performance data reporting. When it is detected that a new round of data reporting occurs, the performance data will be automatically asynchronously intercepted and processed. The loading of the framework during the reporting task operation can send the latest performance data to the analyzer through the proxy method, and this process does not affect the continued execution of the reporting task and the result callback.

[0080] During the implementation process, each monitored component method can be used as a proxy point. The proxy point is responsible for connecting to the analyzer. When connecting to the analyzer, according to the current performance component, a loader task scheduling set dispatch = {1, 2, 3, 4..d} is created, where d represents the number of scheduling tasks. The deadline of the scheduling task is eT[t], 1 < eT[t] < d, and it is required that task t ends before time eT[t]. At the same time, the weight of task t is W[t]. On this basis, the deadline and task weight of each task are recorded through the task queue, eT[] = {t1, t2, t3...}, W[] = {integer1, integer2, integer3,...}. Finally, the unique identifier id, deadline, and task weight of each task are saved through the set. When the loading task initiates scheduling, it can be determined whether the task is the optimal loader according to the calculated deadline and weight of each task. Further, the analyzer will send the data to the loader for loading and parsing. In the loader, the incremental change of the performance data will be parsed, and the incremental data will be published to the listener through events. After receiving the event, the listener will store it in the form of a message queue according to different data types.

[0081] When querying historical data, the performance data can be aggregated and displayed by minute, hour, day, month, etc. according to the principle of aggregation. At the same time, the blocked indicators can be filtered out.

[0082] In the implementation process, first, the weight W of the retrieval index K is calculated using the weight algorithm containing the retrieval index:

[0083]

[0084] Among them, Doc is the number of all records in the directory, n is a constant, and l(k) represents the number of records containing the keyword (retrieval index).

[0085] Furthermore, according to the above algorithm, it can be seen that the more concentrated the index value is, the greater the weight of the record is, and the higher the record is ranked. Among them, the weight correlation formula of all records is:

[0086]

[0087] Among them, file is the length of the record, mon is the average length of all records in the directory, and W is the weight value of the retrieval index k in the record file.

[0088] Therefore, according to the above weight correlation formula, all records containing search indicators in the directory can be sorted according to weights, thereby realizing data retrieval.

[0089] It can be seen that the data storage method provided in the embodiment of the present application can utilize methods such as dynamic cache increment, data aggregation, and time-scalable performance query to display in-band performance data. At the same time, effective algorithms are used in the data processing and storage process stages to quickly monitor data. The framework uses dynamic loading, event monitoring and other methods to detect and asynchronously execute methods to obtain performance data, thereby realizing dynamic full-volume performance data display of the physical infrastructure management platform.

[0090] An embodiment of the present application provides a data storage device.

[0091] Please refer to Figure 4 , Figure 4 This is a structural schematic diagram of a data storage device provided in the present application, and the data storage device may include:

[0092] Loading module 1, used to asynchronously load performance data from the data reporting task using the management driver, and send the performance data to the analyzer;

[0093] A selection module 2 is used to select a target scheduling task from a preset scheduling task set using the analyzer, and send performance data to the loader using the target scheduling task;

[0094] The parsing module 3 is used to parse the performance data using the loader to obtain incremental data, and send the incremental data to the listener;

[0095] The storage module 4 is used to store the incremental data using a listener.

[0096] It can be seen that the data storage device provided in the embodiment of the present application, during the process of performing the data reporting task, utilizes the management driver to asynchronously load and obtain performance data from the data reporting task, thereby realizing the independence between the data reporting task and the performance data acquisition, and can realize the acquisition and storage of performance data in the reporting task without affecting the efficiency of the reporting task, while avoiding the delay problem caused by the reporting task for the display of performance data; in addition, the transmission of performance data is realized through multiple scheduling tasks, and data storage is realized through dynamic incremental operations, which can further reduce the data display delay problem.

[0097] In one embodiment of the present application, the above-mentioned loading module 1 can be specifically used to monitor the target device in real time using a management driver, and when a data reporting task is monitored, the performance data is extracted from the data reporting task using asynchronous loading technology.

[0098] In one embodiment of the present application, the above-mentioned selection module 2 can be specifically used to calculate the priority of each scheduled task in a preset scheduled task set based on task parameters, the task parameters include task deadline and / or task weight, and the task parameters are updated in real time; the scheduled task with the highest priority is used as the target scheduling task.

[0099] In one embodiment of the present application, the storage module 4 can be specifically used to determine the data type of each incremental data; and store each incremental data in a message queue according to the data type.

[0100] In one embodiment of the present application, the data storage device may also include a filtering module for using the analyzer to filter and obtain target performance data of a specified data type from the performance data before selecting a target scheduling task from a preset scheduling task set using the analyzer and sending the performance data to the loader using the target scheduling task.

[0101] In one embodiment of the present application, the data storage device may also include a retrieval module, which is used to determine a retrieval index according to the data retrieval instruction when a data retrieval instruction is received; calculate the weight of all stored data according to the retrieval index to obtain the weight of each stored data; sort each stored data in order from large to small according to the weight to obtain a stored data sequence; and extract the retrieval result from the stored data sequence according to preset extraction rules.

[0102] In one embodiment of the present application, the data storage device may also include a display module for determining a specified time period according to a data retrieval instruction; extracting target retrieval results that meet the specified time period from all retrieval results; and outputting the target retrieval results to a display interface.

[0103] For an introduction to the device provided in the embodiments of the present application, please refer to the above method embodiments, and the present application will not elaborate on them here.

[0104] An embodiment of the present application provides an electronic device.

[0105] Please refer to Figure 5 , Figure 5 This is a schematic diagram of the structure of an electronic device provided in this application, and the electronic device may include:

[0106] Memory for storing computer programs;

[0107] A processor, when used to execute a computer program, can implement the steps of any of the above-mentioned data storage methods.

[0108] like Figure 5 , which is a schematic diagram of the composition structure of an electronic device, the electronic device may include: a processor 10, a memory 11, a communication interface 12 and a communication bus 13. The processor 10, the memory 11 and the communication interface 12 all communicate with each other through the communication bus 13.

[0109] In the embodiment of the present application, the processor 10 may be a central processing unit (CPU), an application specific integrated circuit, a digital signal processor, a field programmable gate array or other programmable logic devices, etc.

[0110] The processor 10 may call a program stored in the memory 11. Specifically, the processor 10 may execute operations in the embodiment of the data storage method.

[0111] The memory 11 is used to store one or more programs, which may include program codes, and the program codes include computer operation instructions. In the embodiment of the present application, the memory 11 at least stores programs for implementing the following functions:

[0112] Use the management driver to asynchronously load performance data from the data reporting task and send the performance data to the analyzer;

[0113] Using the analyzer to select a target scheduling task from a preset scheduling task set, and using the target scheduling task to send performance data to the loader;

[0114] Use the loader to parse the performance data to get the incremental data, and send the incremental data to the listener;

[0115] Use listeners to store incremental data.

[0116] In a possible implementation, the memory 11 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function, etc.; the data storage area may store data created during use.

[0117] In addition, the memory 11 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device or other volatile solid-state storage device.

[0118] The communication interface 12 may be an interface of a communication module, and is used to connect to other devices or systems.

[0119] Of course, it should be noted that Figure 5 The structure shown does not constitute a limitation on the electronic device in the embodiment of the present application. In actual applications, the electronic device may include Figure 5 More or fewer components than shown, or combinations of certain components.

[0120] An embodiment of the present application provides a computer-readable storage medium.

[0121] The computer-readable storage medium provided in the embodiment of the present application stores a computer program, and when the computer program is executed by a processor, the steps of any one of the above-mentioned data storage methods can be implemented.

[0122] The computer-readable storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.

[0123] For an introduction to the computer-readable storage medium provided in the embodiments of the present application, please refer to the above method embodiments, and the present application will not elaborate on them here.

[0124] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0125] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0126] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0127] The technical solution provided by the present application is described in detail above. The principle and implementation method of the present application are described in detail using specific examples herein, and the description of the above embodiments is only used to help understand the method and core idea of ​​the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the present application.

Claims

1. A data storage method, characterized in that: include: Asynchronously load the performance data from the data reporting task using the management driver, and send the performance data to the analyzer; Using the analyzer to select a target scheduling task from a preset scheduling task set, and using the target scheduling task to send the performance data to the loader; The target scheduling task is the optimal scheduling task in the preset scheduling task set for transmitting the performance data; parse the performance data using the loader to obtain incremental data, and send the incremental data to the listener; Using the listener to store the incremental data; When a data retrieval instruction is received, a retrieval index is determined according to the data retrieval instruction; weight calculation is performed on all stored data according to the retrieval index to obtain the weight of each stored data; each stored data is sorted in descending order according to the weight to obtain a stored data sequence; and a retrieval result is obtained from the stored data sequence according to a preset extraction rule; Calculating the weight of all stored data according to the search index to obtain the weight of each stored data includes: The indicator weight calculation formula is used to calculate the indicator weight of the search indicator. The indicator weight calculation formula is: W represents the index weight, Doc represents the amount of stored data, l(k) represents the amount of stored data containing the retrieval index, and n is a constant; The data weight of the stored data is calculated according to the weight correlation formula, and the weight correlation formula is: S represents the data weight of the storage data containing the retrieval index, mon represents the average data length of all the storage data containing the retrieval index, file represents the data length of the i-th storage data containing the retrieval index, and L represents the number of storage data containing the retrieval index.

2. The data storage method according to claim 1, characterized in that: The method of asynchronously loading the performance data from the data reporting task using the management driver includes: The target device is monitored in real time using the management driver, and when the data reporting task is detected, the performance data is extracted from the data reporting task using asynchronous loading technology.

3. The data storage method according to claim 1, characterized in that: The selecting a target scheduling task from a preset scheduling task set by using the analyzer includes: Calculate the priority of each scheduled task in the preset scheduled task set according to task parameters, wherein the task parameters include task deadline and / or task weight, and the task parameters are updated in real time; The scheduling task with the highest priority is used as the target scheduling task.

4. The data storage method according to claim 1, characterized in that: The storing of the incremental data by using the listener includes: Determine the data type of each incremental data; Each incremental data is stored in a message queue according to the data type.

5. The data storage method according to claim 1, characterized in that: Before the analyzer is used to select a target scheduling task from a preset scheduling task set and the target scheduling task is used to send the performance data to the loader, the method further includes: The analyzer is used to filter the performance data to obtain target performance data of a specified data type.

6. The data storage method according to claim 1, characterized in that: Also includes: determining a specified time period according to the data retrieval instruction; Extracting target search results that meet the specified time period from all the search results; The target search result is output to a display interface.

7. A data storage device, characterized in that: include: A loading module, used to asynchronously load the performance data from the data reporting task using the management driver, and send the performance data to the analyzer; A selection module, configured to select a target scheduling task from a preset scheduling task set using the analyzer, and send the performance data to a loader using the target scheduling task; The target scheduling task is the optimal scheduling task in the preset scheduling task set for transmitting the performance data; A parsing module, used for parsing the performance data using the loader to obtain incremental data, and sending the incremental data to a listener; A storage module, used to store the incremental data using the listener; A retrieval module is used to, when receiving a data retrieval instruction, determine a retrieval index according to the data retrieval instruction; perform weight calculation on all stored data according to the retrieval index to obtain a weight of each stored data; sort each stored data in descending order of the weight to obtain a stored data sequence; and extract a retrieval result from the stored data sequence according to a preset extraction rule; The retrieval module is specifically used to implement: The indicator weight calculation formula is used to calculate the indicator weight of the search indicator. The indicator weight calculation formula is: W represents the index weight, Doc represents the amount of stored data, l(k) represents the amount of stored data containing the retrieval index, and n is a constant; The data weight of the stored data is calculated according to the weight correlation formula, and the weight correlation formula is: S represents the data weight of the storage data containing the retrieval index, mon represents the average data length of all the storage data containing the retrieval index, file represents the data length of the i-th storage data containing the retrieval index, and L represents the number of storage data containing the retrieval index.

8. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the data storage method according to any one of claims 1 to 6 when executing the computer program.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the data storage method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Data processing method, system and device and storage medium

    CN110334070A