Data processing method, device and electronic equipment
By judging the predicted probability of data to be stored in the buffer storage unit and making storage decisions, the problems of long CPU waiting time and low cache update efficiency are solved, and the working efficiency of the buffer storage unit and the overall performance of the computer are improved.
Patent Information
- Application Number
- CN202010266930.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-04-07
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2040-04-07
AI Technical Summary
In the prior art, the CPU will have a waiting time when accessing data to the main memory, resulting in limited improvement in computer performance. When the cache memory updates data, it often replaces high-density data with low-density data, which reduces the working efficiency of the cache.
By determining whether the data to be stored in the buffer storage unit is stored, if it is not stored, whether it is stored in the buffer storage unit is determined based on the predicted probability of the data to be stored, and only when the predicted probability reaches or exceeds the threshold value, and the storage position is determined based on the remaining space information of the buffer storage unit.
It ensures that data whose data density exceeds the threshold is stored in the buffer storage unit, improves the working efficiency of the buffer storage unit, reduces the waiting time of the CPU, and improves the overall performance of the computer.
Smart Images

Figure CN113297107B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a data processing method, device and electronic device. Background Art
[0002] With the continuous improvement and development of CPU (Central Processing Unit) manufacturing technology, the performance of CPU has been significantly improved. However, compared with the improvement speed of CPU performance, the improvement speed of main memory performance is relatively slow. As a result, the speed of CPU processing data is much higher than the speed of main memory processing data. When CPU accesses data in main memory, there will be a certain waiting time, which reduces the improvement of computer performance as a whole. In order to improve the overall performance of the computer, a cache (high-speed cache memory) memory is often set between the CPU and the main memory in the prior art.
[0003] Cache memory can store data that has been recently used by the CPU and data adjacent to the data storage location that has been recently used by the CPU. If the CPU needs to use this part of data again, it can directly call this part of data from the cache memory. In this way, the CPU does not need to access this part of data from the main memory, thereby reducing the CPU waiting time and improving the computer's performance.
[0004] In the prior art, data recently used by the CPU and data adjacent to the data storage location recently used by the CPU are often stored in the cache memory. When the cache memory is full of data, the data stored in the cache memory is generally replaced with the data just used by the CPU through algorithms such as LRU (Least Recently Used), thereby updating the data stored in the cache memory. The existing method for updating data stored in the cache memory often replaces high-density data in the cache memory with low-density data, thereby reducing the working efficiency of the cache memory. Summary of the invention
[0005] The present application provides a data processing method, device and electronic device to improve the working efficiency of a buffer storage unit.
[0006] The present application provides a data processing method, comprising:
[0007] Obtaining data to be stored;
[0008] Determining whether the data to be stored is stored in the buffer storage unit;
[0009] If not, determining the predicted probability that the data to be stored is target storage data, the target storage data being data whose data density exceeds a data density threshold;
[0010] If the predicted probability reaches or exceeds the predicted probability threshold, the data to be stored is stored in the buffer storage unit, where the buffer storage unit is a storage unit for storing data used by a data processing unit within a specified time interval.
[0011] Optionally, storing the data to be stored in the buffer storage unit includes: storing the data to be stored in the buffer storage unit according to remaining storage space information of the buffer storage unit.
[0012] Optionally, storing the data to be stored in the buffer storage unit based on the remaining storage space information of the buffer storage unit includes: if there is no remaining storage space in the storage space of the buffer storage unit, replacing the data to be stored with the data stored in the buffer storage unit and least used by the data processing unit within a preset time interval.
[0013] Optionally, replacing the data stored in the buffer storage unit and used least by the data processing unit within a preset time interval with the data to be stored includes: after storing the data stored in the buffer storage unit and used least by the data processing unit within a preset time interval in the main memory, storing the data to be stored in the buffer storage unit.
[0014] Optionally, storing the data to be stored in the buffer storage unit according to the remaining storage space information of the buffer storage unit includes: if there is remaining storage space in the storage space of the buffer storage unit, storing the data to be stored in a preset storage area corresponding to the predicted probability.
[0015] Optionally, storing the data to be stored in a preset storage area corresponding to the predicted probability includes:
[0016] Obtaining a usage hit rate of at least one preset storage area in the buffer storage unit, wherein the usage hit rate is used to indicate a probability that the data stored in the preset storage area is used by the data processing unit within a preset time interval;
[0017] Determine the usage hit rate corresponding to the predicted probability according to the predicted probability;
[0018] According to the usage hit rate corresponding to the predicted probability, a preset storage area corresponding to the predicted probability is determined, and the data to be stored is stored in the preset storage area corresponding to the predicted probability.
[0019] Optionally, obtaining the usage hit rate of at least one preset storage area in the buffer storage unit includes: obtaining the usage hit rate of at least one preset storage area in the buffer storage unit within the preset time interval.
[0020] Optionally, obtaining the usage hit rate of at least one preset storage area in the buffer storage unit within the preset time interval includes:
[0021] Obtaining the number of times the data processing unit uses data within the preset time interval as a first statistical number;
[0022] Obtaining the number of times the data processing unit uses the data stored in the preset storage area within the preset time interval as a second statistical number;
[0023] A usage hit rate of at least one preset storage area in the buffer storage unit within the preset time interval is obtained according to the first statistical number and the second statistical number.
[0024] Optionally, it also includes: after the data processing unit uses the data stored in the preset storage area within the preset time interval, increasing the first statistical number and the second statistical number.
[0025] Optionally, it also includes: obtaining a corresponding relationship between the usage hit rate and the prediction probability;
[0026] Determining the usage hit rate corresponding to the predicted probability according to the predicted probability includes: determining the usage hit rate corresponding to the predicted probability according to the predicted probability, a corresponding relationship between the usage hit rate and the predicted probability.
[0027] Optionally, the correspondence between the hit rates of the preset storage areas and the predicted probabilities is a correspondence established according to the order of the hit rates of the preset storage areas from large to small and the order of the predicted probabilities from large to small.
[0028] Optionally, the correspondence between the hit rate of the preset storage area and the predicted probability is the correspondence between the hit rate interval of the preset storage area and the predicted probability interval.
[0029] Optionally, it also includes: if the predicted probability does not reach the predicted probability threshold, storing the data to be stored according to the remaining storage space information of the buffer storage unit.
[0030] Optionally, storing the data to be stored according to the remaining storage space information of the buffer storage unit includes: if there is no remaining storage space in the storage space of the buffer storage unit, storing the data to be stored in the main storage unit.
[0031] Optionally, storing the data to be stored according to the remaining storage space information of the buffer storage unit includes: if there is remaining storage space in the storage space of the buffer storage unit, storing the data to be stored in the buffer storage unit.
[0032] Optionally, after the data to be stored is stored according to the remaining storage space information of the buffer storage unit, the number of times the data processing unit uses the data within the preset time interval is increased.
[0033] Optionally, also include:
[0034] Obtaining a granularity region where the data to be stored is located;
[0035] According to the granularity area where the data to be stored is located, obtaining a weight of the granularity area where the data to be stored is located when calculating the prediction probability;
[0036] The determining the predicted probability that the data to be stored is the target stored data includes: calculating the predicted probability according to a weight of a granularity region where the data to be stored is located when calculating the predicted probability.
[0037] Optionally, obtaining the granularity area where the data to be stored is located includes:
[0038] Obtaining data density characteristics of the data to be stored;
[0039] Obtaining the correspondence between data density features and granularity regions;
[0040] The granularity region where the data to be stored is located is obtained according to the data density feature of the data to be stored and the corresponding relationship between the data density feature and the granularity region.
[0041] Optionally, obtaining the data density feature of the data to be stored includes:
[0042] Obtaining data characteristics of the data to be stored;
[0043] According to the data characteristics of the data to be stored, a data density characteristic of the data to be stored is obtained.
[0044] Optionally, the determining whether the data to be stored is stored in the buffer storage unit includes:
[0045] Obtaining the similarity between the data to be stored and the data stored in the buffer storage unit;
[0046] According to the similarity between the data to be stored and the data stored in the buffer storage unit, it is determined whether the data to be stored is stored in the buffer storage unit.
[0047] Optionally, judging whether the data to be stored is stored in the buffer storage unit based on the similarity between the data to be stored and the data stored in the buffer storage unit includes: if the similarity reaches or exceeds a similarity threshold, the data to be stored is stored in the buffer storage unit.
[0048] Optionally, judging whether the data to be stored is stored in the buffer storage unit according to the similarity between the data to be stored and the data stored in the buffer storage unit includes: if the similarity does not reach the similarity threshold, the data to be stored is not stored in the buffer storage unit.
[0049] Optionally, the method further includes: if the data to be stored is stored in the buffer storage unit, increasing the number of times the data processing unit uses the data within the preset time interval.
[0050] In another aspect, the present application provides a data processing device, comprising:
[0051] A unit for obtaining data to be stored, used for obtaining data to be stored;
[0052] a data-to-be-stored determining unit, used for determining whether the data-to-be-stored is stored in the buffer storage unit;
[0053] a prediction probability obtaining unit, configured to determine, when the judgment result of the to-be-stored data judging unit is no, the prediction probability that the to-be-stored data is target storage data, wherein the target storage data is data whose data density exceeds a data density threshold;
[0054] The data to be stored unit is used to store the data to be stored in the buffer storage unit if the predicted probability reaches or exceeds the predicted probability threshold.
[0055] In another aspect, the present application provides an electronic device, including:
[0056] Processor; and
[0057] The memory is used to store a computer program. After the device is powered on and the computer program is run by the processor, the following steps are performed:
[0058] Obtaining data to be stored;
[0059] Determining whether the data to be stored is stored in the buffer storage unit;
[0060] If not, determining the predicted probability that the data to be stored is target storage data, the target storage data being data whose data density exceeds a data density threshold;
[0061] If the predicted probability reaches or exceeds the predicted probability threshold, the data to be stored is stored in the buffer storage unit, where the buffer storage unit is a storage unit for storing data used by a data processing unit within a specified time interval.
[0062] In another aspect, the present application provides a data processing method, comprising:
[0063] Obtaining data to be stored;
[0064] Determining whether the data to be stored is stored in the buffer storage unit;
[0065] If not, determining whether the data density of the data to be stored exceeds a data density threshold;
[0066] If the data density of the data to be stored reaches or exceeds the data density threshold, the data to be stored is stored in the buffer storage unit; if the data density of the data to be stored does not reach the data density threshold, the data to be stored is stored in the main storage unit. The buffer storage unit is a storage unit for storing data used by a data processing unit within a specified time interval.
[0067] In another aspect, the present application provides a data processing method, comprising:
[0068] Obtaining data to be stored;
[0069] Determining whether the data to be stored is stored in the buffer storage unit;
[0070] If not, determining whether the data density of the data to be stored exceeds a data density threshold;
[0071] If the data density of the data to be stored reaches or exceeds the data density threshold, the data to be stored is stored in the buffer storage unit, which is a storage unit for storing data used by a data processing unit within a specified time interval.
[0072] In another aspect, the present application provides a data processing method, comprising:
[0073] Get data write request;
[0074] According to the data writing request, determining whether the writing request satisfies a first preset condition, and if so, writing the data into a buffer storage unit;
[0075] The first preset condition at least includes an indicator of writing a set amount of data within a set time, and the buffer storage unit is a storage unit for storing data used by the data processing unit within a specified time interval.
[0076] Optionally, if not, the data is written to the main storage unit.
[0077] Optionally, if not, it is further determined whether there is room in the buffer storage space, and if so, the data is written into the buffer storage unit; if not, the data is written into the main storage unit.
[0078] In another aspect, the present application provides a data storage device, comprising:
[0079] A data writing request obtaining unit, used for obtaining a data writing request,
[0080] a data writing unit, used for judging whether there is space in the buffer storage space, and if so, judging whether the writing request satisfies a first preset condition according to the data writing request, and if so, writing the data into the buffer storage unit;
[0081] The first preset condition at least includes an indicator of writing a set amount of data within a set time, and the buffer storage unit is a storage unit for storing data used by the data processing unit within a specified time interval.
[0082] In another aspect, the present application provides a distributed denial of service attack data processing method, comprising:
[0083] Obtaining data to be stored for a data write request;
[0084] Determining whether the data to be stored is distributed denial of service data whose data density exceeds a data density threshold;
[0085] If yes, the data to be stored is stored in the buffer storage unit; otherwise, the data to be stored is stored in the main storage unit, and the buffer storage unit is a storage unit for storing data used by the data processing unit within a specified time interval. Compared with the prior art, the present application has the following advantages:
[0086] The data processing method provided by the present application first determines whether the data to be stored is stored in the buffer storage unit after obtaining the data to be stored. When the data to be stored is not stored in the buffer storage unit, the predicted probability that the data to be stored is the target storage data is further determined, and the data to be stored is directly stored in the buffer storage unit only when the predicted probability reaches or exceeds the predicted probability threshold, thereby ensuring that the data to be stored whose data density exceeds the data density threshold is stored in the buffer storage unit, thereby improving the working efficiency of the buffer storage unit. BRIEF DESCRIPTION OF THE DRAWINGS
[0087] Figure 1 This is a first schematic diagram of an application scenario embodiment of the data processing method provided in the present application.
[0088] Figure 1A This is a second schematic diagram of an application scenario embodiment of the data processing method provided in the present application.
[0089] Figure 2 This is a flowchart of a data processing method provided in the first embodiment of the present application.
[0090] Figure 3 This is a flowchart for obtaining a granularity area where data to be stored is located provided in the first embodiment of the present application.
[0091] Figure 4 A flowchart of storing data to be stored in a preset storage area is provided in the first embodiment of the present application.
[0092] Figure 5 A flowchart for obtaining a usage hit rate of a preset storage area within a preset time interval is provided in the first embodiment of the present application.
[0093] Figure 6 This is a schematic diagram of a data processing device provided in the second embodiment of the present application.
[0094] Figure 7 A schematic diagram of an electronic device provided in an embodiment of the present application.
[0095] Figure 8 This is a flowchart of a data processing method provided in the fourth embodiment of the present application. DETAILED DESCRIPTION
[0096] Many specific details are set forth in the following description to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present invention, so the present invention is not limited to the specific implementation disclosed below.
[0097] In order to more clearly demonstrate the data processing method provided by the present application, the application scenario of the data processing method provided by the present application is first introduced.
[0098] The data processing method provided in this application can be applied to computer data processing application scenarios, such as Figure 1 As shown, it is a first schematic diagram of an application scenario embodiment of the data processing method provided by the present application. In the embodiment of the application scenario of the data processing method provided by the present application, the buffer storage unit is a cache memory, the main storage unit is a DDR SDRAM (Double Data Rate Synchronous Dynamic Random Access Memory), the data processing unit is a CPU, and the data to be stored is the data just used by the CPU. In the application scenario embodiment of the data processing method provided by the present application, the subject that performs data processing is generally a program, software or model in a data exchange unit for data exchange that is pre-set and deployed on a data processing device, such as: a program, software or model in a data exchange unit for data exchange installed on a server.
[0099] In the application scenario embodiment of the data processing method provided in the present application, the data processing method can be implemented by a running program loaded in the data processing unit 101, and the specific implementation process is as follows:
[0100] The data to be stored is obtained from the data processing unit 101. After the data to be stored is obtained, it is determined whether the data to be stored is stored in the buffer storage unit 102. If the data to be stored is not stored in the buffer storage unit 102, the predicted probability that the data to be stored is the target storage data is further determined, and when the predicted probability reaches or exceeds the predicted probability threshold, the data to be stored is stored in the buffer storage unit 102. Wherein, when the predicted probability does not reach the predicted probability threshold, the data to be stored is stored according to the remaining storage space information of the buffer storage unit 102. Specifically, if there is no remaining storage space in the storage space of the buffer storage unit 102, the data to be stored is stored in the main storage unit 103; if there is remaining storage space in the storage space of the buffer storage unit 102, the data to be stored is stored in the buffer storage unit 102.
[0101] It should be noted that in the application scenario embodiment of the data processing method provided in the present application, the target storage data is data whose data density exceeds a data density threshold, wherein the data density is the flow of data within a specified time period.
[0102] The data processing method provided by the present application is also often used to defend against distributed denial of service attacks. Distributed denial of service attacks are network attacks in which a target server is simultaneously attacked by multiple different computing devices from different locations within a specified time period. Distributed denial of service attack data is data whose data density exceeds a data density threshold, that is, the flow of real-time data to be stored is large within a specified time period. When the data processing method provided by the present application is applied to defend against distributed denial of service attacks, it is necessary to monitor the data to be stored in real time. Specifically, when obtaining real-time data to be stored, it is first determined whether the data to be stored is stored in the buffer storage unit. If the data to be stored is not stored in the buffer storage unit, it is first determined whether the real-time data to be stored is distributed denial of service attack data. If the real-time data to be stored is distributed denial of service attack data, the data to be stored is further stored in the buffer storage unit.
[0103] In the application scenario embodiment of the data processing method provided in the present application, the specific subject that performs data processing may be a prediction classifier in a data exchange unit for data exchange that is pre-set and deployed on a server, etc., please refer to Figure 1A , which is a second schematic diagram of an application scenario embodiment of the data processing method provided in this application.
[0104] First, a prediction classifier is trained, which is used to obtain the data density of the data to be stored, and store the data to be stored according to whether the data density of the data to be stored exceeds the data density threshold. Specifically, the parameter training process of the prediction classifier is as follows: first, sample data is obtained; second, the storage device corresponding to the sample data and the data density corresponding to the sample data are obtained; third, the prediction classifier is trained according to the sample data, the storage device corresponding to the sample data and the data density corresponding to the sample data.
[0105] Secondly, statistics, specifically, first integrate all data obtained within a preset time period, and count the data that does not exist in the cache. This data is the data to be stored for the data write request, wherein the data write request can be a data write request sent by the server to the client, at this time, the data to be stored for the data write request is the data to be stored provided by the client to the server for the data write request sent by the server; the data write request can be a data write request sent by the client to its corresponding server, at this time, the data to be stored for the data write request is the data carried in the data write request.
[0106] Again, the statistical data is input into the trained prediction classifier, and the prediction classifier determines whether the data density of the data to be stored exceeds the data density threshold. That is, the prediction classifier determines whether the data to be stored is Class A data or Class B data, where Class A data is data whose data density reaches or exceeds the data density threshold, and Class B data is data whose data density does not reach the data density threshold.
[0107] Finally, if the data to be stored is type A data, it is stored in the buffer storage unit; if the data to be stored is type B data, it is stored in the main storage unit.
[0108] The data processing method provided in the present application can also be applied to other application scenarios. The embodiments of the application scenarios of the above-mentioned data processing method are provided to facilitate the understanding of the data processing method provided in the present application, but are not used to limit the data processing method provided in the present application.
[0109] First embodiment
[0110] In the first embodiment of the present application, a data processing method is provided as follows: Figures 2 to 5 Provide explanation.
[0111] Please refer to Figure 2 , which is a flowchart of a data processing method provided in the first embodiment of the present application.
[0112] In step S201, data to be stored is obtained.
[0113] In the first embodiment of the present application, the data to be stored is generally data just used by the CPU in the computer. Specifically, in the first embodiment of the present application, the data to be stored is data used by the CPU in a specified time interval.
[0114] In step S202, it is determined whether the buffer storage unit stores data to be stored.
[0115] In the first embodiment of the present application, when the data to be stored is data just used by the CPU in the computer, the buffer storage unit is a Cache memory.
[0116] The process of judging whether the data to be stored is stored in the buffer storage unit is as follows: obtaining the similarity between the data to be stored and the data stored in the buffer storage unit; judging whether the data to be stored is stored in the buffer storage unit according to the similarity between the data to be stored and the data stored in the buffer storage unit. Specifically, if the similarity reaches or exceeds the similarity threshold, the data to be stored is stored in the buffer storage unit; if the similarity does not reach the similarity threshold, the data to be stored is not stored in the buffer storage unit.
[0117] In the first embodiment of the present application, the similarity threshold is a pre-set value between 0 and 1. Generally, the similarity threshold is a value greater than 0.5 and less than 1. For example, when the similarity threshold in the first embodiment of the present application is set to 0.8, if the similarity between the data to be stored and the data stored in the buffer storage unit is greater than or equal to 0.8, it means that the data to be stored is stored in the buffer storage unit, and if the similarity between the data to be stored and the data stored in the buffer storage unit is less than 0.8, it means that the data to be stored is not stored in the buffer storage unit.
[0118] In the first implementation of the present application, if the buffer storage unit stores data to be stored, the number of times the data processing unit uses data within a preset time interval is increased; if the buffer storage unit does not store data to be stored, step S203 is executed.
[0119] In step S203 , if not, the predicted probability that the data to be stored is the target stored data is determined.
[0120] In the first embodiment of the present application, the target storage data is data whose data density exceeds the data density threshold, wherein the data density is the flow of data in a specified time period. When determining the predicted probability that the data to be stored is the target storage data, the data to be stored can be input into a prediction classifier to obtain the predicted probability. The prediction classifier is used to classify the data to be stored according to the source address or the target address of the data to be stored, and to calculate the predicted probability according to the storage heat statistics and storage hit rate statistics corresponding to the classified data to be stored.
[0121] In the first embodiment of the present application, the specific operation of determining the predicted probability that the data to be stored is the target storage data is: according to the weight of the granularity area where the data to be stored is located when calculating the predicted probability, calculate the predicted probability. Therefore, before determining the predicted probability that the data to be stored is the target storage data, it is necessary to first obtain the granularity area where the data to be stored is located, and then obtain the weight of the granularity area where the data to be stored is located when calculating the predicted probability based on the granularity area where the data to be stored is located. In the first embodiment of the present application, the granularity interval where the storage data is located can be divided into a fine-grained interval and a coarse-grained interval, wherein several fine-grained intervals can be proportionally merged into a coarse-grained interval, and the granularity interval is the interval divided when the storage heat statistics and storage hit rate statistics corresponding to the data to be stored are counted.
[0122] In the first embodiment of the present application, the process of obtaining the granularity area where the data to be stored is located is shown in Figure 3 , which is a flowchart for obtaining a granularity area where data to be stored is located provided in the first embodiment of the present application, specifically including steps S201 - 1 to S203 - 3.
[0123] Step S203-1: Obtaining data density characteristics of the data to be stored. The process of obtaining the data density characteristics of the data to be stored is as follows: obtaining data characteristics of the data to be stored; and obtaining data density characteristics of the data to be stored according to the data characteristics of the data to be stored.
[0124] Step S203-2: Obtaining the correspondence between the data density feature and the granularity region. Specifically, the obtained correspondence between the data density feature and the granularity region is a preset correspondence.
[0125] Step S203 - 3 : According to the data density feature of the data to be stored and the corresponding relationship between the data density feature and the granularity region, the granularity region where the data to be stored is located is obtained.
[0126] In step S204, if the predicted probability reaches or exceeds the predicted probability threshold, the data to be stored is stored in a buffer storage unit.
[0127] In the first embodiment of the present application, when the predicted probability reaches or exceeds the predicted probability threshold, the step of storing the data to be stored in the buffer storage unit is: storing the data to be stored in the buffer storage unit according to the remaining storage space information of the buffer storage unit. Specifically, it corresponds to the following two situations:
[0128] The first case is: if there is no remaining storage space in the storage space of the buffer storage unit, the data stored in the buffer storage unit and least used by the data processing unit in the preset time interval is replaced with the data to be stored. In a specific case, the process of replacing the data stored in the buffer storage unit and least used by the data processing unit in the preset time interval with the data to be stored can be implemented by an LRU algorithm.
[0129] In a first embodiment of the present application, data stored in a buffer storage unit and least used by a data processing unit within a preset time interval is replaced with data to be stored, including: after storing the data stored in the buffer storage unit and least used by the data processing unit within a preset time interval in a main memory, the data to be stored is stored in the buffer storage unit.
[0130] The first case is: if there is remaining storage space in the storage space of the buffer storage unit, the data to be stored is stored in a preset storage area corresponding to the predicted probability.
[0131] In the first embodiment of the present application, the process of storing the data to be stored in the preset storage area corresponding to the predicted probability is as follows: Figure 4 , which is a flowchart of storing data to be stored in a preset storage area provided in the first embodiment of the present application, specifically including steps S204 - 1 to S204 - 3.
[0132] S204-1: Obtain a usage hit rate of at least one preset storage area in the buffer storage unit.
[0133] In the first embodiment of the present application, the usage hit rate is used to indicate the probability that the data stored in the preset storage area is used by the data processing unit within a preset time interval.
[0134] In the first embodiment of the present application, the usage hit rate obtained is specifically the usage hit rate of at least one preset storage area in the buffer storage unit within a preset time interval. Figure 5 , which is a flowchart for obtaining a usage hit rate of a preset storage area within a preset time interval provided in the first embodiment of the present application, specifically including steps S204 - 11 to S204 - 13.
[0135] Step S204 - 11 : obtaining the number of times the data processing unit uses data within a preset time interval as a first statistical number.
[0136] Step S204 - 12 : obtaining the number of times the data processing unit uses data within a preset time interval as a first statistical number.
[0137] Step S204 - 13 : Obtaining a usage hit rate of at least one preset storage area in the buffer storage unit within a preset time interval according to the first statistical number and the second statistical number.
[0138] In the first embodiment of the present application, after the data processing unit uses the data stored in the preset storage area within the preset time interval, it is necessary to increase the values of the first statistical number and the second statistical number to obtain a new first statistical number and a new second statistical number.
[0139] S204-2: Determine the usage hit rate corresponding to the predicted probability according to the predicted probability.
[0140] In the first embodiment of the present application, the specific process of determining the usage hit rate corresponding to the predicted probability according to the predicted probability is: determining the usage hit rate corresponding to the predicted probability according to the corresponding relationship between the predicted probability, the usage hit rate and the predicted probability. Therefore, before determining the usage hit rate corresponding to the predicted probability, it is necessary to obtain the corresponding relationship between the usage hit rate and the predicted probability.
[0141] The corresponding relationship between the hit rate of the preset storage area and the predicted probability is a corresponding relationship established according to the order of the hit rates of the preset storage areas from large to small and the order of the predicted probabilities from large to small. In addition, the corresponding relationship between the hit rate of the preset storage area and the predicted probability can further be a corresponding relationship between the hit rate interval of the preset storage area and the interval between the predicted probabilities.
[0142] S204 - 3 : Determine a preset storage area corresponding to the predicted probability according to the usage hit rate corresponding to the predicted probability, and store the data to be stored in the preset storage area corresponding to the predicted probability.
[0143] In the first embodiment of the present application, if the predicted probability does not reach the predicted probability threshold, the data to be stored is stored according to the remaining storage space information of the buffer storage unit. Specifically, if there is no remaining storage space in the storage space of the buffer storage unit, the data to be stored is stored in the main storage unit; if there is remaining storage space in the storage space of the buffer storage unit, the data to be stored is stored in the buffer storage unit.
[0144] After the data to be stored is stored according to the remaining storage space information of the buffer storage unit, the number of times the data processing unit uses the data within a preset time interval is increased.
[0145] The data processing method provided in the first embodiment of the present application, after obtaining the data to be stored, first determines whether the data to be stored is stored in the buffer storage unit. When the data to be stored is not stored in the buffer storage unit, further determines the predicted probability that the data to be stored is the target storage data, and directly stores the data to be stored in the buffer storage unit when the predicted probability reaches or exceeds the predicted probability threshold, thereby ensuring that the data to be stored whose data density exceeds the data density threshold is stored in the buffer storage unit, thereby improving the working efficiency of the buffer storage unit.
[0146] Second embodiment
[0147] Corresponding to a data processing method provided in the first embodiment of the present application, a data processing device is also provided in the second embodiment of the present application. Since the device embodiment is basically similar to the first method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device embodiment described below is only illustrative.
[0148] Please refer to Figure 6 , which is a schematic diagram of a data processing device provided in the second embodiment of the present application.
[0149] The data processing device comprises:
[0150] The data to be stored obtaining unit 201 is used to obtain the data to be stored;
[0151] The to-be-stored data determination unit 202 is used to determine whether the to-be-stored data is stored in the buffer storage unit;
[0152] A prediction probability obtaining unit 203 is used to determine the prediction probability that the data to be stored is target storage data when the judgment result of the data to be stored judgment unit 202 is no, and the target storage data is data whose data density exceeds a data density threshold;
[0153] The first data storage unit 204 is configured to store the data to be stored in the buffer storage unit if the predicted probability reaches or exceeds a predicted probability threshold.
[0154] Optionally, the first data to be stored unit 204 is specifically configured to store the data to be stored in the buffer storage unit according to the remaining storage space information of the buffer storage unit.
[0155] Optionally, storing the data to be stored in the buffer storage unit based on the remaining storage space information of the buffer storage unit includes: if there is no remaining storage space in the storage space of the buffer storage unit, replacing the data to be stored with the data stored in the buffer storage unit and least used by the data processing unit within a preset time interval.
[0156] Optionally, replacing the data stored in the buffer storage unit and used least by the data processing unit within a preset time interval with the data to be stored includes: after storing the data stored in the buffer storage unit and used least by the data processing unit within a preset time interval in the main memory, storing the data to be stored in the buffer storage unit.
[0157] Optionally, storing the data to be stored in the buffer storage unit according to the remaining storage space information of the buffer storage unit includes: if there is remaining storage space in the storage space of the buffer storage unit, storing the data to be stored in a preset storage area corresponding to the predicted probability.
[0158] Optionally, storing the data to be stored in a preset storage area corresponding to the predicted probability includes:
[0159] Obtaining a usage hit rate of at least one preset storage area in the buffer storage unit, wherein the usage hit rate is used to indicate a probability that the data stored in the preset storage area is used by the data processing unit within a preset time interval;
[0160] Determine the usage hit rate corresponding to the predicted probability according to the predicted probability;
[0161] According to the usage hit rate corresponding to the predicted probability, a preset storage area corresponding to the predicted probability is determined, and the data to be stored is stored in the preset storage area corresponding to the predicted probability.
[0162] Optionally, obtaining the usage hit rate of at least one preset storage area in the buffer storage unit includes: obtaining the usage hit rate of at least one preset storage area in the buffer storage unit within the preset time interval.
[0163] Optionally, obtaining the usage hit rate of at least one preset storage area in the buffer storage unit within the preset time interval includes:
[0164] Obtaining the number of times the data processing unit uses data within the preset time interval as a first statistical number;
[0165] Obtaining the number of times the data processing unit uses the data stored in the preset storage area within the preset time interval as a second statistical number;
[0166] A usage hit rate of at least one preset storage area in the buffer storage unit within the preset time interval is obtained according to the first statistical number and the second statistical number.
[0167] Optionally, it also includes: after the data processing unit uses the data stored in the preset storage area within the preset time interval, increasing the first statistical number and the second statistical number.
[0168] Optionally, it also includes: obtaining a corresponding relationship between the usage hit rate and the prediction probability;
[0169] Determining the usage hit rate corresponding to the predicted probability according to the predicted probability includes: determining the usage hit rate corresponding to the predicted probability according to the predicted probability, a corresponding relationship between the usage hit rate and the predicted probability.
[0170] Optionally, the correspondence between the hit rates of the preset storage areas and the predicted probabilities is a correspondence established according to the order of the hit rates of the preset storage areas from large to small and the order of the predicted probabilities from large to small.
[0171] Optionally, the correspondence between the hit rate of the preset storage area and the predicted probability is the correspondence between the hit rate interval of the preset storage area and the predicted probability interval.
[0172] Optionally, the data processing device provided in the second embodiment of the present application further includes: a second data storage unit to be stored, used to store the data to be stored according to the remaining storage space information of the buffer storage unit if the predicted probability does not reach the predicted probability threshold.
[0173] Optionally, the second data storage unit to be stored is specifically used to store the data to be stored in the main storage unit if there is no remaining storage space in the storage space of the buffer storage unit.
[0174] Optionally, the second data storage unit to be stored is specifically configured to store the data to be stored in the buffer storage unit if there is remaining storage space in the storage space of the buffer storage unit.
[0175] Optionally, the method further includes: after storing the data to be stored according to the remaining storage space information of the buffer storage unit, increasing the number of times the data processing unit uses the data within the preset time interval.
[0176] Optionally, the data processing device provided in the second embodiment of the present application further includes:
[0177] A granularity region obtaining unit, used for obtaining the granularity region where the data to be stored is located;
[0178] A weight obtaining unit, used for obtaining, according to the granularity area where the data to be stored is located, a weight of the granularity area where the data to be stored is located when calculating the prediction probability;
[0179] The prediction probability obtaining unit 203 is specifically configured to calculate the prediction probability according to the weight of the granularity region where the data to be stored is located when calculating the prediction probability.
[0180] Optionally, obtaining the granularity area where the data to be stored is located includes:
[0181] Obtaining data density characteristics of the data to be stored;
[0182] Obtaining the correspondence between data density features and granularity regions;
[0183] The granularity region where the data to be stored is located is obtained according to the data density feature of the data to be stored and the corresponding relationship between the data density feature and the granularity region.
[0184] Optionally, obtaining the data density feature of the data to be stored includes:
[0185] Obtaining data characteristics of the data to be stored;
[0186] According to the data characteristics of the data to be stored, a data density characteristic of the data to be stored is obtained.
[0187] Optionally, the data to be stored determining unit 202 is specifically configured to obtain a similarity between the data to be stored and the data stored in the buffer storage unit; and determine whether the data to be stored is stored in the buffer storage unit based on the similarity between the data to be stored and the data stored in the buffer storage unit.
[0188] Optionally, judging whether the data to be stored is stored in the buffer storage unit based on the similarity between the data to be stored and the data stored in the buffer storage unit includes: if the similarity reaches or exceeds a similarity threshold, the data to be stored is stored in the buffer storage unit.
[0189] Optionally, judging whether the data to be stored is stored in the buffer storage unit according to the similarity between the data to be stored and the data stored in the buffer storage unit includes: if the similarity does not reach the similarity threshold, the data to be stored is not stored in the buffer storage unit.
[0190] Optionally, the data processing device provided in the second embodiment of the present application further includes: a number increasing unit, which is used to increase the number of times the data processing unit uses data within the preset time interval if the data to be stored is stored in the buffer storage unit.
[0191] The data processing device provided in the second embodiment of the present application, after obtaining the data to be stored, first determines whether the data to be stored is stored in the buffer storage unit. When the data to be stored is not stored in the buffer storage unit, it further determines the predicted probability that the data to be stored is the target storage data, and directly stores the data to be stored in the buffer storage unit when the predicted probability reaches or exceeds the predicted probability threshold, thereby ensuring that the data to be stored whose data density exceeds the data density threshold is stored in the buffer storage unit, thereby improving the working efficiency of the buffer storage unit.
[0192] Third embodiment
[0193] Corresponding to the data processing method provided in the first embodiment of the present application, an electronic device is also provided in the third embodiment of the present application.
[0194] like Figure 7 As shown, it is a schematic diagram of an electronic device provided in an embodiment of the present application.
[0195] The electronic device comprises:
[0196] Processor 701; and
[0197] The memory 702 is used to store a computer program. After the device is powered on and the computer program is run by the processor, the following steps are performed:
[0198] Obtaining data to be stored;
[0199] Determining whether the data to be stored is stored in the buffer storage unit;
[0200] If not, determining the predicted probability that the data to be stored is target storage data, the target storage data being data whose data density exceeds a data density threshold;
[0201] If the predicted probability reaches or exceeds the predicted probability threshold, the data to be stored is stored in the buffer storage unit, where the buffer storage unit is a storage unit for storing data used by a data processing unit within a specified time interval.
[0202] The data processing electronic device provided in the third embodiment of the present application, after obtaining the data to be stored, first determines whether the data to be stored is stored in the buffer storage unit. When the data to be stored is not stored in the buffer storage unit, it further determines the predicted probability that the data to be stored is the target storage data, and directly stores the data to be stored in the buffer storage unit when the predicted probability reaches or exceeds the predicted probability threshold, thereby ensuring that the data to be stored whose data density exceeds the data density threshold is stored in the buffer storage unit, thereby improving the working efficiency of the buffer storage unit.
[0203] It should be noted that for the detailed description of the electronic device provided in the third embodiment of the present application, reference can be made to the relevant description of the first embodiment of the present application, which will not be repeated here.
[0204] Fourth embodiment
[0205] Corresponding to the application scenario embodiment of the data processing method provided in the present application and the data processing method provided in the first embodiment of the present application, another data processing method is provided in the fourth embodiment of the present application. Since the fourth embodiment is basically similar to the first embodiment of the method, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The following description of the fourth embodiment is only illustrative.
[0206] Please refer to Figure 8 , which is a flowchart of a data processing method provided in the fourth embodiment of the present application.
[0207] Step S801: Obtain data to be stored.
[0208] Step S802: Determine whether the buffer storage unit stores data to be stored.
[0209] Step S803: If not, determine whether the data density of the data to be stored exceeds a data density threshold.
[0210] Step S804-1: if the data density of the data to be stored reaches or exceeds the data density threshold, the data to be stored is stored in the buffer storage unit; Step S804-2: if the data density of the data to be stored does not reach the data density threshold, the data to be stored is stored in the main storage unit.
[0211] It should be noted that for the detailed description of a data processing method provided in the fourth embodiment of the present application, reference can be made to the application scenario embodiment of the data processing method provided in the present application and the related description of a data processing method provided in the first embodiment of the present application, which will not be repeated here.
[0212] Fifth embodiment
[0213] Corresponding to the application scenario embodiment of the data processing method provided in the present application and the data processing method provided in the first embodiment of the present application, another data processing method is provided in the fifth embodiment of the present application. Since the fifth embodiment is basically similar to the first embodiment of the method, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The following description of the fifth embodiment is only illustrative.
[0214] The steps of a data processing method provided in the fifth embodiment of the present application are as follows: first, obtain the data to be stored. Secondly, determine whether the data to be stored is stored in the buffer storage unit. Thirdly, if the data to be stored is not stored in the buffer storage unit, determine whether the data density of the data to be stored exceeds the data density threshold. Finally, if the data density of the data to be stored reaches or exceeds the data density threshold, store the data to be stored in the buffer storage unit, which is a storage unit for storing data used by the data processing unit within a specified time interval.
[0215] It should be noted that for the detailed description of a data processing method provided in the fifth embodiment of the present application, reference can be made to the application scenario embodiment of the data processing method provided in the present application and the related description of a data processing method provided in the first embodiment of the present application, which will not be repeated here.
[0216] Sixth embodiment
[0217] Corresponding to the application scenario embodiment of the data processing method provided in the present application and the data processing method provided in the first embodiment of the present application, another data processing method is provided in the sixth embodiment of the present application. Since the sixth embodiment is basically similar to the first embodiment of the method, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The following description of the sixth embodiment is only illustrative.
[0218] The steps of a data processing method provided in the sixth embodiment of the present application are as follows: first, a data write request is obtained. Then, according to the data write request, it is determined whether the write request satisfies a first preset condition, and if so, the data is written into a buffer storage unit. The first preset condition at least includes an indicator of writing a set amount of data within a set time, and the buffer storage unit is a storage unit for storing data used by the data processing unit within a specified time interval.
[0219] In the sixth embodiment of the present application, the data write request can be a data write request sent by a data processing device such as a server for performing data processing to a related device through a program, software or model in a data exchange unit for data exchange that is pre-installed and deployed. In this case, the data is the data to be stored for the data write request, specifically the data to be stored provided by the related device to the data processing device for the data write request sent by the data processing device; the data write request can also be a data write request sent by the related device to its corresponding data processing device. In this case, the data is the data to be stored for the data write request, specifically the data carried in the data write request. Among them, the related device is generally a client, and the data processing device is generally a server.
[0220] It should be noted that for the detailed description of the distributed denial of service attack data processing method provided in the sixth embodiment of the present application, reference can be made to the application scenario embodiment of the data processing method provided in the present application and the related description of a data processing method provided in the first embodiment of the present application, which will not be repeated here.
[0221] Seventh embodiment
[0222] Corresponding to a data processing method provided in the sixth embodiment of the present application, a data processing device is also provided in the seventh embodiment of the present application. Since the device embodiment is basically similar to the sixth embodiment of the method, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device embodiment described below is only illustrative.
[0223] The data storage device provided in the seventh embodiment of the present application includes:
[0224] A data writing request obtaining unit, used for obtaining a data writing request,
[0225] a data writing unit, used for judging whether there is space in the buffer storage space, and if so, judging whether the writing request satisfies a first preset condition according to the data writing request, and if so, writing the data into the buffer storage unit;
[0226] The first preset condition at least includes an indicator of writing a set amount of data within a set time, and the buffer storage unit is a storage unit for storing data used by the data processing unit within a specified time interval.
[0227] Optionally, the data writing unit is further used to write the data into the main storage unit if the writing request does not meet the first preset condition.
[0228] Optionally, the data writing unit is further used to further determine whether there is room in the buffer storage space if the write request does not meet the first preset condition, and if so, write the data into the buffer storage unit; if not, write the data into the main storage unit.
[0229] Eighth embodiment
[0230] Corresponding to the application scenario embodiment of the data processing method provided in the present application and the data processing method provided in the first embodiment of the present application, the eighth embodiment of the present application also provides a distributed denial of service attack data processing method. Since the eighth embodiment is basically similar to the first embodiment of the method, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The following description of the eighth embodiment is only illustrative.
[0231] The steps of a data processing method provided in the eighth embodiment of the present application are as follows: first, obtain the data to be stored. Then, determine whether the data to be stored is stored in the buffer storage unit. Finally, if the real-time data to be stored is distributed denial of service attack data, store the data to be stored in the buffer storage unit, which is a storage unit for storing data used by the data processing unit within a specified time interval.
[0232] In the eighth embodiment of the present application, the data write request may be a data write request sent by a data processing device such as a server for performing data processing to a related device through a program, software or model in a data exchange unit for data exchange pre-installed and deployed. In this case, the data to be stored for the data write request is the data to be stored provided by the related device to the data processing device for the data write request sent by the data processing device; the data write request may also be a data write request sent by the related device to its corresponding data processing device. In this case, the data to be stored for the data write request is the data carried in the data write request. The related device is generally a client, and the data processing device is generally a server.
[0233] It should be noted that for the detailed description of the distributed denial of service attack data processing method provided in the eighth embodiment of the present application, reference can be made to the application scenario embodiment of the data processing method provided in the present application and the related description of a data processing method provided in the first embodiment of the present application, which will not be repeated here.
[0234] Although the present application is disclosed as above in the form of a preferred embodiment, it is not intended to limit the present application. Any technical personnel in this field may make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.
[0235] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0236] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0237] Computer readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer readable instructions, information structures, program modules or other information. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage media or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory media such as modulated information signals and carrier waves.
[0238] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
Claims
1. A data processing method, characterized in that: include: Obtaining data to be stored; Determining whether the data to be stored is stored in the buffer storage unit; If not, determining the predicted probability that the data to be stored is target storage data, the target storage data being data whose data density exceeds a data density threshold; If the predicted probability reaches or exceeds the predicted probability threshold, the data to be stored is stored in the buffer storage unit, where the buffer storage unit is a storage unit for storing data used by a data processing unit within a specified time interval.
2. The data processing method according to claim 1, characterized in that: The storing the data to be stored in the buffer storage unit includes: storing the data to be stored in the buffer storage unit according to remaining storage space information of the buffer storage unit.
3. The data processing method according to claim 2, characterized in that: The storing the data to be stored in the buffer storage unit according to the remaining storage space information of the buffer storage unit includes: if there is no remaining storage space in the storage space of the buffer storage unit, replacing the data stored in the buffer storage unit and least used by the data processing unit within a preset time interval with the data to be stored.
4. The data processing method according to claim 3, characterized in that: The replacing the data stored in the buffer storage unit and least used by the data processing unit within a preset time interval with the data to be stored comprises: after storing the data stored in the buffer storage unit and least used by the data processing unit within a preset time interval in a main memory, storing the data to be stored in the buffer storage unit.
5. The data processing method according to claim 2, characterized in that: The storing the data to be stored in the buffer storage unit according to the remaining storage space information of the buffer storage unit includes: if there is remaining storage space in the storage space of the buffer storage unit, storing the data to be stored in a preset storage area corresponding to the predicted probability.
6. The data processing method according to claim 5, characterized in that: The storing the data to be stored in a preset storage area corresponding to the predicted probability includes: Obtaining a usage hit rate of at least one preset storage area in the buffer storage unit, wherein the usage hit rate is used to indicate a probability that the data stored in the preset storage area is used by the data processing unit within a preset time interval; Determine the usage hit rate corresponding to the predicted probability according to the predicted probability; According to the usage hit rate corresponding to the predicted probability, a preset storage area corresponding to the predicted probability is determined, and the data to be stored is stored in the preset storage area corresponding to the predicted probability.
7. The data processing method according to claim 6, characterized in that: The obtaining of the usage hit rate of at least one preset storage area in the buffer storage unit includes: obtaining the usage hit rate of at least one preset storage area in the buffer storage unit within the preset time interval.
8. The data processing method according to claim 7, characterized in that: The obtaining of the usage hit rate of at least one preset storage area in the buffer storage unit within the preset time interval includes: Obtaining the number of times the data processing unit uses data within the preset time interval as a first statistical number; Obtaining the number of times the data processing unit uses the data stored in the preset storage area within the preset time interval as a second statistical number; A usage hit rate of at least one preset storage area in the buffer storage unit within the preset time interval is obtained according to the first statistical number and the second statistical number.
9. The data processing method according to claim 8, characterized in that: Also includes: After the data processing unit uses the data stored in the preset storage area within the preset time interval, the first statistical number and the second statistical number are increased.
10. The data processing method according to claim 6, characterized in that: Also includes: Obtaining a corresponding relationship between the usage hit rate and the prediction probability; Determining the usage hit rate corresponding to the predicted probability according to the predicted probability includes: determining the usage hit rate corresponding to the predicted probability according to the predicted probability, a corresponding relationship between the usage hit rate and the predicted probability.
11. The data processing method according to claim 10, characterized in that: The corresponding relationship between the hit rate of the preset storage area and the predicted probability is a corresponding relationship established according to the order of the hit rate of the preset storage area from large to small and the order of the predicted probability from large to small.
12. The data processing method according to claim 10, characterized in that: The corresponding relationship between the hit rate and the predicted probability of the preset storage area is the corresponding relationship between the hit rate interval and the predicted probability interval of the preset storage area.
13. The data processing method according to claim 1, characterized in that: Also includes: If the predicted probability does not reach the predicted probability threshold, the to-be-stored data is stored according to the remaining storage space information of the buffer storage unit.
14. The data processing method according to claim 13, characterized in that: The storing the data to be stored according to the remaining storage space information of the buffer storage unit includes: if there is no remaining storage space in the storage space of the buffer storage unit, storing the data to be stored in the main storage unit.
15. The data processing method according to claim 13, characterized in that: The storing the data to be stored according to the remaining storage space information of the buffer storage unit includes: if there is remaining storage space in the storage space of the buffer storage unit, storing the data to be stored in the buffer storage unit.
16. The data processing method according to claim 13, characterized in that: Also includes: After the data to be stored is stored according to the remaining storage space information of the buffer storage unit, the number of times the data processing unit uses the data within a preset time interval is increased.
17. The data processing method according to claim 1, characterized in that: Also includes: Obtaining a granularity region where the data to be stored is located; According to the granularity area where the data to be stored is located, obtaining a weight of the granularity area where the data to be stored is located when calculating the prediction probability; The determining the predicted probability that the data to be stored is the target stored data includes: calculating the predicted probability according to a weight of a granularity region where the data to be stored is located when calculating the predicted probability.
18. The data processing method according to claim 17, characterized in that: The obtaining the granularity area where the data to be stored is located includes: Obtaining data density characteristics of the data to be stored; Obtaining the correspondence between data density features and granularity regions; The granularity region where the data to be stored is located is obtained according to the data density feature of the data to be stored and the corresponding relationship between the data density feature and the granularity region.
19. The data processing method according to claim 18, characterized in that: The obtaining of the data density characteristics of the data to be stored includes: Obtaining data characteristics of the data to be stored; According to the data characteristics of the data to be stored, a data density characteristic of the data to be stored is obtained.
20. The data processing method according to claim 1, characterized in that: The determining whether the data to be stored is stored in the buffer storage unit comprises: Obtaining the similarity between the data to be stored and the data stored in the buffer storage unit; According to the similarity between the data to be stored and the data stored in the buffer storage unit, it is determined whether the data to be stored is stored in the buffer storage unit.
21. The data processing method according to claim 20, characterized in that: The determining whether the data to be stored is stored in the buffer storage unit according to the similarity between the data to be stored and the data stored in the buffer storage unit includes: if the similarity reaches or exceeds a similarity threshold, the data to be stored is stored in the buffer storage unit.
22. The data processing method according to claim 20, characterized in that: The determining whether the data to be stored is stored in the buffer storage unit according to the similarity between the data to be stored and the data stored in the buffer storage unit includes: if the similarity does not reach the similarity threshold, the data to be stored is not stored in the buffer storage unit.
23. The data processing method according to claim 1, characterized in that: Also includes: If the data to be stored is stored in the buffer storage unit, the number of times the data processing unit uses the data within a preset time interval is increased.
24. A data processing device, characterized in that: include: A unit for obtaining data to be stored, used for obtaining data to be stored; a data-to-be-stored determining unit, used for determining whether the data-to-be-stored is stored in the buffer storage unit; a prediction probability obtaining unit, configured to determine, when the judgment result of the to-be-stored data judging unit is no, the prediction probability that the to-be-stored data is target storage data, wherein the target storage data is data whose data density exceeds a data density threshold; The first data storage unit to be stored is used for storing the data to be stored in the buffer storage unit if the predicted probability reaches or exceeds a predicted probability threshold.
25. An electronic device, characterized in that: include: processor; as well as The memory is used to store a computer program. After the device is powered on and the computer program is run by the processor, the following steps are performed: Obtaining data to be stored; Determining whether the data to be stored is stored in the buffer storage unit; If not, determining the predicted probability that the data to be stored is target storage data, the target storage data being data whose data density exceeds a data density threshold; If the predicted probability reaches or exceeds the predicted probability threshold, the data to be stored is stored in the buffer storage unit, where the buffer storage unit is a storage unit for storing data used by a data processing unit within a specified time interval.
26. A data processing method, characterized in that: include: Obtaining data to be stored; Determining whether the data to be stored is stored in the buffer storage unit; If not, determining whether the data density of the data to be stored exceeds a data density threshold; If the data density of the data to be stored reaches or exceeds the data density threshold, the data to be stored is stored in the buffer storage unit; if the data density of the data to be stored does not reach the data density threshold, the data to be stored is stored in the main storage unit. The buffer storage unit is a storage unit for storing data used by a data processing unit within a specified time interval.
27. A data processing method, characterized in that: include: Obtaining data to be stored; Determining whether the data to be stored is stored in the buffer storage unit; If not, determining whether the data density of the data to be stored exceeds a data density threshold; If the data density of the data to be stored reaches or exceeds the data density threshold, the data to be stored is stored in the buffer storage unit, which is a storage unit for storing data used by a data processing unit within a specified time interval.
28. A data processing method, characterized in that: include: Get data write request; According to the data writing request, determining whether the writing request satisfies a first preset condition, and if so, writing the data into a buffer storage unit; The first preset condition at least includes an indicator of writing a set amount of data within a set time, and the buffer storage unit is a storage unit for storing data used by the data processing unit within a specified time interval.
29. The data processing method according to claim 28, characterized in that: If not, the data is written into the main storage unit.
30. According to claim 28, characterised in that If not, it is further determined whether there is room in the buffer storage space. If so, the data is written into the buffer storage unit; if not, the data is written into the main storage unit.
31. A data storage device, characterized in that: include: A data writing request obtaining unit, used for obtaining a data writing request, a data writing unit, used for judging whether there is space in the buffer storage space, and if so, judging whether the writing request satisfies a first preset condition according to the data writing request, and if so, writing the data into the buffer storage unit; The first preset condition at least includes an indicator of writing a set amount of data within a set time, and the buffer storage unit is a storage unit for storing data used by the data processing unit within a specified time interval.
32. A distributed denial of service attack data processing method, characterized in that: include: Obtaining data to be stored for a data write request; Determining whether the data to be stored is distributed denial of service data whose data density exceeds a data density threshold; If so, the data to be stored is stored in a buffer storage unit; otherwise, the data to be stored is stored in a main storage unit, wherein the buffer storage unit is a storage unit for storing data used by a data processing unit within a specified time interval.
Citation Information
Patent Citations
Recognition method, device and calculation equipment for user equipment uniqueness
CN106709318A
Data processing method and device, electronic device and computer readable medium
CN110727405A