CN111277724A - Detection method and device for abnormal operation application, electronic equipment and storage medium - Google Patents

Detection method and device for abnormal operation application, electronic equipment and storage medium Download PDF

Info

Publication number
CN111277724A
CN111277724A CN202010084279.1A CN202010084279A CN111277724A CN 111277724 A CN111277724 A CN 111277724A CN 202010084279 A CN202010084279 A CN 202010084279A CN 111277724 A CN111277724 A CN 111277724A
Authority
CN
China
Prior art keywords
target
target image
application
color
image
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.)
Granted
Application number
CN202010084279.1A
Other languages
Chinese (zh)
Other versions
CN111277724B (en
Inventor
肖辉鉴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Oppo Chongqing Intelligent Technology Co Ltd
Original Assignee
Oppo Chongqing Intelligent 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 Oppo Chongqing Intelligent Technology Co Ltd filed Critical Oppo Chongqing Intelligent Technology Co Ltd
Priority to CN202010084279.1A priority Critical patent/CN111277724B/en
Publication of CN111277724A publication Critical patent/CN111277724A/en
Application granted granted Critical
Publication of CN111277724B publication Critical patent/CN111277724B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/46Colour picture communication systems
    • H04N1/56Processing of colour picture signals
    • H04N1/60Colour correction or control
    • H04N1/6002Corrections within particular colour systems
    • H04N1/6008Corrections within particular colour systems with primary colour signals, e.g. RGB or CMY(K)

Abstract

The application discloses a method and a device for detecting abnormal operation application, electronic equipment and a storage medium, and belongs to the technical field of application detection. The method is performed by a server, the method comprising: the method comprises the steps of receiving at least one target image, obtaining a first color gradation ratio according to the first target image, wherein the first target image is any one of the at least one target image, the first color gradation ratio is the largest color gradation ratio of the color gradation ratios of all colors in the first target image, calculating an average color gradation ratio according to the first color gradation ratio of all the target images, and determining that a target application is an abnormal operation application when the average color gradation ratio is larger than a preset threshold value. According to the method and the device, the server directly calculates the color gradation ratio of each target image of each terminal, the average color gradation ratio is obtained, the operation of the target application is detected through the size relation between the average color gradation ratio and the preset threshold value, the use of a machine learning model is avoided, and the detection flexibility is improved.

Description

Detection method and device for abnormal operation application, electronic equipment and storage medium
Technical Field
The embodiment of the application relates to the technical field of application detection, in particular to a method and a device for detecting an abnormally-running application, an electronic device and a storage medium.
Background
With the progress of science and technology, more and more application programs are installed in the terminal, and abnormal operation occurs when each application program in the terminal runs.
When the application program abnormally runs in the terminal, the phenomenon that the terminal has an interface containing a single color can be caused. For example, when an application runs in a terminal, the terminal may appear black screen, blue screen, white screen, gray screen, and the like. At present, when the phenomenon of abnormal operation generated by each application program in a terminal is detected, a machine learning model is often set in the terminal, and an application interface of the terminal is detected through the fixed machine learning model, so that whether the abnormal operation occurs in the process of operating the application program of the terminal is detected.
For the scheme that the machine learning model is arranged in the terminal, the terminal needs to adopt different machine learning models for different abnormal operation phenomena, and the problems of poor flexibility and low efficiency in detecting abnormal operation of the application are caused.
Disclosure of Invention
The embodiment of the application provides a detection method and device for abnormally-running applications, electronic equipment and a storage medium, which can avoid setting a machine learning model in a terminal and improve the detection flexibility. The technical scheme is as follows:
in one aspect, an embodiment of the present application provides a method for detecting an abnormally-running application, where the method is executed by a server, and the method includes:
receiving at least one target image, wherein the target image is an image acquired by a target terminal according to specified parameters to a displayed application interface when the target terminal runs a target application, and the specified parameters are used for indicating the time and frequency when the target terminal acquires the image;
obtaining a first color gradation ratio according to a first target image, wherein the first target image is any one of the at least one target image, the first color gradation ratio is the largest color gradation ratio among the color gradation ratios of the colors in the first target image, and the color gradation ratio is the ratio of the number of pixel points of a single color in the first target image to the number of all the pixel points of the first target image;
calculating an average color level ratio according to the first color level ratio of each target image, wherein the average color level ratio is the average value of the first color level ratios of the target images;
when the average color gradation ratio is larger than a preset threshold value, determining that the target application is an abnormally-running application.
On the other hand, an embodiment of the present application provides a device for detecting an abnormally-running application, where the device is used in a server, and the device includes:
the image receiving module is used for receiving at least one target image, wherein the target image is an image acquired by a target terminal according to specified parameters to a displayed application interface when the target terminal runs a target application, and the specified parameters are used for indicating the time and frequency when the target terminal acquires the image;
a first obtaining module, configured to obtain a first color gradation ratio according to a first target image, where the first target image is any one of the at least one target image, the first color gradation ratio is a maximum color gradation ratio among color gradation ratios of respective colors in the first target image, and the color gradation ratio is a ratio of the number of pixels of a single color in the first target image to the number of all pixels of the first target image;
the first calculation module is used for calculating an average color level ratio according to the first color level ratio of each target image, wherein the average color level ratio is the average value of the first color level ratios of the target images;
and the application determining module is used for determining that the target application is an abnormally-running application when the average color gradation ratio is larger than a preset threshold value.
In another aspect, an embodiment of the present application provides an electronic device, where the terminal includes a processor and a memory, where the memory stores at least one instruction, at least one program, a code set, or a set of instructions, and the at least one instruction, the at least one program, the code set, or the set of instructions is loaded and executed by the processor to implement the method for detecting an abnormally-running application according to the above aspect.
In another aspect, the present application provides a computer-readable storage medium, in which at least one instruction, at least one program, a code set, or a set of instructions is stored, and the at least one instruction, the at least one program, the code set, or the set of instructions is loaded and executed by a processor to implement the method for detecting an abnormally-running application according to the above aspect.
The technical scheme provided by the embodiment of the application can at least comprise the following beneficial effects:
receiving at least one target image, and acquiring a first color gradation ratio according to the first target image, wherein the first target image is any one of the at least one target image, the first color gradation ratio is the maximum color gradation ratio of the color gradation ratios of all colors in the first target image, and the color gradation ratio is the ratio of the number of pixel points of a single color in the first target image to the number of all pixel points of the first target image; calculating an average color gradation ratio according to the first color gradation ratios of the target images, wherein the average color gradation ratio is an average value of the first color gradation ratios of the target images; and when the average color gradation ratio is larger than a preset threshold value, determining that the target application is an abnormal operation application. According to the method and the device, the server directly calculates the color gradation ratio of each target image of each terminal, the average color gradation ratio is obtained, the operation of the target application is detected through the size relation between the average color gradation ratio and the preset threshold value, the use of a machine learning model is avoided, and the detection flexibility is improved.
Drawings
Fig. 1 is a schematic structural diagram between a terminal and a server according to an exemplary embodiment of the present application;
FIG. 2 is a flowchart of a method for detecting an abnormally-running application according to an exemplary embodiment of the present application;
FIG. 3 is a flowchart of a method for detecting an abnormally-running application according to an exemplary embodiment of the present application;
FIG. 4 is a flowchart illustrating a method for detecting an abnormally running application according to an exemplary embodiment of the present application;
fig. 5 is a block diagram of a detection apparatus for an abnormally-running application according to an exemplary embodiment of the present application;
fig. 6 is a schematic structural diagram of a server according to an exemplary embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
Reference herein to "a plurality" means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
The scheme provided by the application can be used in a real scene in which an application program runs in a terminal when people use the terminal in daily life, and for convenience of understanding, the system structure related to the embodiment of the application is firstly and simply introduced below.
With the development of science and technology, more and more terminals appear in people's daily life, and people can work, amusement, study etc. through the terminal. In addition, the number of applications installed in the terminal is also increasing, and a user can click an icon of each application in the terminal, thereby running the application in the terminal.
Referring to fig. 1, a schematic structural diagram between a terminal and a server according to an exemplary embodiment of the present application is shown. As shown in fig. 1, a terminal 110 and a server 120 are included.
Optionally, the terminal 110 is a terminal installed with an application program, and the terminal has a display screen, and an application interface can be displayed in the display screen. For example, the terminal may be a mobile phone, a tablet computer, an e-book reader, smart glasses, a smart watch, an MP4(Moving Picture Experts Group Audio Layer IV) player, a notebook computer, a laptop portable computer, a desktop computer, and the like.
Optionally, the server 120 may be a server, or a plurality of servers, or a virtualization platform, or a cloud computing service center. The server 120 may be a server corresponding to each application in the terminal 110, or may be a server of a manufacturer of the terminal 110.
Alternatively, the terminal 110 and the server 120 may be connected through a communication network. Optionally, the communication network is a wired network or a wireless network.
Optionally, the wireless network or wired network described above uses standard communication techniques and/or protocols. The Network is typically the Internet, but may be any Network including, but not limited to, a Local Area Network (LAN), a Metropolitan Area Network (MAN), a Wide Area Network (WAN), a mobile, wireline or wireless Network, a private Network, or any combination of virtual private networks. In some embodiments, data exchanged over a network is represented using techniques and/or formats including Hypertext Mark-up Language (HTML), Extensible markup Language (XML), and the like. All or some of the links may also be encrypted using conventional encryption techniques such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet protocol Security (IPsec). In other embodiments, custom and/or dedicated data communication techniques may also be used in place of, or in addition to, the data communication techniques described above.
In the process of running the application program by the terminal 110, the application interface of the terminal 110 may be in a situation, for example, black in the application interface occupies more than 99% of the color included in the application interface, or white in the application interface occupies more than 99% of the color included in the application interface, or a single color in the application interface occupies more than 99% of the color included in the application interface, which may be regarded as a situation that the application program runs abnormally.
Optionally, in the related art, most terminals may identify the application interface of the application program through their own machine learning models, so as to complete detection of the application interface. If the terminal needs to detect the application interfaces of different application programs, the terminal may need to adopt different machine learning models, or if the terminal needs to detect the application interfaces according to the occupation ratios of different colors in the application interfaces, the terminal may also need to adopt different machine learning models. For example, the machine learning model used when the terminal detects the application interface according to the proportion of black in the application interface is different from the machine learning model used when the terminal detects the application interface according to the proportion of red in the application interface. Therefore, a large number of machine learning models need to be arranged in the terminal, and different machine learning models need to be started when the application program is detected, so that the problems that the terminal is poor in flexibility and low in efficiency when the application program runs and the like are caused.
In order to improve the flexibility of detection of the application interface of the terminal, the application program abnormal operation detection method is provided, the detection of the abnormal condition occurring in the operation process of the application program of the terminal can be realized under the condition that the application interface of the terminal does not need to be detected through a machine learning model, and the efficiency and the flexibility of the application interface detection are improved.
Referring to fig. 2, a flowchart of a method for detecting an abnormally-running application according to an exemplary embodiment of the present application is shown. The method can be used in a system composed of a terminal and a server as shown in fig. 1, and executed by the server in the system, as shown in fig. 2, the method for detecting an abnormally-running application can include the following steps.
Step 201, receiving at least one target image, where the target image is an image acquired by a target terminal according to specified parameters for a displayed application interface when the target terminal runs a target application.
The designated parameters are used for indicating the time and frequency when the target terminal acquires the image. That is, the specified parameter may indicate when the target terminal starts to acquire an image during the running of the target application and a duration of acquiring the image, and acquire the image at a fixed frequency during the duration.
Alternatively, the target terminal may be any one of terminals that establish a network connection with the server, and the target application may be any one of applications designated by the server. The server can designate all applications in a certain application platform, and when the target terminal downloads a certain application from the application platform and runs, the target terminal can acquire images of the displayed application interface according to designated parameters and send the images to the server.
Optionally, the target terminal related in this embodiment of the application may have an image acquisition component, and the terminal may capture an image of the application interface through the image acquisition component, so as to obtain the image of the application interface.
Step 202, according to a first target image, obtaining a first color gradation ratio, where the first target image is any one of at least one target image, and the first color gradation ratio is a maximum color gradation ratio among color gradation ratios of respective colors in the first target image.
The color gradation ratio is the ratio of the number of pixels of a single color in the first target image to the number of all pixels of the first target image. That is, the server may receive each target image acquired by the target terminal for the target application, and obtain a respective first tone scale ratio for each target image.
Step 203, calculating an average color level ratio according to the first color level ratio of each target image, wherein the average color level ratio is an average value of the first color level ratios of each target image.
That is, the server may average the respective first gradation ratios to obtain an average gradation ratio.
And step 204, when the average color gradation ratio is larger than a preset threshold value, determining that the target application is an abnormally-running application.
The server can compare the calculated average color gradation ratio with a preset threshold, and determine whether the target terminal has abnormal operation in the process of operating the target application according to the size relationship between the average color gradation ratio and the preset threshold, so that the target application is determined to be abnormal operation application.
In summary, the server receives at least one target image, and obtains a first color gradation ratio according to a first target image, where the first target image is any one of the at least one target image, the first color gradation ratio is a maximum color gradation ratio among color gradation ratios of colors in the first target image, and the color gradation ratio is a ratio of the number of pixels of a single color in the first target image to the number of all pixels of the first target image; calculating an average color gradation ratio according to the first color gradation ratios of the target images, wherein the average color gradation ratio is an average value of the first color gradation ratios of the target images; and when the average color gradation ratio is larger than a preset threshold value, determining that the target application is an abnormal operation application. According to the method and the device, the server directly calculates the color gradation ratio of each target image of each terminal, the average color gradation ratio is obtained, the operation of the target application is detected through the size relation between the average color gradation ratio and the preset threshold value, the use of a machine learning model is avoided, and the detection flexibility is improved.
In a possible implementation manner, before receiving a target image sent by a target terminal, a server may send image acquisition information to the target terminal, where the image acquisition information indicates that the target terminal needs to acquire an application interface of a target application. The embodiment of the method is described by taking the example that the image acquisition information includes the designated parameters.
Referring to fig. 3, a flowchart of a method for detecting an abnormally-running application according to an exemplary embodiment of the present application is shown. The method may be used in a system composed of a terminal and a server as shown in fig. 1, and executed by the server in the system, as shown in fig. 3, the method for detecting an abnormally-running application may include the following steps.
Step 301, sending image acquisition information to a target terminal.
The image acquisition information is used for indicating the target terminal to acquire an application interface of the target application according to the specified parameters when the target application starts to run, and the specified parameters are used for indicating the time and the frequency when the target terminal acquires the image.
Namely, the server can send image acquisition information to the target terminal through network connection, and the terminal learns that image acquisition needs to be carried out on an application interface when running a target application by the terminal through specified parameters in the image acquisition information and sends the acquired image to the server.
Taking the first application as an example of target application, the server may include an application name of the first application in the image acquisition information and send the image acquisition information to the target terminal, the target terminal receives the image acquisition information, extracts the application name and the designated parameters, and when the first application is installed in the target terminal, the target terminal may call its own image acquisition component and acquire an application interface of the first application according to the designated parameters in a subsequent process of running the first application, and send the acquired application interface to the server.
In a possible implementation manner, the number of the application names of the target applications included in the image acquisition information may be multiple, and the target terminal may select each target application that has been installed by itself, and acquire an application interface in a subsequent process of running the target applications. If the target terminal does not install the target application corresponding to the application name of the target application in the image acquisition information, the target terminal can also ignore the image acquisition information sent by the server.
Optionally, the time when the specified parameter indicates that the target terminal acquires the image may be represented by a specified period, for example, when the target terminal runs the application program, the application interface is acquired at a specified frequency every 5 minutes from the start of running the application program. Then the time when the target terminal acquires the image is indicated to be 5 minutes in the specified parameter. Optionally, the frequency when the specified parameter indicates that the target terminal acquires the image may also be represented by a specified frequency, for example, the specified frequency may be 1 time of acquisition in 1 second, 2 times of acquisition in 1 second, 3 times of acquisition in 1 second, and the like, and if the specified frequency is 1 time of acquisition in 1 second, the target terminal may acquire the application interface once every 1 second.
Step 302, receiving at least one target image, wherein the target image is an image acquired by the target terminal according to specified parameters on a displayed application interface when the target terminal runs a target application.
After receiving the image acquisition information, the target terminal can acquire an application interface of the displayed target application when the target terminal runs the target application. Taking the above-mentioned designated parameters including the designated period and the designated frequency as an example, the target terminal may periodically collect the application interface of the target application, and if the designated period is 3 minutes and the designated frequency is 1 second and 1 time, the target terminal may start to collect the application interface every second from the beginning of running the target application, and send the image collected in 20 seconds to the server as an image in one period, and correspondingly, the server may also receive at least one target image sent by the target terminal.
Optionally, when the target terminal sends the target image, the unique identifier of the target terminal and the application name of the target application may also be sent to the server, so that the server knows which terminal sent the target image, and knows which target application in the target terminal the received target image.
Optionally, the specified parameter may also include a specified duration, and the specified duration may be a duration in a specified period. For example, the specified duration is the first 20 seconds of the specified period, and when the target terminal acquires the target image according to the specified period, the target terminal may acquire the target image according to the specified frequency within the first 20 seconds of the specified period, and may continue to acquire the target image according to the specified frequency within the next period, or within the first 20 seconds of the period.
In a possible implementation manner, the image capturing information may further include a specific interface, where the specific interface is an application interface of the target application. Then, this step can be replaced by: and receiving at least one target image acquired according to the designated parameters when the target terminal shows the designated boundary surface in the process of running the target application.
The server can include the specified interface in the image acquisition information, the target terminal can analyze the specified interface included in the image acquisition information, when the target terminal runs the target application and the specified interface appears, the target terminal starts to acquire the application interface according to the specified parameters and sends the acquired image of the application interface to the server. For example, when the target application has the designated boundary surface, the probability of abnormal operation is high, and the method provided by the embodiment of the application can also be used for detecting the stage in which the abnormal operation condition is easy to occur in the operation process of the target application.
In a possible implementation manner, the designated interface included in the image capture information may also be replaced by a designated code, for example, in a process that the target terminal runs the target application, when the designated code is loaded, the target terminal may capture the displayed application interface according to the designated parameters.
The designated parameters may include a designated period, a designated frequency and a designated operation stage, and the designated operation stage is a stage in which the target application displays the corresponding designated interface in the operation process. That is, the specified operation phase refers to a phase of operating the target application process from the display of the specified interface by the target terminal, or the specified operation phase refers to a phase of operating the target application process from the display of the application interface corresponding to the specified code by the target terminal.
Step 303, extracting color values of each pixel point in a first target image, where the first target image is any one of at least one target image.
The server can extract color values of the pixels of each received target image, for example, an image collected by the target terminal adopts an RGB (Red Green Blue ) color mode, and the server can extract RGB values of the pixels of each target image according to each target image sent by the target terminal, so that the color values of the pixels are obtained.
It should be noted that the number of pixel points included in the target image sent by the target terminal may be determined by the image acquisition component in the target terminal, and if different image acquisition components are adopted by different target terminals, the target images acquired by different target terminals may also be different.
And step 304, acquiring the color type contained in the first target image according to the color value of each pixel point.
The server can acquire the colors contained in each target image according to the color values of the pixel points in each target image. For example, for a certain target image, the RGB value in each pixel point represents the color of the pixel point, and the server may count the colors with the same RGB value in each pixel point, and obtain the color as one of the colors included in the target image.
For example, the target image includes red, green, purple, black, and white. Each pixel point of the target image comprises RGB values corresponding to the colors, and the server obtains the five colors including red, green, purple, black and white in the target image by counting the RGB values in each pixel point.
Step 305 calculates the gradation ratio of the color corresponding to each color type.
The color gradation ratio is the ratio of the number of pixels of a single color in the first target image to the number of all pixels of the first target image.
That is, the server may calculate the gradation ratio of each color in each target image for each target image. For example, for a certain target terminal, the server may calculate the gradation ratio of red in a certain target image to be 20%, where 1 ten thousand of pixel points are included in the certain target image received by the server, and 2000 of pixel points correspond to red. Similarly, the server may calculate the gradation ratio of another color in the target image, or may calculate the gradation ratio of each color included in another target image.
Step 306, a first gradation ratio is obtained from the gradation ratios of the colors corresponding to the respective color types.
Wherein the first gradation ratio is the largest gradation ratio among gradation ratios of respective colors in the first target image.
That is, the server may perform screening according to the gradation ratio of each color included in each target image, to obtain the maximum gradation ratio in each target image. For example, for a certain target image, the server calculates the tone scale ratio of the target image as follows: the gradation ratio of red was 22.8%, the gradation ratio of green was 11.7%, the gradation ratio of purple was 7.5%, the gradation ratio of black was 29.9%, and the gradation ratio of white was 28.1%. Then, the server may acquire that the first gradation ratio in the target image is 29.9%, that is, acquire the gradation ratio of black as the first gradation ratio.
Step 307, calculating an average color gradation ratio according to the first color gradation ratios of the respective target images, wherein the average color gradation ratio is an average value of the first color gradation ratios of the respective target images.
That is, the server may sum the first gradation ratios of the respective target images and divide by the number of received target images to obtain an average gradation ratio. For example, the server receives 20 target images sent by the target terminal, and the server may obtain the respective first tone scale ratios of the 20 target images according to the above-mentioned manners of steps 303 to 306 for the 20 target images, and sum the first tone scale ratios, and divide by 20, thereby obtaining an average tone scale ratio.
In a possible implementation manner, if there are different colors corresponding to the first color gradation ratios of the respective target images, the server may further count the number of the first color gradation ratios of the respective colors, add the first color gradation ratios of the respective colors, and average the first color gradation ratios of the respective colors. For example, in the 20 target images, the colors corresponding to the first gradation ratios of the first 15 target images are all black, and the colors corresponding to the first gradation ratios of the second 5 target images are all red, then the server may add and divide the first gradation ratios of the first 15 target images by 15 to obtain a first average gradation ratio, then add and divide the first gradation ratios of the second 5 target images by 5 to obtain a second average gradation ratio, and both the two gradation ratios may be used as data included in the average gradation ratio.
In a possible implementation manner, the server may further record at least one target image sent by the target terminal according to the specified period; that is, the server may record at least one target image of the received target terminal at a designated period, and perform the above-described steps 303 to 306 for each target image in each period, and calculate the first gradation ratio for each target image. For example, when the target terminal acquires the target image, the target image is acquired according to the specified parameters that the specified period is 3 minutes, the specified duration is the first 20 seconds of the specified period, and the frequency is 1 second and 1 time of acquisition, and after the server receives the target image, the server can record the target image every 3 minutes, that is, the target image acquired by the target terminal in each specified period is used as a group of data, and each method step of the embodiment of the application is executed on each group of data.
Optionally, the server may obtain a second color level ratio according to a second target image, where the second target image is any one of the target images included in each period, and the second color level ratio is a maximum color level ratio among the color level ratios of the colors in the second target image. Reference may be made to the descriptions of step 303 to step 306, which are not described herein again.
And 308, acquiring a preset threshold according to the unique corresponding relation between the designated parameter and the preset threshold.
Optionally, for different specified parameters, the server may store different preset thresholds, and after sending the specified parameters to the target terminal, if the target image sent by the target terminal is received, the server may obtain the corresponding preset thresholds according to the specified parameters previously sent to the target terminal.
Please refer to table 1, which shows a correspondence table related to an exemplary embodiment of the present application.
Specifying parameters Threshold value
Specify a parameter of one Threshold value of one
Specifying a parameter two Threshold value two
…... ……
TABLE 1
As shown in table 1, the server stores preset thresholds corresponding to the designated parameters, and if the server sends a first designated parameter to the target terminal, the size of the preset threshold that the server can obtain is the first threshold.
Step 309, when the average color level ratio is greater than the preset threshold, determining that the target application is an abnormally-running application.
Optionally, the server compares the calculated average color gradation ratio with the obtained preset threshold, and determines whether an abnormal operation occurs in the target application running process of the target terminal according to the size relationship between the average color gradation ratio and the preset threshold, so as to determine the target application as an abnormal operation application. In a manner corresponding to the above one possible implementation, the server may compare the multiple average color gradation ratios with the obtained preset threshold, and when any one of the average color gradation ratios is greater than the preset threshold, the server may determine the target application as an abnormally-operating application.
In summary, the server receives at least one target image, and obtains a first color gradation ratio according to a first target image, where the first target image is any one of the at least one target image, the first color gradation ratio is a maximum color gradation ratio among color gradation ratios of colors in the first target image, and the color gradation ratio is a ratio of the number of pixels of a single color in the first target image to the number of all pixels of the first target image; calculating an average color gradation ratio according to the first color gradation ratios of the target images, wherein the average color gradation ratio is an average value of the first color gradation ratios of the target images; and when the average color gradation ratio is larger than a preset threshold value, determining that the target application is an abnormal operation application. According to the method and the device, the server directly calculates the color gradation ratio of each target image of each terminal, the average color gradation ratio is obtained, the operation of the target application is detected through the size relation between the average color gradation ratio and the preset threshold value, the use of a machine learning model is avoided, and the detection flexibility is improved.
In addition, through the use of the designated operation stage in the embodiment of the application, the target terminal can be prevented from collecting the target image all the time in the operation process of the target application, so that the application has pertinence when detecting the abnormal condition of the operation of the target application, and the detection accuracy is improved.
The following is an example of interaction between a server and a terminal, where a target application is a certain game application, and the detection method for an abnormally-running application provided in the embodiment of the present application is described as an example. Referring to fig. 4, a flowchart of a method for detecting an abnormally-running application according to an exemplary embodiment of the present application is shown. The method can be used in a system composed of a terminal and a server shown in fig. 1, and executed by the server and the terminal in the system, as shown in fig. 4, the method for detecting an abnormally-running application can include the following steps.
Step 401, the server sends image acquisition information to the terminal.
The image capture information may include an application name of the first game.
Step 402, the terminal receives image acquisition information.
And step 403, the terminal acquires the target image according to the specified parameters contained in the image acquisition information.
When the terminal starts to run a game, the target image is collected according to the specified parameters.
And step 404, the terminal sends the acquired target image to a server.
In step 405, the server receives the target image sent by the terminal.
In step 406, the server extracts the pixel points of each target image and obtains the color contained in each target image.
In step 407, the server calculates the tone scale ratio of each color in each target image.
Step 408, the server obtains the maximum tone scale ratio in each target image and averages.
In step 409, the server checks whether the average is greater than 99%.
When the server detects whether the average value is greater than 99%, which indicates that a situation of monotonous color occurs when the game is operated within a certain time period, the server can determine the game as an abnormally-operated application in the terminal.
It should be noted that, the implementation manners in the step 401 to the step 409 may also refer to the description in the embodiment of fig. 3, and are not described herein again.
In summary, the server receives at least one target image, and obtains a first color gradation ratio according to a first target image, where the first target image is any one of the at least one target image, the first color gradation ratio is a maximum color gradation ratio among color gradation ratios of colors in the first target image, and the color gradation ratio is a ratio of the number of pixels of a single color in the first target image to the number of all pixels of the first target image; calculating an average color gradation ratio according to the first color gradation ratios of the target images, wherein the average color gradation ratio is an average value of the first color gradation ratios of the target images; and when the average color gradation ratio is larger than a preset threshold value, determining that the target application is an abnormal operation application. According to the method and the device, the server directly calculates the color gradation ratio of each target image of each terminal, the average color gradation ratio is obtained, the operation of the target application is detected through the size relation between the average color gradation ratio and the preset threshold value, the use of a machine learning model is avoided, and the detection flexibility is improved.
The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
Referring to fig. 5, a block diagram of a device for detecting an abnormally-running application according to an exemplary embodiment of the present application is shown. The detection device of the abnormally-running application can be used in the server to execute all or part of the steps executed by the server in the method provided by the embodiment shown in fig. 2, fig. 3 or fig. 4. The detection device for the abnormally-operating application may include: an image receiving module 501, a first obtaining module 502, a first calculating module 503 and an application determining module 504;
the image receiving module 501 is configured to receive at least one target image, where the target image is an image acquired by a target terminal according to specified parameters on a displayed application interface when the target terminal runs a target application, and the specified parameters are used to indicate time and frequency when the target terminal acquires the image;
the first obtaining module 502 is configured to obtain a first color gradation ratio according to a first target image, where the first target image is any one of the at least one target image, the first color gradation ratio is a maximum color gradation ratio among color gradation ratios of respective colors in the first target image, and the color gradation ratio is a ratio of the number of pixels of a single color in the first target image to the number of all pixels of the first target image;
the first calculating module 503 is configured to calculate an average color level ratio according to the first color level ratio of each target image, where the average color level ratio is an average value of the first color level ratios of the target images;
the application determining module 504 is configured to determine that the target application is an abnormally-running application when the average color level ratio is greater than a preset threshold.
In summary, at least one target image is received, and a first color gradation ratio is obtained according to the first target image, where the first target image is any one of the at least one target image, the first color gradation ratio is the largest color gradation ratio among the color gradation ratios of the colors in the first target image, and the color gradation ratio is the ratio of the number of pixels of a single color in the first target image to the number of all pixels of the first target image; calculating an average color gradation ratio according to the first color gradation ratios of the target images, wherein the average color gradation ratio is an average value of the first color gradation ratios of the target images; and when the average color gradation ratio is larger than a preset threshold value, determining that the target application is an abnormal operation application. According to the method and the device, the server directly calculates the color gradation ratio of each target image of each terminal, the average color gradation ratio is obtained, the operation of the target application is detected through the size relation between the average color gradation ratio and the preset threshold value, the use of a machine learning model is avoided, and the detection flexibility is improved.
Optionally, the first obtaining module 501 includes: the device comprises a first extraction unit, a first acquisition unit, a first calculation unit and a second acquisition unit;
the first extraction unit is used for extracting color values of all pixel points in the first target image;
the first obtaining unit is configured to obtain a color type included in the first target image according to the color value of each pixel;
the first calculating unit is used for calculating the color gradation ratio of the color corresponding to each color type;
the second obtaining unit is configured to obtain the first gradation ratio from gradation ratios of colors corresponding to the respective color types.
Optionally, the apparatus further comprises:
an information sending module, configured to send, by the image receiving module 501, image acquisition information to the target terminal before the receiving of the at least one target image, where the image acquisition information is used to instruct the target terminal to acquire an application interface of the target application according to the specified parameter when the target application starts to run.
Optionally, the image acquisition information includes a designated interface;
the image receiving module 501 is further configured to receive at least one target image acquired according to the specified parameter when the target terminal displays the specified boundary surface in the process of running the target application.
Optionally, the designated parameters include a designated period, a designated frequency, and a designated operation phase, where the designated operation phase is a phase corresponding to the target application displaying the designated interface in an operation process.
Optionally, the apparatus further comprises:
the recording module is used for recording the at least one target image according to the specified period;
the first obtaining module 502 is further configured to obtain a second color level ratio according to a second target image, where the second target image is any one of the target images included in each period, and the second color level ratio is a maximum color level ratio among color level ratios of colors in the second target image.
Optionally, the specified parameter and the preset threshold have a unique corresponding relationship, and the apparatus further includes:
and the second acquisition module is used for acquiring the preset threshold according to the unique corresponding relation between the designated parameter and the preset threshold.
Fig. 6 is a schematic structural diagram of a server according to an exemplary embodiment of the present application. As shown in fig. 6, the server 600 includes a Central Processing Unit (CPU) 601, a system Memory 604 including a Random Access Memory (RAM) 602 and a Read Only Memory (ROM) 603, and a system bus 605 connecting the system Memory 604 and the CPU 601. The computer device 600 also includes a basic Input/output system (I/O system) 606 for facilitating information transfer between devices within the computer, and a mass storage device 607 for storing an operating system 612, application programs 613, and other program modules 614.
The basic input/output system 606 includes a display 608 for displaying information and an input device 609 such as a mouse, keyboard, etc. for a user to input information. Wherein the display 608 and the input device 609 are connected to the central processing unit 601 through an input output controller 610 connected to the system bus 605. The basic input/output system 606 may also include an input/output controller 610 for receiving and processing input from a number of other devices, such as a keyboard, mouse, or electronic stylus. Similarly, input/output controller 610 may also provide output to a display screen, a printer, or other type of output device.
The mass storage device 607 is connected to the central processing unit 601 through a mass storage controller (not shown) connected to the system bus 605. The mass storage device 607 and its associated computer-readable media provide non-volatile storage for the computer device 600. That is, the mass storage device 607 may include a computer-readable medium (not shown) such as a hard disk or a CD-ROM (Compact disk Read-Only Memory) drive.
The computer readable media may include computer storage media and communication media. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes RAM, ROM, EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash Memory or other solid state Memory technology, CD-ROM, DVD (Digital Video Disc) or other optical, magnetic, tape, magnetic disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that the computer storage media is not limited to the foregoing. The system memory 604 and mass storage device 607 described above may be collectively referred to as memory.
The computer device 600 may be connected to the internet or other network devices through a network interface unit 611 connected to the system bus 605.
The memory further includes one or more programs, the one or more programs are stored in the memory, and the central processing unit 601 implements all or part of the steps performed by the server in the methods provided by the above embodiments of the present application by executing the one or more programs.
The present invention further provides a computer-readable storage medium, where at least one instruction, at least one program, a code set, or an instruction set is stored in the storage medium, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the method for detecting an abnormally-running application according to the above embodiments.
The embodiment of the present application further provides a computer program product, where at least one instruction is stored, and the at least one instruction is loaded and executed by the processor to implement the method for detecting an abnormally-running application according to the above embodiments.
Those skilled in the art will recognize that, in one or more of the examples described above, the functions described in the embodiments of the present application may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable storage medium. Computer-readable storage media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
The above description is only exemplary of the present application and should not be taken as limiting, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (10)

1. A method for detecting an abnormally-running application, the method being performed by a server, the method comprising:
receiving at least one target image, wherein the target image is an image acquired by a target terminal according to specified parameters to a displayed application interface when the target terminal runs a target application, and the specified parameters are used for indicating the time and frequency when the target terminal acquires the image;
obtaining a first color gradation ratio according to a first target image, wherein the first target image is any one of the at least one target image, the first color gradation ratio is the largest color gradation ratio among the color gradation ratios of the colors in the first target image, and the color gradation ratio is the ratio of the number of pixel points of a single color in the first target image to the number of all the pixel points of the first target image;
calculating an average color level ratio according to the first color level ratio of each target image, wherein the average color level ratio is the average value of the first color level ratios of the target images;
when the average color gradation ratio is larger than a preset threshold value, determining that the target application is an abnormally-running application.
2. The method of claim 1, wherein obtaining the first tone scale ratio from the first target image comprises:
extracting color values of all pixel points in the first target image;
acquiring the color type contained in the first target image according to the color value of each pixel point;
calculating the color gradation ratio of the color corresponding to each color type;
and obtaining the first gradation ratio from the gradation ratios of the colors corresponding to the respective color types.
3. The method of claim 1, further comprising, prior to said receiving at least one target image:
and sending image acquisition information to the target terminal, wherein the image acquisition information is used for indicating the target terminal to acquire an application interface of the target application according to the specified parameters when the target application starts to run.
4. The method according to claim 3, wherein the image capture information comprises a designated interface;
the receiving at least one target image, comprising:
and receiving at least one target image acquired according to the designated parameters when the designated boundary surface is displayed in the process of running the target application by the target terminal.
5. The method according to claim 4, wherein the specified parameters comprise a specified period, a specified frequency and a specified operation phase, and the specified operation phase is a phase corresponding to the target application displaying the specified interface in an operation process.
6. The method of claim 5, further comprising:
recording the at least one target image according to the designated period;
the obtaining a first color gradation ratio according to the first target image includes:
and acquiring a second color level ratio according to a second target image, wherein the second target image is any one of the target images contained in each period, and the second color level ratio is the maximum color level ratio among the color level ratios of the colors in the second target image.
7. The method of claim 5, wherein the specified parameter has a unique correspondence with the preset threshold, the method further comprising:
and acquiring the preset threshold according to the unique corresponding relation between the designated parameter and the preset threshold.
8. An apparatus for detecting an abnormally-running application, the apparatus being used in a server, the apparatus comprising:
the image receiving module is used for receiving at least one target image, wherein the target image is an image acquired by a target terminal according to specified parameters to a displayed application interface when the target terminal runs a target application, and the specified parameters are used for indicating the time and frequency when the target terminal acquires the image;
a first obtaining module, configured to obtain a first color gradation ratio according to a first target image, where the first target image is any one of the at least one target image, the first color gradation ratio is a maximum color gradation ratio among color gradation ratios of respective colors in the first target image, and the color gradation ratio is a ratio of the number of pixels of a single color in the first target image to the number of all pixels of the first target image;
the first calculation module is used for calculating an average color level ratio according to the first color level ratio of each target image, wherein the average color level ratio is the average value of the first color level ratios of the target images;
and the application determining module is used for determining that the target application is an abnormally-running application when the average color gradation ratio is larger than a preset threshold value.
9. An electronic device comprising a processor and a memory, wherein at least one instruction, at least one program, a set of codes, or a set of instructions is stored in the memory, and wherein the at least one instruction, the at least one program, the set of codes, or the set of instructions is loaded and executed by the processor to implement the method for detecting an abnormally-running application according to any one of claims 1 to 7.
10. A computer-readable storage medium, having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, which is loaded and executed by a processor to implement the method of detecting an abnormally-running application according to any one of claims 1 to 7.
CN202010084279.1A 2020-02-10 2020-02-10 Detection method and device for abnormal operation application, electronic equipment and storage medium Active CN111277724B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010084279.1A CN111277724B (en) 2020-02-10 2020-02-10 Detection method and device for abnormal operation application, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010084279.1A CN111277724B (en) 2020-02-10 2020-02-10 Detection method and device for abnormal operation application, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111277724A true CN111277724A (en) 2020-06-12
CN111277724B CN111277724B (en) 2022-03-15

Family

ID=71003806

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010084279.1A Active CN111277724B (en) 2020-02-10 2020-02-10 Detection method and device for abnormal operation application, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111277724B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117076230A (en) * 2023-06-01 2023-11-17 安徽皖新融资租赁有限公司 Early warning method and system for computer log
CN117556162A (en) * 2023-11-01 2024-02-13 书行科技(北京)有限公司 Picture loading detection method, video rendering detection method and related products

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100188714A1 (en) * 2008-12-25 2010-07-29 Ricoh Company, Ltd. Image inspection system, image inspection method, and computer-readable medium storing an image inspection program
CN106651968A (en) * 2016-12-23 2017-05-10 宇龙计算机通信科技(深圳)有限公司 Game exception detection method and apparatus
US20170178322A1 (en) * 2015-12-18 2017-06-22 Given Imaging Ltd. System and method for detecting anomalies in an image captured in-vivo
CN110246129A (en) * 2019-06-18 2019-09-17 深圳市腾讯网域计算机网络有限公司 Image detecting method, device, computer readable storage medium and computer equipment
CN110400355A (en) * 2019-07-29 2019-11-01 北京华雨天成文化传播有限公司 A kind of determination method, apparatus, electronic equipment and the storage medium of monochrome video

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100188714A1 (en) * 2008-12-25 2010-07-29 Ricoh Company, Ltd. Image inspection system, image inspection method, and computer-readable medium storing an image inspection program
US20170178322A1 (en) * 2015-12-18 2017-06-22 Given Imaging Ltd. System and method for detecting anomalies in an image captured in-vivo
CN106651968A (en) * 2016-12-23 2017-05-10 宇龙计算机通信科技(深圳)有限公司 Game exception detection method and apparatus
CN110246129A (en) * 2019-06-18 2019-09-17 深圳市腾讯网域计算机网络有限公司 Image detecting method, device, computer readable storage medium and computer equipment
CN110400355A (en) * 2019-07-29 2019-11-01 北京华雨天成文化传播有限公司 A kind of determination method, apparatus, electronic equipment and the storage medium of monochrome video

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117076230A (en) * 2023-06-01 2023-11-17 安徽皖新融资租赁有限公司 Early warning method and system for computer log
CN117556162A (en) * 2023-11-01 2024-02-13 书行科技(北京)有限公司 Picture loading detection method, video rendering detection method and related products

Also Published As

Publication number Publication date
CN111277724B (en) 2022-03-15

Similar Documents

Publication Publication Date Title
EP4044612A1 (en) Lagging detection method and apparatus, and device and readable storage medium
CN108376117B (en) Interactive response testing method and device
CN111124567B (en) Operation recording method and device for target application
CN111277724B (en) Detection method and device for abnormal operation application, electronic equipment and storage medium
CN104834597B (en) Using the measuring method and system of response time
CN111782492A (en) Page first screen loading duration testing method and device, computer equipment and medium
CN115396705A (en) Screen projection operation verification method, platform and system
EP3016013A1 (en) Information processing device, terminal device, information processing program, and information processing method
CN113538629A (en) Detection method and device
CN110400355B (en) Method and device for determining monochrome video, electronic equipment and storage medium
WO2023236757A1 (en) Video image noise evaluation method and device
CN106651968B (en) Game abnormity detection method and device
CN115456984A (en) High-speed image recognition defect detection system based on two-dimensional code
CN115934179A (en) Service function control method and equipment
CN112202985B (en) Information processing method, client device, server device and information processing system
CN114745537A (en) Sound and picture delay testing method and device, electronic equipment and storage medium
CN109271122B (en) File display method, device and equipment based on double display screens
CN112199131B (en) Page detection method, device and equipment
CN110865911B (en) Image testing method, device, storage medium, image acquisition card and upper computer
CN113627534A (en) Method and device for identifying type of dynamic image and electronic equipment
CN113313642A (en) Image denoising method and device, storage medium and electronic equipment
CN112016606A (en) Detection method, device and equipment for application program APP and storage medium
CN113051128B (en) Power consumption detection method and device, electronic equipment and storage medium
CN114173194B (en) Page smoothness detection method and device, server and storage medium
CN113117341B (en) Picture processing method and device, computer readable storage medium and electronic equipment

Legal Events

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