CN117932502A - Ranking abnormality detection method, apparatus, device and computer-readable storage medium - Google Patents

Ranking abnormality detection method, apparatus, device and computer-readable storage medium Download PDF

Info

Publication number
CN117932502A
CN117932502A CN202211301766.4A CN202211301766A CN117932502A CN 117932502 A CN117932502 A CN 117932502A CN 202211301766 A CN202211301766 A CN 202211301766A CN 117932502 A CN117932502 A CN 117932502A
Authority
CN
China
Prior art keywords
ranking
sequence
value
original
current
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
CN202211301766.4A
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 Rockwell Technology Co Ltd
Original Assignee
Beijing Rockwell 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 Rockwell Technology Co Ltd filed Critical Beijing Rockwell Technology Co Ltd
Priority to CN202211301766.4A priority Critical patent/CN117932502A/en
Publication of CN117932502A publication Critical patent/CN117932502A/en
Pending legal-status Critical Current

Links

Landscapes

  • Testing And Monitoring For Control Systems (AREA)

Abstract

The present disclosure relates to a method, an apparatus, a device, and a computer-readable storage medium for detecting a ranking abnormality, by obtaining an original ranking sequence and a current ranking sequence, calculating a first ranking value of each element in the original ranking sequence and a second ranking value of each element in the current ranking sequence, calculating a fluctuation value of the current ranking sequence compared with the original ranking sequence by a preset fluctuation value calculation formula, and detecting whether a ranking in the current ranking sequence compared with the original ranking sequence is abnormal or not according to a magnitude relation between the fluctuation value and a preset threshold. Because of paying attention to ranking changes of all elements, the overall fluctuation can be calculated, the overall ranking changes can be obtained, and whether the ranking is abnormal or not can be detected according to the magnitude relation between the fluctuation value and a preset threshold value.

Description

Ranking abnormality detection method, apparatus, device and computer-readable storage medium
Technical Field
The present disclosure relates to the field of data processing technologies, and in particular, to a method, an apparatus, a device, and a computer readable storage medium for detecting ranking anomalies.
Background
With the continuous increase of the number of business personnel, the control of the business capability of the business personnel is more and more important. The ranking change of the business capability can effectively reflect the change condition of the recent business capability of the business personnel.
The fluctuation detection based on the business capability ranking can effectively capture the ranking change of business capability of business personnel, discover problems in time and update the resource allocation strategy, thereby improving the resource conversion rate and the economic benefit.
In the prior art, the fluctuation of the business capability rank is usually calculated by adopting a Jaccard coefficient, but the method only focuses on the rank change of business personnel with the ranking in front, the whole fluctuation can not be calculated, and the whole rank change can not be obtained, so that the abnormality of the rank can not be accurately detected.
Disclosure of Invention
In order to solve the technical problems described above, the present disclosure provides a ranking abnormality detection method, apparatus, device, and computer-readable storage medium to pay attention to overall ranking changes, thereby accurately detecting ranking abnormalities.
In a first aspect, an embodiment of the present disclosure provides a method for detecting a ranking abnormality, including:
acquiring an original ranking sequence and a current ranking sequence;
Calculating a first ranking value of each element in the original ranking sequence and a second ranking value of each element in the current ranking sequence;
Calculating a fluctuation value of the current ranking sequence compared with the original ranking sequence through a preset fluctuation value calculation formula by using a first ranking value of each element in the original ranking sequence and a second ranking value of each element in the current ranking sequence;
And detecting whether the ranking in the current ranking sequence is abnormal compared with the ranking in the original ranking sequence according to the magnitude relation between the fluctuation value and a preset threshold value.
In a second aspect, an embodiment of the present disclosure provides a ranking abnormality detecting apparatus, including:
The acquisition module is used for acquiring the original ranking sequence and the current ranking sequence;
a first calculation module for calculating a first ranking value of each element in the original ranking sequence and a second ranking value of each element in the current ranking sequence;
The second calculation module is used for calculating the first ranking value of each element in the original ranking sequence and the second ranking value of each element in the current ranking sequence according to a preset fluctuation value calculation formula, and the fluctuation value of the current ranking sequence compared with the original ranking sequence;
and the detection module is used for detecting whether the ranking in the current ranking sequence is abnormal compared with the ranking in the original ranking sequence according to the magnitude relation between the fluctuation value and a preset threshold value.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including:
A memory;
A processor; and
A computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method according to the first aspect.
In a fourth aspect, embodiments of the present disclosure provide a computer-readable storage medium having stored thereon a computer program for execution by a processor to implement the method of the first aspect.
In a fifth aspect, the disclosed embodiments also provide a computer program product comprising a computer program or instructions which, when executed by a processor, implements a ranking anomaly detection method as described above.
According to the ranking abnormality detection method, device and equipment and the computer-readable storage medium, through obtaining an original ranking sequence and a current ranking sequence, a first ranking value of each element in the original ranking sequence and a second ranking value of each element in the current ranking sequence are calculated, the first ranking value of each element in the original ranking sequence and the second ranking value of each element in the current ranking sequence are calculated, the fluctuation value of the current ranking sequence compared with the fluctuation value of the original ranking sequence is calculated through a preset fluctuation value calculation formula, and whether the ranking in the current ranking sequence is abnormal compared with the ranking in the original ranking sequence or not is detected according to the relation between the fluctuation value and a preset threshold value. Because of paying attention to ranking changes of all elements, the overall fluctuation can be calculated, the overall ranking changes can be obtained, and whether the ranking is abnormal or not can be detected according to the magnitude relation between the fluctuation value and a preset threshold value.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments of the present disclosure or the solutions in the prior art, the drawings that are required for the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a flowchart of a method for detecting ranking anomalies provided by an embodiment of the present disclosure;
FIG. 2 is a flowchart of a method for detecting rank anomalies provided by another embodiment of the present disclosure;
FIG. 3 is a flowchart of a method for detecting rank anomalies provided by another embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a ranking abnormality detecting apparatus provided in an embodiment of the present disclosure;
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
In order that the above objects, features and advantages of the present disclosure may be more clearly understood, a further description of aspects of the present disclosure will be provided below. It should be noted that, without conflict, the embodiments of the present disclosure and features in the embodiments may be combined with each other.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure, but the present disclosure may be practiced otherwise than as described herein; it will be apparent that the embodiments in the specification are only some, but not all, embodiments of the disclosure.
The embodiment of the disclosure provides a ranking abnormality detection method, which is described below with reference to specific embodiments.
Fig. 1 is a flowchart of a ranking abnormality detection method provided in an embodiment of the present disclosure. The method can be applied to electronic equipment, and the electronic equipment can be portable mobile equipment such as smart phones, tablet computers, notebook computers, vehicle navigation equipment, intelligent sports equipment and the like; the system can also be a fixed device such as a personal computer, an intelligent household appliance, a server and the like, wherein the server can be a single server, can be a server cluster, and can be a distributed cluster or a centralized cluster. The method can be applied to the scenes for comparing ranking changes of ranking sequences of two time periods and calculating the fluctuation of the whole, and can also be applied to the scenes for detecting abnormal ranking. It can be appreciated that the ranking anomaly detection method provided by the embodiment of the present disclosure may also be applied in other scenarios.
The ranking abnormality detection method shown in fig. 1 is described below, and the method includes the following specific steps:
s101, acquiring an original ranking sequence and a current ranking sequence.
For example, the user may store the original ranking sequence and the current ranking sequence in the electronic device in advance, and the electronic device may obtain the original ranking sequence and the current ranking sequence. In some embodiments, the user may import the original ranking sequence and the current ranking sequence into the electronic device, which reads the original ranking sequence and the current ranking sequence. In some embodiments, the original ranking sequence and the current ranking sequence may be stored in a server from which the electronic device obtains the original ranking sequence and the current ranking sequence. The original ranking sequence represents a ranking sequence of certain item data (such as sales volume, workload, etc.) of the business person at a previous certain point in time, and the current ranking sequence represents a ranking sequence of certain item data of the business person at the current point in time. In some embodiments, the original ranking sequence may represent a ranking sequence of sales of various types of products over a certain period of time, and the current ranking sequence may represent a ranking sequence of sales of various types of products over the current period of time. In some embodiments, the original ranking sequence may represent a ranking sequence of the download or browse amount of each application software over a certain period of time, and the current ranking sequence may represent a ranking sequence of the download or browse amount of each application software over the current period of time. The embodiments of the present disclosure do not limit the original ranking sequence, the current ranking sequence.
It should be noted that the original ranking sequence and the current ranking sequence represent two ranking sequences of the same index of something.
S102, calculating a first ranking value of each element in the original ranking sequence and a second ranking value of each element in the current ranking sequence.
After the electronic device obtains the original ranking sequence and the current ranking sequence, a first ranking value of each element in the original ranking sequence and a second ranking value of each element in the current ranking sequence are calculated.
In some embodiments, the first ranking value of an element a = the ranking rank of an element a in the original ranking sequence/the total number of elements in the original ranking sequence, the second ranking value of an element a = the ranking rank of an element a in the current ranking sequence/the total number of elements in the current ranking sequence.
For example, there are 100 elements in the sequence, the ranking rank of the a element in the original ranking sequence is 33, the ranking rank of the B element in the original ranking sequence is 24, the ranking rank of the a element in the current ranking sequence is 32, and the ranking rank of the B element in the current ranking sequence is 42. Thus, the first ranking value of the a element=33/100=0.33, the second ranking value of the a element=32/100=0.32, the first ranking value of the b element=24/100=0.24, and the second ranking value of the b element=42/100=0.42.
S103, calculating the fluctuation value of the current ranking sequence compared with the original ranking sequence through a preset fluctuation value calculation formula according to the first ranking value of each element in the original ranking sequence and the second ranking value of each element in the current ranking sequence.
After calculating the first ranking value of each element in the original ranking sequence and the second ranking value of each element in the current ranking sequence, the electronic device may calculate a fluctuation value of the current ranking sequence compared to the original ranking sequence based on the first ranking value of each element in the original ranking sequence and the second ranking value of each element in the current ranking sequence.
Specifically, calculating a fluctuation value of the current ranking sequence compared with the original ranking sequence through a preset fluctuation value calculation formula by using a first ranking value of each element in the original ranking sequence and a second ranking value of each element in the current ranking sequence. The fluctuation value calculation formula is as follows:
Wherein, p is the current ranking sequence, q is the original ranking sequence, p i is the second ranking value of the i element in the current ranking sequence, q i is the first ranking value of the i element in the original ranking sequence, and N is the total number of elements in the sequence.
And S104, detecting whether the ranking in the current ranking sequence is abnormal compared with the ranking in the original ranking sequence according to the magnitude relation between the fluctuation value and a preset threshold value.
After calculating the fluctuation value of the current ranking sequence compared with the original ranking sequence, detecting whether the ranking in the current ranking sequence is abnormal compared with the ranking in the original ranking sequence according to the magnitude relation between the fluctuation value and a preset threshold value. Detecting whether there is an abnormality in the ranking in the current ranking sequence compared to the ranking in the original ranking sequence includes two cases: the presence or absence of anomalies, in other words, the detection of results includes detecting a ranking anomaly or detecting a ranking normal.
According to the embodiment of the disclosure, a first ranking value of each element in an original ranking sequence and a current ranking sequence are calculated, a second ranking value of each element in the current ranking sequence is calculated, the first ranking value of each element in the original ranking sequence and the second ranking value of each element in the current ranking sequence are calculated through a preset fluctuation value calculation formula, the fluctuation value of the current ranking sequence compared with the original ranking sequence is calculated, and whether the ranking in the current ranking sequence is abnormal compared with the ranking in the original ranking sequence or not is detected according to the size relation between the fluctuation value and a preset threshold. Because of paying attention to ranking changes of all elements, the overall fluctuation can be calculated, the overall ranking changes can be obtained, and whether the ranking is abnormal or not can be detected according to the magnitude relation between the fluctuation value and a preset threshold value.
On the basis of the above embodiment, the calculating the first ranking value of each element in the original ranking sequence and the second ranking value of each element in the current ranking sequence includes: assigning a value to each element in the original ranking sequence to obtain a first ranking value of each element in the original ranking sequence; and assigning each element in the current ranking sequence to obtain a second ranking value of each element in the current ranking sequence.
After the original ranking sequence and the current ranking sequence are obtained, the electronic device can assign a value to each element in the original ranking sequence to obtain a first ranking value of each element in the original ranking sequence, and assign a value to each element in the current ranking sequence to obtain a second ranking value of each element in the current ranking sequence. The essence of the assignment is to assign weights to the elements in the ranking sequence so that the variation in head ranking results in far greater fluctuations than the variation in tail ranking. Specifically, the assignment mode is as follows: ranking of a element in a ranking sequence/total number of elements in a ranking sequence. For example, there are 100 elements in the current ranking sequence, and an element with ranking rank 1 is assigned a value of 0.01, i.e., the element has a second ranking value of 0.01; an element with rank ranking 2 is assigned a value of 0.02, i.e., the element has a second ranking value of 0.02; an element with a ranking rank of 99 is assigned a value of 0.99, i.e., the element has a second ranking value of 0.99; an element with a ranking score of 100 is assigned a value of 1, i.e., the element has a second ranking value of 1. Because the weight of an element= (1-the ranking value of the element), that is, the higher the ranking of the element, the lower the ranking value, the higher the weight of the higher ranking element, so that the fluctuation caused by the change of the head ranking is far greater than the fluctuation caused by the change of the tail ranking.
In some embodiments, after the calculating the first ranking value for each element in the original ranking sequence and the second ranking value for each element in the current ranking sequence, the method further comprises: based on the first ranking value of each element in the original ranking sequence and the second ranking value of each element in the current ranking sequence, a statistical graph of the first ranking values of all elements in the original ranking sequence and a statistical graph of the second ranking values of all elements in the current ranking sequence are output.
The electronic device can output a statistical graph of the first ranking values of all elements in the original ranking sequence and a statistical graph of the second ranking values of all elements in the current ranking sequence based on the first ranking value of each element in the original ranking sequence and the second ranking value of each element in the current ranking sequence, the horizontal axis of the statistical graph corresponds to the element, the vertical axis corresponds to the ranking value, and the ranking change condition of the current ranking sequence compared with the original ranking sequence can be intuitively seen through image comparison.
According to the embodiment of the disclosure, by acquiring an original ranking sequence and a current ranking sequence, assigning a value to each element in the original ranking sequence to obtain a first ranking value of each element in the original ranking sequence, assigning a value to each element in the current ranking sequence to obtain a second ranking value of each element in the current ranking sequence, and outputting a statistical graph of the first ranking values of all elements in the original ranking sequence and a statistical graph of the second ranking values of all elements in the current ranking sequence based on the first ranking value of each element in the original ranking sequence and the second ranking value of each element in the current ranking sequence. In the embodiment of the disclosure, each element in the original ranking sequence is assigned, and each element in the current ranking sequence is assigned, so that the higher the ranking is, the lower the second ranking value is, the higher the weight occupied by the higher ranking element is, and the fluctuation caused by the change of the head ranking is far greater than the fluctuation caused by the change of the tail ranking. And the statistical graphs of the first ranking values of all elements in the original ranking sequence and the statistical graphs of the second ranking values of all elements in the current ranking sequence are output, and the ranking change condition of the current ranking sequence compared with the original ranking sequence can be intuitively seen through image comparison, so that the ranking abnormality can be accurately detected.
Fig. 2 is a flowchart of a ranking anomaly detection method according to another embodiment of the present disclosure, as shown in fig. 2, the method includes the following steps:
s201, acquiring an original ranking sequence and a current ranking sequence.
Specifically, the implementation process and principle of S201 and S101 are consistent, and will not be described herein.
S202, obtaining the first ranking of each element in the original ranking sequence based on the original ranking sequence.
After the electronic device obtains the original ranking sequence, the electronic device may obtain a first ranking of each element in the original ranking sequence based on the original ranking sequence.
S203, determining the ratio of the first ranking of each element in the original ranking sequence to the total number of elements in the original ranking sequence as the first ranking value of each element in the original ranking sequence.
After the electronic device obtains the first ranking of each element in the original ranking sequence, the ratio of the first ranking of each element in the original ranking sequence to the total number of elements in the original ranking sequence can be determined to be the first ranking value of each element in the original ranking sequence. For example, there are 100 elements in the original ranking sequence, the ranking rank of element a in the original ranking sequence is 33, and the ranking rank of element B in the original ranking sequence is 24. Thus, the first ranking value of element a=33/100=0.33 is determined, and the first ranking value of element b=24/100=0.24 is determined.
S204, obtaining the second ranking of each element in the current ranking sequence based on the current ranking sequence.
After the electronic device obtains the current ranking sequence, a second ranking of each element in the current ranking sequence may be obtained based on the current ranking sequence.
S205, determining the ratio of the second ranking of each element in the current ranking sequence to the total number of elements in the current ranking sequence as the second ranking value of each element in the current ranking sequence.
After the electronic device obtains the second ranking of each element in the current ranking sequence, a ratio of the second ranking of each element in the current ranking sequence to the total number of elements in the current ranking sequence may be determined as a second ranking value of each element in the current ranking sequence. For example, there are 100 elements in the current ranking sequence, the ranking rank of the A element in the current ranking sequence is 32, and the ranking rank of the B element in the current ranking sequence is 42. Thus, the second ranking value of element a=32/100=0.32 is determined, and the second ranking value of element b=42/100=0.42 is determined.
Because the weight of an element= (1-the ranking value of the element), that is, the higher the ranking of the element, the lower the ranking value, the higher the weight of the higher ranking element, so that the fluctuation caused by the change of the head ranking is far greater than the fluctuation caused by the change of the tail ranking.
S206, calculating the fluctuation value of the current ranking sequence compared with the original ranking sequence through a preset fluctuation value calculation formula by using the first ranking value of each element in the original ranking sequence and the second ranking value of each element in the current ranking sequence.
Specifically, the implementation process and principle of S206 and S103 are consistent, and will not be described herein.
S207, detecting whether the ranking in the current ranking sequence is abnormal compared with the ranking in the original ranking sequence according to the magnitude relation between the fluctuation value and a preset threshold value.
Specifically, the implementation process and principle of S207 and S104 are identical, and will not be described herein.
According to the method, an original ranking sequence and a current ranking sequence are obtained, the first ranking of each element in the original ranking sequence is obtained based on the original ranking sequence, and the ratio of the first ranking of each element in the original ranking sequence to the total number of elements in the original ranking sequence is determined to be the first ranking value of each element in the original ranking sequence. And based on the current ranking sequence, obtaining a second ranking of each element in the current ranking sequence, and determining the ratio of the second ranking of each element in the current ranking sequence to the total number of elements in the current ranking sequence as a second ranking value of each element in the current ranking sequence. Further, calculating a fluctuation value of the current ranking sequence compared with the original ranking sequence through a preset fluctuation value calculation formula by using the first ranking value of each element in the original ranking sequence and the second ranking value of each element in the current ranking sequence. And detecting whether the ranking in the current ranking sequence is abnormal compared with the ranking in the original ranking sequence according to the magnitude relation between the fluctuation value and a preset threshold value. The ratio of the first ranking order of each element in the original ranking sequence to the total number of elements in the original ranking sequence is determined to be the first ranking value of each element in the original ranking sequence, the ratio of the second ranking order of each element in the current ranking sequence to the total number of elements in the current ranking sequence is determined to be the second ranking value of each element in the current ranking sequence, the higher ranking order element is, the lower ranking value is, the higher ranking weight is, and therefore fluctuation caused by head ranking change is far greater than fluctuation caused by tail ranking change. And because of paying attention to the ranking changes of all elements, the overall fluctuation can be calculated, the overall ranking changes can be obtained, and whether the ranking is abnormal or not can be detected according to the magnitude relation between the fluctuation value and a preset threshold value.
Fig. 3 is a flowchart of a ranking anomaly detection method according to another embodiment of the present disclosure, as shown in fig. 3, the method includes the following steps:
s301, acquiring an original ranking sequence and a current ranking sequence.
Specifically, the implementation process and principle of S301 and S101 are identical, and will not be described herein.
S302, each element in the original ranking sequence is assigned to obtain a first ranking value of each element in the original ranking sequence.
After the original ranking sequence is obtained, the electronic device may assign a value to each element in the original ranking sequence, and obtain a first ranking value of each element in the original ranking sequence. The essence of the assignment is to assign weights to the elements in the ranking sequence so that the variation in head ranking results in far greater fluctuations than the variation in tail ranking. Specifically, the assignment mode is as follows: ranking of a element in a ranking sequence/total number of elements in a ranking sequence. For example, there are 100 elements in the original ranking sequence, and an element with ranking rank 1 is assigned a value of 0.01, i.e. the element has a first ranking value of 0.01; an element with rank ranking 2 is assigned a value of 0.02, i.e., the element has a first ranking value of 0.02; an element with a ranking rank of 99 is assigned a value of 0.99, i.e., the element has a first ranking value of 0.99; an element with a ranking score of 100 is assigned a value of 1, i.e., the element has a first ranking value of 1. Because the weight of an element= (1-the ranking value of the element), that is, the higher the ranking of the element, the lower the ranking value, the higher the weight of the higher ranking element, so that the fluctuation caused by the change of the head ranking is far greater than the fluctuation caused by the change of the tail ranking.
S303, assigning a value to each element in the current ranking sequence to obtain a second ranking value of each element in the current ranking sequence.
After the current ranking sequence is obtained, the electronic device may assign a value to each element in the current ranking sequence, and obtain a second ranking value for each element in the current ranking sequence. The essence of the assignment is to assign weights to the elements in the ranking sequence so that the variation in head ranking results in far greater fluctuations than the variation in tail ranking. Specifically, the assignment mode is as follows: ranking of a element in a ranking sequence/total number of elements in a ranking sequence. For example, there are 100 elements in the current ranking sequence, and an element with ranking rank 1 is assigned a value of 0.01, i.e., the element has a second ranking value of 0.01; an element with rank ranking 2 is assigned a value of 0.02, i.e., the element has a second ranking value of 0.02; an element with a ranking rank of 99 is assigned a value of 0.99, i.e., the element has a second ranking value of 0.99; an element with a ranking score of 100 is assigned a value of 1, i.e., the element has a second ranking value of 1. Because the weight of an element= (1-the ranking value of the element), that is, the higher the ranking of the element, the lower the ranking value, the higher the weight of the higher ranking element, so that the fluctuation caused by the change of the head ranking is far greater than the fluctuation caused by the change of the tail ranking.
S304, for each element in the original ranking sequence, multiplying the absolute value of the logarithm of the ratio of the second ranking value of the element in the current ranking sequence to the first ranking value of the element in the original ranking sequence by the result of the weight of the element in the current ranking sequence to be used as the difference value of the ranking of the element in the two ranking sequences, wherein the weight of the element in the current ranking sequence is 1 minus the value obtained by subtracting the second ranking value of the element in the current ranking sequence.
For each element in the original ranking sequence, the electronic device may multiply the absolute value of the logarithm of the ratio of the second ranking value of the element in the current ranking sequence to the first ranking value of the element in the original ranking sequence by the result of the weight of the element in the current ranking sequence as the difference value of the ranking of the element in the two ranking sequences, wherein the weight of the element in the current ranking sequence is 1 minus the value obtained by subtracting the second ranking value of the element in the current ranking sequence, so as to calculate the difference value of the ranking of each element in the two ranking sequences.
S305, obtaining a fluctuation value of the current ranking sequence compared with the original ranking sequence based on the difference value of ranking of each element in the original ranking sequence in the two ranking sequences.
After calculating the difference value of each element ranked in the two ranking sequences, the electronic device may further obtain a fluctuation value of the current ranking sequence compared to the original ranking sequence based on the difference value of each element in the original ranking sequence ranked in the two ranking sequences. For example, the variance value of each element ranked in the two ranking sequences may be added, or averaged, or variance, or standard deviation, etc., to obtain the fluctuation value of the current ranking sequence compared to the original ranking sequence.
S306, judging whether the fluctuation value is larger than a preset threshold value, if so, executing S307, otherwise, executing S308.
The electronic device judges whether the fluctuation value is larger than a preset threshold value, and if the fluctuation value is larger than the preset threshold value, S307 is executed; if the fluctuation value is less than or equal to a preset threshold, S308 is performed.
S307, detecting that the ranking in the current ranking sequence is abnormal compared with the ranking in the original ranking sequence.
And if the fluctuation value is larger than a preset threshold value, detecting that the ranking in the current ranking sequence is abnormal compared with the ranking in the original ranking sequence.
And S308, detecting that the ranking in the current ranking sequence is normal compared with the ranking in the original ranking sequence.
And if the fluctuation value is smaller than or equal to a preset threshold value, detecting that the ranking in the current ranking sequence is normal compared with the ranking in the original ranking sequence.
According to the embodiment of the disclosure, by acquiring an original ranking sequence and a current ranking sequence, each element in the original ranking sequence is assigned to obtain a first ranking value of each element in the original ranking sequence, each element in the current ranking sequence is assigned to obtain a second ranking value of each element in the current ranking sequence. For each element in the original ranking sequence, multiplying the absolute value of the logarithm of the ratio of the second ranking value of the element in the current ranking sequence to the first ranking value of the element in the original ranking sequence by the result of the weight of the element in the current ranking sequence to be used as the difference value of the ranking of the element in the two ranking sequences, wherein the weight of the element in the current ranking sequence is 1 minus the value obtained by subtracting the second ranking value of the element in the current ranking sequence, and the fluctuation value of the current ranking sequence compared with the original ranking sequence is obtained based on the difference value of the ranking of each element in the original ranking sequence in the two ranking sequences. And further judging whether the fluctuation value is larger than a preset threshold value. If the fluctuation value is larger than a preset threshold value, detecting that the ranking in the current ranking sequence is abnormal compared with the ranking in the original ranking sequence; and if the fluctuation value is smaller than or equal to a preset threshold value, detecting that the ranking in the current ranking sequence is normal compared with the ranking in the original ranking sequence. Because the first ranking value and the second ranking value of each element are calculated firstly, and then the difference value of the ranking of each element in the two ranking sequences is calculated, the fluctuation value of the current ranking sequence compared with the original ranking sequence is further obtained, whether the fluctuation value is larger than a preset threshold value is further judged, whether the ranking in the current ranking sequence compared with the original ranking sequence is abnormal or not can be detected according to the judging result, the integral fluctuation can be calculated, integral ranking change can be obtained, and accordingly the ranking abnormality can be accurately detected.
Fig. 4 is a schematic structural diagram of a ranking abnormality detecting apparatus provided in an embodiment of the present disclosure. The ranking abnormality detecting apparatus may be an electronic device as described in the above embodiments, or the ranking abnormality detecting apparatus may be a part or component in the electronic device. The ranking abnormality detecting apparatus provided by the embodiment of the present disclosure may execute a processing flow provided by the ranking abnormality detecting method embodiment, as shown in fig. 4, the ranking abnormality detecting apparatus 40 includes: an acquisition module 41, a first calculation module 42, a second calculation module 43, a detection module 44; wherein, the obtaining module 41 is configured to obtain an original ranking sequence and a current ranking sequence; the first calculating module 42 is configured to calculate a first ranking value of each element in the original ranking sequence and a second ranking value of each element in the current ranking sequence; the second calculating module 43 is configured to calculate, according to a preset fluctuation value calculation formula, a fluctuation value of the current ranking sequence compared with the original ranking sequence, the first ranking value of each element in the original ranking sequence and the second ranking value of each element in the current ranking sequence; the detection module 44 is configured to detect whether the ranking in the current ranking sequence is abnormal compared with the ranking in the original ranking sequence according to the magnitude relation between the fluctuation value and a preset threshold.
Optionally, the first calculating module 42 is specifically configured to, when calculating the first ranking value of each element in the original ranking sequence and the second ranking value of each element in the current ranking sequence: assigning a value to each element in the original ranking sequence to obtain a first ranking value of each element in the original ranking sequence; and assigning each element in the current ranking sequence to obtain a second ranking value of each element in the current ranking sequence.
Optionally, the first calculating module 42 is configured to assign a value to each element in the original ranking sequence, and when obtaining the first ranking value of each element in the original ranking sequence, specifically: obtaining a first ranking of each element in the original ranking sequence based on the original ranking sequence; and determining the ratio of the first ranking of each element in the original ranking sequence to the total number of elements in the original ranking sequence as the first ranking value of each element in the original ranking sequence.
Optionally, the first calculating module 42 is configured to assign a value to each element in the current ranking sequence, and when obtaining the second ranking value of each element in the current ranking sequence, specifically: obtaining a second ranking of each element in the current ranking sequence based on the current ranking sequence; and determining the ratio of the second ranking of each element in the current ranking sequence to the total number of elements in the current ranking sequence as the second ranking value of each element in the current ranking sequence.
Optionally, the second calculating module 43 calculates, according to a preset fluctuation value calculation formula, a first ranking value of each element in the original ranking sequence and a second ranking value of each element in the current ranking sequence, where the current ranking sequence is compared with the fluctuation value of the original ranking sequence, specifically for: for each element in the original ranking sequence, multiplying the absolute value of the logarithm of the ratio of the second ranking value of the element in the current ranking sequence to the first ranking value of the element in the original ranking sequence by the result of the weight of the element in the current ranking sequence as the difference value of the element in the two ranking sequences, wherein the weight of the element in the current ranking sequence is a value obtained by subtracting the second ranking value of the element in the current ranking sequence from 1; and obtaining a fluctuation value of the current ranking sequence compared with the original ranking sequence based on the difference value of each element in the original ranking sequence in ranking in the two ranking sequences.
Optionally, the detecting module 44 detects whether the ranking in the current ranking sequence is abnormal compared with the ranking in the original ranking sequence according to the magnitude relation between the fluctuation value and the preset threshold, which is specifically configured to: when the fluctuation value is larger than a preset threshold value, detecting that the ranking in the current ranking sequence is abnormal compared with the ranking in the original ranking sequence; and when the fluctuation value is smaller than or equal to the preset threshold value, detecting that the ranking in the current ranking sequence is normal compared with the ranking in the original ranking sequence.
Optionally, the apparatus further includes: an output module 45; the output module 45 is configured to output a statistical graph of the first ranking values of all elements in the original ranking sequence and a statistical graph of the second ranking values of all elements in the current ranking sequence based on the first ranking value of each element in the original ranking sequence and the second ranking value of each element in the current ranking sequence, where a horizontal axis of the statistical graph corresponds to an element and a vertical axis corresponds to a ranking value.
The ranking anomaly detection apparatus of the embodiment shown in fig. 4 may be used to implement the technical solution of the above-mentioned method embodiment, and its implementation principle and technical effects are similar, and are not described herein again.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. The electronic device may be an electronic device as described in the above embodiments. The electronic device provided in the embodiment of the present disclosure may execute the processing flow provided in the embodiment of the ranking abnormality detecting method, as shown in fig. 5, the electronic device 50 includes: memory 51, processor 52, computer programs and communication interface 53; wherein the processor 52, the memory 51, the communication interface 53 are connected by a communication bus; the processor 52 is for executing one or more computer programs stored in the memory 51; the computer program is stored in the memory 51 and is configured to execute the ranking abnormality detecting method as described above by the processor 52.
In addition, the embodiment of the present disclosure also provides a computer-readable storage medium having stored thereon a computer program that is executed by a processor to implement the ranking abnormality detecting method described in the above embodiment.
Furthermore, the embodiments of the present disclosure also provide a computer program product comprising a computer program or instructions which, when executed by a processor, implements the ranking anomaly detection method as described above.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, 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. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, 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: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to:
acquiring an original ranking sequence and a current ranking sequence;
Calculating a first ranking value of each element in the original ranking sequence and a second ranking value of each element in the current ranking sequence;
Calculating a fluctuation value of the current ranking sequence compared with the original ranking sequence through a preset fluctuation value calculation formula by using a first ranking value of each element in the original ranking sequence and a second ranking value of each element in the current ranking sequence;
And detecting whether the ranking in the current ranking sequence is abnormal compared with the ranking in the original ranking sequence according to the magnitude relation between the fluctuation value and a preset threshold value.
In addition, the electronic device may also perform other steps in the ranking anomaly detection method as described above.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including, but not limited to, 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 kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. Wherein the names of the units do not constitute a limitation of the units themselves in some cases.
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
It should be noted that in this document, relational terms such as "first" and "second" and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus 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 apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing is merely a specific embodiment of the disclosure to enable one skilled in the art to understand or practice the disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown and described herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method of ranking anomalies detection, the method comprising:
acquiring an original ranking sequence and a current ranking sequence;
Calculating a first ranking value of each element in the original ranking sequence and a second ranking value of each element in the current ranking sequence;
Calculating a fluctuation value of the current ranking sequence compared with the original ranking sequence through a preset fluctuation value calculation formula by using a first ranking value of each element in the original ranking sequence and a second ranking value of each element in the current ranking sequence;
And detecting whether the ranking in the current ranking sequence is abnormal compared with the ranking in the original ranking sequence according to the magnitude relation between the fluctuation value and a preset threshold value.
2. The method of claim 1, wherein the calculating a first ranking value for each element in the original ranking sequence and a second ranking value for each element in the current ranking sequence comprises:
Assigning a value to each element in the original ranking sequence to obtain a first ranking value of each element in the original ranking sequence;
and assigning each element in the current ranking sequence to obtain a second ranking value of each element in the current ranking sequence.
3. The method of claim 2, wherein assigning each element in the original ranking sequence results in a first ranking value for each element in the original ranking sequence, comprising:
Obtaining a first ranking of each element in the original ranking sequence based on the original ranking sequence;
And determining the ratio of the first ranking of each element in the original ranking sequence to the total number of elements in the original ranking sequence as the first ranking value of each element in the original ranking sequence.
4. The method of claim 2, wherein assigning each element in the current ranking sequence results in a second ranking value for each element in the current ranking sequence, comprising:
obtaining a second ranking of each element in the current ranking sequence based on the current ranking sequence;
And determining the ratio of the second ranking of each element in the current ranking sequence to the total number of elements in the current ranking sequence as the second ranking value of each element in the current ranking sequence.
5. The method according to claim 1, wherein said calculating the fluctuation value of the current ranking sequence compared to the original ranking sequence by a preset fluctuation value calculation formula from the first ranking value of each element in the original ranking sequence and the second ranking value of each element in the current ranking sequence comprises:
For each element in the original ranking sequence, multiplying the absolute value of the logarithm of the ratio of the second ranking value of the element in the current ranking sequence to the first ranking value of the element in the original ranking sequence by the result of the weight of the element in the current ranking sequence as the difference value of the element in the two ranking sequences, wherein the weight of the element in the current ranking sequence is a value obtained by subtracting the second ranking value of the element in the current ranking sequence from 1;
And obtaining a fluctuation value of the current ranking sequence compared with the original ranking sequence based on the difference value of each element in the original ranking sequence in ranking in the two ranking sequences.
6. The method according to claim 1, wherein the detecting whether there is an abnormality in the ranking in the current ranking sequence compared to the ranking in the original ranking sequence according to the magnitude relation of the fluctuation value and a preset threshold value comprises:
If the fluctuation value is larger than a preset threshold value, detecting that the ranking in the current ranking sequence is abnormal compared with the ranking in the original ranking sequence;
and if the fluctuation value is smaller than or equal to the preset threshold value, detecting that the ranking in the current ranking sequence is normal compared with the ranking in the original ranking sequence.
7. The method of claim 1, wherein after the calculating the first ranking value for each element in the original ranking sequence and the second ranking value for each element in the current ranking sequence, the method further comprises:
Based on the first ranking value of each element in the original ranking sequence and the second ranking value of each element in the current ranking sequence, a statistical graph of the first ranking values of all elements in the original ranking sequence and a statistical graph of the second ranking values of all elements in the current ranking sequence are output, wherein the horizontal axis of the statistical graph corresponds to the elements and the vertical axis corresponds to the ranking values.
8. A ranking anomaly detection apparatus, the apparatus comprising:
The acquisition module is used for acquiring the original ranking sequence and the current ranking sequence;
a first calculation module for calculating a first ranking value of each element in the original ranking sequence and a second ranking value of each element in the current ranking sequence;
The second calculation module is used for calculating the first ranking value of each element in the original ranking sequence and the second ranking value of each element in the current ranking sequence according to a preset fluctuation value calculation formula, and the fluctuation value of the current ranking sequence compared with the original ranking sequence;
and the detection module is used for detecting whether the ranking in the current ranking sequence is abnormal compared with the ranking in the original ranking sequence according to the magnitude relation between the fluctuation value and a preset threshold value.
9. An electronic device, comprising:
A memory;
A processor; and
A computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method of any one of claims 1-7.
10. A computer readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, implements the method according to any of claims 1-7.
CN202211301766.4A 2022-10-24 2022-10-24 Ranking abnormality detection method, apparatus, device and computer-readable storage medium Pending CN117932502A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211301766.4A CN117932502A (en) 2022-10-24 2022-10-24 Ranking abnormality detection method, apparatus, device and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211301766.4A CN117932502A (en) 2022-10-24 2022-10-24 Ranking abnormality detection method, apparatus, device and computer-readable storage medium

Publications (1)

Publication Number Publication Date
CN117932502A true CN117932502A (en) 2024-04-26

Family

ID=90768907

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211301766.4A Pending CN117932502A (en) 2022-10-24 2022-10-24 Ranking abnormality detection method, apparatus, device and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN117932502A (en)

Similar Documents

Publication Publication Date Title
CN112650790B (en) Target point cloud plane determining method and device, electronic equipment and storage medium
CN110620681B (en) Network connection timeout time setting method, device, equipment and medium
CN108810047B (en) Method and device for determining information push accuracy rate and server
CN112035753B (en) Recommendation page generation method and device, electronic equipment and computer readable medium
CN112379982B (en) Task processing method, device, electronic equipment and computer readable storage medium
CN112684899A (en) Client operation control method and device, electronic equipment and computer readable medium
JP7216757B2 (en) Method and apparatus for obtaining information
CN116388112B (en) Abnormal supply end power-off method, device, electronic equipment and computer readable medium
CN112685481B (en) Data processing method and device
CN113765966A (en) Load balancing method and device
CN117932502A (en) Ranking abnormality detection method, apparatus, device and computer-readable storage medium
CN116527652A (en) Method, device, equipment and medium for determining file format conversion path
CN111274104A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN113660699A (en) Intelligent cluster networking method and device and electronic equipment
CN115130026A (en) Target object determination method, device, medium and electronic equipment
CN113760178A (en) Cache data processing method and device, electronic equipment and computer readable medium
CN109712011B (en) Community discovery method and device
CN111680754A (en) Image classification method and device, electronic equipment and computer-readable storage medium
CN112671595B (en) Method and device for acquiring network characteristics
CN112214665A (en) Content display method and device, electronic equipment and computer readable storage medium
CN113472842B (en) User state perception method in mobile edge computing network and related equipment
CN117056663B (en) Data processing method and device, electronic equipment and storage medium
CN116561735B (en) Mutual trust authentication method and system based on multiple authentication sources and electronic equipment
CN109189689B (en) Method and apparatus for testing
CN113472565B (en) Method, apparatus, device and computer readable medium for expanding server function

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