Method, device, equipment and medium for identifying operation keys

Through image contour detection and matching recognition of operation buttons, the problem of pop-up blocking during the preloading process of cloud applications is solved, the accuracy of operation button recognition is improved, and the smooth execution of the preloading operation is ensured.

CN113221912BActive Publication Date: 2024-09-06TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010072201.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-01-21
Publication Date
2024-09-06
Estimated Expiration
2040-01-21

AI Technical Summary

Technical Problem

During the preloading process of cloud applications, pop-up windows block the preloading operation, and it is difficult for the existing technology to accurately identify operation buttons, resulting in a high misjudgment rate of recognition and affecting the smooth execution of the preloading operation.

Method used

By acquiring the image to be detected, contour detection and matching is performed, and the contour data and contour components are used to identify operation buttons and reduce the misjudgment rate.

Benefits of technology

It effectively reduces the impact of factors such as pop-up interface changes and low template image resolution on operation button recognition, improves recognition accuracy, and ensures the smooth execution of preloading operations for cloud applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113221912B
    Figure CN113221912B
Patent Text Reader

Abstract

The present application discloses an operation key recognition method, device, equipment and medium, which are applied to the field of computer technology to reduce the misjudgment rate of operation key recognition and improve the accuracy of operation key recognition. Specifically, the image to be detected is acquired, contour detection is performed on the image, contour data of the image is obtained, contour components of the image are obtained based on the contour data, and the operation keys in the image are identified based on the matching results of the contour components and the contour components of the operation keys. In this way, the operation keys in the image are identified by using the contour data and contour components of the image, which can effectively reduce the influence of factors such as changes in the pop-up window interface and low resolution of the template image on the recognition of the operation keys, thereby reducing the misjudgment rate of the recognition of the operation keys and improving the accuracy of the recognition of the operation keys.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to an operation key recognition method, device, equipment and medium. Background Art

[0002] With the continuous development of Internet technology, cloud applications based on cloud computing have emerged. The working principle of cloud applications is that the operation and control of applications are carried out in the server, and the server transmits the rendered scene images, user interfaces, etc. to the user terminal through the network for display and interaction, thereby converting the "local installation, local calculation" of traditional applications into "ready-to-use", and realizing online access to applications without installing the application package.

[0003] In actual applications, the server usually preloads the cloud application into a specified scene so that when the user accesses the cloud application, the specified scene can be directly displayed to the user, thereby improving the user's access efficiency to the cloud application. However, during the preloading process, pop-ups such as advertisements, announcements, and messages may appear to block the execution of the preloading operation. In this case, the current method is to simulate the user's operation on the pop-up window operation button to continue the preloading operation after completing the corresponding operation on the pop-up window. For this reason, how to accurately identify the pop-up window operation button is a problem that needs to be considered at present. Summary of the invention

[0004] The embodiments of the present application provide an operation key recognition method, device, equipment and medium to reduce the misjudgment rate of operation key recognition and improve the accuracy of operation key recognition.

[0005] The technical solutions provided by the embodiments of this application are as follows:

[0006] On the one hand, an embodiment of the present application provides an operation key recognition method, comprising:

[0007] Acquire an image to be detected;

[0008] Perform contour detection on the image to obtain contour data of the image;

[0009] Based on the contour data, the contour component elements of the image are obtained;

[0010] Based on the matching result between the contour component elements and the contour component features of the operation button, the operation button in the image is identified.

[0011] In a possible implementation, acquiring an image to be detected includes:

[0012] Monitoring the execution status of the preloading operation;

[0013] When it is determined according to the monitoring result that the preloading operation is suspended, a current image corresponding to the preloading operation is obtained;

[0014] Based on the current image, an image to be detected is determined.

[0015] In a possible implementation, determining an image to be detected based on a current image includes:

[0016] Determine the current image as the image to be detected;

[0017] Alternatively, the current image is divided into at least two sub-images, and from the at least two sub-images, a sub-image that meets a specific condition is obtained as the image to be detected, wherein the specific condition is configured according to the display position of the operation button.

[0018] In a possible implementation, performing contour detection on an image to obtain contour data of the image includes:

[0019] Perform grayscale processing on the image to obtain a grayscale image;

[0020] The grayscale image is input into the edge detection algorithm to obtain an edge binary image, and the edge binary image is input into the contour detection algorithm to obtain contour data.

[0021] In a possible implementation, if the operation button is a close button, obtaining contour component elements of the image based on the contour data includes:

[0022] Inputting the line thickness, the edge binary image and the contour data into the contour drawing algorithm to obtain the contour binary image;

[0023] The contour binary image is input into the line detection algorithm to obtain each straight line segment as the contour component element.

[0024] In a possible implementation, if the operation button is a close button, identifying the operation button in the image based on a matching result of the contour component element and the contour component feature of the operation button includes:

[0025] Based on the straight line segments contained in the contour constituent elements, which successfully match the intersecting straight line segments whose angles are within a set range, the operation buttons in the image are identified.

[0026] In a possible implementation, identifying an operation button in an image based on a straight line segment successfully matched with an intersecting straight line segment whose angle is within a set range among the straight line segments included in the contour component element includes:

[0027] Determine every two straight line segments in each straight line segment as a detection unit;

[0028] For each detection unit, based on the intersection line detection algorithm, detect whether the two straight line segments contained in the detection unit are intersecting straight line segments, and obtain the intersection detection result of the detection unit;

[0029] From each detection unit, select the detection unit whose corresponding intersection detection result is an intersection straight line segment as the candidate detection unit;

[0030] For each candidate detection unit, based on the angle detection algorithm, detect whether the angle of the intersecting straight line segments included in the candidate detection unit is within a set range, and obtain the angle detection result of the candidate detection unit;

[0031] From each candidate detection unit, select the candidate detection unit whose corresponding angle detection result is within the set range as the target detection unit;

[0032] Based on the straight line segments contained in the target detection unit, the operation buttons in the image are identified.

[0033] On the other hand, an embodiment of the present application provides an operation key recognition device, including:

[0034] An image acquisition unit, used for acquiring an image to be detected;

[0035] A contour detection unit, used for performing contour detection on an image to obtain contour data of the image;

[0036] An element acquisition unit, used for acquiring contour constituent elements of an image based on contour data;

[0037] The button recognition unit is used to recognize the operation button in the image based on the matching result between the outline component elements and the outline component features of the operation button.

[0038] In a possible implementation, when acquiring the image to be detected, the image acquisition unit is specifically used to:

[0039] Monitoring the execution status of the preloading operation;

[0040] When it is determined according to the monitoring result that the preloading operation is suspended, a current image corresponding to the preloading operation is obtained;

[0041] Based on the current image, an image to be detected is determined.

[0042] In a possible implementation, when determining the image to be detected based on the current image, the image acquisition unit is specifically used to:

[0043] Determine the current image as the image to be detected;

[0044] Alternatively, the current image is divided into at least two sub-images, and from the at least two sub-images, a sub-image that meets a specific condition is obtained as the image to be detected, wherein the specific condition is configured according to the display position of the operation button.

[0045] In a possible implementation, when performing contour detection on an image to obtain contour data of the image, the contour detection unit is specifically used to:

[0046] Perform grayscale processing on the image to obtain a grayscale image;

[0047] The grayscale image is input into the edge detection algorithm to obtain an edge binary image, and the edge binary image is input into the contour detection algorithm to obtain contour data.

[0048] In a possible implementation manner, if the operation button is a close button, when obtaining contour constituent elements of the image based on the contour data, the element acquisition unit is specifically used to:

[0049] Inputting the line thickness, the edge binary image and the contour data into the contour drawing algorithm to obtain the contour binary image;

[0050] The contour binary image is input into the line detection algorithm to obtain each straight line segment as the contour component element.

[0051] In a possible implementation, if the operation button is a close button, when identifying the operation button in the image based on the matching result of the contour component element and the contour component feature of the operation button, the button identification unit is specifically used to:

[0052] Based on the straight line segments contained in the contour constituent elements, which successfully match the intersecting straight line segments whose angles are within a set range, the operation buttons in the image are identified.

[0053] In a possible implementation, when identifying an operation button in an image based on a straight line segment successfully matched with an intersecting straight line segment whose angle is within a set range among the straight line segments included in the contour component elements, the button recognition unit is specifically used to:

[0054] Determine every two straight line segments in each straight line segment as a detection unit;

[0055] For each detection unit, based on the intersection line detection algorithm, detect whether the two straight line segments contained in the detection unit are intersecting straight line segments, and obtain the intersection detection result of the detection unit;

[0056] From each detection unit, select the detection unit whose corresponding intersection detection result is an intersection straight line segment as the candidate detection unit;

[0057] For each candidate detection unit, based on the angle detection algorithm, detect whether the angle of the intersecting straight line segments included in the candidate detection unit is within a set range, and obtain the angle detection result of the candidate detection unit;

[0058] From each candidate detection unit, select the candidate detection unit whose corresponding angle detection result is within the set range as the target detection unit;

[0059] Based on the straight line segments contained in the target detection unit, the operation buttons in the image are identified.

[0060] On the other hand, an embodiment of the present application provides an operation key recognition device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the operation key recognition method provided by the embodiment of the present application is implemented.

[0061] On the other hand, an embodiment of the present application further provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed by a processor, the operation key recognition method provided by the embodiment of the present application is implemented.

[0062] The beneficial effects of the embodiments of the present application are as follows:

[0063] In the embodiment of the present application, the contour data and contour components of the image are used to identify the operation buttons in the image, which can effectively reduce the impact of factors such as changes in the pop-up interface and low resolution of the template image on the recognition of the operation buttons, thereby reducing the misjudgment rate of the operation button recognition and improving the accuracy of the operation button recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] Figure 1 This is a schematic diagram of the system architecture of the cloud application system in the embodiment of the present application;

[0065] Figure 2 This is a schematic diagram of the overview of the operation key identification method in the embodiment of the present application;

[0066] Figure 3A This is a schematic diagram of the announcement of the cloud game in the embodiment of the present application;

[0067] Figure 3B This is a schematic diagram of an advertisement for a cloud game in an embodiment of the present application;

[0068] Figure 3C This is a message diagram of a cloud game in an embodiment of the present application;

[0069] Figure 4 This is a schematic diagram of a specific process of the operation key identification method in an embodiment of the present application;

[0070] Figure 5ASchematic diagram of an edge binary image in an embodiment of the present application;

[0071] Figure 5B Schematic diagram of a contour binary image in an embodiment of the present application;

[0072] Figure 5C This is a schematic diagram of the contour composition characteristics of the close button in the embodiment of the present application;

[0073] Figure 6 This is a functional structure diagram of an operation key recognition device in an embodiment of the present application;

[0074] Figure 7 Schematic diagram of the hardware structure of the operation key recognition device in the embodiment of the present application. DETAILED DESCRIPTION

[0075] In order to make the purpose, technical solution and beneficial effects of this application clearer, the technical solution in the embodiment of this application will be clearly and completely described below in conjunction with the drawings in the embodiment of this application. Obviously, the described embodiment is only a part of the embodiment of this application, not all the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0076] In order to facilitate those skilled in the art to better understand the present application, the technical terms involved in the present application are briefly introduced below.

[0077] 1. Cloud applications are applications that are run and controlled in the server, where the server transmits rendered scene images, user interfaces, etc. to the user terminal through the network for display and interaction. For example: cloud games, etc.

[0078] 2. Preloading is a way to load cloud applications into a specified scenario before users access the cloud applications.

[0079] 3. Edge detection algorithm is a method for edge detection of images, such as the Canny algorithm in the Open Source Computer Vision Library (OpenCV).

[0080] 4. Contour detection algorithm is a method for detecting contours of images, such as the FindContours algorithm in OpenCV.

[0081] 5. Contour drawing algorithm is a method for drawing contours in an image. For example: DrawContours algorithm in OpenCV.

[0082] 6. Line detection algorithm is a method for detecting straight line segments in an image, such as the HoughLinesP algorithm in OpenCV.

[0083] 7. Intersecting line detection algorithm is a method for detecting intersecting lines, such as vector cross product algorithm.

[0084] 8. Angle detection algorithm is a method for detecting the angle of intersecting straight lines. For example: trigonometric function algorithm, etc.

[0085] 9. Operation buttons are buttons displayed in the pop-up window for performing corresponding operations on the pop-up window, such as close button, skip button, etc.

[0086] After introducing the technical terms involved in this application, the application scenarios and design concepts of the embodiments of this application are briefly introduced.

[0087] At present, in the process of preloading cloud applications on the server, pop-up windows such as advertisements, announcements, and messages may appear to block the execution of the preloading operation. In order to ensure the smooth progress of the preloading operation, the server usually simulates the user's operation on the operation buttons of the pop-up window to continue the preloading operation after completing the corresponding operation on the pop-up window. Obviously, the recognition of the operation buttons of the pop-up window is the key to ensuring the smooth execution of the preloading operation. In practical applications, when recognizing the operation buttons of the pop-up window, the method usually adopted is to match the current image of the preloading operation with the pre-configured pop-up template image to identify the operation buttons of the pop-up window in the current image. However, this method of identifying the operation buttons by template matching depends on the pop-up template image. When the resolution of the pop-up template image is low, or the pop-up interface changes, if the pop-up template image is used to identify the operation buttons of the pop-up window in the current image, it is likely to affect the accuracy of the operation button recognition, and even cause the operation button recognition to fail, thereby causing the preloading operation to be interrupted.

[0088] Based on this, see Figure 1As shown, in an embodiment of the present application, the server 110 is connected to the user terminal 120 through a communication network. During the process of preloading the cloud application, the server 110 monitors the execution status of the preloading operation. When the preloading operation is detected to be suspended, the current image of the preloading operation is obtained. After obtaining the image to be detected based on the current image, the image is subjected to contour detection to obtain contour data of the image. Based on the contour data, the contour components of the image are obtained, and the operation buttons in the image are identified based on the matching results of the contour components and the contour components of the operation buttons. In this way, the operation buttons in the image are identified by using the contour data and contour components of the image, which can effectively reduce the influence of factors such as the change of the pop-up window interface and the low resolution of the template image on the recognition of the operation buttons, thereby reducing the misjudgment rate of the recognition of the operation buttons and improving the accuracy of the recognition of the operation buttons.

[0089] After introducing the application scenarios and design concepts of the embodiments of the present application, the technical solutions provided by the embodiments of the present application are described in detail below.

[0090] The present application provides an operation key recognition method, which can be applied to Figure 1 The server 110 in the cloud application system shown in FIG. Figure 2 As shown, the overview process of the operation key recognition method provided in the embodiment of the present application is as follows:

[0091] Step 201: Acquire an image to be detected.

[0092] In actual applications, during the process of preloading cloud applications, the server 110 can monitor the execution status of the preloading operation in real time. When it is determined that the preloading operation is suspended based on the monitoring results, the current image of the preloading operation can be obtained, and based on the current image, the image to be detected can be obtained.

[0093] Specifically, when the server 110 obtains the image to be detected based on the current image, in one embodiment, the server 110 may directly determine the current image as the image to be detected.

[0094] In another embodiment, in order to reduce the computational complexity of image processing and improve the recognition efficiency of operation buttons, the server 110 may also divide the current image into at least two sub-images, and obtain a sub-image that meets specific conditions from the at least two sub-images as the image to be detected, wherein the specific conditions are configured according to the display position of the operation button.

[0095] For example: assuming that the operation button is a close button, the specific condition can be configured to be located in the upper right corner of the current image based on the display position of the close button. In this way, while ensuring that the image to be detected divided from the current image contains the operation button, the amount of computational effort for subsequent image processing of the image to be detected is reduced, thereby improving the recognition efficiency of the operation button.

[0096] Step 202: Perform contour detection on the image to obtain contour data of the image.

[0097] In actual applications, the server 110 may use, but is not limited to, the following methods when executing step 202:

[0098] First, the server 110 performs grayscale processing on the image to obtain a grayscale image.

[0099] Then, the server 110 inputs the grayscale image into an edge detection algorithm to obtain an edge binary image. Specifically, the server 110 may input the grayscale image into a Canny algorithm in OpenCV to obtain an edge binary image.

[0100] Finally, the server 110 inputs the edge binary image into a contour detection algorithm to obtain contour data of the image. Specifically, the server 110 may input the edge binary image into a FindContours algorithm in OpenCV to obtain contour data of the image.

[0101] Step 203: Based on the contour data, obtain contour component elements of the image.

[0102] In practical applications, in order to improve the recognition accuracy of contour components, the server 110 can also redraw the contour in the edge binary image of the image according to the contour data of the image, and then obtain the contour components of the image. In specific implementation, the server 110 can input the line thickness, the edge binary image and the contour data into the contour drawing algorithm, so as to obtain the contour binary image after the redrawing of the contour. Specifically, the server 110 can input the line thickness, the edge binary image and the contour data into the DrawContours algorithm in OpenCV, so as to obtain the contour binary image.

[0103] Furthermore, after acquiring the contour binary image, the server 110 can detect contour components from the contour binary image. Specifically, depending on the different operation buttons to be identified, the server 110 can use different contour component element detection methods to detect contour components from the contour binary image. In practical applications, if the operation button to be identified is a close button, the server 110 can input the contour binary image into a straight line detection algorithm to obtain each straight line segment as a contour component element detected from the contour binary image. Specifically, the server 110 can input the contour binary image into the HoughLinesP algorithm in OpenCV to obtain each straight line segment as a contour component element detected from the contour binary image.

[0104] Step 204: Based on the matching result between the contour component elements and the contour component features of the operation keys, the operation keys in the image are identified.

[0105] In actual applications, if the operation button to be identified is a close button, the contour composition feature may be intersecting straight line segments whose angles are within a set range. Furthermore, the server 110 may identify the close button in the image based on the straight line segments contained in the contour composition element that successfully match the intersecting straight line segments whose angles are within the set range.

[0106] Specifically, the server 110 may use, but is not limited to, the following methods when identifying the operation button in the image based on the straight line segments successfully matched with the intersecting straight line segments whose angles are within the set range among the straight line segments included in the contour component elements:

[0107] First, the server 110 determines every two straight line segments in each straight line segment as a detection unit, and for each detection unit, based on the intersection straight line detection algorithm, detects whether the two straight line segments included in the detection unit are intersecting straight line segments to obtain the intersection detection result of the detection unit.

[0108] Specifically, the server 110 may detect, for each detection unit, whether two straight line segments included in the detection unit are intersecting straight line segments based on a vector cross product algorithm, thereby obtaining an intersection detection result of the detection unit.

[0109] Then, the server 110 selects the detection units whose corresponding intersection detection results are intersecting straight line segments from each detection unit as candidate detection units, and for each candidate detection unit, based on the angle detection algorithm, detects whether the angle of the intersecting straight line segments contained in the alternative detection unit is within the set range, and obtains the angle detection result of the alternative detection unit.

[0110] Specifically, the server 110 may detect, for each detection unit, whether the angle of the intersecting straight line segments included in the candidate detection unit is within a set range based on a trigonometric function algorithm, thereby obtaining an angle detection result of the candidate detection unit.

[0111] Secondly, the server 110 selects, from among the candidate detection units, candidate detection units whose corresponding angle detection results are within the set range as target detection units.

[0112] Finally, based on the straight line segments contained in the target detection unit, the operation buttons in the image are identified.

[0113] Specifically, the server 110 may determine a contour composed of straight line segments contained in the target detection unit as an operation button in the image.

[0114] In the embodiment of the present application, the contour data and contour components of the image are used to identify the operation buttons in the image, which can effectively reduce the impact of factors such as changes in the pop-up interface and low resolution of the template image on the recognition of the operation buttons, thereby reducing the misjudgment rate of the operation button recognition and improving the accuracy of the operation button recognition, thereby ensuring the smooth execution of the preloading operation of the cloud application.

[0115] In actual applications, cloud gaming, as a specific implementation of cloud applications, has attracted widespread attention due to its convenience, lightness, ease of use, etc. In cloud gaming, when promoting a game scene or level, in order to facilitate users to quickly try out the game scene or level, the server 110 can preload the cloud game into the game scene or level so that users can directly enter the game scene or level when accessing the cloud game. However, during the preloading process, the following problems may occur: Figure 3A The announcement shown, Figure 3B The advertisements shown, Figure 3C The pop-up window such as the message shown blocks the execution of the preloading operation. In order to enable the preloading operation to continue, the server 110 can use the operation button recognition method provided in the embodiment of the present application to identify the close button, and close the pop-up window by simulating the user's click operation on the close button to ensure the smooth execution of the preloading operation.

[0116] The following uses "recognizing the close button of a pop-up window during the preloading process of a cloud game" as a specific application scenario to further explain the operation button recognition method provided in the embodiment of the present application. Figure 4 As shown, the specific process of the operation key recognition method provided in the embodiment of the present application is as follows:

[0117] Step 401: During the process of preloading the cloud game, the server 110 monitors the execution status of the preloading operation in real time.

[0118] Step 402: when the server 110 determines, based on the monitoring result, that the preloading operation is suspended, it obtains a current image of the preloading operation, wherein the current image includes a pop-up window that blocks the execution of the preloading operation.

[0119] Step 403: The server 110 divides the current image into at least two sub-images, and selects the sub-image located at the upper right corner of the current image from the at least two sub-images as the image to be detected.

[0120] Step 404: The server 110 performs grayscale processing on the image to obtain a grayscale image.

[0121] Step 405: The server 110 inputs the grayscale image into the Canny algorithm in OpenCV to obtain Figure 5A The edge binary image shown.

[0122] Step 406: The server 110 inputs the edge binary image into the FindContours algorithm in OpenCV to obtain contour data of the image.

[0123] Step 407: The server 110 inputs the line thickness, the edge binary image and the contour data into the DrawContours algorithm in OpenCV to obtain the following: Figure 5B The contour binary image shown.

[0124] Step 408: The server 110 inputs the binary contour image into the HoughLinesP algorithm in OpenCV to obtain straight line segments.

[0125] Step 409: The server 110 determines every two straight line segments in each straight line segment as a detection unit.

[0126] Step 410: The server 110 detects, for each detection unit, whether two straight line segments included in the detection unit are intersecting straight line segments based on a vector cross product algorithm, and obtains an intersection detection result of the detection unit.

[0127] Step 411: The server 110 selects, from among the various detection units, detection units whose corresponding intersection detection results are intersection straight line segments as candidate detection units.

[0128] Step 412: The server 110 detects, based on a trigonometric function algorithm, whether the angle of the intersecting straight line segments contained in each candidate detection unit is within a set range, and obtains the angle detection result of the candidate detection unit. In practical applications, the set range may be, but is not limited to: [30°, 60°].

[0129] Step 413: The server 110 selects, from among the candidate detection units, candidate detection units whose corresponding angle detection results are within a set range as target detection units.

[0130] It is worth mentioning that if the server 110 does not select a candidate detection unit whose corresponding angle detection result is within the set range from each candidate detection unit, it can be determined that there is no close button in the image. In this case, the server 110 can notify the cloud game maintenance personnel that the preloading operation of the cloud game is abnormal and needs to be handled abnormally.

[0131] Step 414: The server 110 converts the straight line segments included in the target detection unit into Figure 5C The outline shown is identified as the close button in this image.

[0132] Step 415: The server 110 closes the pop-up window by simulating a user clicking the close button in the image.

[0133] In this way, by using the image's contour data and contour components to identify the close button in the image, the impact of factors such as changes in the pop-up interface and low template image resolution on the close button recognition can be effectively reduced, thereby reducing the misjudgment rate of close button recognition and improving the accuracy of close button recognition, thereby ensuring the smooth execution of the cloud game preloading operation.

[0134] Based on the above embodiments, the present application provides an operation key recognition device. Figure 6 As shown, the operation key recognition device 600 provided in the embodiment of the present application at least includes:

[0135] An image acquisition unit 601 is used to acquire an image to be detected;

[0136] The contour detection unit 602 is used to perform contour detection on the image to obtain contour data of the image;

[0137] An element acquisition unit 603 is used to obtain contour constituent elements of the image based on the contour data;

[0138] The button recognition unit 604 is used to recognize the operation button in the image based on the matching result between the outline component elements and the outline component features of the operation button.

[0139] In a possible implementation manner, when acquiring the image to be detected, the image acquisition unit 601 is specifically used to:

[0140] Monitoring the execution status of the preloading operation;

[0141] When it is determined according to the monitoring result that the preloading operation is suspended, a current image corresponding to the preloading operation is obtained;

[0142] Based on the current image, an image to be detected is determined.

[0143] In a possible implementation manner, when determining the image to be detected based on the current image, the image acquisition unit 601 is specifically configured to:

[0144] Determine the current image as the image to be detected;

[0145] Alternatively, the current image is divided into at least two sub-images, and from the at least two sub-images, a sub-image that meets a specific condition is obtained as the image to be detected, wherein the specific condition is configured according to the display position of the operation button.

[0146] In a possible implementation, when performing contour detection on an image to obtain contour data of the image, the contour detection unit 602 is specifically used to:

[0147] Perform grayscale processing on the image to obtain a grayscale image;

[0148] The grayscale image is input into the edge detection algorithm to obtain an edge binary image, and the edge binary image is input into the contour detection algorithm to obtain contour data.

[0149] In a possible implementation, if the operation button is a close button, when obtaining the contour constituent elements of the image based on the contour data, the element acquisition unit 603 is specifically used to:

[0150] Inputting the line thickness, the edge binary image and the contour data into the contour drawing algorithm to obtain the contour binary image;

[0151] The contour binary image is input into the line detection algorithm to obtain each straight line segment as the contour component element.

[0152] In a possible implementation, if the operation button is a close button, when identifying the operation button in the image based on the matching result of the contour component element and the contour component feature of the operation button, the button identification unit 604 is specifically used to:

[0153] Based on the straight line segments contained in the contour constituent elements, which successfully match the intersecting straight line segments whose angles are within a set range, the operation buttons in the image are identified.

[0154] In a possible implementation, when identifying an operation button in an image based on a straight line segment successfully matched with an intersecting straight line segment whose angle is within a set range among the straight line segments included in the contour component elements, the button recognition unit 604 is specifically used to:

[0155] Determine every two straight line segments in each straight line segment as a detection unit;

[0156] For each detection unit, based on the intersection line detection algorithm, detect whether the two straight line segments contained in the detection unit are intersecting straight line segments, and obtain the intersection detection result of the detection unit;

[0157] From each detection unit, select the detection unit whose corresponding intersection detection result is an intersection straight line segment as the candidate detection unit;

[0158] For each candidate detection unit, based on the angle detection algorithm, detect whether the angle of the intersecting straight line segments included in the candidate detection unit is within a set range, and obtain the angle detection result of the candidate detection unit;

[0159] From each candidate detection unit, select the candidate detection unit whose corresponding angle detection result is within the set range as the target detection unit;

[0160] Based on the straight line segments contained in the target detection unit, the operation buttons in the image are identified.

[0161] It should be noted that the principle of solving the technical problem by the operation key identification device provided in the embodiment of the present application is similar to the operation key identification method provided in the embodiment of the present application. Therefore, the implementation of the operation key identification device provided in the embodiment of the present application can refer to the implementation of the operation key identification method provided in the embodiment of the present application, and the repeated parts will not be repeated.

[0162] After introducing the operation key recognition method and apparatus provided in the embodiments of the present application, the operation key recognition device provided in the embodiments of the present application is briefly introduced next.

[0163] See also Figure 7 As shown, the operation key recognition device 700 provided in the embodiment of the present application includes at least: a processor 701, a memory 702, and a computer program stored in the memory 702 and executable on the processor 701. When the processor 701 executes the computer program, the operation key recognition method provided in the embodiment of the present application is implemented.

[0164] It should be noted that if Figure 7 The operation key recognition device 700 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0165] The operation key recognition device 700 provided in the embodiment of the present application may also include a bus 703 connecting different components (including the processor 701 and the memory 702). The bus 703 represents one or more of several types of bus structures, including a memory bus, a peripheral bus, a local bus, etc.

[0166] The memory 702 may include a readable medium in the form of a volatile memory, such as a random access memory (RAM) 7021 and / or a cache memory 7022 , and may further include a read-only memory (ROM) 7023 .

[0167] The memory 702 may also include a program tool 7025 having a set (at least one) of program modules 7024, wherein the program modules 7024 include but are not limited to: an operating subsystem, one or more application programs, other program modules, and program data, each of which or some combination may include the implementation of a network environment.

[0168] The operation key recognition device 700 can also communicate with one or more external devices 704 (such as keyboards, remote controls, etc.), and can also communicate with one or more devices that enable a user to interact with the operation key recognition device 700 (such as mobile phones, computers, etc.), and / or communicate with any device that enables the operation key recognition device 700 to communicate with one or more other operation key recognition devices 700 (such as routers, modems, etc.). Such communication can be performed through an input / output (I / O) interface 705. In addition, the operation key recognition device 700 can also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN) and / or a public network, such as the Internet) through a network adapter 706. Figure 7 As shown, the network adapter 706 communicates with other modules of the operation key recognition device 700 via the bus 703. It should be understood that although Figure 7 Not shown, other hardware and / or software modules may be used in conjunction with the operation key identification device 700, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, disk arrays (Redundant Arrays of Independent Disks, RAID) subsystems, tape drives, and data backup storage subsystems.

[0169] The computer-readable storage medium provided in the embodiment of the present application is introduced below. The embodiment of the present application provides a computer-readable storage medium, which stores computer instructions, and when the computer instructions are executed by the processor, the operation key recognition method provided in the embodiment of the present application is implemented. Specifically, the executable program can be built-in or installed in the operation key recognition device 700, so that the operation key recognition device 700 can implement the operation key recognition method provided in the embodiment of the present application by executing the built-in or installed executable program.

[0170] In addition, the operation key identification method provided in the embodiment of the present application can also be implemented as a program product, which includes a program code. When the program product can be run on the operation key identification device 700, the program code is used to enable the operation key identification device 700 to execute the operation key identification method provided in the embodiment of the present application.

[0171] The program product provided in the embodiments of the present application may adopt any combination of one or more readable media, wherein the readable medium may be a readable signal medium or a readable storage medium, and the readable storage medium may be but is not limited to an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any combination of the above. Specifically, more specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, RAM, ROM, Erasable Programmable Read Only Memory (EPROM), optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0172] The program product provided in the embodiment of the present application may adopt a CD-ROM and include program code, and may also be run on a computing device. However, the program product provided in the embodiment of the present application is not limited thereto. In the embodiment of the present application, the readable storage medium may be any tangible medium containing or storing a program, and the program may be used by or in combination with an instruction execution system, apparatus, or device.

[0173] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.

[0174] Obviously, those skilled in the art can make various changes and modifications to the embodiments of the present application without departing from the spirit and scope of the embodiments of the present application. Thus, if these modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A method for identifying an operation key, characterized in that: include: Get the current image corresponding to when the preloading operation is paused; Determine the current image as the image to be detected; or divide the current image into at least two sub-images, and obtain a sub-image that meets a specific condition from the at least two sub-images as the image to be detected, wherein the specific condition is configured according to the display position of the operation button; Performing contour detection on the image to obtain contour data of the image; Based on the contour data, obtaining contour component elements of the image; Based on the matching result between the contour component elements and the contour component features of the operation button, the operation button in the image is identified.

2. The operation key recognition method according to claim 1, characterized in that: Get the current image corresponding to when the preload operation is paused, including: monitoring the execution status of the preloading operation; When it is determined according to the monitoring result that the preloading operation is suspended, a current image corresponding to the preloading operation is acquired.

3. The operation key recognition method according to claim 1 or 2, characterized in that: Performing contour detection on the image to obtain contour data of the image includes: Performing grayscale processing on the image to obtain a grayscale image; The grayscale image is input into an edge detection algorithm to obtain an edge binary image, and the edge binary image is input into a contour detection algorithm to obtain the contour data.

4. The operation key recognition method according to claim 3, characterized in that: If the operation button is a close button, obtaining contour component elements of the image based on the contour data includes: Inputting the line thickness, the edge binary image and the contour data into a contour drawing algorithm to obtain a contour binary image; The contour binary image is input into a line detection algorithm to obtain each straight line segment as the contour component element.

5. The operation key recognition method according to claim 4, characterized in that: If the operation button is a close button, identifying the operation button in the image based on a matching result of the contour component element and the contour component feature of the operation button includes: The operation button in the image is identified based on the straight line segments that are successfully matched with the intersecting straight line segments whose angles are within a set range among the straight line segments included in the contour component elements.

6. The operation key recognition method according to claim 5, characterized in that: Based on the straight line segments in the contour component elements that successfully match the intersecting straight line segments whose angles are within a set range, identifying the operation button in the image includes: Determine every two straight line segments among the straight line segments as a detection unit; For each detection unit, based on the intersection line detection algorithm, detect whether two straight line segments included in the detection unit are intersecting straight line segments, and obtain the intersection detection result of the detection unit; From the various detection units, the detection units whose corresponding intersection detection results are intersection straight line segments are selected as candidate detection units; For each candidate detection unit, based on an angle detection algorithm, detecting whether the angle of the intersecting straight line segments included in the candidate detection unit is within the set range, and obtaining an angle detection result of the candidate detection unit; From the candidate detection units, select the candidate detection units whose corresponding angle detection results are within the set range as target detection units; The operation button in the image is identified based on the straight line segments included in the target detection unit.

7. An operation key recognition device, characterized in that: include: An image acquisition unit, used to acquire a current image corresponding to when the preloading operation is suspended; Determine the current image as the image to be detected; or divide the current image into at least two sub-images, and obtain a sub-image that meets a specific condition from the at least two sub-images as the image to be detected, wherein the specific condition is configured according to the display position of the operation button; A contour detection unit, used for performing contour detection on the image to obtain contour data of the image; An element acquisition unit, used for acquiring contour constituent elements of the image based on the contour data; The button recognition unit is used to recognize the operation button in the image based on the matching result between the outline component elements and the outline component features of the operation button.

8. An operation key recognition device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the operation key recognition method according to any one of claims 1 to 6 when executing the computer program.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the operation key recognition method according to any one of claims 1 to 6 is implemented.