CN113742555A - Hotspot detection method, device, detection server, hotspot detection system and medium - Google Patents

Hotspot detection method, device, detection server, hotspot detection system and medium Download PDF

Info

Publication number
CN113742555A
CN113742555A CN202111060848.XA CN202111060848A CN113742555A CN 113742555 A CN113742555 A CN 113742555A CN 202111060848 A CN202111060848 A CN 202111060848A CN 113742555 A CN113742555 A CN 113742555A
Authority
CN
China
Prior art keywords
hot spot
access
key
access event
server
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
CN202111060848.XA
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 Ruian Technology Co Ltd
Original Assignee
Beijing Ruian 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 Ruian Technology Co Ltd filed Critical Beijing Ruian Technology Co Ltd
Priority to CN202111060848.XA priority Critical patent/CN113742555A/en
Publication of CN113742555A publication Critical patent/CN113742555A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines

Abstract

The embodiment of the invention discloses a hot spot detection method, a hot spot detection device, a detection server, a hot spot detection system and a medium. The method comprises the following steps: acquiring an access event and storing the access event into a message middleware according to a set protocol format, so that the access event is reported to a server cluster through the message middleware and is stored into a key value storage cluster; carrying out heat statistics on access events in the key value storage cluster according to the time slices; and determining hot spot cache data according to the statistical result. According to the method, through the time slicing arrangement, the relevant data of the access event can be cached in real time and continuously, and the hot spot can be detected in real time according to the statistical result through the heat statistics of the access event, so that the hit rate of the hot spot detection is improved.

Description

Hotspot detection method, device, detection server, hotspot detection system and medium
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a hot spot detection method, a hot spot detection device, a hot spot detection server, a hot spot detection system and a hot spot detection medium.
Background
The hot spot refers to news or information which is concerned or popular with the broad masses. In the hot spot detection process, data of various business applications, such as a browser, is usually required to be read for analysis, so that data acquired by the browser needs to be cached daily to ensure the reuse of the data. One of the currently used caching methods is to cache the acquired data in a memory or a file system of the server; the other is to directly cache the acquired data in a local cache mechanism of the browser, when a client requests a data resource from the server, the data is firstly read from the local cache mechanism of the browser, and if the requested data resource exists, the data can be directly read.
However, the disadvantages of the prior art are: cache data is unpredictable, resulting in cache access conditions that are not predictable in advance. And if the high-frequency access occurs and a large number of cache access requests are generated, the intranet broadband can be greatly occupied, and the local cache mechanism of a server or a browser for storing data is broken down.
Disclosure of Invention
The invention provides a hot spot detection method, a hot spot detection device, a detection server, a hot spot detection system and a hot spot detection medium, which are used for realizing real-time detection of hot spots and further improving the accuracy and efficiency of cache positioning of access event data, thereby improving the hit rate of hot spot detection.
In a first aspect, an embodiment of the present invention provides a hot spot detection method, including:
acquiring an access event and storing the access event into a message middleware according to a set protocol format, so that the access event is reported to a server cluster through the message middleware and is stored into a key value storage cluster;
carrying out heat statistics on access events in the key value storage cluster according to time slicing;
and determining hot spot cache data according to the statistical result.
In a second aspect, an embodiment of the present invention provides a hot spot detection apparatus, including:
the access processing module is used for acquiring an access event and storing the access event into a message middleware according to a set protocol format, so that the access event is reported to a server cluster through the message middleware and is stored into a key value storage cluster;
the statistic module is used for carrying out heat statistics on the access events in the key value storage cluster according to the time slices;
and the hot spot module is used for determining hot spot cache data according to the statistical result.
In a third aspect, an embodiment of the present invention provides a detection server, including:
one or more processors;
storage means for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors implement the hotspot detection method according to the first aspect.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the hot spot detection method according to the first aspect.
In a fifth aspect, an embodiment of the present invention provides a hot spot detection system, including: a server cluster, a key value storage cluster and the detection server of the third aspect;
the detection server is respectively connected with the server cluster and the key value storage cluster.
The embodiment of the invention provides a hot spot detection method, a device, a detection server, a hot spot detection system and a medium, which are characterized in that an access event is firstly acquired and stored in a message middleware according to a set protocol format, the access event is reported to a server cluster through the message middleware and stored in a key value storage cluster, then the hot degree statistics is carried out on the access event in the key value storage cluster according to time slicing, and finally hot spot cache data are determined according to a statistical result. According to the technical scheme, the related data of the access event can be cached in real time and continuously through the time slicing arrangement, and the hot spot can be detected in real time according to the statistical result through the heat statistics of the access event, so that the hit rate of hot spot detection is improved.
Drawings
Fig. 1 is a flowchart of a hot spot detection method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a timing gear according to an embodiment of the present invention;
fig. 3 is a flowchart of a hot spot detection method according to a second embodiment of the present invention;
fig. 4 is a schematic diagram of a statistical table for setting the total heat in a time window according to a second embodiment of the present invention;
fig. 5 is a schematic diagram illustrating an implementation of a hot spot detection overall system architecture according to a second embodiment of the present invention;
fig. 6 is a schematic diagram illustrating an implementation of a hot spot detection method according to a second embodiment of the present invention;
fig. 7 is a schematic structural diagram of a hot spot detection device according to a third embodiment of the present invention;
fig. 8 is a schematic diagram of a hardware structure of a detection server according to a fourth embodiment of the present invention;
fig. 9 is a schematic diagram of a hot spot detection system according to a fifth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. In addition, the embodiments and features of the embodiments in the present invention may be combined with each other without conflict. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the steps as a sequential process, many of the steps can be performed in parallel, concurrently or simultaneously. In addition, the order of the steps may be rearranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
It should be noted that the terms "first", "second", and the like in the embodiments of the present invention are only used for distinguishing different apparatuses, modules, units, or other objects, and are not used for limiting the order or interdependence relationship of the functions performed by these apparatuses, modules, units, or other objects.
Example one
Fig. 1 is a flowchart of a hot spot detection method according to an embodiment of the present invention, which is applicable to a situation of detecting a hot spot in real time. Specifically, the hot spot detection method may be executed by a hot spot detection device, and the hot spot detection device may be implemented by software and/or hardware and integrated in a detection server. Further, the detection server includes but is not limited to: the system comprises an industrial integration server, a system background server and a cloud server. It should be noted that the detecting server in this embodiment may be one detecting server, or may be a cluster formed by multiple detecting servers, and each detecting server in the cluster may execute the method in this embodiment to jointly complete hot spot detection on the service application data.
As shown in fig. 1, the method specifically includes the following steps:
s110, obtaining an access event and storing the access event into a message middleware according to a set protocol format, so that the access event is reported to a server cluster through the message middleware and is stored into a key value storage cluster.
The access event may refer to data generated by a user in each business application by clicking a certain news event or viewing a certain information and recording the event or the information. The service application can refer to a terminal desktop application and/or an internet application (namely a Web application) and the like; the terminal desktop Application can be various Application software (App) in terminal equipment such as a mobile phone or a computer; the Web application may be a respective Web site or Web page within a browser.
The protocol format may refer to a storage format set for the access event according to the obtained related information carried by the access event, and may include a source, content, occurrence time, and a factor affecting the access event.
Optionally, the set protocol format includes the following contents: a service application identifier of the access event; a unique key to access the event; the time of occurrence of the access event; a weighting factor for the event is accessed.
The service application identifier may refer to a name of a service application that represents a source of the access event, that is, from which service application the access event comes, where the name of the service application is the service application identifier of the access event. A unique Key (Key) can refer to a unique Key word or keyword for representing the title content of the access event, and can be used for pointing to the specific content (Value) of the access event; that is, each access event can extract a keyword or keywords (i.e., keys), and each Key corresponds to a specific content (i.e., Value) of the access event. The occurrence time may refer to an access time initiated by the user for the access event, for example, the user clicks on a certain news event on the browser at a certain time on a certain day, and the certain time is the occurrence time of the access event. The weighting factor may refer to an external factor that affects the access event popularity determination, such as a difference between the daytime and the nighttime access event popularity determination, specifically, for a certain news event, the certain news event is clicked 20 times in a certain time period of the daytime, and it may not be determined that the certain news event is a hot spot, but if the certain news event is clicked 20 times in a certain time period of the late night, the certain news event is likely to be a hot spot.
Optionally, each key of each service application of the access event corresponds to a time gear; the time gear is provided with a plurality of time slices, and each time slice is used for recording the access times of the key in a corresponding time period.
Wherein each key of each service application of an access event corresponds to a time gear, e.g. for a certain access event, different service applications correspond to different keys, each key corresponding to a time gear. For a certain business application, different access events correspond to different keys, each key corresponding to a time gear. A time gear may refer to a component for recording the number of times a user accesses each key over a period of time. On this basis, a certain time period of the time gear can be divided into a plurality of time periods according to actual requirements, each time period corresponds to one time slice, that is, for a certain key, the corresponding time gear can be provided with a plurality of time slices, and each time slice can be used for recording the number of times of access of a user to the key in each time period. The number of accesses may refer to the number of times each key is accessed by the user counted in each business application. In this embodiment, the small time period corresponding to each time slice is not limited, and may be set to 5 seconds, or may be set to one hour, for example, and may be flexibly set according to actual requirements.
The time gear can be arranged in the server cluster as a component, namely, the server cluster can be used for maintaining the time gear to normally record corresponding data.
Fig. 2 is a schematic diagram of a timing gear according to an embodiment of the present invention. As shown in fig. 2, taking a time gear corresponding to a certain Key1 in a certain service application App1 as an example, 1, 2, … …, n-1, n may represent n time slices set in the time gear. Assuming that the small time segment corresponding to each time slice is set to 5 seconds, that is, the number of times the Key1 is accessed within App1 is counted once every 5 seconds, the 1 st time slice may represent the number of times the recorded Key1 is accessed within the 1 st 5 seconds, the 2 nd time slice may represent the number of times the recorded Key1 is accessed within the 2 nd 5 seconds, and so on, the nth time slice may represent the number of times the recorded Key1 is accessed within the nth 5 seconds.
The message middleware is used as an intermediate server between a server (also called as an SDK server) based on a Software Development Kit (SDK) and a server cluster, and is mainly used for temporarily caching access events in a set protocol format to play a role of data buffering, and also used as a channel for transferring information, continuously receiving the access events from the SDK server and recording and reporting the access events to the server cluster. For example, after receiving an access event of the SDK server, the message middleware records the access event received within one hour, and the corresponding Key and the number of accesses thereof according to a set time period (e.g., one hour, which is not limited herein), and then counts data of one hour and reports the counted data to the server cluster once, and so on, and continuously counts and reports the counted data. The SDK server may refer to a server connected to each service application and configured to obtain an access event, and is configured to send the obtained access event to the message middleware according to a set protocol format, where the number of the SDK servers may be one or more. The server cluster can refer to a server formed by connecting a plurality of servers, and is used for storing each Key of each service application of an access event and a time gear corresponding to the Key; the main purpose of the server cluster is to perform an allocation function, that is, the stored data can be allocated to different servers in the key value storage cluster for storage.
And S120, carrying out heat statistics on the access events in the key value storage cluster according to the time slices.
Wherein, the popularity statistic may refer to the ranking of the total access times of the access events from the current time slice to several time slices ahead according to the time slices. For example, assuming that the heat statistics within one hour is to be performed on a certain access event, and each time slice is set to be 5 minutes, for each Key of each access event, the access times from the current time slice to the 12 time slices ahead (i.e. 60 minutes is one hour) are sorted, i.e. the process of the heat statistics is performed. In this step, for how long a period of time the popularity statistics is to be performed, the total access times are sorted according to the time slices in the corresponding period of time, so as to obtain the required popularity statistics result.
In this embodiment, according to actual needs, the SDK server may perform corresponding heat statistics on each access event in the key value storage cluster periodically according to time slices. According to periodic statistics, each key in each business application that accesses an event may correspond to a heat statistic. It should be noted that the access events are obtained and reported and stored in real time, and the heat statistics of each access event are performed periodically.
And S130, determining hot spot cache data according to the statistical result.
The hotspot cache data may refer to a Key and a Value corresponding to an access event determined as a hotspot.
In this embodiment, the SDK server may manage the hot spots, such as discovery of the hot spots and failure of the hot spots. Specifically, the hotspot cache data may be determined according to the heat statistics result of each access event, for example, one or more access events with the top heat statistics result may be used as hotspots, and keys and values corresponding to the hotspots may be used as cache data and stored in the service application local storage mechanism corresponding to the hotspots. At this time, in order to reduce occupation of the local storage mechanism of the service application, cache data (including keys and values) that is no longer a hotspot may also be marked as a non-hotspot, and the cache data is invalidated and moved out of the local storage mechanism of the service application and only stored in the cache proxy cluster.
The cache proxy cluster may refer to a backend server of each service application, and is configured to store cache data of each access event in the service application, that is, hot or non-hot cache data may be stored in the cache proxy cluster, and meanwhile, the hot cache data may also be stored in a local storage mechanism of the service application.
The hot spot detection method provided by the embodiment of the invention comprises the steps of firstly obtaining an access event and storing the access event into a message middleware according to a set protocol format, reporting the access event to a server cluster through the message middleware and storing the access event to a key value storage cluster, then carrying out hot degree statistics on the access event in the key value storage cluster according to time slicing, and finally determining hot spot cache data according to a statistical result. According to the method, through the time slicing arrangement, the relevant data of the access event can be cached in real time and continuously, and the hot spot can be detected in real time according to the statistical result through the heat statistics of the access event, so that the hit rate of the hot spot detection is improved.
Example two
Fig. 3 is a flowchart of a hotspot detection method provided in the second embodiment of the present invention, and this embodiment is a detailed description of a process of performing hot statistics on access events in a key value storage cluster according to time slicing on the basis of the second embodiment. It should be noted that technical details that are not described in detail in the present embodiment may be referred to any of the above embodiments.
Specifically, as shown in fig. 3, the method specifically includes the following steps:
s210, obtaining an access event and storing the access event into a message middleware according to a set protocol format, so that the access event is reported to a server cluster through the message middleware and is stored into a key value storage cluster.
In the embodiment, firstly, an access event of a service application is obtained through an SDK server, and the access event is stored in a message middleware; then the message middleware reports the stored access event to the server cluster; and finally, the server side cluster is responsible for distributing the access event to the key value storage cluster for storage.
S220, reading the mapping relation between each key of each service application and the total heat in a set time window from the key value storage cluster, and sequencing the keys according to the total heat; and for each key of each service application, the total heat in the set time window corresponding to the key is the total access times of the key in the set time window.
Wherein, setting the time window can be regarded as setting a specific time period, and the time period can be a specific time period from the current time to several times ahead. The set time window can be flexibly set according to actual requirements, for example, if hot spot statistics within 1 hour needs to be performed, the set time window can be set to a time period from the current time to 1 hour ahead.
The total heat may be considered as a result of the counted total number of times each key of each business application is accessed within a set time window. For example, for a certain key in a certain service application, if hot spot statistics within 1 hour needs to be performed, the set time window may be set to a time period from the current time to 1 hour ahead, and then all time slices covered by the set time window, that is, all time slices covered from the current time to 1 hour ahead, are determined according to the time setting of each time slice in the time gear (for example, each time slice is set to 5 minutes). On the basis, the access times corresponding to each time slice covered by the set time window are accumulated, and the accumulation result is the total heat degree in the set time window.
In this embodiment, each key of each service application corresponds to one time gear, and the total heat of each key of each service application in the set time window can be obtained according to each time gear. Each key of each service application has a one-to-one mapping relation with the total heat in the set time window, that is, each key of each service application corresponds to the total heat in one set time window. The mapping relationship between each key of each service application and the total heat in the set time window can be stored in a key value storage cluster in a certain data mapping format, wherein the data mapping format can be represented as Map < Name, Map < uniqueKey, total heat > >, Map represents the data mapping format, Name represents the Name of the service application, and uniqueKey represents a unique key. The data mapping format of the time gear corresponding to each key in each mapping relation can be represented as Map < String, hotspot > >, where String represents the gear number of each time gear, and hotspot represents the distribution of access times in each time slice on the corresponding time gear.
Fig. 4 is a schematic diagram of a statistical table for setting the total heat in a time window according to a second embodiment of the present invention. Each business application corresponds to a statistical table of the total heat in a set time window, and each statistical table comprises the mapping relation between each key of each business application and the total heat of each key in the set time window. As shown in fig. 4, taking a statistical table of the total heat of the business application App1 in the set time window as an example, the business application data of App1 includes n keys, i.e., Key1, Key2, Key … …, and Keyn, and each Key corresponds to one total heat in the set time window.
In this embodiment, sorting the keys according to the total heat may be considered to arrange the total heat of each key in the total heat statistical table corresponding to each service application from large to small.
And S230, according to the sorting result of the keys, using the service application cache data corresponding to the specified number of keys with the highest total heat in the set time window as hot spot cache data.
The designated number of keys with the highest total heat in the set time window may be considered as one or more keys with the top total heat ranking result, or may be considered as one or more keys with the total heat exceeding a set threshold in the set time window, which is not limited herein. The service application cache data may refer to a Key and a Value corresponding to each Key.
In an embodiment, firstly, the SDK server reads a mapping relationship between each key of each service application and total heat in a set time window from a key value storage cluster; then, according to the counted total heat, sorting each key in each service application from big to small; and finally, according to the total heat sorting result of the keys, the service application cache data corresponding to the keys with the highest total heat in the set time window and the specified number can be used as hot spot cache data.
It should be noted that, only the mapping relationship between each key of each business application and the total heat in the set time window is stored in the key value storage cluster, and the total heat is not sorted at this time. After the SDK server reads the corresponding mapping relation, the total heat degree is sorted.
S240, judging whether the current access event is accessed by the hot cache data or not according to the hot cache data determination result, if so, executing S250; if not, go to S260.
And S250, locally reading corresponding business application cache data from the browser.
S260, reading corresponding service application cache data from the cache proxy cluster.
In this embodiment, when the SDK server obtains an access event of a user to a service application, it is determined whether the current access event is accessed by hot cache data according to a determined result of the hot cache data, and if so, corresponding service application cache data is read from a service application local storage mechanism (e.g., local to a browser); and if not, reading corresponding service application cache data from the cache proxy cluster.
In the hot spot detection method provided by the second embodiment of the present invention, the process of performing hot degree statistics on access events is refined on the basis of the above embodiments, real-time hot spot detection can be realized by setting statistics and periodic sorting of the total hot degree in a time window, and the accuracy and efficiency of cache location of access events can be improved by setting different cache positions of hot spots and non-hot spots, so as to improve the hit rate of hot spot detection.
Fig. 5 is a schematic diagram illustrating an implementation of a hot spot detection overall system architecture according to a second embodiment of the present invention. As shown in fig. 5, the service application layer includes multiple scenarios, such as a desktop application (where a local cache is used to store related data of the desktop application; forwarding request mainly refers to that the front end of the desktop application receives an access request and forwards the request to a corresponding component at the back end, and the result of the request is fed back to the front end for display), a Web application (where a cache SDK is used to cache related data of the Web application; forwarding Jedis mainly refers to that the front end of the Web application forwards the received access request to Jedis, and the Jedis processes the request result and feeds back the result to the front end of the Web application, and the Jedis is a development tool of a Redis database in a Web application back-end server), and other applications. The proxy layer is formed by SDK servers (one or more SDK servers can be used), provides a uniform cache use interface and a communication protocol for the service application layer, and is used for the routing function forwarding after the distributed data horizontal segmentation. The storage layer can be formed by key value storage clusters and provides basic key value data read-write capacity for the proxy layer. And the key value storage cluster comprises various distributed key value storage databases and distributed NoSQL databases, such as CODIS, Zeppelin, Aeroscope, Reborne DB, Dynamo, HBase and the like, and different data storage database services can be selected for different service application scenes on the basis.
Fig. 6 is a schematic diagram illustrating an implementation of a hot spot detection method according to a second embodiment of the present invention. As shown in fig. 6, taking a Web application scenario as an example, a specific hot spot detection method is implemented as follows:
first, a user initiates an access request (i.e., an access event) through a service application and sends the access event to the SDK server. Then, after the SDK server obtains the access event, the access event is stored in a message middleware according to a set protocol format, the access event is reported to the server cluster through the message middleware and stored in the key value storage cluster, corresponding time gear and total heat statistics are carried out on the server cluster and the key value storage cluster, and the statistics are stored for use when the follow-up regular total heat sequencing is waited.
Meanwhile, the SDK server can obtain a Key value through a function byte according to the latest total heat sorting result corresponding to the service application; the total heat and the sorting result of the current access event can be determined through a function get (String Key, Callable), where Callable represents the corresponding total heat and the sorting result obtained through the gear number and Key location. And judging whether the current access event (assuming that the corresponding unique Key is Key1) is the hot cache data according to the obtained total heat and the sorting result. If yes, reading corresponding service application cache data (namely, Key1 and Value1) from a service application local storage mechanism through a function get (Key1) in Jedis, and if not, reading corresponding Key1 and Value1 from a cache agent cluster (one or more cache servers) through a function getOrigin (Key1) in Jedis.
Finally, the influence of the current access event on the hot spot and non-hot spot cache data can be checked in real time through a set/del/expect (Key1) function in Jedis, if the influence indicates that the current access event is a new hot spot, the hot spot failure management can be performed in the SDK server, namely, the original hot spot cache data is failed and replaced by the new hot spot cache data. And the function expire (String1 Key1) can be used for transmitting the information of the failed Key1 and the corresponding time gear number to the Key value storage cluster to replace the subsequent hot spot.
As shown in fig. 6, the hot spot maintenance in the SDK server represents data maintenance for an access event determined to be a hot spot; the Key list represents the record information of the Key corresponding to the access event determined as the hotspot; the expiration time represents that a time threshold is set for the access event determined as the hot spot, and when the existing time as the hot spot exceeds the time threshold, the access event is identified as a non-hot spot, so that the local cache of the removed service application is used; the local cache maintenance means that the access event determined as the hot spot is stored in the local cache mechanism of the service application, and relevant cache data of the hot spot is maintained and recorded. The configuration between the server cluster and the SDK server is in a message center, and can be used for setting a black and white list of an access event, turning on and off detection of a hot spot of the SDK server, setting storage addresses of databases in the key value storage cluster, setting a list of related information of each service application, setting a hot spot total heat threshold value, and the like.
EXAMPLE III
Fig. 7 is a schematic structural diagram of a hot spot detection device according to a third embodiment of the present invention. The hot spot detection device provided by the embodiment comprises: an access processing module 310, a statistics module 320, and a hotspot module 330.
The access processing module 310 is configured to acquire an access event and store the access event into a message middleware according to a set protocol format, so that the access event is reported to a server cluster through the message middleware and is stored in a key value storage cluster;
a counting module 320, configured to perform hotness counting on the access events in the key value storage cluster according to the time slices;
the hot spot module 330 is configured to determine hot spot cache data according to the statistical result.
The third embodiment of the present invention provides a hot spot detection device, which first obtains an access event through an access processing module and stores the access event into a message middleware according to a set protocol format, so as to report the access event to a server cluster through the message middleware and store the access event in a key value storage cluster; then, carrying out heat statistics on access events in the key value storage cluster through a statistics module according to the time slices; and finally, determining hot spot cache data according to the statistical result through a hot spot module. The device can continuously cache the relevant data of the access event in real time through the time slicing arrangement, and can realize the real-time detection of the hot spot according to the statistical result through the heat statistics of the access event, thereby improving the hit rate of the hot spot detection.
On the basis of the above embodiment, the set protocol format includes the following contents:
a service application identifier of the access event; a unique key to access the event; the time of occurrence of the access event; a weighting factor for the event is accessed.
Optionally, each key of each service application of the access event corresponds to a time gear; the time gear is provided with a plurality of time slices, and each time slice is used for recording the access times of the key in a corresponding time period.
Optionally, the statistic module 320 includes:
the sorting unit is used for reading the mapping relation between each key of each service application and the total heat in a set time window from the key value storage cluster and sorting the keys according to the total heat;
and for each key of each service application, the total heat in the set time window corresponding to the key is the total access times of the key in the set time window.
Optionally, the hot spot module 330 includes:
and the hot spot determining unit is used for taking the service application cache data corresponding to the specified number of keys with the highest total heat in the set time window as hot spot cache data according to the sorting result of the keys.
Optionally, the apparatus further comprises:
the hot spot access module is used for locally reading corresponding business application cache data from the browser if the current access event accesses the hot spot cache data;
and the non-hotspot access module is used for reading corresponding service application cache data from the cache proxy cluster if the current access event accesses the non-hotspot cache data.
The hot spot detection device provided by the third embodiment of the invention can be used for executing the hot spot detection method provided by any of the above embodiments, and has corresponding functions and beneficial effects.
Example four
Fig. 8 is a schematic diagram of a hardware structure of a detection server according to a fourth embodiment of the present invention. As shown in fig. 8, the detection server according to the embodiment of the present invention includes a processor 41, a storage device 42, and a computer program stored on the storage device 42 and capable of running on the processor 41, and when the processor 41 executes the computer program, the hot spot detection method is implemented.
The sniffing server may also include a storage device 42; the number of the processors 41 in the detection server can be one or more, and one processor 41 is taken as an example in fig. 8; storage 42 is used to store one or more programs; the one or more programs are executed by the one or more processors 41, so that the one or more processors 41 implement the hotspot detection method according to the embodiment of the invention.
The detection server further comprises: a communication device 43, an input device 44 and an output device 45.
The processor 41, the storage device 42, the communication device 43, the input device 44 and the output device 45 in the detection server may be connected by a bus or other means, and fig. 8 illustrates the connection by the bus as an example.
The input device 44 is operable to receive input numeric or character information and generate key signal inputs associated with detecting user settings and function controls of the server. The output device 45 may include a display device such as a display screen.
The communication means 43 may comprise a receiver and a transmitter. The communication device 43 is configured to perform information transmission and reception communication in accordance with control of the processor 41.
The storage device 42, which is a computer-readable storage medium, can be configured to store software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the hotspot detecting method according to the embodiment of the present application (for example, the access processing module 310, the statistics module 320, and the hotspot module 330 in the hotspot detecting device). The storage device 42 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the server, and the like. Further, the storage 42 may include high speed random access storage and may also include non-volatile storage, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, storage 42 may further include storage remotely located from processor 41, which may be connected to a sniffing server via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
On the basis of the foregoing embodiments, this embodiment further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a hot spot detection apparatus, implements the hot spot detection method in any of the foregoing embodiments of the present invention, and the method includes: acquiring an access event and storing the access event into a message middleware according to a set protocol format, so that the access event is reported to a server cluster through the message middleware and is stored into a key value storage cluster; carrying out heat statistics on access events in the key value storage cluster according to the time slices; determining hot spot cache data according to statistical results
Embodiments of the present invention provide a storage medium including computer-executable instructions, which may take the form of any combination of one or more computer-readable media, such as a computer-readable signal medium or storage medium. The computer-readable storage medium may be, for example, but is not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory device (RAM), a Read Only Memory device (ROM), an Erasable Programmable Read Only Memory device (EPROM), a flash Memory, an optical fiber, a portable CD-ROM, an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. A computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take a variety of forms, including, but not limited to: an electromagnetic signal, an optical signal, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, Radio Frequency (RF), etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
EXAMPLE five
Fig. 9 is a schematic diagram of a hot spot detection system according to a fifth embodiment of the present invention. As shown in fig. 9, the hot spot detection system includes: a server cluster 510, a key value storage cluster 520, and a detection server 530 provided in the embodiments of the present invention;
the detection server 530 is connected to the server cluster 510 and the key value storage cluster 520 respectively.
The detecting server 530 may be a cluster formed by a plurality of servers.
On the basis of the above embodiment, the hot spot detection system further includes: a cluster of caching agents connected to the snoop server 530.
The caching proxy cluster can be formed by one or more caching servers.
The hot spot detection system provided by the fifth embodiment can be used for executing the hot spot detection method provided by any of the above embodiments, and has corresponding functions and beneficial effects.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method for hot spot detection, comprising:
acquiring an access event and storing the access event into a message middleware according to a set protocol format, so that the access event is reported to a server cluster through the message middleware and is stored into a key value storage cluster;
carrying out heat statistics on access events in the key value storage cluster according to time slicing;
and determining hot spot cache data according to the statistical result.
2. The method of claim 1, wherein the setting the protocol format comprises:
a service application identifier of the access event; a unique key to access the event; the time of occurrence of the access event; a weighting factor for the event is accessed.
3. The method of claim 1, wherein each key of each business application of the access event corresponds to a time gear; the time gear is provided with a plurality of time slices, and each time slice is used for recording the access times of the key in a corresponding time period.
4. The method of claim 3, wherein performing hotness statistics on access events in the key-value storage cluster according to time slicing comprises:
reading the mapping relation between each key of each service application and the total heat in a set time window from the key value storage cluster, and sequencing the keys according to the total heat;
and for each key of each service application, the total heat in the set time window corresponding to the key is the total access times of the key in the set time window.
5. The method of claim 4, wherein determining hotspot cache data based on the statistical results comprises:
and according to the sorting result of the keys, using the service application cache data corresponding to the specified number of keys with the highest total heat degree in the set time window as hot spot cache data.
6. The method of claim 1, further comprising:
if the current access event accesses the hotspot cache data, locally reading corresponding business application cache data from the browser;
and if the current access event accesses non-hot-spot cache data, reading corresponding service application cache data from the cache proxy cluster.
7. A hot spot detection device, comprising:
the access processing module is used for acquiring an access event and storing the access event into a message middleware according to a set protocol format, so that the access event is reported to a server cluster through the message middleware and is stored into a key value storage cluster;
the statistic module is used for carrying out heat statistics on the access events in the key value storage cluster according to the time slices;
and the hot spot module is used for determining hot spot cache data according to the statistical result.
8. A detection server, comprising:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the hotspot detection method of any one of claims 1-6.
9. A hotspot detection system, comprising: a server cluster, a key value storage cluster and the snoop server of claim 8;
the detection server is respectively connected with the server cluster and the key value storage cluster.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method for hotspot detection according to any one of claims 1 to 6.
CN202111060848.XA 2021-09-10 2021-09-10 Hotspot detection method, device, detection server, hotspot detection system and medium Pending CN113742555A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111060848.XA CN113742555A (en) 2021-09-10 2021-09-10 Hotspot detection method, device, detection server, hotspot detection system and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111060848.XA CN113742555A (en) 2021-09-10 2021-09-10 Hotspot detection method, device, detection server, hotspot detection system and medium

Publications (1)

Publication Number Publication Date
CN113742555A true CN113742555A (en) 2021-12-03

Family

ID=78737862

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111060848.XA Pending CN113742555A (en) 2021-09-10 2021-09-10 Hotspot detection method, device, detection server, hotspot detection system and medium

Country Status (1)

Country Link
CN (1) CN113742555A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10067843B1 (en) * 2016-12-01 2018-09-04 Infinidat Ltd. Synchronizing control nodes and a recovery from a failure of a primary control node of a storage system
CN110083307A (en) * 2019-03-29 2019-08-02 华为技术有限公司 Date storage method, memory and server
CN110837480A (en) * 2019-11-07 2020-02-25 北京沃东天骏信息技术有限公司 Processing method and device of cache data, computer storage medium and electronic equipment
EP3731461A1 (en) * 2019-04-25 2020-10-28 Juniper Networks, Inc. Multi-cluster configuration controller for software defined networks
CN112835892A (en) * 2021-01-15 2021-05-25 卓望数码技术(深圳)有限公司 Hot spot data detection method and device, electronic equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10067843B1 (en) * 2016-12-01 2018-09-04 Infinidat Ltd. Synchronizing control nodes and a recovery from a failure of a primary control node of a storage system
CN110083307A (en) * 2019-03-29 2019-08-02 华为技术有限公司 Date storage method, memory and server
EP3731461A1 (en) * 2019-04-25 2020-10-28 Juniper Networks, Inc. Multi-cluster configuration controller for software defined networks
CN110837480A (en) * 2019-11-07 2020-02-25 北京沃东天骏信息技术有限公司 Processing method and device of cache data, computer storage medium and electronic equipment
CN112835892A (en) * 2021-01-15 2021-05-25 卓望数码技术(深圳)有限公司 Hot spot data detection method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110147398B (en) Data processing method, device, medium and electronic equipment
KR100791628B1 (en) Method for active controlling cache in mobile network system, Recording medium and System thereof
US11025747B1 (en) Content request pattern-based routing system
US10027773B2 (en) Methods and apparatus to share online media impressions data
CN109947668B (en) Method and device for storing data
US10484190B2 (en) Managing channels in an open data ecosystem
CN109299144B (en) Data processing method, device and system and application server
US9009253B2 (en) Optimizing server resources using multiple retry for high traffic websites
US20150237113A1 (en) Method and system for file transmission
CN110413650B (en) Method, device, equipment and storage medium for processing service data
CN108429777B (en) Data updating method based on cache and server
CN102446222A (en) Method, device and system of webpage content preloading
CN109462631B (en) Data processing method, data processing device, storage medium and electronic device
CN111782692B (en) Frequency control method and device
CN112003945A (en) Service request response method and device
CN109040153B (en) Caching method for caching content, related device and computer-readable storage medium
CN111221469A (en) Method, device and system for synchronizing cache data
CN111290696A (en) Flow control method and device for application program assembly
CN116405460A (en) Domain name resolution method and device for content distribution network, electronic equipment and storage medium
CN116996578B (en) Resource processing method and device based on content distribution network
CN106156258B (en) Method, device and system for counting data in distributed storage system
KR101845195B1 (en) Multiple Resource Subscriptions Association Method in an M2M system
CN113742555A (en) Hotspot detection method, device, detection server, hotspot detection system and medium
WO2018090315A1 (en) Data request processing method and cache system
CN113778977A (en) Data processing method and data processing device

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