CN113391741B - Operation verification method and device, storage medium and electronic equipment - Google Patents

Operation verification method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN113391741B
CN113391741B CN202011270498.5A CN202011270498A CN113391741B CN 113391741 B CN113391741 B CN 113391741B CN 202011270498 A CN202011270498 A CN 202011270498A CN 113391741 B CN113391741 B CN 113391741B
Authority
CN
China
Prior art keywords
screenshot
pixel
parameter set
target
target operation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011270498.5A
Other languages
Chinese (zh)
Other versions
CN113391741A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202011270498.5A priority Critical patent/CN113391741B/en
Publication of CN113391741A publication Critical patent/CN113391741A/en
Application granted granted Critical
Publication of CN113391741B publication Critical patent/CN113391741B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Tests Of Electronic Circuits (AREA)

Abstract

The invention discloses an operation verification method and device, a storage medium and electronic equipment. Wherein the method comprises the following steps: acquiring a plurality of operation screenshots; determining a common pixel parameter set and a difference pixel parameter set of a plurality of operation screenshots; verifying a target operation screenshot to be verified through the common pixel parameter set and the difference pixel parameter set, wherein the target operation screenshot is a screenshot of a result interface obtained after target operation is performed on a target operation area; and under the condition that the target operation screenshot reaches the verification condition, determining the target operation as normal operation. The invention solves the technical problem of low operation verification accuracy.

Description

Operation verification method and device, storage medium and electronic equipment
Technical Field
The present invention relates to the field of computers, and in particular, to an operation verification method and apparatus, a storage medium, and an electronic device.
Background
In the prior art, in the process of verifying whether the target operation is normal, whether the target operation to be verified is normal or not can be determined by comparing the similarity of the screenshot of the result obtained after the target operation to be verified is executed and the screenshot of the result obtained after the normal target operation is executed.
However, merely checking whether the target operation is normal by comparing the similarity of the pictures cannot obtain an accurate check result, resulting in low accuracy of operation check.
In view of the above problems, no effective solution has been proposed at present.
Disclosure of Invention
The embodiment of the invention provides an operation verification method and device, a storage medium and electronic equipment, which are used for at least solving the technical problem of low operation verification accuracy.
According to an aspect of an embodiment of the present invention, there is provided an operation checking method, including: acquiring a plurality of operation screenshots, wherein each operation screenshot in the plurality of operation screenshots is a screenshot of a result interface obtained after an operation is performed on a target operation area in an operation interface; determining a common pixel parameter set and a difference pixel parameter set of the plurality of operation screen shots, wherein the common pixel parameter set comprises pixels with the same pixel value at the same position in the plurality of operation screen shots, and the difference pixel parameter set comprises the number of pixels with different pixel values at the same position between every two operation screen shots in the plurality of operation screen shots; verifying a target operation screenshot to be verified through the common pixel parameter set and the difference pixel parameter set, wherein the target operation screenshot is a screenshot of a result interface obtained after target operation is performed on the target operation area; and under the condition that the target operation screenshot reaches the verification condition, determining the target operation as normal operation.
According to another aspect of the embodiment of the present invention, there is also provided an operation checking device, including: the device comprises an acquisition unit, a display unit and a display unit, wherein the acquisition unit is used for acquiring a plurality of operation screenshots, wherein each operation screenshot in the plurality of operation screenshots is a screenshot of a result interface obtained after an operation is performed on a target operation area in an operation interface; a first determining unit, configured to determine a common pixel parameter set and a differential pixel parameter set of the multiple operation shots, where the common pixel parameter set includes pixels with the same pixel value at the same position in the multiple operation shots, and the differential pixel parameter set includes the number of pixels with different pixel values at the same position between every two operation shots in the multiple operation shots; the verification unit is used for verifying a target operation screenshot to be verified through the common pixel parameter set and the difference pixel parameter set, wherein the target operation screenshot is a screenshot of a result interface obtained after the target operation is executed on the target operation area; and the second determining unit is used for determining the target operation as normal operation under the condition that the target operation screenshot reaches the verification condition.
As an optional example, the first determining unit includes: a third obtaining module, configured to obtain a pixel matrix of each of the plurality of operation shots, where the pixel matrix includes a pixel value of each pixel of the operation shot and a position of each pixel; and a second determining module, configured to determine, when pixel values of pixel points at a second location are the same in the plurality of pixel matrices, the pixel point at the second location as one pixel point in the common pixel parameter set, where the second location is any one location in the pixel matrix.
As an optional example, the first determining unit includes: the processing module is used for taking any one of the operation screen shots as a first operation screen shot, taking each operation screen shot except the first operation screen shot of the operation screen shots as a second operation screen shot in sequence, and executing the following operations on the first operation screen shot and the second operation screen shot: and adding 1 to a statistical parameter when pixel values of pixels at the same position in the first operation screen shot and the second operation screen shot are different, wherein an initial value of the statistical parameter is zero, the statistical parameter is used for representing the number of pixels with different pixel values of pixels at the same position in the first operation screen shot and the second operation screen shot, and the statistical parameter is used as one parameter in the differential pixel parameter set after traversing each pixel of the first operation screen shot and the second operation screen shot.
As an optional example, the first determining unit includes: a fourth obtaining module, configured to obtain a plurality of first screenshots under the condition that a common pixel parameter set and a differential pixel parameter set of the plurality of operation screenshots are determined, where each of the plurality of first screenshots is a screenshot of a result interface obtained after the operation is performed on a target operation area in an operation interface; the third determining module is used for taking the plurality of operation screenshots and the plurality of first screenshots as a plurality of second screenshots; a fourth determining module, configured to determine a common pixel parameter set and a differential pixel parameter set of the plurality of second shots; and a fifth determining module, configured to determine, when the common pixel parameter set of the second screenshot is the same as the common pixel parameter set of the plurality of operation shots and the difference pixel parameter set of the second screenshot is the same as the difference pixel parameter set of the plurality of operation shots, the common pixel parameter set and the difference pixel parameter set of the second screenshot as the common pixel parameter set and the difference pixel parameter set of the plurality of operation shots.
According to a further aspect of embodiments of the present invention, there is also provided a computer-readable storage medium having a computer program stored therein, wherein the computer program is configured to perform the above-described operation checking method when run.
According to still another aspect of the embodiments of the present invention, there is also provided an electronic device including a memory in which a computer program is stored, and a processor configured to execute the above-described operation checking method by the above-described computer program.
In the embodiment of the invention, a plurality of operation screenshots are acquired, wherein each operation screenshot in the plurality of operation screenshots is a screenshot of a result interface obtained after an operation is performed on a target operation area in an operation interface; determining a common pixel parameter set and a difference pixel parameter set of the plurality of operation screen shots, wherein the common pixel parameter set comprises pixels with the same pixel value at the same position in the plurality of operation screen shots, and the difference pixel parameter set comprises the number of pixels with different pixel values at the same position between every two operation screen shots in the plurality of operation screen shots; verifying a target operation screenshot to be verified through the common pixel parameter set and the difference pixel parameter set, wherein the target operation screenshot is a screenshot of a result interface obtained after target operation is performed on the target operation area; under the condition that the target operation screenshot reaches the verification condition, the method for determining the target operation to be the normal operation is characterized in that in the method, in the process of verifying the target operation, a plurality of operation screenshots after the target region is operated are obtained, and the target operation screenshot of the target operation is verified through a common pixel point parameter set and a difference pixel point parameter set of the plurality of operation screenshots, so that the target operation screenshot can be verified from the common pixel part and the difference pixel part, the verification accuracy of the target operation screenshot is improved, and the technical problem of low operation verification accuracy is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
FIG. 1 is a schematic illustration of an application environment for an alternative operation verification method according to an embodiment of the present application;
FIG. 2 is a schematic illustration of an application environment for an alternative operation verification method according to an embodiment of the present application;
FIG. 3 is a flow chart of an alternative operation verification method according to an embodiment of the application;
FIG. 4 is an operational acquisition schematic of an alternative operational verification method according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a common pixel parameter set for an alternative operation verification method according to an embodiment of the application;
FIG. 6 is a schematic diagram of an alternative operation verification method for comparing a common pixel parameter set to a first pixel set according to an embodiment of the present application;
FIG. 7 is a schematic diagram of an alternative operation verification method for obtaining a first number in accordance with an embodiment of the application;
FIG. 8 is a flow chart of an alternative operation verification method according to an embodiment of the application;
FIG. 9 is a schematic diagram of a verification target operation screenshot of an alternative operation verification method in accordance with an embodiment of the invention;
FIG. 10 is a schematic diagram of an alternative operation checking device according to an embodiment of the present invention;
fig. 11 is a schematic structural view of an alternative electronic device according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an aspect of the embodiment of the present invention, there is provided an operation checking method, optionally, as an alternative implementation, the operation checking method may be applied, but not limited to, in the environment shown in fig. 1.
As shown in fig. 1, the terminal device 102 includes a memory 104 for storing various data generated during operation of the terminal device 102, a processor 106 for processing and operating the various data, and a display 108 for displaying a verification result. An application client may be run on the terminal device 102. Terminal device 102 may interact with server 112 via network 110. The terminal device 102 may send a plurality of operation shots and a target operation shot to the server 112 through S102, S104, the server 112 may check the target operation shot and S106 issue the check result to the terminal device 102, so that the terminal device 102 displays the check result. The server 112 includes a database 114 for storing operation shots and target operation shots, and a processing engine 116 for determining verification results. The terminal device 102 may display the verification result.
As an alternative embodiment, the above-described operation verification method may be applied, but not limited to, in the environment shown in fig. 2.
As shown in fig. 2, the terminal device 202 includes a memory 204 for storing various data generated during operation of the terminal device 202, a processor 206 for processing and operating the various data, and a display 208 for displaying the verification result. The terminal device 202 may execute S202 to S208 to obtain a common pixel parameter set and a differential pixel parameter set of the multiple operation shots, and verify the target operation shot to obtain a verification result, and display the verification result.
Alternatively, in the present embodiment, the terminal device 102 or the terminal device 202 may be a terminal device configured with a target client, and may include, but is not limited to, at least one of the following: a mobile phone (e.g., an Android mobile phone, iOS mobile phone, etc.), a notebook computer, a tablet computer, a palm computer, a MID (Mobile Internet Devices, mobile internet device), a PAD, a desktop computer, a smart television, etc. The target client may be a video client, an instant messaging client, a browser client, an educational client, and the like. The network may include, but is not limited to: a wired network, a wireless network, wherein the wired network comprises: local area networks, metropolitan area networks, and wide area networks, the wireless network comprising: bluetooth, WIFI, and other networks that enable wireless communications. The server may be a single server, a server cluster composed of a plurality of servers, or a cloud server. The above is merely an example, and is not limited in any way in the present embodiment.
Optionally, as an optional embodiment, as shown in fig. 3, the operation checking method includes:
s302, acquiring a plurality of operation screenshots, wherein each operation screenshot in the plurality of operation screenshots is a screenshot of a result interface obtained after an operation is performed on a target operation area in an operation interface;
s304, determining a common pixel parameter set and a differential pixel parameter set of a plurality of operation screen shots, wherein the common pixel parameter set comprises pixels with the same pixel value at the same position in the plurality of operation screen shots, and the differential pixel parameter set comprises the number of pixels with different pixel values at the same position between every two operation screen shots in the plurality of operation screen shots;
s306, verifying a target operation screenshot to be verified through the common pixel parameter set and the difference pixel parameter set, wherein the target operation screenshot is a screenshot of a result interface obtained after target operation is performed on a target operation area;
s308, determining that the target operation is normal operation under the condition that the target operation screenshot reaches the verification condition.
Alternatively, the above operation checking method may be, but not limited to, in the process of applying and checking whether the operation is normal. For example, the operation may be one or a combination of several of a single click, a double click, a continuous click, a drag, a slide, a press operation performed by the input device, and verifying whether the operation is normal may include verifying whether an operation position and an operation type of the operation are normal, for example, verifying whether the target operation is a click operation performed on a button of the target operation area, or verifying whether the target operation is normal may be verifying whether an operation result after the target operation is performed is normal. For example, it is verified whether or not the result obtained after the click operation is performed on the button of the target operation area is normal. If the operation result of the target operation is verified to be normal, the target operation is the same as the operation performed when the multiple operation screenshots are acquired.
Alternatively, the operational scenario of the above-described operation verification method is not limited. For example, it may be applied in a scenario to an application or system or a combination of both.
If the method is applied to the process of judging whether the target operation of the application program is normal, a plurality of operation screenshots for executing the operation of the application program can be obtained, a common pixel point parameter set and a difference pixel point parameter set of the operation screenshots are obtained, then the target operation is executed for the application program, and whether the target operation is normal is determined by checking the target operation screenshots.
For another example, whether the operation result of the target operation of the system is normal or not is judged, and multiple operation screenshots for performing the operation on the system, such as performing a right click-view operation on the system, may be obtained. And then, a common pixel parameter set and a difference pixel parameter set of a plurality of operation screenshots are obtained, and then, a right click-view operation, namely a target operation, is executed to obtain the target operation screenshots. And checking the target operation screenshot through the common pixel point parameter set and the difference pixel point parameter set, and determining whether the target operation is normal. If the system has problems, such as right key failure or operation failure checking, the target operation screenshot is determined to be abnormal after verification, and then the target operation is determined to be abnormal. The abnormal operation result of the target operation and the abnormal function corresponding to the execution of the target operation can be determined.
Optionally, the target operation area in the present application may be a display interface, or may be an area in the display interface. Performing an operation in a display interface may cause a change in the display interface. In the embodiment of the application, the screenshot of the result interface obtained after the operation is executed is the picture obtained after the operation is executed in the target operation area. A time value, such as 3 seconds after the execution of the operation, may be preset to perform the screenshot, so as to obtain the operation screenshot.
Alternatively, in the embodiment of the present application, the operations performed may be single operations or may be a combination of operations. The operation combination comprises a plurality of operations, which can be identical or different, and can be coherent or have intervals in between. For example, clicking once every two seconds, three times in total.
Taking the combination operation as an example, as shown in fig. 4, the press button 402 is dragged from the initial position to the target position release button 402 in the target operation area, and the combination operation 404 is correspondingly acquired.
Optionally, in the embodiment of the present application, if it is determined that the target operation screenshot reaches the verification condition, that is, the verification result is normal, it may be determined that the target operation is normal. If the verification is a process of the verification function, such as a system function or an application function, if the verification result is normal, the system function or the application function is normal. If the operation result is checked, if the check result of the target operation picture is normal, the operation result after the target operation is executed is normal.
The description is made with reference to a specific example. For example, a search button is clicked on a display interface of an application program to obtain a search result, and the search result is subjected to screenshot for one operation to obtain a plurality of operation screenshots. And determining a common pixel parameter set and a difference pixel parameter set of a plurality of operation screenshots. In the testing process, clicking a search button on a display interface of an application program at a certain time to obtain a search result, checking a target operation screenshot obtained by screenshot of the search result through a common pixel parameter set and a difference pixel parameter set to obtain a check result, and checking whether the result obtained by clicking the search button on the display interface of the application program in the testing process is normal or not. If the search function does not respond, or the network is disconnected, the search results should be abnormal. It is further determined that the search button is abnormal.
In some embodiments, a plurality of reference operation screenshots can be provided in advance to determine a common pixel parameter set and a difference pixel parameter set of the reference operation screenshots, then the operation screenshots obtained in the test are checked through the common pixel parameter set and the difference pixel parameter set, and the common pixel parameter set and the difference pixel parameter set can be customized according to the wish of a user or the service requirement by providing the reference operation screenshots in advance, so that the user-defined requirement is met, and the detection pertinence is stronger. In other embodiments, multiple operation shots may be acquired during the use or testing process, a common pixel parameter set and a differential pixel parameter set of the multiple operation shots are automatically determined according to the multiple operation shots, and a target operation shot is checked through the common pixel parameter set and the differential pixel parameter set, where the target operation shot may be one of the multiple operation shots or may be acquired by a user in other manners.
By the method, the verification result of the target operation screenshot can be determined by using the common pixel parameter set and the difference pixel parameter set of the plurality of operation screenshots, so that whether the target operation is normal or not is determined, and the effect of improving the accuracy of the verification operation is realized.
As an optional implementation manner, verifying the target operation screenshot to be verified through the common pixel parameter set and the difference pixel parameter set includes:
acquiring a first pixel point set of a target operation screenshot, wherein the position of a pixel point in the first pixel point set in the target operation screenshot is the same as the position of a pixel point in any operation screenshot in a common pixel point parameter set;
acquiring first numbers of pixel points with different pixel values at the same position between a target operation screenshot and any operation screenshot, and acquiring a plurality of first numbers;
and under the condition that the pixel values of the pixel points at the same positions in the first pixel point set and the common pixel point parameter set are the same and a plurality of first numbers belong to different pixel point parameter sets, determining that the target operation screenshot reaches a verification condition.
Optionally, the purpose of obtaining the first pixel set is to compare the first pixel set with the common pixel parameter set, so as to verify the first pixel set with the common pixel parameter set, that is, to verify the target operation screenshot with the common pixel parameter set. The common pixel parameter set may include pixels having the same pixel value at the same location in the plurality of operation shots. The common pixel parameter set may be a pixel value matrix of pixels, including pixels with different pixel values may be set to a specific value, for example 0 or-1. As shown in fig. 5, fig. 5 is an alternative common pixel parameter set. In fig. 5, the pixel points with positive values represent that the pixel points at the same position in all the operation pictures are all values in the common pixel point parameter set. And the pixel point with the value of-1 indicates that the pixel values of the pixel points at corresponding positions in at least two operation pictures are different. Fig. 5 is merely an example, and the pixels of the operation picture are far more than the illustration of fig. 5. The first pixel point set is compared with the common pixel point parameter set, for example, as shown in fig. 6, the left side of fig. 6 is the first pixel point set, and the right side of fig. 6 is the common pixel point parameter set. And comparing whether the pixel values of the first pixel point set and the common pixel point parameter set are the same or not. When in comparison, only the pixel values of the pixel points with the pixel values not being-1 need to be compared. The pixel value of the pixel point with the pixel value of-1 is still-1 after comparison. In fig. 6, the case 602 is the case where the pixel values are the same, and the case 604 is the case where the pixel values are different. As long as the common pixel parameter set and the first pixel set have different pixel values in the case 604, the verification of the target operation picture does not reach the verification condition. One of the check conditions requires that the common pixel parameter set is the same as the pixel value of the pixel at the same position of the first pixel set (excluding the position where the pixel value is-1).
Optionally, the target operation screenshot is checked by using the difference pixel parameter set, and the first number of the target operation screenshot and each operation screenshot in the plurality of operation shots may be obtained first. The first number is the number of pixels with different pixel values at the same position in the operation screen shot of any one of the operation screen shots in the comparison operation screen shot and the plurality of operation screen shots. For example, for any operation screen, the pixel values of the pixels at the same position in the operation screen and the target operation screen are compared. As shown in fig. 7, the left side in fig. 7 is the pixel value of the pixel of the operation screen shot, and the right side is the pixel value of the pixel of the target operation screen shot. The pixel values 702 in fig. 7 are different and a first number needs to be counted. The first number is counted as 4.
If the pixel values of the pixels at the same position of the first pixel point set and the common pixel point parameter set are the same, and the first quantity belongs to the difference pixel point parameter set, the verification of the target operation screenshot is passed, and the target operation screenshot is considered to reach the verification condition. By the embodiment, the target operation screenshot can be accurately checked, and the checking accuracy is improved.
As an alternative embodiment, acquiring the first set of pixels of the target operation screenshot includes:
Acquiring a first position of each pixel in a common pixel parameter set;
acquiring a first pixel point of a first position from a target operation screenshot;
and determining the first pixel points as the pixel points in the first pixel point set.
Alternatively, since the first pixel set of the target operation screen shot and the pixel values of the pixels of the common pixel parameter set of the plurality of operation screen shots need to be compared, the pixel points with the same positions as the pixels in the common pixel parameter set need to be acquired from the target operation screen shot.
Or if the common pixel parameter set is a pixel value matrix of the pixels, the pixels with the pixel values being the original values in the common pixel parameter set can be obtained, and then the pixels with the same positions as the pixels with the pixel values being the original values in the common pixel parameter set in the target operation screenshot are determined to be the pixels in the first pixel set. In other words, in the process of comparing the first pixel point set with the common pixel point parameter set, only the pixel point with the pixel value as the original value in the common pixel point parameter set and the corresponding pixel point in the target operation screenshot need to be compared, so that the comparison efficiency is improved.
As an optional implementation manner, obtaining the first number of pixels with different pixel values at the same position between the target operation screenshot and any operation screenshot includes:
Determining any operation screenshot as a current operation screenshot, and executing the following operations on the target operation screenshot and the current operation screenshot: and under the condition that the pixel values of the pixel points at any same position of the target operation screenshot and the current operation screenshot are different, increasing the first quantity of the target operation screenshot and the current operation screenshot by 1, wherein the initial value of the first quantity of the target operation screenshot and the current operation screenshot is zero.
That is, the pixel values of the pixels at the same position of the target operation screen shot and each of the current operation screen shots are compared, if the pixel values of the pixels at the same position are the same, no record is made, and if the pixel values of the pixels at the same position are different, the first number is added by 1, so that the number of pixels with different pixel values at the same position in the target operation screen shot and the current operation screen shot is recorded. And judging whether the first quantity belongs to a difference pixel point parameter set. Since there may be a plurality of first numbers, it is necessary to determine whether each of the first numbers belongs to a difference pixel parameter set. If the first quantity which does not belong to the difference pixel parameter set exists, the verification of the target operation screenshot is not passed, and the verification condition is not reached.
As an alternative embodiment, determining the common pixel parameter set of the plurality of operation shots includes:
acquiring a pixel matrix of each operation screenshot of a plurality of operation shots, wherein the pixel matrix comprises a pixel value of each pixel point of the operation screenshot and a position of each pixel point;
and determining the pixel point at the second position as one pixel point in the common pixel point parameter set under the condition that the pixel values of the pixel points at the second position are the same in the plurality of pixel matrixes, wherein the second position is any position in the pixel matrixes.
Alternatively, determining the common pixel parameter set may first determine whether pixel values of pixels at each same location in the plurality of operation shots are the same. If the pixel values of the pixel points at the same position of each of the plurality of operation screen shots are the same, the operation screen shots are the same operation screen shots. If the pixel values of the pixel points at the same position are different, the operation screen shots are different. The common pixel parameter set is used for storing the pixel values and the positions of the pixel points which are the same. By the embodiment, the effect of improving the accuracy of the common pixel parameter set can be achieved.
As an alternative embodiment, determining the difference pixel parameter set of the plurality of operation shots includes:
taking any one of the plurality of operation screen shots as a first operation screen shot, taking each operation screen shot except the first operation screen shot of the plurality of operation screen shots as a second operation screen shot in sequence, and executing the following operations on the first operation screen shot and the second operation screen shot: and under the condition that the pixel values of the pixels at the same positions in the first operation screenshot and the second operation screenshot are different, adding 1 to the statistical parameter, wherein the initial value of the statistical parameter is zero, the statistical parameter is used for representing the number of pixels with different pixel values of the pixels at the same positions in the first operation screenshot and the second operation screenshot, and after traversing each pixel of the first operation screenshot and the second operation screenshot, taking the statistical parameter as one parameter in a difference pixel parameter set.
Optionally, when comparing the difference pixel parameter sets, after obtaining multiple operation screenshots, the statistical parameters between every two operation screenshots need to be obtained. I.e. the number of pixels with different pixel values at the same location. And comparing every two operation screenshots from the first pixel point, if the pixel values are the same, not processing, and if the pixel values are different, adding 1 to the statistical parameter, and traversing every two operation screenshots to obtain the statistical parameter of every two operation screenshots. And taking the statistical parameter as one parameter in the differential pixel point parameter set.
As an alternative embodiment, determining the common pixel parameter set and the differential pixel parameter set of the plurality of operation shots includes:
under the condition that a common pixel point parameter set and a difference pixel point parameter set of a plurality of operation screen shots are determined, a plurality of first screen shots are obtained, wherein each first screen shot in the plurality of first screen shots is a screen shot of a result interface obtained after the operation is performed on a target operation area in an operation interface;
taking the plurality of operation screen shots and the plurality of first screen shots as a plurality of second screen shots;
determining a common pixel parameter set and a difference pixel parameter set of the second screenshot;
and under the condition that the common pixel parameter set of the second screenshot is the same as the common pixel parameter set of the plurality of operation screenshots and the difference pixel parameter set of the second screenshot is the same as the difference pixel parameter set of the plurality of operation screenshots, determining the common pixel parameter set and the difference pixel parameter set of the second screenshot as the common pixel parameter set and the difference pixel parameter set of the plurality of operation screenshots.
Optionally, in the embodiment of the present application, after obtaining multiple operation shots, determining a common pixel parameter set and a differential pixel parameter set, one or more operation shots may be obtained again, and determining a new common pixel parameter set and a differential pixel parameter set of the obtained operation shots and the multiple operation shots. For example, two or more operation screen shots are obtained first, taking two operation screen shots as an example, for the operation screen shot 1 and the operation screen shot 2, a common pixel parameter set and a differential pixel parameter set of the operation screen shot 1 and the operation screen shot 2 are determined, then one operation screen shot 3 is obtained, and a common pixel parameter set and a differential pixel parameter set of the operation screen shots 1-3 are determined. If the common pixel parameter set and the differential pixel parameter set of the operation screen shots 1-3 are different from the common pixel parameter set and the differential pixel parameter set of the operation screen shots 1 and 2, the common pixel parameter set and the differential pixel parameter set of the operation screen shots 1-3 are reserved. The operation screen shot 4 may be reacquired and the common pixel parameter set and the difference pixel parameter set of operation screen shots 1-4 determined. If the common pixel parameter set and the differential pixel parameter set of the operation screen shots 1-4 are different from the common pixel parameter set and the differential pixel parameter set of the operation screen shots 1-3, the common pixel parameter set and the differential pixel parameter set of the operation screen shots 1-4 are reserved. If the common pixel parameter set and the difference pixel parameter set of the operation screen shots 1-4 are the same as the common pixel parameter set and the difference pixel parameter set of the operation screen shots 1-3, the condition that the parameter sets are the same once is considered to occur. If the multiple parameter sets are the same, for example, the common pixel parameter set and the differential pixel parameter set of the operation screen shots 1-5 are the same as the common pixel parameter set and the differential pixel parameter set of the operation screen shots 1-4, then the current common pixel parameter set and the differential pixel parameter set can be considered to be the common pixel parameter set and the differential pixel parameter set which are already in accordance with the requirements, the common pixel parameter set and the differential pixel parameter set which are in accordance with the requirements are determined as the common pixel parameter set and the differential pixel parameter set of the operation screen shots, and the common pixel parameter set and the differential pixel parameter set of the operation screen shots are used for checking the target operation screen shots. The above case where the parameter sets are identical in a plurality of consecutive occurrences may be set according to actual situations, for example, set to 3. By the method, the accuracy of the determined common pixel parameter set and the determined difference pixel parameter set is improved.
As an alternative embodiment, obtaining the plurality of operation shots includes:
acquiring an operation executed on a target operation area in an operation interface;
automatically executing the operation to obtain a screenshot of the result interface under the condition of obtaining the result interface of the operation to obtain one operation screenshot of a plurality of operation screenshots;
and repeatedly executing the operation, and capturing a screenshot of the result interface to obtain a plurality of operation screenshots.
Optionally, in the embodiment of the present application, an operation performed by a user in a target operation area may be recorded. Such as recording down operation content, operation track, etc. Then, automatic playback is performed, which can automatically perform the operation that the user has performed, without requiring the user to perform the operation again. And after automatic playback, the screenshot can be carried out, and an operation screenshot is obtained.
For example, the user may save after performing an operation, then set the number of playback times, such as 100 times, and then after the user clicks on to start, the system automatically plays back the operation performed by the user and automatically captures a screen to obtain 100 operation captures. By the embodiment, the effect of improving the efficiency of acquiring the operation screenshot is achieved.
The above operation checking method is explained below in connection with a specific example.
In the embodiment of the application, the common pixel parameter set and the difference pixel parameter set for determining the operation screenshot can be learned in advance. And after learning to obtain the common pixel parameter set and the differential pixel parameter set, the common pixel parameter set and the differential pixel parameter set are used. It should be noted that the embodiments of the present application do not necessarily have to explicitly demarcate learning and use at the time of execution, but rather are explained in two stages.
Recording engine: an engine records user behavior. The operations performed by the user may be recorded.
Playback engine: an engine for playing back user behavior can automatically play back operations performed by a user, namely, automatically perform operations performed by the user.
In the recording process, a user can click to start recording and end recording to record operation, and the recorded operation is recorded and added with a unique identifier. Such as by clicking a button on the screen. After the recording is completed, the recording operation may be saved. The operation may be played back by a playback engine. The playback operation process does not need user participation, and only needs the user to set the playback times. If playback is 100 times, the button is clicked 100 times. During playback, the results of each playback may be screenshot. For example, clicking a button once to capture a screenshot results in an operation screenshot. Of course, the recorded operation screen shots obtained by different operations and playback operations need to be stored differently. The present embodiment is explained taking an example involving an operation. The embodiment of the application can also take the gray level diagram of the operation screenshot as the operation screenshot. The comparison pixel value may be a comparison gray value.
After obtaining the operation screenshot of the above operation, learning of the common pixel parameter set and the differential pixel parameter set may be performed. If the pixel values of the pixels at a position of each operation screen shot are the same as the three operation screen shots, for example, the pixel values of the pixels at the 1 st row and the 3 rd column of each operation screen shot are 175, the pixels at the position should be saved in the common pixel parameter set. The common pixel parameter set records the position and the pixel value of the pixel. If the pixel values of any at least two operation shots at a position are different, the pixel value of the position in the common pixel parameter set can be set to-1. And after comparing the three operation screenshots, obtaining a common pixel point parameter set of the three operation screenshots. The difference pixel parameter set is the number of pixels with different pixel values at the same position between every two of the three operation screen shots. If the pixel values of the first row and the first column of the first operation screenshot are different from the pixel values of the second operation screenshot, counting from 0, and increasing the count by 1 when the pixel value of each pixel is different until the first operation screenshot and the second operation screenshot are traversed, so as to obtain the number of the pixel points with different pixel values at the same position of the first operation screenshot and the second operation screenshot. This number is taken as one parameter in the difference pixel parameter set. The different pixel point parameter sets have a plurality of parameters, and if the parameters are the same, the parameters are combined into one parameter. For example, three operation shots obtain a difference pixel parameter set: {12575,2254,11355}.
Of course, the common pixel parameter set and the differential pixel parameter set of the three operation shots may be unstable. If the fourth operation screenshot is obtained, determining a common pixel parameter set and a difference pixel parameter set of the first to fourth operation shots, and if the common pixel parameter set and the difference pixel parameter set of the three operation shots are different from each other, storing a new common pixel parameter set and a new difference pixel parameter set. For example, the new set of difference pixel parameters may be {12575, 2254, 11355, 2700, 5900, 10600}. If the fifth operation screenshot is obtained, then obtaining a public pixel parameter set and a difference pixel parameter set of the first to fifth operation screenshots, and storing a new public pixel parameter set and a new difference pixel parameter set. If the operation screen shots are continuously acquired, such as the sixth operation screen shot, the seventh operation screen shot and the eighth operation screen shot, in the process of acquiring the sixth operation screen shot, the common pixel parameter set and the difference pixel parameter set of the first to sixth operation screen shots, the common pixel parameter set and the difference pixel parameter set of the first to seventh operation screen shots, the common pixel parameter set and the difference pixel parameter set of the first to eighth operation screen shots are not changed any more and are the same as the common pixel parameter set and the difference pixel parameter set of the fifth operation screen shot, the common pixel parameter set and the difference pixel parameter set of the current operation screen shot are considered to be stable. That is, the common pixel parameter set and the differential pixel parameter set of the operation screen shot which are continuously acquired are not changed for a plurality of times, so that the operation screen shot is stable. If the operation screenshot is continuously acquired, if the target operation screenshot is acquired, the target operation screenshot can be checked by using the common pixel parameter set and the difference pixel parameter set of the stable operation screenshot.
The flowchart may be as shown in steps S802 to S816 of fig. 8. S802, recording user operation, S804, replaying the user operation to obtain an operation screenshot, S806, determining a public pixel parameter set and a difference pixel parameter set, S808, continuously obtaining the operation screenshot to obtain a stable public pixel parameter set and a stable difference pixel parameter set, S810, storing the public pixel parameter set and the difference pixel parameter set, S812, obtaining a target operation screenshot, 814, checking the target operation screenshot by using the public pixel parameter set and the difference pixel parameter set, S816, and displaying a checking result. Specifically, after the recording engine finishes recording a scene, that is, after the recording user operates, the background server obtains all information of the scene, such as specific information of an operation track, an operation type and the like, and automatically issues a specified number of learning tasks (configurable, default is 3), that is, automatically executes the operation three times. The playback engine completes the analysis execution, automatically executes three operations, and reports the screenshot information after the operation execution is completed each time. According to each acquired operation screenshot, the algorithm firstly carries out data iteration on all submitted operation shots to calculate a public part, namely a public pixel parameter set, the result is a two-dimensional matrix, the original value is reserved if the two-dimensional matrix is the same, the difference value is calculated as-1 if the two-dimensional matrix is different, and secondly calculates the difference part, and the two-to-two comparison is carried out on the shots to obtain a difference pixel number list, namely a difference pixel parameter set. And storing the obtained public two-dimensional matrix and the difference pixel number list, and finally, if the public two-dimensional matrix and the difference pixel number list are not changed in the 3 newly reported screenshots, indicating that the mode is stable, and storing the mode after the learning stage is finished. In this mode, that is, under the user operation, if the user operation is performed again to obtain the target operation screenshot, the target operation screenshot may be verified using the saved mode. The modes may be user operations, and different user operations correspond to different modes. The results can be shown in fig. 9. For a target operation screen, the target operation screen may be identical to one of the operation screens. The two-dimensional matrix of gray values or the two-dimensional matrix of pixel values of the target operation screen shot is identical to one of the plurality of operation screen shots S902, and the gray values are compared with the pixel values of the two-dimensional matrix. If the contents of the target operation screenshot and the operation screenshot are the same, the same part is compared with the common pixel parameter set, that is, S904, the pixel value or the gray value of the two-dimensional matrix of the common part is compared. For the portion of difference, it may be compared whether the number of pixels of the portion of difference belongs to the difference pixel parameter set, as in S906, whether the number of pixels of the two-dimensional matrix of the portion of difference is located in the difference pixel parameter set, or whether the number of pixels of the two-dimensional matrix of the portion of difference is located in the sum of the difference pixel parameter set and the error value, as in S908. For example, if one parameter of the differential pixel parameter set is 50000 and +2000 and-2000 are error values, the number of differential pixels is considered to be in the differential pixel parameter set as long as the number of differential pixels is between 48000 and 52000. It should be noted that, the steps S902 to S908 may be performed alternatively or additionally, and the execution is not limited to the sequence.
In the verification process, when the playback engine receives a verification task, the screenshot records are imported into a verification table. When the picture verification engine finds that the task to be verified exists in the verification table, an algorithm of a verification stage is executed, the picture to be verified is subjected to public two-dimensional matrix matching, and the difference pixel number calculation is carried out on the picture to be verified and the picture of any learning stage.
It should be noted that, for simplicity of description, the foregoing method embodiments are all described as a series of acts, but it should be understood by those skilled in the art that the present invention is not limited by the order of acts described, as some steps may be performed in other orders or concurrently in accordance with the present invention. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required for the present invention.
According to another aspect of the embodiment of the present invention, there is also provided an operation verification device for implementing the operation verification method. As shown in fig. 10, the apparatus includes:
an obtaining unit 1002, configured to obtain a plurality of operation screenshots, where each operation screenshot in the plurality of operation screenshots is a screenshot of a result interface obtained after an operation is performed on a target operation area in an operation interface;
A first determining unit 1004, configured to determine a common pixel parameter set and a differential pixel parameter set of the multiple operation shots, where the common pixel parameter set includes pixels with the same pixel value at the same position in the multiple operation shots, and the differential pixel parameter set includes the number of pixels with different pixel values at the same position between every two operation shots in the multiple operation shots;
the verification unit 1006 is configured to verify, through the common pixel parameter set and the differential pixel parameter set, a target operation screenshot to be verified, where the target operation screenshot is a screenshot of a result interface obtained after the target operation is performed on the target operation area;
and a second determining unit 1008, configured to determine that the target operation is a normal operation if the target operation screenshot reaches the verification condition.
Alternatively, the operation checking device may be, but not limited to, an application and a process of checking whether the operation is normal. For example, the operation may be one or a combination of several of a single click, a double click, a continuous click, a drag, a slide, a press operation performed by the input device, and verifying whether the operation is normal may include verifying whether an operation position and an operation type of the operation are normal, for example, verifying whether the target operation is a click operation performed on a button of the target operation area, or verifying whether the target operation is normal may be verifying whether an operation result after the target operation is performed is normal. For example, it is verified whether or not the result obtained after the click operation is performed on the button of the target operation area is normal. If the operation result of the target operation is verified to be normal, the target operation is the same as the operation performed when the multiple operation screenshots are acquired.
Alternatively, the operational scenario of the above-described operation verification method is not limited. For example, it may be applied in a scenario to an application or system or a combination of both.
If the method is applied to the process of judging whether the target operation of the application program is normal, a plurality of operation screenshots for executing the operation of the application program can be obtained, a common pixel point parameter set and a difference pixel point parameter set of the operation screenshots are obtained, then the target operation is executed for the application program, and whether the target operation is normal is determined by checking the target operation screenshots.
For another example, whether the operation result of the target operation of the system is normal or not is judged, and multiple operation screenshots for performing the operation on the system, such as performing a right click-view operation on the system, may be obtained. And then, a common pixel parameter set and a difference pixel parameter set of a plurality of operation screenshots are obtained, and then, a right click-view operation, namely a target operation, is executed to obtain the target operation screenshots. And checking the target operation screenshot through the common pixel point parameter set and the difference pixel point parameter set, and determining whether the target operation is normal. If the system has problems, such as right key failure or operation failure checking, the target operation screenshot is determined to be abnormal after verification, and then the target operation is determined to be abnormal. The abnormal operation result of the target operation and the abnormal function corresponding to the execution of the target operation can be determined.
For other examples of this embodiment, please refer to the above examples, and the description thereof is omitted.
According to still another aspect of the embodiment of the present invention, there is also provided an electronic device for implementing the above operation checking method, which may be a terminal device or a server as shown in fig. 11. The present embodiment is described taking the electronic device as an example. As shown in fig. 11, the electronic device comprises a memory 1102 and a processor 1104, the memory 1102 having stored therein a computer program, the processor 1104 being arranged to perform the steps of any of the method embodiments described above by means of the computer program.
Alternatively, in this embodiment, the electronic device may be located in at least one network device of a plurality of network devices of the computer network.
Alternatively, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program:
acquiring a plurality of operation screenshots, wherein each operation screenshot in the plurality of operation screenshots is a screenshot of a result interface obtained after an operation is performed on a target operation area in an operation interface;
determining a common pixel parameter set and a differential pixel parameter set of a plurality of operation screen shots, wherein the common pixel parameter set comprises pixel points with the same pixel value at the same position in the plurality of operation screen shots, and the differential pixel parameter set comprises the number of pixel points with different pixel values at the same position between every two operation screen shots in the plurality of operation screen shots;
Verifying a target operation screenshot to be verified through the common pixel parameter set and the difference pixel parameter set, wherein the target operation screenshot is a screenshot of a result interface obtained after target operation is performed on a target operation area;
and under the condition that the target operation screenshot reaches the verification condition, determining the target operation as normal operation.
Alternatively, it will be understood by those skilled in the art that the structure shown in fig. 11 is only schematic, and the electronic device may be a smart phone (such as an Android mobile phone, an iOS mobile phone, etc.), a tablet computer, a palm computer, a mobile internet device (Mobile Internet Devices, MID), a PAD, etc. Fig. 11 is not limited to the structure of the electronic device and the electronic apparatus described above. For example, the electronics may also include more or fewer components (e.g., network interfaces, etc.) than shown in FIG. 11, or have a different configuration than shown in FIG. 11.
The memory 1102 may be used to store software programs and modules, such as program instructions/modules corresponding to the operation checking method and apparatus in the embodiments of the present invention, and the processor 1104 executes the software programs and modules stored in the memory 1102 to perform various functional applications and data processing, i.e., implement the operation checking method described above. Memory 1102 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, memory 1102 may further include memory located remotely from processor 1104, which may be connected to the terminal via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. The memory 1102 may be used to store, but is not limited to, information such as operation screen shots and target operation screen shots. As an example, as shown in fig. 11, the memory 1102 may include, but is not limited to, the acquisition unit 1002, the first determination unit 1004, the verification unit 1006, and the second determination unit 1008 in the operation verification device. In addition, other module units in the operation checking device may be included, but are not limited to, and are not described in detail in this example.
Optionally, the transmission device 1106 is used to receive or transmit data via a network. Specific examples of the network described above may include wired networks and wireless networks. In one example, the transmission device 1106 includes a network adapter (Network Interface Controller, NIC) that may be connected to other network devices and routers via a network cable to communicate with the internet or a local area network. In one example, the transmission device 1106 is a Radio Frequency (RF) module for communicating wirelessly with the internet.
In addition, the electronic device further includes: a display 1108 for displaying the verification result; and a connection bus 1110 for connecting the respective module parts in the above-described electronic apparatus.
In other embodiments, the terminal device or the server may be a node in a distributed system, where the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the plurality of nodes through a network communication. Among them, the nodes may form a Peer-To-Peer (P2P) network, and any type of computing device, such as a server, a terminal, etc., may become a node in the blockchain system by joining the Peer-To-Peer network.
According to a further aspect of embodiments of the present invention, there is also provided a computer readable storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
Alternatively, in the present embodiment, the above-described computer-readable storage medium may be configured to store a computer program for executing the steps of:
acquiring a plurality of operation screenshots, wherein each operation screenshot in the plurality of operation screenshots is a screenshot of a result interface obtained after an operation is performed on a target operation area in an operation interface;
determining a common pixel parameter set and a differential pixel parameter set of a plurality of operation screen shots, wherein the common pixel parameter set comprises pixel points with the same pixel value at the same position in the plurality of operation screen shots, and the differential pixel parameter set comprises the number of pixel points with different pixel values at the same position between every two operation screen shots in the plurality of operation screen shots;
verifying a target operation screenshot to be verified through the common pixel parameter set and the difference pixel parameter set, wherein the target operation screenshot is a screenshot of a result interface obtained after target operation is performed on a target operation area;
And under the condition that the target operation screenshot reaches the verification condition, determining the target operation as normal operation.
Alternatively, in this embodiment, it will be understood by those skilled in the art that all or part of the steps in the methods of the above embodiments may be performed by a program for instructing a terminal device to execute the steps, where the program may be stored in a computer readable storage medium, and the storage medium may include: flash disk, read-Only Memory (ROM), random-access Memory (Random Access Memory, RAM), magnetic or optical disk, and the like.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
The integrated units in the above embodiments may be stored in the above-described computer-readable storage medium if implemented in the form of software functional units and sold or used as separate products. Based on such understanding, the technical solution of the present invention may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, comprising several instructions for causing one or more computer devices (which may be personal computers, servers or network devices, etc.) to perform all or part of the steps of the method described in the embodiments of the present invention.
In the foregoing embodiments of the present application, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In several embodiments provided by the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, such as the division of the units, is merely a logical function division, and may be implemented in another manner, for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The foregoing is merely a preferred embodiment of the present invention and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present invention, which are intended to be comprehended within the scope of the present invention.

Claims (13)

1. An operation verification method, comprising:
acquiring a plurality of operation screenshots, wherein each operation screenshot in the plurality of operation screenshots is a screenshot of a result interface obtained after an operation is performed on a target operation area in an operation interface;
determining a common pixel parameter set and a difference pixel parameter set of the plurality of operation screen shots, wherein the common pixel parameter set comprises pixels with the same pixel value at the same position in the plurality of operation screen shots, and the difference pixel parameter set comprises the number of pixels with different pixel values at the same position between every two operation screen shots in the plurality of operation screen shots;
And verifying the target operation screenshot to be verified through the common pixel parameter set and the difference pixel parameter set, wherein the verifying comprises the following steps: acquiring a first pixel point set of the target operation screenshot, wherein the position of a pixel point in the first pixel point set in the target operation screenshot is the same as the position of a pixel point in any one operation screenshot in the pixel points in the common pixel point parameter set; acquiring a first number of pixel points with different pixel values at the same position between the target operation screenshot and any operation screenshot, and obtaining a plurality of first numbers; under the condition that the pixel values of the pixel points at the same positions in the first pixel point set and the common pixel point parameter set are the same, and a plurality of first numbers belong to the difference pixel point parameter set, determining that the target operation screenshot reaches a verification condition, wherein the target operation screenshot is a screenshot of a result interface obtained after the target operation is executed on the target operation area;
and under the condition that the target operation screenshot reaches the verification condition, determining the target operation as normal operation.
2. The method of claim 1, wherein the obtaining the first set of pixels of the target operation screen shot comprises:
Acquiring a first position of each pixel in the common pixel parameter set;
acquiring a first pixel point of the first position from the target operation screenshot;
and determining the first pixel point as a pixel point in the first pixel point set.
3. The method of claim 1, wherein the obtaining a first number of pixels having different pixel values at a same location between the target operation screen shot and any one of the operation screen shots comprises:
determining any operation screenshot as a current operation screenshot, and executing the following operations on the target operation screenshot and the current operation screenshot: and under the condition that the pixel values of the pixel points at any same position of the target operation screenshot and the current operation screenshot are different, increasing the first number of the target operation screenshot and the current operation screenshot by 1, wherein the initial value of the first number of the target operation screenshot and the current operation screenshot is zero.
4. The method of claim 1, wherein determining the common set of pixel parameters for the plurality of operational shots comprises:
acquiring a pixel matrix of each operation screenshot of the plurality of operation shots, wherein the pixel matrix comprises a pixel value of each pixel point of the operation screenshot and a position of each pixel point;
And determining the pixel point at the second position as one pixel point in the common pixel point parameter set under the condition that the pixel values of the pixel points at the second position are the same in the pixel matrixes, wherein the second position is any position in the pixel matrixes.
5. The method of claim 1, wherein determining the set of difference pixel parameters for the plurality of operational shots comprises:
taking any one of the operation screen shots as a first operation screen shot, taking each operation screen shot except the first operation screen shot of the operation screen shots as a second operation screen shot in sequence, and executing the following operations on the first operation screen shot and the second operation screen shot: and adding 1 to a statistical parameter under the condition that the pixel values of the pixels at the same position in the first operation screenshot and the second operation screenshot are different, wherein the initial value of the statistical parameter is zero, the statistical parameter is used for representing the number of pixels with different pixel values of the pixels at the same position in the first operation screenshot and the second operation screenshot, and after traversing each pixel of the first operation screenshot and the second operation screenshot, the statistical parameter is used as one parameter in the differential pixel parameter set.
6. The method of claim 1, wherein determining the common pixel parameter set and the difference pixel parameter set for the plurality of operational shots comprises:
under the condition that a common pixel parameter set and a difference pixel parameter set of the plurality of operation screenshots are determined, a plurality of first screenshots are obtained, wherein each first screenshot in the plurality of first screenshots is a screenshot of a result interface obtained after the operation is executed on a target operation area in an operation interface;
taking the operation screen shots and the first screen shots as second screen shots;
determining a common pixel parameter set and a difference pixel parameter set of the plurality of second screenshot;
and under the condition that the common pixel parameter set of the second screenshot is the same as the common pixel parameter set of the plurality of operation screenshots and the difference pixel parameter set of the second screenshot is the same as the difference pixel parameter set of the plurality of operation screenshots, determining the common pixel parameter set and the difference pixel parameter set of the second screenshot as the common pixel parameter set and the difference pixel parameter set of the plurality of operation screenshots.
7. The method of any one of claims 1 to 6, wherein obtaining a plurality of operation shots comprises:
Acquiring the operation executed on the target operation area in the operation interface;
automatically executing the operation to obtain a result interface of the operation, and capturing a screenshot of the result interface to obtain one operation screenshot of the plurality of operation screenshots;
and repeatedly executing the operation, and capturing the result interface to obtain the multiple operation captures.
8. An operation verification device, comprising:
the system comprises an acquisition unit, a display unit and a display unit, wherein the acquisition unit is used for acquiring a plurality of operation screenshots, wherein each operation screenshot in the plurality of operation screenshots is a screenshot of a result interface obtained after an operation is performed on a target operation area in an operation interface;
the first determining unit is used for determining a common pixel parameter set and a difference pixel parameter set of the plurality of operation screen shots, wherein the common pixel parameter set comprises pixels with the same pixel value at the same position in the plurality of operation screen shots, and the difference pixel parameter set comprises the number of pixels with different pixel values at the same position between every two operation screen shots in the plurality of operation screen shots;
the verification unit is used for verifying a target operation screenshot to be verified through the common pixel point parameter set and the difference pixel point parameter set, wherein the target operation screenshot is a screenshot of a result interface obtained after the target operation is executed on the target operation area;
The second determining unit is used for determining that the target operation is normal operation under the condition that the target operation screenshot reaches a verification condition;
the verification unit includes:
the first acquisition module is used for acquiring a first pixel point set of the target operation screenshot, wherein the position of a pixel point in the first pixel point set in the target operation screenshot is the same as the position of a pixel point in the public pixel point parameter set in any operation screenshot;
the second acquisition module is used for acquiring first numbers of pixel points with different pixel values at the same position between the target operation screenshot and any operation screenshot to obtain a plurality of first numbers;
the first determining module is configured to determine that the target operation screenshot reaches the verification condition when the pixel values of the pixels at the same position in the first pixel set and the common pixel parameter set are the same, and the plurality of first numbers belong to the difference pixel parameter set.
9. The apparatus of claim 8, wherein the first acquisition module comprises:
the first acquisition sub-module is used for acquiring a first position of each pixel in the common pixel parameter set;
The second acquisition sub-module is used for acquiring a first pixel point of the first position from the target operation screenshot;
and the first determining submodule is used for determining the first pixel point as a pixel point in the first pixel point set.
10. The apparatus of claim 8, wherein the second acquisition module comprises:
the second determining submodule is used for determining any operation screenshot as a current operation screenshot, and executing the following operations on the target operation screenshot and the current operation screenshot: and under the condition that the pixel values of the pixel points at any same position of the target operation screenshot and the current operation screenshot are different, increasing the first number of the target operation screenshot and the current operation screenshot by 1, wherein the initial value of the first number of the target operation screenshot and the current operation screenshot is zero.
11. The apparatus according to any one of claims 8 to 10, wherein the acquisition unit comprises:
a fifth obtaining module, configured to obtain the operation performed on the target operation area in the operation interface;
the first screenshot module is used for automatically executing the operation to obtain a screenshot of a result interface of the operation under the condition that the result interface is obtained, so as to obtain one of the operation screenshots;
And the second screenshot module is used for repeatedly executing the operation and performing screenshot on the result interface to obtain the multiple operation screenshots.
12. A computer readable storage medium storing a computer program, characterized in that the computer program when run performs the method of any one of claims 1 to 7.
13. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method according to any of the claims 1 to 7 by means of the computer program.
CN202011270498.5A 2020-11-13 2020-11-13 Operation verification method and device, storage medium and electronic equipment Active CN113391741B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011270498.5A CN113391741B (en) 2020-11-13 2020-11-13 Operation verification method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011270498.5A CN113391741B (en) 2020-11-13 2020-11-13 Operation verification method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN113391741A CN113391741A (en) 2021-09-14
CN113391741B true CN113391741B (en) 2023-08-29

Family

ID=77616507

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011270498.5A Active CN113391741B (en) 2020-11-13 2020-11-13 Operation verification method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN113391741B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113934353A (en) * 2021-09-30 2022-01-14 北京五八信息技术有限公司 Information processing method and device
CN114327203B (en) * 2021-12-28 2023-08-04 傲网信息科技(厦门)有限公司 User operation restoration method and device, and recording method and device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0261584A2 (en) * 1986-09-25 1988-03-30 The Board of Trustees of the University of Illinois Method for controlling cells and pixels of plasma panels, plasma display panels, electroluminescent panels, lcd's or that like and a circuit for carrying out the method
EP1288847A1 (en) * 2001-08-30 2003-03-05 Matsushita Electric Industrial Co., Ltd. Method and apparatus for identifying identical images
JP2013254394A (en) * 2012-06-07 2013-12-19 Ntt Data Corp Image verification method, image verification device, and program
US9418284B1 (en) * 2014-04-09 2016-08-16 Vortex Intellectual Property Holding LLC Method, system and computer program for locating mobile devices based on imaging
WO2017005148A1 (en) * 2015-07-03 2017-01-12 上海触乐信息科技有限公司 Automatic software-testing method and device
CN107562589A (en) * 2017-08-29 2018-01-09 上海与德科技有限公司 A kind of touch-screen pixel point detecting method and system based on mobile terminal
CN108510502A (en) * 2018-03-08 2018-09-07 华南理工大学 Melanoma picture tissue segmentation methods based on deep neural network and system
CN110163201A (en) * 2019-03-01 2019-08-23 腾讯科技(深圳)有限公司 Image measurement method and apparatus, storage medium and electronic device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9251435B2 (en) * 2013-09-20 2016-02-02 Oracle International Corporation Screenshot database for application verification
TWI622877B (en) * 2016-05-09 2018-05-01 國立中央大學 System and method for recording and replaying mouse behavior, recording media and program products
US10127689B2 (en) * 2016-12-20 2018-11-13 International Business Machines Corporation Mobile user interface design testing tool
JP2020166492A (en) * 2019-03-29 2020-10-08 コニカミノルタ株式会社 Test apparatus, test method and computer program

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0261584A2 (en) * 1986-09-25 1988-03-30 The Board of Trustees of the University of Illinois Method for controlling cells and pixels of plasma panels, plasma display panels, electroluminescent panels, lcd's or that like and a circuit for carrying out the method
EP1288847A1 (en) * 2001-08-30 2003-03-05 Matsushita Electric Industrial Co., Ltd. Method and apparatus for identifying identical images
JP2013254394A (en) * 2012-06-07 2013-12-19 Ntt Data Corp Image verification method, image verification device, and program
US9418284B1 (en) * 2014-04-09 2016-08-16 Vortex Intellectual Property Holding LLC Method, system and computer program for locating mobile devices based on imaging
WO2017005148A1 (en) * 2015-07-03 2017-01-12 上海触乐信息科技有限公司 Automatic software-testing method and device
CN107562589A (en) * 2017-08-29 2018-01-09 上海与德科技有限公司 A kind of touch-screen pixel point detecting method and system based on mobile terminal
CN108510502A (en) * 2018-03-08 2018-09-07 华南理工大学 Melanoma picture tissue segmentation methods based on deep neural network and system
CN110163201A (en) * 2019-03-01 2019-08-23 腾讯科技(深圳)有限公司 Image measurement method and apparatus, storage medium and electronic device

Also Published As

Publication number Publication date
CN113391741A (en) 2021-09-14

Similar Documents

Publication Publication Date Title
CN107213641B (en) Video synchronized with in-game telemetry
CN110378488B (en) Client-side change federal training method, device, training terminal and storage medium
CN113391741B (en) Operation verification method and device, storage medium and electronic equipment
CN110830735B (en) Video generation method and device, computer equipment and storage medium
CN110474820B (en) Flow playback method and device and electronic equipment
CN111325417A (en) Method and device for realizing privacy protection and realizing multi-party collaborative updating of business prediction model
CN104243590B (en) Resource object recommends method and apparatus
CN110812835A (en) Cloud game detection method and device, storage medium and electronic device
CN106201794A (en) The detection method of a kind of server and device
WO2018121335A1 (en) Real-time data processing method and device
CN107203464B (en) Method and device for positioning service problem
CN111611140A (en) Reporting verification method and device of buried point data, electronic equipment and storage medium
CN112148607A (en) Interface testing method and device for service scene
CN111193945A (en) Advertisement playing processing method and device
CN116827774A (en) Service analysis method, device, equipment and storage medium
CN112799955B (en) Method and device for detecting model change, storage medium and electronic equipment
CN110399723B (en) Vulnerability detection method and device, storage medium and electronic device
CN113296666A (en) Anchor exposure data reporting method and device, terminal equipment and storage medium
CN115705190A (en) Method and device for determining dependence degree
CN115904883B (en) RPA flow execution visual abnormity monitoring method, device and medium
US20170188095A1 (en) Method and electronic device for web video capturing
CN108647139B (en) System test method, device, storage medium and electronic device
CN110020166B (en) Data analysis method and related equipment
CN108664484A (en) Media content recommendations method and device
CN110515819A (en) Performance test methods, electronic equipment, scheduling system and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40052818

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant