CN109889602B - Resource acquisition frequency adjusting method, device, system and storage medium - Google Patents

Resource acquisition frequency adjusting method, device, system and storage medium Download PDF

Info

Publication number
CN109889602B
CN109889602B CN201910192369.XA CN201910192369A CN109889602B CN 109889602 B CN109889602 B CN 109889602B CN 201910192369 A CN201910192369 A CN 201910192369A CN 109889602 B CN109889602 B CN 109889602B
Authority
CN
China
Prior art keywords
resource
user
frequency
data
adjusting
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.)
Active
Application number
CN201910192369.XA
Other languages
Chinese (zh)
Other versions
CN109889602A (en
Inventor
杨旭荣
苏杰春
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sangfor Technologies Co Ltd
Original Assignee
Sangfor Technologies 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 Sangfor Technologies Co Ltd filed Critical Sangfor Technologies Co Ltd
Priority to CN201910192369.XA priority Critical patent/CN109889602B/en
Publication of CN109889602A publication Critical patent/CN109889602A/en
Application granted granted Critical
Publication of CN109889602B publication Critical patent/CN109889602B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a resource acquisition frequency adjusting method, which comprises the steps of acquiring operation habit data of a user on resources at a cloud end according to behavior state information of the user; the behavior state information comprises resource information which is operated by the user, resource types and resource quantity owned by the user, and the operation habit data comprises the operation frequency of the user on each resource; adjusting the acquisition frequency of each resource according to the operation habit data; wherein, the collection frequency of each resource is positively correlated with the corresponding operation frequency. The invention also discloses a device, a system and a storage medium for adjusting the resource acquisition frequency. The invention reduces the performance pressure of the HCP while ensuring low hardware cost and monitoring real-time performance.

Description

Resource acquisition frequency adjusting method, device, system and storage medium
Technical Field
The present invention relates to the field of computers, and in particular, to a method, an apparatus, a system, and a storage medium for adjusting a resource acquisition frequency.
Background
An HCP (hybrid-cloud platform) is a cloud management platform that performs unified management on various public clouds and private clouds based on a multi-cloud model, and provides a unified access interface for users. The HCP manages various resources, and needs to acquire resource data in real time to display the latest state and basic information of the resources to a user so as to realize the monitoring of the resources. In order to meet the real-time requirements of resource monitoring, the period for collecting resource data must be short enough, and a too short period may put a large performance stress on the HCP.
In order to solve the performance pressure problem, the currently generally adopted method is as follows: 1. continuously expanding hardware according to the user requirements; 2. the frequency of interface access and the total number of accesses are limited. However, the method 1 is relatively expensive, and the method 2 reduces the real-time property of resource data presentation. How to alleviate the performance stress problem of the HCP under the premise of high real-time monitoring at low hardware cost becomes a technical problem to be solved at present.
Disclosure of Invention
The invention mainly aims to provide a resource acquisition frequency adjusting method, and aims to solve the technical problem of relieving the performance pressure of an HCP (host computer controller) on the premise of low hardware cost and high monitoring instantaneity.
In order to achieve the above object, the present invention provides a method for adjusting a resource acquisition frequency, including the steps of: acquiring operation habit data of the user on resources of the cloud according to the behavior state information of the user; the behavior state information comprises resource information which is operated by the user, resource types and resource quantity owned by the user, and the operation habit data comprises the operation frequency of the user on each resource; adjusting the acquisition frequency of each resource according to the operation habit data; wherein, the collection frequency of each resource is positively correlated with the corresponding operation frequency.
Optionally, the step of obtaining the operation habit data of the user on the resources in the cloud according to the behavior state information of the user includes: analyzing the received user request to obtain behavior state information; and learning behavior state information to obtain operation habit data.
Optionally, the step of analyzing the received user request and obtaining the behavior state information further includes: storing the behavior state information into a cache unit; and taking out the behavior state information from the buffer unit in a preset sending period to learn the behavior state information.
Optionally, the behavior state information further includes a time interval of the last request initiated by the user; the step of adjusting the collection frequency of each resource according to the operation habit data further comprises the following steps: comparing and analyzing the time interval of the last request initiated by the user with a preset time threshold value to obtain the current activity of the user; the time interval of the last request initiated by the user is the time interval between the time point of the last request initiated by the user and the current time point, and the activity is negatively related to the time interval of the last request initiated by the user; the step of adjusting the collection frequency of each resource according to the operation habit data comprises the following steps: adjusting the acquisition frequency of each resource according to the operation habit data and the activity; wherein the acquisition frequency is positively correlated with the activity.
Optionally, the operation habit data further includes active habit data of the user, and the active habit data is correlation data between activity of the user and whether the user is offline; the step of adjusting the collection frequency of each resource according to the operation habit data and the activity degree comprises the following steps: judging whether the user is offline currently according to the activity degree and the active habit data; when the user is offline, adjusting the acquisition frequency of each resource to zero, and returning to the step of acquiring the operation habit data of the user on the resources of the cloud according to the behavior state information of the user; and when the user is not off-line, adjusting the acquisition frequency of each resource according to the operation frequency and the activity of each resource operated by the user.
Optionally, the step of adjusting the collection frequency of each resource according to the operation habit data further includes: acquiring the load capacity of the machine; the step of adjusting the collection frequency of each resource according to the operation habit data comprises the following steps: adjusting the acquisition frequency of each resource according to the operation habit data and the load; the acquisition frequency is inversely related to the load.
Optionally, the step of obtaining the load amount of the local computer further includes: acquiring configuration parameters of a local machine; the step of adjusting the collection frequency of each resource according to the operation habit data and the load amount comprises the following steps: and adjusting the acquisition frequency of each resource according to the operation habit data, the load and the configuration parameters.
Optionally, the step of adjusting the collection frequency of each resource according to the operation habit data further includes: receiving monitoring data obtained by monitoring the acquisition process of the resource data; the step of adjusting the collection frequency of each resource according to the operation habit data comprises the following steps: and adjusting the acquisition frequency of each resource according to the operation habit data and the monitoring data.
Optionally, the monitoring data includes at least one of a cloud account status of the user, a delay parameter of acquiring the resource data, and an acquisition result of the resource data; the step of adjusting the collection frequency of each resource according to the operation habit data and the monitoring data comprises the following steps: and adjusting the acquisition frequency of each resource according to at least one of the cloud account state of the user, the delay parameter of the acquired resource data, the acquisition result of the resource data and the operation habit data.
In addition, to achieve the above object, the present invention further provides a resource acquisition frequency adjusting apparatus, including: the acquisition module is used for acquiring the operation habit data of the user on the resources of the cloud according to the behavior state information of the user; the behavior state information comprises resource information which is operated by the user, resource types and resource quantity owned by the user, and the operation habit data comprises the operation frequency of the user on each resource; the acquisition frequency adjusting module is used for adjusting the acquisition frequency of each resource according to the operation habit data; wherein, the collection frequency of each resource is positively correlated with the corresponding operation frequency.
In addition, to achieve the above object, the present invention further provides a resource acquisition frequency adjustment system, including: the resource acquisition frequency adjusting program is stored on the memory and can run on the processor, and when being executed by the processor, the resource acquisition frequency adjusting program realizes the steps of the resource acquisition frequency adjusting method.
In addition, in order to achieve the above object, the present invention further provides a storage medium, in which a resource acquisition frequency adjustment program is stored, and the resource acquisition frequency adjustment program, when executed by a processor, implements the steps of the resource acquisition frequency adjustment method as described above.
According to the resource acquisition frequency adjusting method, the resource acquisition frequency adjusting device and the storage medium, the user request is analyzed, the behavior data and the state information of the user are obtained, the user habit is learned according to the behavior data and the state information, the operation frequency of each resource operated by the user is obtained, and the acquisition frequency of each resource is adjusted according to the operation frequency of each resource operated by the user. The acquisition frequency is positively correlated with the operation frequency, so that the acquisition frequency corresponding to the resource with higher user operation frequency can be correspondingly improved, the acquisition frequency corresponding to the resource with lower user operation frequency can be correspondingly reduced, the real-time monitoring requirement on the resource is met, hardware does not need to be expanded, the performance pressure is relieved by reducing the acquisition frequency of the resource with lower operation frequency, and the performance pressure of the HCP is relieved on the premise of high real-time monitoring at low hardware cost.
Drawings
FIG. 1 is a schematic HCP configuration diagram of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a resource acquisition frequency adjustment method according to a first embodiment of the present invention;
FIG. 3 is a detailed flowchart of the step S200 of adjusting the resource collection frequency in FIG. 2;
FIG. 4 is a flowchart illustrating a resource acquisition frequency adjustment method according to a second embodiment of the present invention;
FIG. 5 is a detailed flowchart of the step S210 of adjusting the resource collection frequency in FIG. 4;
FIG. 6 is a flowchart illustrating a resource collection frequency adjustment method according to a third embodiment of the present invention;
FIG. 7 is a flowchart illustrating a resource collection frequency adjustment method according to a fourth embodiment of the present invention;
fig. 8 is a block diagram of a resource acquisition frequency adjustment apparatus according to the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The main solution of the embodiment of the invention is as follows: acquiring operation habit data of the user on resources of the cloud according to the behavior state information of the user; the behavior state information comprises resource information which is operated by the user, resource types and resource quantity owned by the user, and the operation habit data comprises the operation frequency of the user on each resource; adjusting the acquisition frequency of each resource according to the operation habit data; wherein, the collection frequency of each resource is positively correlated with the corresponding operation frequency.
The invention provides a solution, which is characterized in that a user request is analyzed to obtain behavior data and state information of a user, user habits are learned according to the behavior data and the state information, the operation frequency of each resource operated by the user is obtained, and the acquisition frequency of each resource is adjusted according to the operation frequency of each resource operated by the user. The acquisition frequency is positively correlated with the operation frequency, so that the acquisition frequency corresponding to the resource with higher user operation frequency can be correspondingly improved, the acquisition frequency corresponding to the resource with lower user operation frequency can be correspondingly reduced, the real-time monitoring requirement on the resource is met, hardware does not need to be expanded, the performance pressure is relieved by reducing the acquisition frequency of the resource with lower operation frequency, and the performance pressure of the HCP is relieved on the premise of high real-time monitoring at low hardware cost.
The HCP of the present invention may be implemented as a stand-alone server or as a server cluster comprised of a plurality of servers. The HCP carries out unified admission management on various public clouds and private clouds and provides a unified access interface for users. The user has a unique cloud account number and is used for logging in the public cloud through the HCP, and the user can access and use resources in the public cloud after logging in. The HCP may host multiple users simultaneously.
As shown in fig. 1, fig. 1 is a schematic structural diagram of an HCP in a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the HCP includes: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Optionally, the HCP may also include a camera, RF (Radio Frequency) circuitry, sensors, audio circuitry, WiFi modules, and the like. Such as light sensors, motion sensors, and other sensors. Specifically, the light sensor includes an ambient light sensor that adjusts the brightness of the display screen according to the brightness of ambient light, and a proximity sensor that turns off the display screen and/or adjusts the backlight when the HCP is close to the object. The motion sensor comprises a gravity acceleration sensor, which is one of the motion sensors, and the gravity acceleration sensor can detect the acceleration in each direction (generally three axes) when the HCP is in a motion state, and can also be used for identifying the application of the HCP posture (such as horizontal and vertical screen switching, induction control of related games, magnetometer posture calibration), vibration identification related functions (such as pedometer and knocking), and the like; of course, the HCP may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, and an infrared sensor, which are not described herein again.
Those skilled in the art will appreciate that the HCP configuration shown in FIG. 1 is not intended to be limiting of HCPs, and may include more or fewer components than shown, or some components may be combined, or a different arrangement of components.
In other embodiments, as shown in fig. 1, the memory 1005 as a storage medium includes an electrically connected storage unit, a network communication module, and a user interface module, and the storage unit stores contents including, but not limited to, a resource acquisition frequency adjustment program and an operating system. The operating system is used for managing a resource acquisition frequency adjustment program, a network communication module and a user interface module.
In the HCP shown in fig. 1, the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be configured to call the resource collection frequency adjustment program stored in the memory 1005, and perform the following operations:
acquiring operation habit data of the user on resources of the cloud according to the behavior state information of the user; the behavior state information comprises resource information which is operated by the user, resource types and resource quantity owned by the user, and the operation habit data comprises the operation frequency of the user on each resource;
adjusting the acquisition frequency of each resource according to the operation habit data; wherein, the collection frequency of each resource is positively correlated with the corresponding operation frequency.
Further, the step of acquiring the operation habit data of the user on the resources in the cloud according to the behavior state information of the user includes: analyzing the received user request to obtain behavior state information; and learning behavior state information to obtain operation habit data.
Further, the step of analyzing the received user request and obtaining the behavior state information further includes: storing the behavior state information into a cache unit; and taking out the behavior state information from the buffer unit in a preset sending period to learn the behavior state information.
Further, the behavior state information also comprises the time interval of the last request initiated by the user; the step of adjusting the collection frequency of each resource according to the operation habit data further comprises the following steps: comparing and analyzing the time interval of the last request initiated by the user with a preset time threshold value to obtain the current activity of the user; the time interval of the last request initiated by the user is the time interval between the time point of the last request initiated by the user and the current time point, and the activity is negatively related to the time interval of the last request initiated by the user; the step of adjusting the collection frequency of each resource according to the operation habit data comprises the following steps: adjusting the acquisition frequency of each resource according to the operation habit data and the activity; wherein the acquisition frequency is positively correlated with the activity.
Furthermore, the operation habit data also comprises active habit data of the user, and the active habit data is correlation data between the activity of the user and whether the user is offline; the step of adjusting the collection frequency of each resource according to the operation habit data and the activity degree comprises the following steps: judging whether the user is offline currently according to the activity degree and the active habit data; when the user is offline, adjusting the acquisition frequency of each resource to zero, and returning to the step of acquiring the operation habit data of the user on the resources of the cloud according to the behavior state information of the user; and when the user is not off-line, adjusting the acquisition frequency of each resource according to the operation frequency and the activity of each resource operated by the user.
Further, the step of adjusting the collection frequency of each resource according to the operation habit data further comprises the following steps: acquiring the load capacity of the machine; the step of adjusting the collection frequency of each resource according to the operation habit data comprises the following steps: adjusting the acquisition frequency of each resource according to the operation habit data and the load; the acquisition frequency is inversely related to the load.
Further, the step of obtaining the load amount of the device further includes: acquiring configuration parameters of a local machine; the step of adjusting the collection frequency of each resource according to the operation habit data and the load capacity comprises the following steps: and adjusting the acquisition frequency of each resource according to the operation habit data, the load and the configuration parameters.
Further, the step of adjusting the collection frequency of each resource according to the operation habit data further comprises the following steps: receiving monitoring data obtained by monitoring the acquisition process of the resource data; the step of adjusting the collection frequency of each resource according to the operation habit data comprises the following steps: and adjusting the acquisition frequency of each resource according to the operation habit data and the monitoring data.
Further, the monitoring data includes at least one of a cloud account state of the user, a delay parameter of the collected resource data, and a collection result of the resource data, and the step of adjusting the collection frequency of each resource according to the operation habit data and the monitoring data includes: and adjusting the acquisition frequency of each resource according to at least one of the cloud account state of the user, the delay parameter of the acquired resource data, the acquisition result of the resource data and the operation habit data.
Referring to fig. 2, a first embodiment of a resource acquisition frequency adjustment method includes the following steps:
step S200, acquiring operation habit data of the user on resources of the cloud according to the behavior state information of the user; the behavior state information comprises resource information which is operated by the user, resource types and resource quantity owned by the user, and the operation habit data comprises the operation frequency of the user on each resource;
after the user logs in the cloud through the HCP, the resources of the cloud can be used. After the user obtains the resource, the user can perform related operations on the resource. Wherein, the cloud is public cloud. The public cloud includes one or more cloud environments. A cloud environment may have one or more resources. The HCP manages the units of public cloud resources as a cloud environment. A user may obtain one or more resources in one or more cloud environments. The resources include, but are not limited to, a CPU resource, a memory resource, a hard disk resource, a file resource, and a network resource of the cloud end required for program operation when a user initiates a request. The frequency of operation of the various resources by the user may be different. And if the user does not operate a certain resource all the time from the request initiation to the current time, the operating frequency of the user on the resource is zero. The behavior state of the user is the operation behavior and state of the user accessing the public cloud process. The operation behavior comprises the operation of the user on the acquired resource, and the state comprises the resource owned by the user. The behavior state information of the user includes information of the resources the user is operating, the resource category and the resource quantity owned by the user, and the like. The resource information includes ID (Identification) information of the resource. In this embodiment, the resource with different IDs is a resource category. The HCP may identify the class of resource by detecting the ID of the resource.
The operation habit data is used for embodying the operation habit of the user for operating the resource, such as the operation frequency of the operation resource. The user's operating habits for different resources may vary. In order to reduce the performance pressure of the HCP while guaranteeing the real-time performance of resource monitoring, the HCP of the application correspondingly uses different acquisition frequencies to acquire resources with different operation habits so as to realize more precise monitoring control and reduce unnecessary performance pressure caused by uniformly acquiring various resources by using the same acquisition frequency. In this embodiment, the operation habit data of the user includes operation frequency of each resource by the user.
Specifically, the HCP acquires behavior state information of the user, acquires operation habit data of the user on the resources of the cloud according to the behavior state information of the user, and the HCP can acquire the operation habit data of the user on the resources of the cloud by analyzing the behavior state information of the user. Specifically, the HCP acquires behavior state information of the user in a preset acquisition period, and analyzes the acquired behavior state information to obtain operation habit data of the user on resources in the cloud.
Referring to fig. 3, in one embodiment, step S200 includes:
step S300, analyzing the received user request to obtain behavior state information;
step S310, learning behavior state information and obtaining operation habit data.
The HCP receives the user request. The user request is a request for acquiring a certain resource, and the HCP analyzes the user request to acquire the behavior state information of the user. Further, the HCP learns the habits of the user according to the behavior state information, and obtains the operation habit data of the user.
In order to reduce the number of triggers of step S310 and ensure the orderly execution of each step, it is necessary to cache the behavior state information.
In one embodiment, step S300 is followed by: storing the behavior state information into a cache unit; and taking out the behavior state information from the buffer unit in a preset sending period to learn the behavior state information.
The transmission period and the acquisition period may be different period values.
Step S210, adjusting the acquisition frequency of each resource according to the operation habit data; wherein, the collection frequency of each resource is positively correlated with the corresponding operation frequency.
In this embodiment, the operation habit data includes operation frequencies of the user for operating various resources. The HCP adjusts the collection frequency of each resource according to certain rules. The acquisition frequency of each resource is positively correlated with the corresponding operating frequency, namely, the HCP increases the acquisition frequency of the resource with high operating frequency correspondingly and decreases the acquisition frequency of the resource with low operating frequency correspondingly.
The HCP collects each resource according to the adjusted collection frequency, and presents the collected resource data to the user to realize the monitoring of the resource.
In this embodiment, the behavior data and the state information of the user are obtained by analyzing the user request, the user habit is learned according to the behavior data and the state information, the operation frequency of each resource operated by the user is obtained, and the acquisition frequency of each resource is adjusted according to the operation frequency of each resource operated by the user. The acquisition frequency is positively correlated with the operation frequency, so that the acquisition frequency corresponding to the resource with higher user operation frequency can be correspondingly improved, the acquisition frequency corresponding to the resource with lower user operation frequency can be correspondingly reduced, the real-time monitoring requirement on the resource is met, hardware does not need to be expanded, the performance pressure is relieved by reducing the acquisition frequency of the resource with lower operation frequency, and the performance pressure of the HCP is relieved on the premise of high real-time monitoring at low hardware cost.
Referring to fig. 4, a second embodiment of a resource collection frequency adjustment method, based on the embodiment shown in fig. 2, the behavior state information further includes a time interval at which the user finally initiates a request; step S210 is preceded by:
step S400, comparing and analyzing the time interval of the last request initiated by the user with a preset time threshold value to obtain the current activity of the user; the time interval of the last request initiated by the user is the time interval between the time point of the last request initiated by the user and the current time point, and the activity is negatively related to the time interval of the last request initiated by the user;
step S210 includes: adjusting the acquisition frequency of each resource according to the operation habit data and the activity; wherein the acquisition frequency is positively correlated with the activity.
And the time interval of the last request initiated by the user is the time interval between the time point of the last request initiated by the user and the current time point at the current time. Liveness is used to describe the activity level of a current user-initiated request. Liveness is inversely related to the time interval in which the user last initiated the request. That is, the larger the time interval at which the user finally initiates the request, the lower the current activity of the user, and correspondingly, the smaller the time interval at which the user finally initiates the request, the higher the current activity of the user. In this embodiment, the preset time threshold includes a plurality of threshold intervals. The HCP may obtain the current activity of the user according to a threshold interval within which the time interval at which the user last initiated the request falls. As shown in Table 1, when the time interval of the last request initiated by the user falls within the interval [ t0, t1), the activity is A1, when the time interval of the last request initiated by the user falls within the interval [ t1, t2), the activity is A2, and when the time interval of the last request initiated by the user falls within the interval [ t (n-1), tn ], the activity is An.
Figure BDA0001994265700000091
Figure BDA0001994265700000101
TABLE 1
Further, the HCP adjusts the collection frequency of each resource according to the operation habit data and the activity. That is, in the present application, the HCP correspondingly adjusts the collection frequency of each resource according to the operation frequency of each resource operated by the user and the current activity of the user. Wherein the acquisition frequency is positively correlated with the activity. In this embodiment, the HCP integrally adjusts the collection frequency of each resource according to the current activity of the user, and correspondingly adjusts the collection frequency of each resource according to the operation frequency of each resource operated by the user.
In one embodiment, the operation habit data further comprises active habit data of the user, and the active habit data is correlation data between the activity of the user and whether the user is offline. Specifically, the HCP learns the time interval at which the user last initiated the request, and obtains the active habit data of the user. The HCP acquires the behavior state information of the users in a preset acquisition period, namely the acquisition of the behavior state information of the users by the users is a continuous process, the acquired behavior state information of the users is a plurality of groups, and the behavior state information is stored when the HCP acquires the behavior state information of one group of users. That is, the HCP continuously acquires a plurality of time intervals at which the user finally makes the request, and the HCP acquires the active habit data of the user by learning the time intervals at which the plurality of users finally make the request. The active habit data is used for describing the correlation between the activity of the user and whether the user is offline. The HCP can judge whether the user is off-line or not under the current activity degree through the activity habit data.
Referring to fig. 5, in this embodiment, step S210 includes:
step S500, judging whether the user is off-line currently according to the liveness and active habit data;
step S510, when the user is off-line, adjusting the acquisition frequency of each resource to be zero, and returning to the step S200;
when the HCP determines that the user is offline, the HCP adjusts the collection frequency of each resource to zero, stops collecting each resource, and returns to continue to execute step S200.
Step S520, when the user is not off-line, the collection frequency of each resource is adjusted according to the operation frequency and the activity of each resource operated by the user.
In this embodiment, the time interval at which the user finally initiates the request is compared with a preset time threshold value for analysis, so as to obtain the current activity of the user, further adjust the acquisition frequency of each resource by using the habit data and the activity, correspondingly improve the acquisition frequency when the activity of the user is high, correspondingly reduce the acquisition frequency when the activity of the user is low, realize the more precise acquisition and monitoring of the resource data, and further relieve the performance pressure of the HCP.
Referring to fig. 6, a third embodiment of a resource collection frequency adjustment method, based on the embodiment shown in fig. 2, before step S210, further includes:
step S600, acquiring the load capacity of the local computer;
step S210 includes: adjusting the acquisition frequency of each resource according to the operation habit data and the load; the acquisition frequency is inversely related to the load.
The load capacity of the host computer is the CPU (Central Processing Unit) occupancy rate of the HCP. The higher the load, the greater the HCP performance pressure.
In this embodiment, the HCP obtains the load of the local computer, and adjusts the collection frequency of each resource according to the operation habit data and the load. Specifically, the HCP performs overall adjustment on the acquisition frequency of each resource according to the load, and correspondingly adjusts the acquisition frequency of each resource according to the operation habit data of the user. The collecting frequency is inversely related to the load, that is, on the premise that the operation habit data of the user is certain, the higher the load is, the lower the collecting frequency of the corresponding adjustment is, and the lower the load is, the higher the collecting frequency of the corresponding adjustment is.
In one embodiment, step S600 further includes acquiring configuration parameters of the local device; step S210 further includes: and adjusting the acquisition frequency of each resource according to the operation habit data, the load and the configuration parameters.
Wherein the configuration parameters are used to describe the superiority of the HCP configuration. The more optimal the HCP configuration is, the greater the computational pressure can be withstood. In this embodiment, the collection frequency of each resource is integrally adjusted according to the load and the configuration parameters, and the collection frequency of each resource is correspondingly adjusted according to the operation habit data of the user. On the premise that the load capacity and the operation habit data are fixed, the more optimal the configuration of the HCP described by the configuration parameters is, the higher the acquisition frequency of corresponding adjustment is. In this embodiment, the configuration parameter may be a comprehensive value of the HCP multiple configurations, and may be calculated according to a certain rule according to the value of the HCP multiple configurations.
In this embodiment, by obtaining the load and the configuration parameter of the local computer, the acquisition frequency of each resource is adjusted according to the operation habit data, the load and the configuration parameter, so that when the HCP is configured with a good load or a low load, the acquisition frequency of the resource can be correspondingly increased, and when the HCP is configured with a bad load or a high load, the acquisition frequency of the resource is correspondingly decreased, thereby realizing more precise acquisition and monitoring of the resource data, and further relieving the performance pressure of the HCP.
Referring to fig. 7, a fourth embodiment of a resource collection frequency adjustment method, based on the embodiment shown in fig. 2, before the step S210, further includes:
step S700, receiving monitoring data obtained by monitoring the acquisition process of the resource data;
after adjusting the collection frequency, the HCP may collect resource data according to the collection frequency. Since the resource data may be abnormally collected during the resource data collection process, it is necessary to monitor the resource data collection process to take corresponding measures to ensure the normal resource monitoring or stop the resource monitoring operation to protect the HCP.
The HCP monitors the acquisition process of the resource data to obtain monitored data. In one embodiment, the monitoring data includes at least one of a cloud account status of the user, a delay parameter for collecting the resource data, and a collection result of the resource data. The user can log in the cloud end to request resources through the HCP only when the cloud account of the user is in an available state, and the user cannot log in the cloud end to operate when the cloud account of the user is unavailable, so that the monitoring operation of the HCP on the resources is stopped necessarily when the cloud account of the user is unavailable. When the delay of collecting the resource data is high, it indicates that the resource data is abnormal, so it is necessary to obtain the delay parameter of collecting the resource data to adjust the collection frequency of each resource correspondingly. The acquisition of the resource data may fail, for example, the acquisition is unsuccessful, or the resource data acquired in two adjacent times are completely consistent, so it is necessary to take corresponding measures with respect to the acquisition result of the resource data.
In this embodiment, step S210 includes: and adjusting the acquisition frequency of each resource according to the operation habit data and the monitoring data.
In this embodiment, the HCP respectively adjusts the collection frequency of each resource according to the operation habit data and integrally adjusts the collection frequency of each resource according to the monitoring data. Specifically, the HCP integrally adjusts the acquisition frequency of each resource according to at least one of the cloud account state of the user, the delay parameter of the acquired resource data, and the acquisition result of the resource data, and respectively and correspondingly adjusts the acquisition frequency of each resource according to the operation habit data.
When the monitoring data is the cloud account state of the user, the HCP detects the cloud account state of the user, judges whether the cloud account state of the user is available, and stops collecting and monitoring resources required by the user corresponding to the cloud account when the cloud account state of the user is detected to be unavailable.
When the monitoring data is the delay parameter of the acquired resource data, the HCP detects the delay parameter of the acquired resource, compares the delay parameter of the acquired resource data with a delay threshold value, and correspondingly reduces the acquisition frequency of the corresponding resource when the delay parameter is greater than the delay threshold value.
When the monitoring data is the acquisition result of the resource data, the HCP detects the acquisition result of the resource data, judges whether the resource data are successfully acquired, adjusts the acquisition frequency of the resource to zero if the acquisition fails, analyzes the reason of the resource data acquisition failure, and informs the user of the reason of the acquisition failure. The condition that the resource data acquisition fails comprises that the HCP does not acquire any resource data and the resource data acquired by the HCP twice are completely consistent.
In this embodiment, the monitoring data obtained by monitoring the acquisition process of the resource data is received, the acquisition frequency of each resource is adjusted according to the operation habit data and the monitoring data, the monitoring data of the acquisition process of the resource can be analyzed, so that the acquisition frequency of the resource is correspondingly adjusted, or the abnormal condition of the resource acquisition is notified to the user, so that the user takes corresponding measures to restore the normal resource acquisition monitoring process, the more precise acquisition and monitoring of the resource data are realized, the performance pressure of the HCP is further relieved, meanwhile, the normal operation of the resource monitoring can be ensured by automatically detecting the resource acquisition fault, and the reliability is improved.
Referring to fig. 8, an embodiment of the present invention further provides a resource acquisition frequency adjusting apparatus, where the resource acquisition frequency adjusting apparatus includes:
the obtaining module 810 is configured to obtain operation habit data of the user on resources in the cloud according to the behavior state information of the user; the behavior state information comprises resource information which is operated by the user, resource types and resource quantity owned by the user, and the operation habit data comprises the operation frequency of the user on each resource;
an acquisition frequency adjusting module 820, configured to adjust acquisition frequencies of the resources according to the operation habit data; wherein, the collection frequency of each resource is positively correlated with the corresponding operation frequency.
Further, the resource collection frequency adjusting apparatus further includes: the learning module is used for analyzing the received user request and acquiring behavior state information; and learning behavior state information to obtain operation habit data.
Further, the resource collection frequency adjusting apparatus further includes: the cache module is used for storing the behavior state information into the cache unit; and taking out the behavior state information from the buffer unit in a preset sending period to learn the behavior state information.
In this embodiment, the behavior data and the state information of the user are obtained by analyzing the user request, the user habit is learned according to the behavior data and the state information, the operation frequency of each resource operated by the user is obtained, and the acquisition frequency of each resource is adjusted according to the operation frequency of each resource operated by the user. The acquisition frequency is positively correlated with the operation frequency, so that the acquisition frequency corresponding to the resource with higher user operation frequency can be correspondingly improved, the acquisition frequency corresponding to the resource with lower user operation frequency can be correspondingly reduced, the real-time monitoring requirement on the resource is met, hardware does not need to be expanded, the performance pressure is relieved by reducing the acquisition frequency of the resource with lower operation frequency, and the performance pressure of the HCP is relieved on the premise of high real-time monitoring at low hardware cost.
Further, the behavior state information further includes a time interval of the last request initiated by the user, and the obtaining module 810 is further configured to compare and analyze the time interval of the last request initiated by the user with a preset time threshold, so as to obtain the current activity of the user; the time interval of the last request initiated by the user is the time interval between the time point of the last request initiated by the user and the current time point, and the activity is negatively related to the time interval of the last request initiated by the user; the acquisition frequency adjusting module 820 is further configured to adjust acquisition frequencies of the resources according to the operation habit data and the activity; wherein the acquisition frequency is positively correlated with the activity.
Furthermore, the operation habit data also comprises active habit data of the user, and the active habit data is correlation data between the activity of the user and whether the user is offline; the acquisition frequency adjustment module 820 is further configured to determine whether the user is currently offline according to the activity level and the active habit data; when the user is offline, adjusting the acquisition frequency of each resource to zero, and returning to the step of acquiring the operation habit data of the user on the resources of the cloud according to the behavior state information of the user; and when the user is not off-line, adjusting the acquisition frequency of each resource according to the operation frequency and the activity of each resource operated by the user.
In this embodiment, the time interval at which the user finally initiates the request is compared with a preset time threshold value for analysis, so as to obtain the current activity of the user, further adjust the acquisition frequency of each resource by using the habit data and the activity, correspondingly improve the acquisition frequency when the activity of the user is high, correspondingly reduce the acquisition frequency when the activity of the user is low, realize the more precise acquisition and monitoring of the resource data, and further relieve the performance pressure of the HCP.
Further, the obtaining module 810 is further configured to obtain a load amount of the local computer; the acquisition frequency adjusting module 820 is further configured to adjust acquisition frequencies of the resources according to the operation habit data and the load amount; the acquisition frequency is inversely related to the load.
Further, the obtaining module 810 is further configured to obtain a configuration parameter of the local computer; the collection frequency adjusting module 820 is further configured to adjust the collection frequency of each resource according to the operation habit data, the load amount, and the configuration parameter.
In this embodiment, by obtaining the load and the configuration parameter of the local computer, the acquisition frequency of each resource is adjusted according to the operation habit data, the load and the configuration parameter, so that when the HCP is configured with a good load or a low load, the acquisition frequency of the resource can be correspondingly increased, and when the HCP is configured with a bad load or a high load, the acquisition frequency of the resource is correspondingly decreased, thereby realizing more precise acquisition and monitoring of the resource data, and further relieving the performance pressure of the HCP.
Further, the acquisition frequency adjustment module 820 is further configured to receive monitoring data obtained by monitoring an acquisition process of the resource data; the step of adjusting the collection frequency of each resource according to the operation habit data comprises the following steps: and adjusting the acquisition frequency of each resource according to the operation habit data and the monitoring data.
Further, the monitoring data comprises at least one of a cloud account state of the user, a delay parameter for acquiring the resource data and an acquisition result of the resource data; the collection frequency adjusting module 820 is further configured to adjust the collection frequency of each resource according to at least one of the cloud account status of the user, the delay parameter of the collected resource data, the collection result of the resource data, and the operation habit data.
In this embodiment, the monitoring data obtained by monitoring the acquisition process of the resource data is received, the acquisition frequency of each resource is adjusted according to the operation habit data and the monitoring data, the monitoring data of the acquisition process of the resource can be analyzed, so that the acquisition frequency of the resource is correspondingly adjusted, or the abnormal condition of the resource acquisition is notified to the user, so that the user takes corresponding measures to restore the normal resource acquisition monitoring process, the more precise acquisition and monitoring of the resource data are realized, the performance pressure of the HCP is further relieved, meanwhile, the normal operation of the resource monitoring can be ensured by automatically detecting the resource acquisition fault, and the reliability is improved.
The embodiment of the present invention further provides a resource acquisition frequency adjustment system, where the resource acquisition frequency adjustment system includes: the resource acquisition frequency adjusting program is stored on the memory and can run on the processor, and when being executed by the processor, the resource acquisition frequency adjusting program realizes the steps of any one of the resource acquisition frequency adjusting method embodiments.
The embodiment of the present invention further provides a storage medium, where the storage medium stores a resource acquisition frequency adjustment program, and the resource acquisition frequency adjustment program, when executed by a processor, implements the steps of any one of the above embodiments of the resource acquisition frequency adjustment method.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) as described above, and includes instructions for enabling an HCP (which may be implemented by a server or a server cluster) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (12)

1. A resource acquisition frequency adjusting method is characterized by comprising the following steps:
acquiring operation habit data of a user on resources of a cloud according to the behavior state information of the user; the behavior state information comprises resource information which is operated by a user, resource types and resource quantity owned by the user, the operation habit data comprises operation frequency of each resource by the user, the operation habit data also comprises active habit data of the user, and the active habit data is correlation data between activity of the user and whether the user is offline;
adjusting the acquisition frequency of each resource according to the operation habit data; wherein the collection frequency of each resource is positively correlated with the corresponding operating frequency.
2. The method according to claim 1, wherein the step of obtaining the operation habit data of the user on the cloud resource according to the behavior state information of the user comprises:
analyzing the received user request to acquire the behavior state information;
and learning the behavior state information to obtain the operation habit data.
3. The method of claim 2, wherein the step of analyzing the received user request and obtaining the behavior state information further comprises:
storing the behavior state information into a cache unit;
and taking the behavior state information out of the cache unit in a preset sending period to learn the behavior state information.
4. The resource acquisition frequency adjustment method according to any one of claims 1 to 3, wherein the behavior state information further comprises a time interval at which the user last initiated the request; the step of adjusting the collection frequency of each resource according to the operation habit data further comprises the following steps:
comparing and analyzing the time interval of the last request initiated by the user with a preset time threshold value to obtain the current activity of the user; wherein, the time interval of the last request initiated by the user is the time interval between the time point of the last request initiated by the user and the current time point, and the activity is negatively related to the time interval of the last request initiated by the user;
the step of adjusting the collection frequency of each resource according to the operation habit data comprises the following steps:
adjusting the acquisition frequency of each resource according to the operation habit data and the activity; wherein the acquisition frequency is positively correlated with the activity level.
5. The method of claim 4, wherein the step of adjusting the collection frequency of each resource according to the operation habit data and the activity level comprises:
judging whether the user is offline currently according to the activity and the active habit data;
when the user is offline, adjusting the acquisition frequency of each resource to zero, and returning to the step of acquiring the operation habit data of the user on the resources of the cloud according to the behavior state information of the user;
and when the user is not off-line, adjusting the acquisition frequency of each resource according to the operation frequency and the activity of each resource operated by the user.
6. The method for adjusting the collection frequency of resources according to claim 1, wherein the step of adjusting the collection frequency of each resource according to the operation habit data further comprises:
acquiring the load capacity of the machine;
the step of adjusting the collection frequency of each resource according to the operation habit data comprises the following steps:
adjusting the acquisition frequency of each resource according to the operation habit data and the load; the collection frequency is inversely related to the load amount.
7. The resource collection frequency adjustment method according to claim 6, wherein the step of obtaining the load amount of the local computer further comprises:
acquiring configuration parameters of a local machine;
the step of adjusting the collection frequency of each resource according to the operation habit data and the load amount comprises:
and adjusting the acquisition frequency of each resource according to the operation habit data, the load and the configuration parameters.
8. The method for adjusting the collection frequency of resources according to claim 1, wherein the step of adjusting the collection frequency of each resource according to the operation habit data further comprises:
receiving monitoring data obtained by monitoring the acquisition process of the resource data;
the step of adjusting the collection frequency of each resource according to the operation habit data comprises the following steps:
and adjusting the acquisition frequency of each resource according to the operation habit data and the monitoring data.
9. The method according to claim 8, wherein the monitoring data includes at least one of a cloud account status of the user, a delay parameter for collecting resource data, and a collection result of the resource data, and the step of adjusting the collection frequency of each resource according to the operation habit data and the monitoring data includes:
and adjusting the acquisition frequency of each resource according to at least one of the cloud account state of the user, the delay parameter of the acquired resource data, the acquisition result of the resource data and the operation habit data.
10. A resource acquisition frequency adjustment apparatus, comprising:
the acquisition module is used for acquiring the operation habit data of the user on the resources of the cloud according to the behavior state information of the user; the behavior state information comprises resource information which is operated by a user, resource types and resource quantity owned by the user, the operation habit data comprises operation frequency of each resource by the user, the operation habit data also comprises active habit data of the user, and the active habit data is correlation data between activity of the user and whether the user is offline;
the acquisition frequency adjusting module is used for adjusting the acquisition frequency of each resource according to the operation habit data; wherein the collection frequency of each resource is positively correlated with the corresponding operating frequency.
11. A resource acquisition frequency adjustment system, comprising: a memory, a processor and a resource acquisition frequency adjustment program stored on the memory and executable on the processor, the resource acquisition frequency adjustment program when executed by the processor implementing the steps of the resource acquisition frequency adjustment method according to any one of claims 1 to 9.
12. A computer-readable storage medium, on which a resource acquisition frequency adjustment program is stored, which when executed by a processor implements the steps of the resource acquisition frequency adjustment method according to any one of claims 1 to 9.
CN201910192369.XA 2019-03-13 2019-03-13 Resource acquisition frequency adjusting method, device, system and storage medium Active CN109889602B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910192369.XA CN109889602B (en) 2019-03-13 2019-03-13 Resource acquisition frequency adjusting method, device, system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910192369.XA CN109889602B (en) 2019-03-13 2019-03-13 Resource acquisition frequency adjusting method, device, system and storage medium

Publications (2)

Publication Number Publication Date
CN109889602A CN109889602A (en) 2019-06-14
CN109889602B true CN109889602B (en) 2021-11-19

Family

ID=66932242

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910192369.XA Active CN109889602B (en) 2019-03-13 2019-03-13 Resource acquisition frequency adjusting method, device, system and storage medium

Country Status (1)

Country Link
CN (1) CN109889602B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112559177B (en) * 2020-12-15 2024-01-26 杭州和利时自动化有限公司 Industrial control system and load management method and equipment thereof

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102799512A (en) * 2012-07-04 2012-11-28 南京邮电大学 Virtual machine monitoring method in vector-autoregression-based cloud computing
CN104035608A (en) * 2013-03-08 2014-09-10 宏碁股份有限公司 Touch panel sampling frequency adjusting device and method
CN105472009A (en) * 2015-12-18 2016-04-06 国云科技股份有限公司 Self-adapting frequency monitoring method of cloud platform resource
CN106250305A (en) * 2016-08-17 2016-12-21 浪潮电子信息产业股份有限公司 The self-adaptation control method of monitoring system data collection cycle under cloud computing environment
CN106502868A (en) * 2016-11-18 2017-03-15 国云科技股份有限公司 A kind of dynamic adjustment monitoring frequency method suitable for cloud computing

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102799512A (en) * 2012-07-04 2012-11-28 南京邮电大学 Virtual machine monitoring method in vector-autoregression-based cloud computing
CN104035608A (en) * 2013-03-08 2014-09-10 宏碁股份有限公司 Touch panel sampling frequency adjusting device and method
CN105472009A (en) * 2015-12-18 2016-04-06 国云科技股份有限公司 Self-adapting frequency monitoring method of cloud platform resource
CN106250305A (en) * 2016-08-17 2016-12-21 浪潮电子信息产业股份有限公司 The self-adaptation control method of monitoring system data collection cycle under cloud computing environment
CN106502868A (en) * 2016-11-18 2017-03-15 国云科技股份有限公司 A kind of dynamic adjustment monitoring frequency method suitable for cloud computing

Also Published As

Publication number Publication date
CN109889602A (en) 2019-06-14

Similar Documents

Publication Publication Date Title
CN109586952B (en) Server capacity expansion method and device
CN106302565B (en) Scheduling method and system of service server
US8661299B1 (en) Detecting abnormalities in time-series data from an online professional network
CN112333556B (en) Control method for monitoring video transmission bandwidth, terminal equipment and readable storage medium
CN108633311A (en) A kind of method, apparatus and control node of the con current control based on call chain
CN107908487B (en) Task control management method, device and equipment and computer readable storage medium
CN103746829A (en) Cluster-based fault perception system and method thereof
CN113900834B (en) Data processing method, device, equipment and storage medium based on Internet of things technology
CN113742066A (en) Load balancing system and method for server cluster
CN112612618B (en) Interface current limiting method and device, computer equipment and storage medium
CN115277566B (en) Load balancing method and device for data access, computer equipment and medium
CN108446207B (en) Method, device and system for evaluating disaster tolerance capability of computer system
CN113037846A (en) Data reporting method and device, electronic equipment and computer readable storage medium
US8374320B2 (en) Environment information transmission method, service controlling system, and computer product
CN109889602B (en) Resource acquisition frequency adjusting method, device, system and storage medium
CN105471938B (en) Server load management method and device
CN109981779B (en) Service providing method, server and computer storage medium
CN114710499A (en) Load balancing method, device and medium for edge computing gateway based on computational power routing
CN116800638A (en) Network detection method, device, electronic equipment and storage medium
CN106686082B (en) Storage resource adjusting method and management node
CN116915841A (en) CDN edge node hot spot spreading method, device, equipment and storage medium
CN115987786A (en) Configuration change method, system, terminal equipment and storage medium
CN111064636B (en) Control method, device and system for connection of front-end processor and computer equipment
CN113918757A (en) Application recommendation method and device, electronic equipment and storage medium
KR101537723B1 (en) Video analysis system for using priority of video analysis filter and method thereof

Legal Events

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