CN113900906A - Log capacity determination method and device, electronic equipment and storage medium - Google Patents

Log capacity determination method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113900906A
CN113900906A CN202111279900.0A CN202111279900A CN113900906A CN 113900906 A CN113900906 A CN 113900906A CN 202111279900 A CN202111279900 A CN 202111279900A CN 113900906 A CN113900906 A CN 113900906A
Authority
CN
China
Prior art keywords
historical
time period
capacity
log
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111279900.0A
Other languages
Chinese (zh)
Inventor
郭妙友
陈晓锵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202111279900.0A priority Critical patent/CN113900906A/en
Publication of CN113900906A publication Critical patent/CN113900906A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3089Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents
    • G06F11/3093Configuration details thereof, e.g. installation, enabling, spatial arrangement of the probes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3089Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents
    • G06F11/3096Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents wherein the means or processing minimize the use of computing system or of computing system component resources, e.g. non-intrusive monitoring which minimizes the probe effect: sniffing, intercepting, indirectly deriving the monitored data from other directly available data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
    • G06F11/3419Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment by assessing time
    • G06F11/3423Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment by assessing time where the assessed time is active or idle time
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3438Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment monitoring of user actions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3452Performance evaluation by statistical analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/3476Data logging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/865Monitoring of software

Abstract

The disclosure relates to a log capacity determination method, a log capacity determination device, an electronic device and a storage medium, wherein the method comprises the following steps: acquiring historical active data and historical log capacity of target equipment in a historical time period; the historical activity data represents the activity of the target equipment in a historical time period; according to the historical activity data and the historical log capacity, determining the predicted log capacity which can be stored by the target equipment in a predicted time period, wherein the predicted time period is a time period after the historical time period; and determining the target log capacity which can be stored by the target device in the prediction time period based on the predicted log capacity and the residual disk capacity of the target device in the prediction time period. According to the scheme, the user dimension and the equipment dimension are comprehensively considered, the configuration precision of the target log capacity is improved, the occupation of a user equipment disk is reduced as far as possible on the premise that log information is not lost, and the user experience is improved.

Description

Log capacity determination method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for determining log capacity, an electronic device, and a storage medium.
Background
In the related art, the log configuration items (for example, the logs can occupy the total capacity of the disk, the number of log files, the capacity of the individual log files, and the like) are generally configured through a log framework (for example, coco LumberJack).
However, the configuration items obtained by the log configuration through the log framework are static, and the log configuration process has no consideration on the user dimension and the equipment dimension. In addition, the log files are limited by the log configuration items of static configuration (for example, at most 5 log files can be stored, the size of a single file is not more than 1M, the total size is not more than 20M, the time span of the file is not more than 24 hours, and the like), so that the occupation of a user equipment disk cannot be reduced as much as possible on the premise of not losing log information, and the user experience is reduced.
Disclosure of Invention
The disclosure provides a method and a device for determining log capacity, electronic equipment and a storage medium, which are used for solving the problems that log configuration items in the related technology are static, user dimensions and equipment dimensions are not considered, and the occupation of a user equipment disk cannot be reduced as much as possible on the premise that log information is not lost. The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a log capacity determination method, including:
acquiring historical active data and historical log capacity of target equipment in a historical time period; the historical activity data represents the activity of the target device in the historical time period, and the historical log capacity represents the size of a log generated by the target device in the historical time period;
according to the historical activity data and the historical log capacity, determining a predicted log capacity which can be stored by the target device in a predicted time period, wherein the predicted time period is a time period after the historical time period;
and determining the target log capacity which can be stored by the target device in the prediction time period based on the predicted log capacity and the residual disk capacity of the target device in the prediction time period.
In an exemplary embodiment, the determining, based on the predicted log capacity and the remaining disk capacity of the target device in the predicted time period, a target log capacity that the target device can store in the predicted time period includes:
taking the predicted log capacity as the target log capacity when the predicted log capacity is less than or equal to the remaining disk capacity;
and taking the residual disk capacity as the target log capacity when the predicted log capacity is larger than the residual disk capacity.
In an exemplary embodiment, after determining the target log capacity that the target device can store within the prediction time period based on the predicted log capacity and the remaining disk capacity of the target device within the prediction time period, the method further includes:
and obtaining the number of the log files which can be stored by the target equipment in the prediction time period according to the target log capacity and the capacity of a single log file.
In an exemplary embodiment, the determining the predicted log capacity that the target device can store within the predicted time period according to the historical activity data and the historical log capacity includes:
carrying out statistical analysis on the historical use duration to obtain the predicted use duration of the target equipment in the prediction time period;
obtaining the log capacity of the historical average time length according to the historical log capacity and the historical using time length;
and obtaining the predicted log capacity based on the log capacity of the historical average duration and the predicted use duration.
In an exemplary embodiment, the historical time period includes a plurality of historical time periods, each historical time period includes a plurality of historical time points, the predicted time period includes a plurality of predicted time points, the historical usage time period includes historical usage time periods of the target device at the respective historical time points in each historical time period, and the statistical analysis of the historical usage time periods results in the predicted usage time period of the target device in the predicted time period, including:
obtaining the average historical period usage duration of the target device in each historical time period based on the historical usage duration of the target device at each historical time point in each historical time period;
obtaining the historical use time length ratio of each historical time point of the target equipment in each historical time period according to the historical use time length of each historical time point of the target equipment in each historical time period and the average historical period use time length;
and obtaining the predicted use time of the target equipment at each predicted time point according to the historical use time ratio and the average historical period use time of the target equipment in a target historical time period, wherein the target historical time period is the historical time period which is closest to the time of the predicted time period in the plurality of historical time periods.
In an exemplary embodiment, the obtaining the log capacity of the history average time length according to the history log capacity and the history usage time length includes:
and obtaining the log capacity of the history average time length of the target equipment at each target history time point according to the history log capacity of the target equipment at each target history time point in the target history time period and the history use time length of the target equipment at each target history time point.
In an exemplary embodiment, the obtaining the predicted log capacity based on the log capacity of the historical average duration and the predicted usage duration includes:
and obtaining the predicted log capacity of the target equipment at each predicted time point according to the log capacity of the historical average time length of the target equipment at each target historical time point and the predicted use time length of the target equipment at each predicted time point.
In an exemplary embodiment, the method further includes obtaining the remaining disk capacity, where obtaining the remaining disk capacity includes:
acquiring identification information corresponding to the target equipment;
and acquiring the residual disk capacity corresponding to the identification information through a preset interface in the prediction time period.
According to a second aspect of the embodiments of the present disclosure, there is provided a log capacity determination apparatus including:
the acquisition module is configured to acquire historical activity data and historical log capacity of the target device in a historical time period; the historical activity data represents the activity of the target device in the historical time period, and the historical log capacity represents the size of a log generated by the target device in the historical time period;
a predicted log capacity determination module configured to perform determining a predicted log capacity that the target device can store within a predicted time period according to the historical activity data and the historical log capacity, the predicted time period being a time period after the historical time period;
a target log capacity determination module configured to perform determining a target log capacity that the target device is capable of storing within the prediction time period based on the predicted log capacity and a remaining disk capacity of the target device within the prediction time period.
In an exemplary embodiment, the target log capacity determination module includes:
a first log capacity determination unit configured to perform, in a case where the predicted log capacity is less than or equal to the remaining disk capacity, setting the predicted log capacity as the target log capacity;
a second log capacity determination unit configured to perform, in a case where the predicted log capacity is larger than the remaining disk capacity, setting the remaining disk capacity as the target log capacity.
In an exemplary embodiment, the apparatus further comprises:
and the log file quantity determining unit is configured to obtain the quantity of the log files which can be stored by the target equipment in the prediction time period according to the target log capacity and the capacity of a single log file.
In an exemplary embodiment, the historical activity data includes a historical usage duration characterizing a usage duration of the target device over the historical time period, and the predicted log capacity determination module includes:
a predicted usage duration determining unit configured to perform statistical analysis on the historical usage duration to obtain a predicted usage duration of the target device within the predicted time period;
a log capacity determining unit of the historical average duration, configured to execute obtaining the log capacity of the historical average duration according to the historical log capacity and the historical using duration;
a predicted log capacity determination unit configured to perform a log capacity based on the historical average time length and the predicted usage time length, resulting in the predicted log capacity.
In an exemplary embodiment, the history time period includes a plurality of history time periods, each of the history time periods includes a plurality of history time points, the prediction time period includes a plurality of prediction time points, the history usage time period includes a history usage time period of the target device at each of the history time points in each of the history time periods, and the prediction usage time period determination unit includes:
a cycle use duration determining subunit configured to perform obtaining an average history cycle use duration of the target device in each history time period based on the history use durations of the target device at the respective history time points in each history time period;
the ratio determining subunit is configured to perform obtaining, according to the historical use duration of each historical time point of the target device in each historical time period and the average historical period use duration, a historical use duration ratio of each historical time point of the target device in each historical time period;
and the predicted use time length determining subunit is configured to execute obtaining the predicted use time length of the target device at each predicted time point according to the historical use time length ratio and the average historical period use time length of the target device in a target historical time period, wherein the target historical time period is a historical time period closest to the time of the predicted time period in the plurality of historical time periods.
In an exemplary embodiment, the historical log capacity includes a historical log capacity of the target device at each historical time point in each historical time period, and the log capacity determination unit of the historical average time length is configured to perform obtaining the log capacity of the target device at the historical average time length of each target historical time point according to the historical log capacity of the target device at each target historical time point in each historical time period and the historical usage time length of the target device at each target historical time point.
In an exemplary embodiment, the predicted log capacity determination unit is configured to perform obtaining the predicted log capacity of the target device at each predicted time point according to the log capacity of the target device at the historical average time point of each target historical time point and the predicted usage time of the target device at each predicted time point.
In an exemplary embodiment, the apparatus further includes a capacity obtaining module for obtaining the remaining disk capacity, and the capacity obtaining module includes:
an identification information acquisition unit configured to perform acquisition of identification information corresponding to the target device;
and the residual disk capacity acquisition unit is configured to acquire the residual disk capacity corresponding to the identification information through a preset interface in the prediction time period.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the log capacity determination method according to any of the above embodiments.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium, wherein instructions, when executed by a processor of an electronic device, cause the electronic device to perform the log capacity determination method according to any one of the above embodiments.
According to a fifth aspect of an embodiment of the present disclosure, there is provided a computer program product, including a computer program, which when executed by a processor implements the log capacity determination method according to any one of the above embodiments.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
the method and the device for predicting the target log capacity of the target device acquire historical active data and historical log capacity of the target device in a historical time period, determine predicted log capacity which can be stored by the target device in a predicted time period according to the historical active data and the historical log capacity, determine the target log capacity which can be stored by the target device in the predicted time period based on the predicted log capacity and the residual disk capacity of the target device in the predicted time period, and achieve dynamic configuration of the target log capacity. Therefore, the target log capacity which can be stored in the prediction time period of the target device is configured according to the historical active data of the target device and the residual disk capacity of the target device in the prediction time period, because the historical active data represents the activity of the target device in the historical time period, the activity is related to a user using the target device, and the residual disk capacity is related to the target device, the user dimension and the device dimension are comprehensively considered in the configuration process of the target log capacity, the configuration precision of the target log capacity is improved, the occupation of a disk of the user device is reduced as much as possible on the premise that log information is not lost, and the user experience is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
Fig. 1 is an application environment diagram illustrating a method for log capacity determination, according to an example embodiment.
FIG. 2 is a flow chart illustrating a method of log capacity determination according to an example embodiment.
FIG. 3 is a flow diagram illustrating a method for determining a predicted log capacity that a target device is capable of storing during a predicted time period, according to an example embodiment.
FIG. 4 is a flow diagram illustrating statistical analysis of historical usage to obtain a predicted usage of a target device to use a target application for a predicted time period, according to an example embodiment.
Fig. 5 is a block diagram illustrating a log capacity determination apparatus according to an example embodiment.
FIG. 6 is a block diagram illustrating an electronic device for information recommendation, according to an example embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Referring to fig. 1, fig. 1 is a diagram illustrating an application environment of a log capacity determination method according to an exemplary embodiment, and the application environment may include a client 01 and a server 02. The client 01 can be used for collecting historical active data of the target device in a historical time period, historical log capacity and residual disk capacity of the target device in a prediction time period. Optionally, the client 01 may include a terminal device such as a smart phone, a desktop computer, a tablet computer, a notebook computer, a digital assistant, an Augmented Reality (AR)/Virtual Reality (VR) device, and a smart wearable device.
The server 02 may be configured to obtain historical active data of the target device in a historical time period, historical log capacity, and remaining disk capacity of the target device in a predicted time period, where the data are sent by the client 01; and a prediction log capacity used for determining the prediction log capacity which can be stored by the target device in the prediction time period according to the historical activity data and the historical log capacity; and a step of determining a target log capacity that the target device can store in the prediction time period based on the predicted log capacity and the remaining disk capacity. Optionally, the server 02 may be an independent physical server, or a server cluster or a distributed system formed by a plurality of physical servers, or may be a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a Content Delivery Network (CDN), a big data and artificial intelligence platform, and the like.
It should be noted that the above application environment is only an example, and the embodiments of the present disclosure may also include other application environments. For example, the log capacity determination method provided by the embodiment of the present disclosure may also be applied to an application environment including only a client.
Fig. 2 is a flowchart illustrating a log capacity determination method according to an exemplary embodiment, which is used in the system including the client and the server in fig. 1, as shown in fig. 2, and includes the following steps.
In step S11, obtaining historical activity data and historical log capacity of the target device in a historical time period; the historical activity data represents the activity of the target device in the historical time period, and the historical log capacity represents the size of a log generated by the target device in the historical time period.
Alternatively, the target device may include, but is not limited to, a terminal device such as a smartphone, a desktop computer, a tablet computer, a laptop computer, a digital assistant, an Augmented Reality (AR)/Virtual Reality (VR) device, a smart wearable device, and the like.
Optionally, the historical activity data may characterize: a target object (e.g., a user) using the target device uses the liveness of the target application in the target device for a historical period of time.
Illustratively, the target Application may be an Application (APP) installed in the target device. The target application may include, but is not limited to: short video APP, games APP, news APP, shopping APP, etc.
Alternatively, historical activity data may include, but is not limited to: historical usage duration, historical dwell page log capacity, historical access times, historical collection indices, and the like.
The historical use duration represents the duration of the target object in the historical time period, which is the use duration of the target device in the historical time period. Alternatively, the historical usage time period may be an accumulation of usage time periods at respective historical time points of the historical time period. For each historical time point, the historical usage duration for each historical time point may be the difference between the time T0 when the target object started the target application and the time T1 when the target application exited the target application at that historical time point (i.e., T1-T0). If there are multiple starts and exits at the historical time point, the usage duration at the historical time point may be the sum of multiple (T1-T0).
The log capacity of the history stay page represents a log amount (log capacity or log amount) generated by the target object staying on a certain page in the history time period in the process of using the target application, that is, the log amount generated by the target device staying on a certain page in the history time period. The historical access times represent the times of the target object accessing the target application in the historical time period, namely the times of the target device accessing the target application in the historical time period. The historical collection index represents a situation that the target object collects product content (such as an article, a commodity and the like) in the target application in a historical time period in the process of using the target application, namely that the target device collects the product content in the historical time period.
Specifically, the history log capacity represents a log size generated by the target object using the target application in the history time period, and the log size is a byte (byte), for example, 10G, 20G, or the like.
Optionally, the historical log capacity of the target device over the historical time period is related to the historical operational behavior of the target object: if the target object likes live, it is likely that the live is being watched most of the time. The target object prefers social interaction, and may be chatting most of the time using the application privacy function. Therefore, during the target object using the target application, the historical log capacity generated by the historical operation behavior of the target object can be collected.
Illustratively, the historical operational behavior may include, but is not limited to: historical browsing behavior of the target object (historical browsing behavior may generate historical staying page log capacity), historical access behavior (historical access behavior may generate historical access times), historical collection behavior (historical collection behavior may generate historical collection index), and the like.
In step S13, a predicted log capacity that the target device can store in a predicted time period is determined based on the historical activity data and the historical log capacity, and the predicted time period is a time period after the historical time period.
Optionally, the predicted log capacity characterizes a predicted maximum log capacity that the target device can store during the prediction time period.
In step S15, a target log capacity that can be stored by the target device in the predicted time period is determined based on the predicted log capacity and the remaining disk capacity of the target device in the predicted time period.
The different target devices each have a corresponding total disk capacity, e.g., 128G, 256G, 512G, etc. The remaining disk capacity refers to the difference between the total disk capacity and the used disk capacity. During the process that the target object uses the target application, the log is written continuously, so that the residual capacity of the target device is reduced continuously. And the predicted log capacity cannot be larger than the remaining disk capacity theoretically, so that the target log capacity which can be stored by the target device in the predicted time period needs to be determined according to the predicted log capacity and the remaining disk capacity of the target device in the predicted time period.
The target log capacity is the maximum log capacity that can be stored by the target device in the prediction time period, that is, the total capacity of the disk that can be occupied by the logs in the prediction time period.
The method and the device for predicting the target log capacity of the target device acquire historical active data and historical log capacity of the target device in a historical time period, determine predicted log capacity which can be stored by the target device in a predicted time period according to the historical active data and the historical log capacity, determine the target log capacity which can be stored by the target device in the predicted time period based on the predicted log capacity and the residual disk capacity of the target device in the predicted time period, and achieve dynamic configuration of the target log capacity. Therefore, the target log capacity which can be stored in the target device in the prediction time period is configured according to the historical active data of the target device and the residual disk capacity of the target device in the prediction time period, because the historical active data represents the activity of the target device in the historical time period, the activity is related to the user using the target device, and the residual disk capacity is related to the target device, the user dimension and the device dimension are comprehensively considered in the configuration process of the target log capacity, the configuration precision of the target log capacity is improved, the occupation of a disk of the user device is reduced as much as possible on the premise that log information is not lost, and the user experience is improved.
FIG. 3 is a flow diagram illustrating a method for determining a predicted log capacity that a target device is capable of storing during a predicted time period, according to an example embodiment. In an alternative embodiment, as shown in fig. 3, the historical activity data includes a historical usage time period, and the historical usage time period represents a usage time period of the target device in the historical time period, and the determining, in step S13, a predicted log capacity that the target device can store in the predicted time period according to the historical activity data and the historical log capacity may include:
in step S1301, statistical analysis is performed on the historical usage duration to obtain a predicted usage duration of the target device in the predicted time period.
Optionally, the statistical analysis may include, but is not limited to: averaging, quoting, median, etc.
Optionally, the predicted usage duration may be characterized by: and the target object uses the predicted use time of the target application in the prediction time period.
In step S1303, a log capacity of the history average time length is obtained according to the history log capacity and the history use time length.
Alternatively, the historical log capacity may be divided by the historical usage time to obtain the log capacity of the historical average time.
In step S1305, the predicted log capacity is obtained based on the log capacity of the history average time length and the predicted used time length.
Alternatively, the predicted log capacity may be a product of a log capacity of the historical average time period and the predicted usage time period.
According to the method and the device, the prediction log capacity of the target device in the prediction time period is predicted according to the historical use duration and the historical log capacity, and the prediction accuracy of the prediction log capacity can be improved; the historical use duration of the user dimension is fully considered in the prediction process of the predicted log capacity, so that the consideration of the user dimension exists in the configuration process of the subsequent target log capacity, and the user experience is improved; in addition, the predicted log capacity is not fixed, but is dynamically changed according to the log capacity of the historical average duration and the predicted use duration, so that the dynamic configuration of the subsequent target log capacity is realized, and the occupation of a user equipment disk is reduced as much as possible on the premise of not losing log information.
FIG. 4 is a flow diagram illustrating a statistical analysis of historical usage to arrive at a predicted usage of a target device over a predicted time period, according to an example embodiment. As shown in fig. 4, in an alternative embodiment, if the historical time period includes a plurality of historical time periods, each historical time period includes a plurality of historical time points, the predicted time period includes a plurality of predicted time points, and the historical usage time period includes a historical usage time period of the target device at each historical time point in each historical time period, in step S1301, statistically analyzing the historical usage time period to obtain a predicted usage time period of the target device in the predicted time period may include:
in step S13011, an average history period usage time length of the target device in each history time period is obtained based on the history usage time lengths of the target device at the respective history time points in each history time period.
Optionally, the duration of each historical time period is the same, and the number of historical time points included in each historical time period is the same. The historical use duration includes the historical use duration of the target device at each historical time point in each historical time period, that is, the sum of the historical use durations of the target device at each historical time point in each historical time period.
Alternatively, the duration of the predicted time period may be the same as the duration of each historical time period, and the number of the predicted time points may be the same as the number of the historical time points included in each historical time period.
For example, the plurality of historical time periods may include the first three weeks (i.e., the first week, the second week, the third week) and the predicted time period may be the fourth week. The historical time point of the first week may be monday to sunday of the first week. The time lapse of the second week may be monday to sunday of the second week. The time duration point of the third week may be monday to sunday of the third week. The fourth week elapsed time point may be the fourth monday through sunday.
The historical usage duration of the target device on monday of the first week may be: the difference between the time T0 when the target object launches the target application on monday of the first week and the time T1 when the target application exits (i.e., T1-T0). If there are multiple starts and exits on Monday of the first week, the usage duration at this historical point in time may be the sum of multiple (T1-T0).
For another example, the plurality of historical time periods may also include the first three months (i.e., first month, second month, third month), and the predicted time period may be the fourth month. The historical time point for the first month may be from the beginning of the month to the end of the month of the first month. The historical time point for the second month may be from the beginning of the month to the end of the month of the second month. The historical time point for the third month may be from the beginning of the month to the end of the month of the third month. The historical time point for the fourth month may be from the beginning of the month to the end of the month of the fourth month.
For example, in step S13011, an average value of the historical use durations of the target device at the respective historical time points in each historical time period may be calculated, and the average value of the historical use durations in each historical time period may be used as the average historical period use duration of the target device in each historical time period.
Alternatively, the average value may include, but is not limited to: arithmetic mean, geometric mean, weighted mean, harmonic mean, weighted mean, and the like.
For example, the average of the historical usage periods of monday through sunday of the first week may be calculated, resulting in an average historical cycle usage period of the first week. And calculating the average value of the historical use duration from Monday to Sunday of the second week to obtain the average historical period use duration of the second week. And calculating the average value of the historical use duration from Monday to Sunday of the third week to obtain the average historical use duration of the third week.
In step S13013, a historical usage time length ratio of the target device at each historical time point in each historical time period is obtained according to the historical usage time length of the target device at each historical time point in each historical time period and the average historical period usage time length.
For example, the historical usage time length of the target device at each historical time point in each historical time period may be divided by the average historical period usage time length of each historical time period to obtain the historical usage time length ratio of each historical time point in each historical time period.
For example, the historical usage time of the first week may be divided by the average historical cycle usage time of the first week to obtain the historical usage time ratio of the first week to the weekday. And respectively dividing the historical use duration from Monday to Sunday of the second week by the average historical period use duration of the first week to obtain the historical use duration ratio from Monday to Sunday of the second week. And respectively dividing the historical use duration from Monday to Sunday of the third week by the average historical use duration of the third week to obtain the historical use duration ratio from Monday to Sunday of the first week.
In step S13015, the predicted usage time of the target device at each predicted time point is obtained according to the historical usage time ratio and the average historical period usage time of the target device in a target historical time period, where the target historical time period is a historical time period closest to the time of the predicted time period in the plurality of historical time periods.
For example, the historical usage time ratio of the target device at different historical time periods and the same historical time point may be statistically analyzed, so as to obtain statistical analysis values of the target device at different historical time periods and the same historical time point.
Alternatively, the product of the statistical analysis value of the target device at different historical time periods and the average historical period usage duration of the target historical time period may be calculated to obtain the predicted usage duration of the target device at each predicted time point.
Optionally, the statistical analysis of the historical usage duration ratio of the target device at the same historical time point in different historical time periods may include, but is not limited to: median, mean, etc.
Specifically, assuming that the plurality of historical time periods includes the first three weeks (i.e., the first week, the second week, and the third week), and the predicted time period is the fourth week, the target historical time period may be the third week.
For example, the median of the historical usage length ratios for mondays of the first week, mondays of the second week, and mondays of the third week may be calculated to obtain the median of mondays. And taking the product of the median of the Monday and the average historical cycle use time of the Monday of the third week as the predicted use time of the Monday of the fourth week. The calculation method of the predicted usage time from tuesday to sunday in the fourth week is the same as that in the first week, and is not described herein again.
In the embodiment of the disclosure, the predicted use duration of the target device at each predicted time point is obtained by performing statistical analysis on the historical use duration of each historical time point in each historical time period, so that the prediction precision of the predicted use duration can be improved; the historical use duration of the user dimension is fully considered in the prediction process of the predicted use duration, so that the user dimension is considered in the subsequent configuration process of the target log capacity, and the user experience is improved; in addition, the predicted use duration is not fixed and is dynamically changed according to the historical use duration of each historical time point, so that the dynamic configuration of the subsequent target log capacity is realized, and the occupation of a user equipment disk is reduced as much as possible on the premise of not losing log information.
In an optional embodiment, the history log capacity includes a history log capacity of the target device at each history time point in each history time period, and in the step S1303, obtaining a log capacity of a history average time length according to the history log capacity and the history use time length may include:
and obtaining the log capacity of the history average time length of the target equipment at each target history time point according to the history log capacity of the target equipment at each target history time point in the target history time period and the history use time length of the target equipment at each target history time point.
For example, the historical log capacity at each target historical time point may be divided by the historical usage time at each target historical time point to obtain the log capacity of the historical average time at each target historical time point.
For example, the log capacity of the historical average time length of the monday of the third week is obtained by dividing the historical log capacity of the monday of the third week by the historical usage time length of the monday of the third week. The log capacity of the historical average duration of the tuesday of the third week is the same as that of the monday of the third week, and is not described herein again.
According to the historical log capacity of the target equipment at each target historical time point and the historical use duration of the target equipment at each target historical time point, the log capacity of the target equipment at the historical average time point of each target is obtained through calculation, and the log capacity of the historical log is the log size generated by the target equipment in the historical time period, namely the log size generated when the target object uses the target application, so that the operation behavior of the target equipment can be fully considered in the determination of the log capacity of the historical average time point, namely the historical log capacity of the user dimension is fully considered, the user dimension is considered in the configuration process of the subsequent target log capacity, and the user experience is improved; in addition, the historical use time length is not fixed and is dynamically changed along with the historical log capacity of each target historical time point and the historical use time length of each target historical time point, so that the dynamic configuration of the subsequent target log capacity is realized, and the occupation of a user equipment disk is reduced as far as possible on the premise of not losing log information.
In an alternative embodiment, in step S1305, the obtaining the predicted log capacity based on the log capacity of the historical average time length and the predicted usage time length may include:
and obtaining the predicted log capacity of the target equipment at each predicted time point according to the log capacity of the history average time length of the target equipment at each target history time point and the predicted use time length of the target equipment at each predicted time point.
For example, the log capacity of the history average time length of the target device at each target history time point and the product of the predicted usage time length of the target device at each predicted time point may be used as the predicted log capacity of the target device at each predicted time point.
For example, the log capacity for the historical average time duration for the third week's monday may be calculated and multiplied by the predicted usage time duration for the fourth week's monday to obtain the predicted log capacity for the fourth week's monday. The calculation method of the predicted log capacity of the fourth monday to the sunday is the same as that of the fourth monday, and is not described herein again.
According to the log capacity of the historical average duration of each target historical time point and the predicted use duration of each predicted time point, the predicted log capacity of the target equipment at each predicted time point is obtained through calculation, so that the determination of the predicted log capacity fully considers the log capacity and the predicted use duration of the historical average duration of user dimensionality, the consideration of the user dimensionality exists in the configuration process of the subsequent target log capacity, and the user experience is improved; in addition, the predicted log capacity is not fixed, but is dynamically configured along with the log capacity of the historical average time length of each target historical time point and the predicted use time length of each predicted time point, so that the dynamic configuration of the subsequent target log capacity is realized, and the occupation of a user equipment disk is reduced as far as possible on the premise of not losing log information.
Hereinafter, the following description will be made with reference to the example in which the historical activity data is the historical usage time length, the plurality of historical time periods include the previous three weeks (i.e., the first week, the second week, and the third week), the predicted time period is the fourth week, the predicted time points of the first week to the third week are the monday to the sunday, and the predicted time point of the fourth week is the monday to the sunday, step S13011 to step S13015, and step S1305:
1) during the target object uses the target application within the historical time period, the start application time (T0) and the exit application time (T1) of the current day are recorded. And obtaining the historical use duration of the current day from T1 to T0. If there are multiple starts and exits on the day, the historical usage duration of the day is the sum of the multiple (T1-T0).
The client collects and records historical use duration data of the previous three weeks to obtain the historical use duration of each day of the previous three weeks. The historical usage duration of each day of the previous three weeks can be as shown in table 1, wherein a1-a7, B1-B7, C1-C7 are all historical usage durations.
TABLE 1 historical usage duration for each day of the first three weeks
Monday Zhou Di Wednesday Week four ZhouWu for treating viral hepatitis Saturday wine (Sunday) Average of historical usage time
First week A1 A2 A3 A4 A5 A6 A7 Avg1=Sum(A1...A7)/7
Second week B1 B2 B3 B4 B5 B6 B7 Avg2=Sum(B1...B7)/7
The third week C1 C2 C3 C4 C5 C6 C7 Avg3=Sum(C1…C7)/7
Where Avg1 is the average of the historical usage periods for the first week, Avg2 is the average of the historical usage periods for the second week, and Avg3 is the average of the historical usage periods for the third week.
2) And dividing the historical use time of each day of each week by the average value of the historical use time of each week to obtain the historical use time ratio of each day of each week. And calculating the median of the historical use time length ratios of the same day in different weeks.
The median refers to that for a limited number set, all observed values can be ranked according to height to find out one in the middle as the median. If the observed values are even numbers, the mean of the two most intermediate values can be taken as the median. The median is not influenced by the extreme value, so that the method has better robustness.
The median of the historical usage length ratios for each day of the week and the same day of different weeks may be as shown in table 2. Wherein A1/Avg1-C7/Avg3 is the historical use time length ratio, and W1-W7 is the median.
TABLE 2 historical usage duration ratios for each day of each week and median of historical usage duration ratios for the same day of different weeks
Monday Zhou Di Wednesday Week four ZhouWu for treating viral hepatitis Saturday wine (Sunday)
First week A1/Avg1 A2/Avg1 A3/Avg1 A4/Avg1 A5/Avg1 A6/Avg1 A7/Avg1
Second week B1/Avg2 B2/Avg2 B3/Avg2 B4/Avg2 B5/Avg2 B6/Avg2 B7/Avg2
The third week C1/Avg3 C2/Avg3 C3/Avg3 C4/Avg3 C5/Avg3 C6/Avg3 C7/Avg3
Median number W1 W2 W3 W4 W5 W6 W7
3) Accumulated from the values of the previous three weeks, the average historical period usage time (Avg3) of the target historical time period (i.e., the third week) may be taken as the base value, and the product of the base value and the median may be taken as the predicted usage time of the predicted time period (i.e., the fourth week). The predicted usage time for each day of the fourth week may be as shown in table 3. Wherein the content of the first and second substances,
TABLE 3 predicted usage time for each day of the fourth week
Monday Zhou Di Wednesday Week four ZhouWu for treating viral hepatitis Week (week) (Sunday)
The fourth side W1*base W2*base W3*base W4*base W5*base W6*base W7*base
4) The log capacity generated by the target object every day is strongly correlated with the operation behavior of the target object: if the target object likes live broadcast, the live broadcast may be watched most of the time, and if the target object likes social contact, the chat may be performed most of the time by using the private message function.
The log capacity of the historical average time duration of the target device at each target historical time point (i.e., the log capacity in bytes of the historical average time duration for each day of the third week) may be determined during use of the target application by the target object. The log capacity of the historical average time length for each day of the third week may be as shown in table 4, where X1-X7 are the log capacities of the historical average time lengths, and the calculation formula of the log capacity of the historical average time length may be as follows:
the log capacity of the history average time length of each target history time point is equal to the history log capacity of each target history time point/the history use time length of each target history time point
TABLE 4 Log Capacity of historical average duration for each day of the third week
Figure BDA0003326313250000151
5) The predicted log capacity for k each day of the fourth week is:
logFileDiskQutoa=Xk*Wk*base,
the logFileDiskQutoa is the predicted log capacity, Xk is the log capacity of the historical average time length of the kth day in the four weeks, and Wk is the predicted use time length of the kth day in the four weeks.
In one possible embodiment, in step S15, the determining, based on the predicted log capacity and the remaining disk capacity of the target device in the predicted time period, a target log capacity that the target device can store in the predicted time period includes:
and setting the predicted log capacity as the target log capacity when the predicted log capacity is less than or equal to the remaining disk capacity.
And setting the remaining disk capacity as the target log capacity when the predicted log capacity is larger than the remaining disk capacity.
Illustratively, the target log capacity is min (filesystems fresize, Xk Wk base).
Under the condition that the filesysmtfreesize is smaller than or equal to the residual disk capacity, the filesysmtfreesize can be used as the target log capacity, and the maximum log capacity which can be stored by the target device does not exceed the residual disk capacity, so that under the condition that the filesysmtfreesize is larger than the residual disk capacity, the residual disk capacity can be used as the target log capacity, the residual disk capacity of the device dimension is fully considered in the configuration of the target log capacity, the target log capacity is not fixed and is dynamically changed along with the predicted log capacity and the residual disk capacity, the dynamic configuration of the subsequent target log capacity is realized, the occupation of a user device disk is reduced as much as possible on the premise that log information is not lost, and the user experience is improved.
It should be noted that the target log capacity at each predicted time point is different, and specifically, the target log capacity that the target device can store at each predicted time point may be determined according to the predicted log capacity of the target device at each predicted time point and the remaining disk capacity of the target device at each predicted time point. And when the predicted log capacity at each predicted time point is smaller than or equal to the residual disk capacity at each predicted time point, setting the predicted log capacity at each predicted time point as the target log capacity at each predicted time point, and when the predicted log capacity at each predicted time point is larger than the residual disk capacity at each predicted time point, setting the residual disk capacity at each predicted time point as the target log capacity at each predicted time point.
In a possible embodiment, after determining the target log capacity that the target device can store in the predicted time period based on the predicted log capacity and the remaining disk capacity of the target device in the predicted time period, the method may further include:
and obtaining the number of the log files which can be stored by the target equipment in the prediction time period according to the target log capacity and the capacity of a single log file.
Specifically, on the premise of fixing the capacity of a single log file, the target log capacity may be divided by the capacity of the single log file to obtain the number of log files that the target device can store in the prediction time period, and the calculation formula may be as follows: .
FileCount ═ target log capacity/maximum filesize,
wherein FileCount is the number of log files, and maxiumFileSize is the capacity of a single log file.
The method and the device for obtaining the log file number can fix the capacity of a single log file, and obtain the log file number which can be stored by the target device in the prediction time period according to the target log capacity and the capacity of the single log file, so that more log file numbers can be provided under the condition that the target object frequently uses the target application and the residual disk capacity of the target device disk is sufficient. Under the condition that the target object uses less target applications, because the historical log capacity is less, the corresponding target log capacity is also less, so that the number of log files can be reduced, and the 'private customization' of log configuration is realized, so that the configuration of log configuration items (such as the target log capacity, the number of the log files and the like) is more flexible, and the configuration flexibility of the log configuration items is improved.
In an alternative embodiment, the capacity of a single log file may not be fixed, so that the capacity of the single log file may be increased when the remaining capacity of the disk is abundant.
It should be noted that the number of log files that can be stored by the target device in the prediction time period is not fixed, but is different at each prediction time point, and specifically, the number of log files that can be stored by the target device at each prediction time point may be obtained according to the target log capacity at each prediction time point and the capacity of a single log file.
In an optional embodiment, the method further includes obtaining the remaining disk capacity, where the obtaining the remaining disk capacity may include:
and acquiring identification information corresponding to the target equipment.
And acquiring the residual disk capacity corresponding to the identification information through a preset interface in the prediction time period.
Illustratively, the identification information may be SKU information of the target device. The SKU information is a stock keeping unit, that is, a basic unit for stock in and out measurement, and may be a unit of a piece, a box, a tray, and the like. For example, iPhone 12Pro Max Red 256G, iPhone 12Pro Max Black 512G, etc.
Illustratively, the identification information may also include, but is not limited to: international Mobile Equipment Identity (IMEI), advertisement Identifier (IDFA), device unique identifier (UDID), and the like.
Specifically, the remaining disk capacity corresponding to the identification information may be obtained through A Preset Interface (API) within the prediction time period. The remaining disk capacity may be used as an upper limit for the log configuration items.
In the embodiment of the present disclosure, the remaining disk capacity is obtained through the identification information (for example, SKU information) corresponding to the target device, so that not only is the obtaining precision of the remaining disk capacity improved, but also the remaining disk capacity of the device dimension is considered in the configuration process of the target log capacity, thereby ensuring that the disk occupancy of the user device is reduced as much as possible on the premise of not losing the log information, and improving the user experience.
Fig. 5 is a block diagram illustrating a log capacity determination apparatus according to an example embodiment. Referring to fig. 5, the apparatus may include an acquisition module 21, a predicted log capacity determination module 23, and a target log capacity determination module 25.
An obtaining module 21 configured to perform obtaining historical activity data and historical log capacity of a target device in a historical time period; the historical activity data represents the activity of the target device in the historical time period, and the historical log capacity represents the size of a log generated by the target device in the historical time period.
And a predicted log capacity determination module 23 configured to perform determining, according to the historical activity data and the historical log capacity, a predicted log capacity that the target device can store within a predicted time period, where the predicted time period is a time period after the historical time period.
And a target log capacity determination module 25 configured to determine a target log capacity that the target device can store in the prediction time period based on the predicted log capacity and the remaining disk capacity of the target device in the prediction time period.
In an exemplary embodiment, the target log capacity determining module includes:
a first log capacity determination unit configured to perform, in a case where the predicted log capacity is less than or equal to the remaining disk capacity, setting the predicted log capacity as the target log capacity.
A second log capacity determination unit configured to perform, in a case where the predicted log capacity is larger than the remaining disk capacity, setting the remaining disk capacity as the target log capacity.
In an exemplary embodiment, the apparatus further includes:
and the log file quantity determining unit is configured to obtain the quantity of the log files which can be stored by the target device in the prediction time period according to the target log capacity and the capacity of a single log file.
In an exemplary embodiment, the historical activity data includes a historical usage duration, the historical usage duration characterizing usage duration of the target device over the historical time period, and the predicted log capacity determination module includes:
and the predicted use time length determining unit is configured to perform statistical analysis on the historical use time length to obtain the predicted use time length of the target device in the predicted time period.
And the log capacity determining unit of the history average time length is configured to obtain the log capacity of the history average time length according to the history log capacity and the history use time length.
And a predicted log capacity determination unit configured to perform a log capacity based on the historical average time length and the predicted usage time length to obtain the predicted log capacity.
In an exemplary embodiment, the history time period includes a plurality of history time periods, each history time period includes a plurality of history time points, the prediction time period includes a plurality of prediction time points, the history usage time period includes a history usage time period of the target device at each history time point in each history time period, and the predicted usage time period determination unit includes:
and the cycle use duration determining subunit is configured to perform historical use duration based on the historical use durations of the target device at the historical time points in each historical time period to obtain an average historical cycle use duration of the target device in each historical time period.
And the ratio determining subunit is configured to perform obtaining of the ratio of the historical use durations of the target device at the historical time points in each historical time period according to the historical use durations of the target device at the historical time points in each historical time period and the average historical period use duration.
And a predicted use time determining subunit configured to perform obtaining of the predicted use time of the target device at each predicted time point according to the historical use time ratio and an average historical period use time of the target device in a target historical time period, where the target historical time period is a historical time period closest to the time of the predicted time period in the plurality of historical time periods.
In an exemplary embodiment, the historical log capacity includes a historical log capacity of the target device at each historical time point in each historical time period, and the log capacity determination unit of the historical average time length is configured to perform obtaining the log capacity of the target device at the historical average time length of each target historical time point according to the historical log capacity of the target device at each target historical time point in each historical time period and the historical usage time length of the target device at each target historical time point.
In an exemplary embodiment, the predicted log capacity determination unit is configured to perform obtaining the predicted log capacity of the target device at each predicted time point according to the log capacity of the target device at the historical average time point of each target device and the predicted usage time of the target device at each predicted time point.
In an exemplary embodiment, the apparatus further includes a capacity obtaining module for obtaining a remaining disk capacity, where the capacity obtaining module includes:
and the identification information acquisition unit is configured to acquire the identification information corresponding to the target device.
And a residual disk capacity obtaining unit configured to obtain the residual disk capacity corresponding to the identification information through a preset interface in the prediction time period.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be described in detail here
In an exemplary embodiment, there is also provided an electronic device, comprising a processor; a memory for storing processor-executable instructions; wherein the processor is configured to implement the steps of any of the log capacity determination methods in the above embodiments when executing the instructions stored on the memory.
The electronic device may be a terminal, a server, or a similar computing device, taking the electronic device as a server as an example, fig. 6 is a block diagram of an electronic device for information recommendation according to an exemplary embodiment, where the electronic device 30 may have a relatively large difference due to different configurations or performances, and may include one or more Central Processing Units (CPUs) 31 (the CPU 31 may include but is not limited to a Processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 33 for storing data, and one or more storage media 32 (e.g., one or more mass storage devices) for storing applications 323 or data 322. The memory 33 and the storage medium 32 may be, among other things, transient storage or persistent storage. The program stored on the storage medium 32 may include one or more modules, each of which may include a sequence of instructions operating on the electronic device. Still further, the central processor 31 may be configured to communicate with the storage medium 32, and execute a series of instruction operations in the storage medium 32 on the electronic device 30. The electronic device 30 may also include one or more power supplies 36, one or more wired or wireless network interfaces 35, one or more input-output interfaces 34, and/or one or more operating systems 321, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, and so forth.
The input output interface 34 may be used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the electronic device 30. In one example, the input/output Interface 34 includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In an exemplary embodiment, the input/output interface 34 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
It will be understood by those skilled in the art that the structure shown in fig. 6 is merely illustrative and is not intended to limit the structure of the electronic device. For example, electronic device 30 may also include more or fewer components than shown in FIG. 6, or have a different configuration than shown in FIG. 6.
In an exemplary embodiment, there is also provided a computer-readable storage medium, wherein instructions of the computer-readable storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the steps of any of the log capacity determination methods of the above embodiments.
In an exemplary embodiment, there is also provided a computer program product comprising a computer program that, when executed by a processor, implements the log capacity determination method provided in any one of the above embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided by the present disclosure may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A method for determining log capacity, comprising:
acquiring historical active data and historical log capacity of target equipment in a historical time period; the historical activity data represents the activity of the target device in the historical time period, and the historical log capacity represents the size of a log generated by the target device in the historical time period;
according to the historical activity data and the historical log capacity, determining a predicted log capacity which can be stored by the target device in a predicted time period, wherein the predicted time period is a time period after the historical time period;
and determining the target log capacity which can be stored by the target device in the prediction time period based on the predicted log capacity and the residual disk capacity of the target device in the prediction time period.
2. The method of claim 1, wherein the determining a target log capacity that the target device can store during the prediction time period based on the predicted log capacity and a remaining disk capacity of the target device during the prediction time period comprises:
taking the predicted log capacity as the target log capacity when the predicted log capacity is less than or equal to the remaining disk capacity;
and taking the residual disk capacity as the target log capacity when the predicted log capacity is larger than the residual disk capacity.
3. The log capacity determination method as claimed in claim 1, wherein after the determining of the target log capacity that the target device can store within the prediction time period based on the predicted log capacity and a remaining disk capacity of the target device within the prediction time period, the method further comprises:
and obtaining the number of the log files which can be stored by the target equipment in the prediction time period according to the target log capacity and the capacity of a single log file.
4. The log capacity determination method of any one of claims 1 to 3, wherein the historical activity data comprises a historical usage duration, the historical usage duration characterizing a usage duration of the target device over the historical time period, and wherein determining a predicted log capacity that the target device is capable of storing over a predicted time period based on the historical activity data and the historical log capacity comprises:
carrying out statistical analysis on the historical use duration to obtain the predicted use duration of the target equipment in the prediction time period;
obtaining the log capacity of the historical average time length according to the historical log capacity and the historical using time length;
and obtaining the predicted log capacity based on the log capacity of the historical average duration and the predicted use duration.
5. The log capacity determination method of claim 4, wherein the historical time period comprises a plurality of historical time periods, each historical time period comprising a plurality of historical time points, the predicted time period comprises a plurality of predicted time points, and the historical usage duration comprises a historical usage duration of the target device at each historical time point in each historical time period;
the performing statistical analysis on the historical service life to obtain the predicted service life of the target device in the predicted time period includes:
obtaining the average historical period usage duration of the target device in each historical time period based on the historical usage duration of the target device at each historical time point in each historical time period;
obtaining the historical use time length ratio of each historical time point of the target equipment in each historical time period according to the historical use time length of each historical time point of the target equipment in each historical time period and the average historical period use time length;
and obtaining the predicted use time of the target equipment at each predicted time point according to the historical use time ratio and the average historical period use time of the target equipment in a target historical time period, wherein the target historical time period is the historical time period which is closest to the time of the predicted time period in the plurality of historical time periods.
6. The method of claim 5, wherein the historical log capacity comprises historical log capacity of the target device at historical time points in each historical time period, and the obtaining the log capacity of the historical average time period according to the historical log capacity and the historical usage time period comprises:
and obtaining the log capacity of the history average time length of the target equipment at each target history time point according to the history log capacity of the target equipment at each target history time point in the target history time period and the history use time length of the target equipment at each target history time point.
7. A log capacity determination apparatus, comprising:
the acquisition module is configured to acquire historical activity data and historical log capacity of the target device in a historical time period; the historical activity data represents the activity of the target device in the historical time period, and the historical log capacity represents the size of a log generated by the target device in the historical time period;
a predicted log capacity determination module configured to perform determining a predicted log capacity that the target device can store within a predicted time period according to the historical activity data and the historical log capacity, the predicted time period being a time period after the historical time period;
a target log capacity determination module configured to perform determining a target log capacity that the target device is capable of storing within the prediction time period based on the predicted log capacity and a remaining disk capacity of the target device within the prediction time period.
8. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions; wherein the processor is configured to execute the instructions to implement the log capacity determination method of any of claims 1 to 6.
9. A computer-readable storage medium, wherein instructions, when executed by a processor of an electronic device, cause the electronic device to perform the log capacity determination method of any of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the log capacity determination method of any one of claims 1 to 6.
CN202111279900.0A 2021-10-28 2021-10-28 Log capacity determination method and device, electronic equipment and storage medium Pending CN113900906A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111279900.0A CN113900906A (en) 2021-10-28 2021-10-28 Log capacity determination method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111279900.0A CN113900906A (en) 2021-10-28 2021-10-28 Log capacity determination method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113900906A true CN113900906A (en) 2022-01-07

Family

ID=79027706

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111279900.0A Pending CN113900906A (en) 2021-10-28 2021-10-28 Log capacity determination method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113900906A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116339645A (en) * 2023-05-26 2023-06-27 杭州中电安科现代科技有限公司 Method, device, equipment and medium for preventing firewall disk from overflowing

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105094698A (en) * 2015-07-08 2015-11-25 浪潮(北京)电子信息产业有限公司 Method for predicting disc capacity based on historical monitoring data
WO2019000887A1 (en) * 2017-06-26 2019-01-03 北京三快在线科技有限公司 Method and device for recommending information
CN110113224A (en) * 2019-03-19 2019-08-09 深圳壹账通智能科技有限公司 Capacity monitor method, apparatus, computer equipment and storage medium
CN110334036A (en) * 2019-06-28 2019-10-15 京东数字科技控股有限公司 A kind of method and apparatus for realizing data cached scheduling
CN110795236A (en) * 2019-09-26 2020-02-14 北京大米科技有限公司 Method, device, electronic equipment and medium for adjusting capacity of server
CN111459410A (en) * 2020-03-25 2020-07-28 北京三快在线科技有限公司 Memory space allocation method and device, electronic equipment and storage medium
CN111913885A (en) * 2020-08-07 2020-11-10 腾讯科技(深圳)有限公司 Log processing method and device, computer readable storage medium and equipment
CN112214376A (en) * 2020-10-19 2021-01-12 维沃移动通信有限公司 Storage space prompting method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105094698A (en) * 2015-07-08 2015-11-25 浪潮(北京)电子信息产业有限公司 Method for predicting disc capacity based on historical monitoring data
WO2019000887A1 (en) * 2017-06-26 2019-01-03 北京三快在线科技有限公司 Method and device for recommending information
CN110113224A (en) * 2019-03-19 2019-08-09 深圳壹账通智能科技有限公司 Capacity monitor method, apparatus, computer equipment and storage medium
CN110334036A (en) * 2019-06-28 2019-10-15 京东数字科技控股有限公司 A kind of method and apparatus for realizing data cached scheduling
CN110795236A (en) * 2019-09-26 2020-02-14 北京大米科技有限公司 Method, device, electronic equipment and medium for adjusting capacity of server
CN111459410A (en) * 2020-03-25 2020-07-28 北京三快在线科技有限公司 Memory space allocation method and device, electronic equipment and storage medium
CN111913885A (en) * 2020-08-07 2020-11-10 腾讯科技(深圳)有限公司 Log processing method and device, computer readable storage medium and equipment
CN112214376A (en) * 2020-10-19 2021-01-12 维沃移动通信有限公司 Storage space prompting method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116339645A (en) * 2023-05-26 2023-06-27 杭州中电安科现代科技有限公司 Method, device, equipment and medium for preventing firewall disk from overflowing
CN116339645B (en) * 2023-05-26 2023-08-11 杭州中电安科现代科技有限公司 Method, device, equipment and medium for preventing firewall disk from overflowing

Similar Documents

Publication Publication Date Title
CN108763502B (en) Information recommendation method and system
CN108289121B (en) Marketing information pushing method and device
CN108270842B (en) Method, system and server for pushing rights and interests task
US10152458B1 (en) Systems for determining long-term effects in statistical hypothesis testing
CN106294778B (en) Information-pushing method and device
CN107808314B (en) User recommendation method and device
CN112104505B (en) Application recommendation method, device, server and computer readable storage medium
CN111488529B (en) Information processing method, information processing apparatus, server, and storage medium
Liang et al. Adaptive computing resource allocation for mobile cloud computing
CN113900906A (en) Log capacity determination method and device, electronic equipment and storage medium
CN111092814B (en) Service handling request message distribution method and equipment
US20190080358A1 (en) Dynamic Email System
CN111026969A (en) Content recommendation method and device, storage medium and server
CN108874876B (en) Message pushing method, computer readable storage medium and terminal equipment
CN107547626B (en) User portrait sharing method and device
CN113468226A (en) Service processing method, device, electronic equipment and storage medium
US20190081920A1 (en) Dynamic Email Content Engine
US20140214826A1 (en) Ranking method and system
CN113408817B (en) Traffic distribution method, device, equipment and storage medium
CN112669091B (en) Data processing method, device and storage medium
CN116028696A (en) Resource information acquisition method and device, electronic equipment and storage medium
CN114399328A (en) Advertisement putting method and device, storage medium and electronic device
CN113419938A (en) Control method, device and equipment for user concurrent access
CN114254841A (en) Resource limit processing method, computing device, user device and server
CN112491939A (en) Multimedia resource scheduling method and system

Legal Events

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