Method and apparatus for application scene recognition, device, and storage medium

By extracting background structural features from the application interface video and matching them with preset scenes, it solves the problem of insufficient complex scene recognition capabilities in the existing technology, achieves fast and accurate scene recognition, and is suitable for a variety of platforms and models.

WO2024193251A1PCT designated stage expired Publication Date: 2024-09-26TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/076194
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-21
Filing Date
2024-02-06
Publication Date
2024-09-26

AI Technical Summary

Technical Problem

Scene recognition methods in existing applications have limited recognition capabilities in complex scenes, especially targets that rotate or change in size, and the AI ​​model performs poorly in complex scene analysis and fade-out interference.

Method used

By obtaining the video of the application interface, extracting the interface image and determining the background structural features in the background area, matching and detecting the background structural features in the preset scene to determine whether the interface is in the preset scene, suitable for different platforms and models image.

Benefits of technology

It improves the speed and accuracy of application scene recognition, reduces complex feature extraction steps, is suitable for complex scene analysis, and is suitable for image recognition on different platforms and models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024076194_26092024_PF_FP
    Figure CN2024076194_26092024_PF_FP
Patent Text Reader

Abstract

A method for application scene recognition, executed by a computer device. The method comprises: acquiring a first video obtained by recording an interface of an application, and extracting a first interface image from the first video, the first interface image comprising a first interface element region where a preset interface element of the application is located, and further comprising a first background region other than the first interface element region (210); determining a first background structural feature of the first interface image in the first background region (220); acquiring a second background structural feature of an interface in a preset scene (225); determining whether the first background structural feature and the second background structural feature meet a preset matching condition; and when the first background structural feature and the second background structural feature meet the preset matching condition, determining that the interface recorded in the first interface image is in the preset scene (230).
Need to check novelty before this filing date? Find Prior Art

Description

Application scene recognition method, device, equipment and storage medium

[0001] Related applications

[0002] This application claims priority to Chinese patent application number 2023103188223, filed on March 21, 2023, entitled “Scene recognition method, device, equipment and storage medium for application program,” the entire text of which is incorporated herein by reference. Technical Field

[0003] The embodiments of the present application relate to the field of computer and Internet technology, and in particular to a scene recognition method, apparatus, device, and storage medium for an application. Background Art

[0004] Currently, application scenario recognition has been widely used in various fields. For example, in the field of automated assertions, scenario recognition can determine whether an assertion succeeds or fails by identifying whether the assertion success scenario occurs.

[0005] In the related art, a scene recognition method for an application is provided, which can perform scene recognition through a trained AI (Artificial Intelligence) model.

[0006] However, the scene recognition methods used in related art applications are limited in their scene recognition capabilities by various aspects such as training samples, models, and training algorithms, and cannot accurately recognize complex scenes.

[0007] Summary of the Invention

[0008] According to an embodiment of the present application, a method, apparatus, device, and storage medium for scene recognition of an application are provided.

[0009] In one aspect, a method for scene recognition of an application is provided, which is executed by a computer device, and the method includes:

[0010] Obtaining a first video obtained by recording the interface of the application program;

[0011] Extracting a first interface image from the first video, the first interface image including a first interface element area where a preset interface element of the application is located, and also including a first background area other than the first interface element area;

[0012] determining a first background structural feature of the first interface image in the first background area;

[0013] Acquire a second background structure feature of the interface in a preset scenario;

[0014] Determining whether the first background structure feature and the second background structure feature meet a preset matching condition; and

[0015] When the first background structure feature and the second background structure feature meet a preset matching condition, it is determined that the interface recorded in the first interface image is in the preset scene.

[0016] In one aspect, a scene recognition device for an application is provided, the device comprising:

[0017] An interface image acquisition module is configured to acquire a first video obtained by recording the interface of an application program; extract a first interface image from the first video, wherein the first interface image includes a first interface element area where preset interface elements of the application program are located, and also includes a first background area other than the first interface element area;

[0018] A first determining module, configured to determine a first background structural feature of the first interface image in the first background area;

[0019] A preset scene background structure feature acquisition module, used to acquire a second background structure feature of the interface under the preset scene; and

[0020] The second determination module is used to determine whether the first background structure feature and the second background structure feature meet the preset matching conditions; when the first background structure feature and the second background structure feature meet the preset matching conditions, determine that the interface recorded in the first interface image is in the preset scene.

[0021] In one aspect, a computer device is provided, comprising a processor and a memory, wherein the memory stores a computer program, and the processor is configured to execute the computer program to implement the scene recognition method of the above-mentioned application.

[0022] In one aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and the computer program is loaded and executed by a processor to implement the scene recognition method of the above application.

[0023] In one aspect, a computer program product is provided, comprising a computer program loaded and executed by a processor to implement the scene recognition method of the above application.

[0024] The details of one or more embodiments of the present application are set forth in the following drawings and description. Other features, objects, and advantages of the present application will become apparent from the description, drawings, and claims. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the conventional technology, the following briefly introduces the drawings required for use in the embodiments or the conventional technology descriptions. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the disclosed drawings without any creative work.

[0026] FIG1 is a schematic diagram of an implementation environment of a solution provided by an embodiment of the present application;

[0027] FIG2 is a flow chart of a scene recognition method for an application provided by one embodiment of the present application;

[0028] FIG3 is a schematic diagram of framing provided by an embodiment of the present application;

[0029] FIG4 is a schematic diagram of area division provided by an embodiment of the present application;

[0030] FIG5 is a schematic diagram of various area division methods provided by an embodiment of the present application;

[0031] FIG6 is a schematic diagram of a same-color through-line provided in one embodiment of the present application;

[0032] FIG7 is a flowchart of a scene recognition method for an application provided by another embodiment of the present application;

[0033] FIG8 is a block diagram of a scene recognition device for an application provided by one embodiment of the present application;

[0034] FIG9 is a block diagram of a scene recognition device for an application provided by another embodiment of the present application;

[0035] FIG10 is a structural block diagram of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0036] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0037] Please refer to Figure 1, which shows a schematic diagram of an implementation environment for a solution provided by an embodiment of the present application. The implementation environment for the solution can be implemented as a system architecture for scene recognition of an application. The implementation environment for the solution can include: a recognition device 100 and a collection device 200.

[0038] The recognition device 100 is used to recognize the interface image and determine whether the interface recorded in the interface image is in a preset scene. The recognition device 100 can be a computer device, and the computer device can be a terminal device 101 or a server 102, which is not limited in this application. The terminal device 101 can be an electronic device such as a PC (Personal Computer), a tablet computer, a mobile phone, a wearable device, an in-vehicle terminal, etc.

[0039] Server 102 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. Server 200 can be the background server of the target application, used to provide background services for the client of the target application.

[0040] The acquisition device 200 is used to obtain a first video obtained by recording the interface of the application, and extract a first interface image from the first video. The acquisition device 200 can be a terminal device. Terminal devices are electronic devices such as PCs (Personal Computers), tablets, mobile phones, wearable devices, and vehicle-mounted terminals. A client that runs the above-mentioned application can be installed in the acquisition device 200. This application does not limit the type of application. For example, the application can be a life service application, a sports application, a social application, etc. In addition, this application does not limit the form of the application, including but not limited to App (Application) installed in the terminal device 100, applets, etc., and can also be in the form of a web page.

[0041] The recognition device 100 and the acquisition device 200 can communicate with each other via a network, such as a wired or wireless network.

[0042] In the scene recognition method of the application provided in the embodiment of the present application, the execution subject of each step can be a computer device. A computer device refers to an electronic device with data calculation, processing and storage capabilities. Taking the solution implementation environment shown in Figure 1 as an example, the scene recognition method of the application can be executed by the recognition device 100 (for example, the scene recognition method of the application can be executed by the terminal device 101, or the scene recognition method of the application can be executed by the server 102), or the acquisition device 200 and the recognition device 100 can interact and cooperate to execute, and this application does not limit this. For ease of explanation, in the following method embodiments, only the execution subject of each step of the scene recognition method of the application is introduced as a computer device.

[0043] In the related art, two scene recognition methods for applications are provided. Among them, the first method relies on a pre-set template image with background structure features of a preset scene to perform template matching detection and feature matching detection with the interface image to achieve scene recognition of the application. The second method relies on a trained AI model to perform scene recognition on the interface image to determine whether the interface element area belongs to the interface of the preset scene. Among them, the interface image is the image corresponding to the interface element area of ​​the application.

[0044] However, the template matching method mentioned above has significant limitations. It can only handle parallel movement. If the matching target is rotated or resized, the algorithm cannot recognize it. Feature matching is also slow, and even with local high-priority detection, it remains difficult to overcome this speed bottleneck.

[0045] In the above-mentioned method 2, the AI ​​model has significant limitations in complex scene analysis, gradually disappearing and appearing interference, and engineering automation.

[0046] An embodiment of the present application provides a scene recognition method for an application program, which obtains a first video obtained by recording the interface of the application program, extracts a first interface image from the first video, determines a first background structural feature of the first interface image in a first background area of ​​the first interface image, and determines that the interface recorded in the first interface image is in a preset scene when the first background structural feature and the second background structural feature of the interface of the application program in a preset scene meet a preset matching condition. This scene recognition method can be applied to interface images obtained from different platforms and different models. It does not require a complex feature extraction process, which improves the speed of scene recognition for the application program.

[0047] Please refer to Figure 2, which shows a flow chart of a scene recognition method for an application provided by one embodiment of the present application. This embodiment uses the method as an example of applying the method to a computer device, that is, the method is executed by the computer device. The method may include at least one of the following steps 210 to 230.

[0048] Step 210, obtain a first video obtained by recording the interface of the application, extract a first interface image from the first video, the first interface image includes a first interface element area where the preset interface elements of the application are located, and also includes a first background area other than the first interface element area.

[0049] The first video is a video that requires scene recognition, and the first video is obtained by recording the interface of the application. The first video can be obtained by recording the process of the interface changing during the process of the application interface changing. The first video can be obtained by the user turning on screen recording on a computer device, and operating the application on the computer device to change the interface of the application. The computer device records the changes in the interface during the operation until the conditions for stopping recording are met, and the recorded first video is obtained. In other embodiments, the first video can also be obtained by one computer device recording the interface of an application displayed on another computer device.

[0050] Applications can be system applications installed on a computer device or third-party applications installed on the computer device, and this application does not limit this. System applications are applications that come with the computer device's operating system, while third-party applications are applications provided by third-party developers on the computer device. Third-party developers are application developers other than the operating system developers.

[0051] An interface image is an image of an application interface. The first interface image is an image of the application interface extracted from the first video. The application interface can be any interface within the application, for example, the application startup interface, or a functional interface of the application, such as a product browsing interface, a shopping cart interface, or a chat interface.

[0052] The interface image includes the interface element area where the preset interface elements of the application are located, and also includes the background area other than the interface element area. The preset interface elements are the preset elements that constitute the interface, and may include at least one of the images, texts, animations or controls displayed in the interface element area. The background area is all or part of the area in the interface image after removing the interface element area, such as the edge lines of independent areas in the interface, the isolation lines or isolation areas of adjacent areas, decorative shapes, etc. The first interface element area refers to the interface element area in the first interface image, and the first background area refers to the background area in the first interface image.

[0053] The computer device can frame the first video and use each image of the interface containing the application obtained by framing as the first interface image. It can also sample the first video at a certain time interval or video frame interval to obtain video frame images, and then determine the video frame image of the interface containing the application from the sampled video frame images as the first interface image.

[0054] Step 220: Determine a first background structural feature of the first interface image in the first background area.

[0055] Background structure features are used to characterize the structure of the background area. Specifically, background structure features describe the structure of the background area of ​​an interface image. Background structure features can be structures formed by the color, shape, brightness, or relative position of elements in the background area. The first background structure feature refers to the background structure feature of the first interface image.

[0056] In some embodiments, an image analysis algorithm may be used to determine the background structural features of the interface image. This application does not limit the specific image analysis algorithm.

[0057] For example, color can be used as the background structural feature of the interface image to describe the structure of the background area of ​​the interface image; brightness can be used as the background structural feature of the interface image to describe the structure of the background area of ​​the interface image; or through lines of the same color can be used to represent the background structural features of the interface image.

[0058] In some embodiments, the scene recognition method of the application further includes: determining a first background area of ​​the first interface image based on the first interface image. This application does not limit the method for determining the background area of ​​the first interface image. For example, the first interface image can be binarized to obtain a binary image, and the first background area of ​​the first interface image can be determined from the binary image. The binarization process can enhance the distinction between the preset interface elements and the background area in the interface image, so that the background area of ​​the interface image can be better identified.

[0059] For example, contour extraction can be performed on the first interface image to obtain a contour image of the first interface image, and the first background area of ​​the first interface image can be determined based on the contour image of the first interface image. The contour image of the first interface image displays the contours of the preset interface elements of the interface image, and the first background area of ​​the first interface image can be determined based on the contour lines displayed in the contour image of the first interface image. For example, the area outside the contour line circle is the background area of ​​the interface image.

[0060] In some embodiments, determining the first background area of ​​the first interface image based on the first interface image includes: binarizing the first interface image to obtain a binary image; extracting the contour of the binary image to obtain a contour image; determining the contour of the preset interface element in the contour image; and determining the first background area excluding the preset interface element in the first interface image based on the contour of the preset interface element in the contour image. In this embodiment, the binary image obtained by binarization can better express the difference between the preset interface element and the background area, thereby being able to more accurately determine the boundary of the preset interface element in the binary image. Since the binary image is obtained by binarizing the first interface image, the two have a consistent area arrangement. Based on the contour of the preset interface element in the contour image, the boundary of the preset interface element in the first interface image can be determined, thereby determining the area excluding the preset interface element in the first interface as the first background area.

[0061] For example, the preset interface elements contained in the first interface image can be identified, and the area of ​​the first interface image other than the preset interface elements is determined as the first background area of ​​the first interface image. This application does not limit the method for identifying the preset interface elements contained in the first interface image. For example, the preset interface elements contained in the first interface image can be identified by an AI model.

[0062] Through the above method, the first background area of ​​the first interface image can be better determined, and then the first background structural features of the first interface image can be determined from the first background area of ​​the first interface image.

[0063] Step 225: Acquire a second background structure feature of the interface of the application in a preset scenario.

[0064] A scenario refers to a specific function that can be achieved through the operation of an application interface. For example, the shopping function achieved through the interface is a shopping scenario; the instant messaging conversation function achieved through the interface operation is an instant messaging conversation scenario; the red envelope interaction function achieved through the interface operation is a red envelope interaction scenario. A preset scenario is a scenario that needs to be identified. That is, a known preset scenario needs to be identified to determine whether the interface recorded by the first interface image is in this preset scenario.

[0065] The second background structural feature is the background structural feature of the application interface in a preset scenario. The second background structural feature can be pre-set for the preset scenario or calculated in real time when needed. The application to which the interface of the second background structural feature belongs can be the same as or different from the application to which the interface in the first interface image belongs.

[0066] In some embodiments, the second background structure feature of the preset scene is obtained based on the second interface image of the preset scene.

[0067] In some embodiments, step 225 includes: obtaining a second interface image of a preset scene; the second interface image includes a second interface element area where the preset interface elements of the application are located, and also includes a second background area other than the second interface element area; determining the second background structural features of the second interface image in the second background area.

[0068] In some embodiments, the methods used to determine the second background structural features of the preset scene may be the same as or different from the methods used to determine the background structural features of the interface image, and this application does not limit this. The aforementioned methods may include: a method for determining the background area of ​​the interface image, and a method for determining the background area of ​​the second interface image.

[0069] In some embodiments, the background structural features of the interface image are represented in the same manner as the background structural features of the preset scene. For example, if the background structural features of the preset scene are represented by a through line, the background structural features of the interface image are also represented by a through line. For example, if the background structural features of the preset scene are represented by the color of a designated sub-region, the background structural features of the interface image are also represented by the color of the corresponding designated sub-region.

[0070] Step 225 may be performed at any step before step 230 , for example, before step 210 , or after step 220 and before step 230 .

[0071] Step 230 , determining whether the first background structure feature and the second background structure feature meet the preset matching conditions; when the first background structure feature and the second background structure feature meet the preset matching conditions, determining that the interface recorded in the first interface image is in a preset scene.

[0072] Matching conditions determine whether the interface in the first interface image belongs to a preset scene based on background structural features. Matching conditions are specifically related to the second background structural features. Furthermore, the second background structural features can include one or more types, and each type of second background structural feature corresponds to at least one matching condition.

[0073] If the first background structure feature and the second background structure feature meet the preset matching conditions, that is, the first background structure feature and the second background structure feature match, then it can be determined that the interface recorded in the first interface image is in the preset scene. If the first background structure feature and the second background structure feature do not meet the preset matching conditions, that is, the first background structure feature and the second background structure feature do not match, then it can be determined that the interface recorded in the first interface image is not in the preset scene.

[0074] In some embodiments, the preset matching condition includes: the first background structure feature and the second background structure feature are the same. In this embodiment, if the first background structure feature and the second background structure feature are the same, it can be determined that the interface in the first interface image is in the preset scene; if the first background structure feature and the second background structure feature are different, it can be determined that the interface in the first interface image is not in the preset scene.

[0075] In some embodiments, the preset matching condition includes: at least one first background structural feature among the plurality of first background structural features is the same as at least one second background structural feature among the plurality of second background structural features.

[0076] In some embodiments, determining whether the first background structural feature and the second background structural feature meet a preset matching condition includes calculating a matching degree between the first background structural feature and the second background structural feature, and determining whether the matching degree exceeds a preset matching degree threshold. When the matching degree exceeds the preset matching degree threshold, it can be determined that the first background structural feature and the second background structural feature meet the preset matching condition. The matching degree can be represented by the similarity between the first background structural feature and the second background structural feature. For different types of background structural features, an adaptive similarity calculation method can be used, for example, Euclidean distance or cosine similarity can be used as the matching degree.

[0077] The technical solution provided by the embodiment of the present application extracts the background structural features of the interface image from the background area of ​​the interface image, and determines whether the interface element area belongs to the interface of the preset scene by performing feature matching detection on the background structural features of the interface image and the background structural features of the preset scene. The processing is based on a simple image analysis algorithm, without the need for complex feature extraction steps, saving the time required for scene recognition of the application. Good results can also be achieved in the case of complex scene analysis. Moreover, scene recognition based on background structural features can be applied to images obtained from different platforms and different models.

[0078] In some embodiments, step 225 includes at least one of steps 240 - 250 .

[0079] Step 240: Acquire a second interface image in a preset scene. The second interface image includes a second interface element area where the preset interface elements of the application are located, and also includes a second background area other than the second interface element area.

[0080] Among them, the second interface image is an interface image that is known to be in a preset scene, and has a different source from the first interface image. The composition of the second interface image is consistent with that of the first interface image, and also includes an interface element area and a background area. To distinguish them from the interface element area and background area in the first interface image, they are respectively referred to as the second interface element area and the second background area. The second interface image records the interface in the preset scene. In some embodiments, the second interface image can be obtained by taking a screenshot of the interface of the application.

[0081] In some embodiments, the size of the second interface image of the preset scene can be the same as or different from the interface image, and this application does not limit this. For example, the second interface image and the interface image of the preset scene can be from different models of computer devices and have different sizes. The application to which the interface recorded in the second interface image belongs can be the same as or different from the application to which the interface recorded in the first interface image belongs.

[0082] In some embodiments, the aspect ratio of the second interface image in a preset scene is equal to that of the first interface image, or the difference between the aspect ratio of the second interface image in the preset scene and the aspect ratio of the first interface image is less than a preset threshold. In this embodiment, when the interface recorded by the first interface image is in the preset scene, the second interface image of the preset scene displays the same content as, or has minimal differences from, the interface recorded by the first interface image.

[0083] In some embodiments, the second interface image under the preset scene can be extracted from a video of the interface including the preset scene. Further, the second interface image under the preset scene can be extracted from a second video obtained by recording the interface of the application under the preset scene.

[0084] In some embodiments, obtaining a second interface image under a preset scene includes: obtaining a second video obtained by recording the interface of an application under a preset scene; selecting a starting video frame image in the preset scene from the second video; and using the starting video frame image as the second interface image under the preset scene. In this embodiment, the second video can be framed to obtain multiple video frame images, and the first video frame image in which the preset scene appears is selected from the multiple video frame images as the second interface image of the preset scene. It can be understood that the starting video frame image is a video frame image that can represent the preset scene. In the second video, when changing from a video frame image of an interface that does not record the preset scene to a video frame image that records the interface under the preset scene, the video frame image that transitions during the change process does not belong to the starting video frame image.

[0085] Exemplarily, as shown in FIG3 , the second video is divided into frames to obtain a plurality of video frame images, and a starting video frame image 310 in which a preset scene appears is selected from the plurality of video frame images as the second interface image of the preset scene.

[0086] In some embodiments, other video frames in a preset scene may also be selected from the second video. Specifically, candidate video frames in the preset scene may be determined from the various video frames of the second video, and then the background area in each candidate video frame may be determined, and then the degree of background structural feature conspicuity of the background area in each video frame may be determined, thereby selecting the video frame whose background structural feature conspicuity meets the preset screening criteria as the second interface image in the preset scene.

[0087] The degree of background structural feature prominence can be obtained by quantizing and mapping the background structural features in the candidate video frame image. For example, color value, brightness value, line width, whether the line is at a preset position, etc. can all be quantized and mapped into numerical values ​​and normalized to a unified value range, and then aggregated (such as summation or weighted summation) to obtain the degree of background structural feature prominence. The degree of background structural feature prominence can also be the similarity between the background structural features of the video frame image and the preset background structural features. The higher the similarity, the higher the degree of background structural feature prominence.

[0088] In this embodiment, a video frame image with obvious background structure features in a preset scene can be used as the second interface image in the preset scene, which helps to improve the accuracy of scene recognition of the first interface image.

[0089] In some embodiments, the second interface image of the preset scene may be obtained by clustering multiple video frame images.

[0090] In some embodiments, obtaining a second interface image under a preset scene includes: obtaining multiple candidate video frame images, the multiple candidate video frame images including video frame images in a video obtained by recording the interface under the preset scene; clustering the multiple candidate video frame images to obtain at least one cluster set; determining a cluster set that meets preset feature conditions of the preset scene from the at least one cluster set; and selecting the second interface image under the preset scene from the video frame images in the determined cluster set.

[0091] Among them, the preset feature condition is a condition for judging whether the video frame images in the cluster set are in a preset scene based on the features of the video frame images in the cluster set. The preset feature condition can be a feature that the interface in the preset scene has in common in its background area. Multiple candidate video frame images may include second interface images of multiple scenes. By clustering the multiple candidate video frame images, the second interface images of different scenes can be clustered into respective cluster sets. From the video frame images in the determined cluster set, the second interface image in the preset scene is selected. The selection can be random, or the video frame image whose background structure feature is obvious enough to meet the preset screening conditions can be selected.

[0092] In this embodiment, clustering can allow video frame images recording interfaces in the same scene to be clustered in the same cluster set, which helps to efficiently and accurately determine the second interface image in the preset scene and helps to improve the accuracy of scene recognition for the first interface image.

[0093] Step 250 : extracting background structural features of the second interface image in the second background area to obtain second background structural features of the interface in the preset scene.

[0094] The process of extracting background structural features from the second background area is consistent with the process of extracting the first background structural features from the first background area. For details on extracting the second background structural features from the second background area in the above embodiment, please refer to the relevant content. The extracted background structural features can be directly used as the second background structural features of the interface under the preset scene, or the extracted background structural features can be further processed to obtain the second background structural features of the interface under the preset scene. Further processing may include normalization or aggregation.

[0095] In the above embodiment, the background structure features of the preset scene are extracted from the second interface image of the preset scene to serve as the recognition standard for scene recognition of the preset scene, rather than directly using the second interface image of the preset scene as a template image. This can be applicable to images from different platforms and different models.

[0096] In some embodiments, when determining the background structural features of the interface image from the background area of ​​the first interface image, the first interface image can be divided into regions to extract the background structural features of the interface image at a finer granularity.

[0097] In some embodiments, the above step 220 may include at least one of the following steps 221 to 223 .

[0098] Step 221 : dividing the first interface image into regions to obtain a plurality of image regions.

[0099] This application does not limit the granularity of the region division of the first pair of interface images, and can be set according to the specific circumstances of the preset scene. For example, the first interface image can be divided into two image regions, or the interface image can be divided into six image regions. For example, as shown in Figure 4, the first interface image 410 can be divided into six image regions (B1 to B6).

[0100] In some embodiments, each image area may be divided evenly or unevenly, which is not limited in this application.

[0101] In some embodiments, the granularity of region division for the first interface image is the same as the method for region division for the second interface image. The above region division method can be understood as the position of each image region and the size ratio between each image region. For example, if the second interface image is divided into two regions, the region division method refers to the region division ratio of the two regions. For example, if region 1 and region 2 are arranged vertically and their size ratio is 1:1, then the interface image is divided into two upper and lower image regions according to the same region division method.

[0102] In some embodiments, the first interface image and the second interface image have different sizes, but the size ratio between the various image areas of the first interface image is the same as the size ratio between the various image areas of the second interface image.

[0103] Step 222: Determine, from the plurality of image regions, an image region divided from a designated position in the first interface image.

[0104] The designated location may be a pre-set location. In some embodiments, an interactive interface displaying multiple image regions divided from the first interface image may be provided to the user. The multiple image regions in the interactive interface are arranged according to their positions in the first interface image, and the designated location input by the user is determined, thereby determining the image region at the designated location from the multiple image regions. The designated location input by the user may be determined by touch operation or voice control, without limitation.

[0105] In some embodiments, the image area at the specified position in the first interface image corresponds one-to-one with the image area at the specified position in the second interface image. For example, as shown in FIG4 , if the image area at the specified position in the second interface image is B3, then the image area at the specified position in the first interface image is also B3.

[0106] Step 223 : Acquire the background structural features of the determined image area to obtain the first background structural features of the first interface image.

[0107] In some embodiments, a computer device may obtain an image area at at least one specified position among multiple image areas, determine the background structural features of each image area at at least one specified position from the background area of ​​the image area at at least one specified position, and then determine the first background structural features of the first interface image based on the background structural features of each image area at at least one specified position.

[0108] Among them, in some embodiments, the first background structural features of the first interface image are determined based on the respective background structural features of the image areas at at least one specified position. Specifically, the respective background structural features of the image areas at at least one specified position can be aggregated to obtain the first background structural features of the first interface image, and the first background structural features include the respective background structural features of the image areas at at least one specified position.

[0109] In some embodiments, the image area at the designated position can be set according to the background area of ​​the second interface image. For example, the image area outside the image area in the second interface image that has no intersection with the background area of ​​the second interface image can be determined as the image area at the designated position. That is, the image area that does not include at least a part of the background area in the second interface image is the image area at the non-designated position, and the image area that includes at least a part of the background area in the second interface image is the image area at the designated position. Since the image area at the non-designated position does not include at least a part of the background area of ​​the preset scene, the background structural features of the preset scene cannot be extracted in the non-designated image area. Therefore, when determining the first background structural features of the first interface image, there is no need to consider the image area at the non-designated position.

[0110] Similarly, since the area division method of the first interface image is the same as the area division method of the second interface image, the image area at the specified position of the interface image is in the same position as the image area at the specified position of the second interface image, that is, the specified image area of ​​the interface image is in one-to-one correspondence with the specified image area of ​​the second interface image.

[0111] Through the above embodiment, the first interface image is divided into regions, and the background structural features of the image regions at each specified location are extracted as the first background structural features of the first interface image. This allows for the extraction of fine-grained background structural features of the first interface image. Furthermore, by only extracting the background structural features of the image regions at the specified locations, the workload required for processing the first interface image is reduced.

[0112] In some embodiments, the first interface image may be divided into regions in a variety of different ways to extract background structural features of the first interface image at multiple granularities.

[0113] In some embodiments, the above step 220 may include at least one of the following steps 223 to 224.

[0114] Step 223 , adopting n different region division methods to divide the first interface image into regions, and obtaining n different region division results, each region division result including one or more image regions, where n is a positive integer.

[0115] In some embodiments, the n different region division methods mentioned above may be n different region division methods in which the number of image regions in the region division results is different.

[0116] For example, the region division result obtained by the first region division method includes 6 image regions, and the region division result obtained by the second region division method includes 36 image regions.

[0117] In some embodiments, the different n region division methods mentioned above may also result in different positions or sizes of image regions in region division results obtained by the region division.

[0118] For example, the region division result obtained by the first region division method includes three image regions arranged from top to bottom, and the size ratio between each image region is 1:1:1; the region division result obtained by the second region division method includes three image regions arranged from left to right, and the size ratio between each image region is 1:1:1; the region division result obtained by the third region division method includes three image regions arranged from left to right, and the size ratio between each image region is 1:1:2; the region division result obtained by the fourth region division method includes three image regions arranged from top to bottom, and the size ratio between each image region is 1:1:2.

[0119] In some embodiments, different region division methods correspond to different region division results, and each region division result includes one or more image regions. For example, as shown in FIG4 , the region division result corresponding to the first region division method includes one image region A1, the region division result corresponding to the second region division method includes six image regions B1 to B6, and the region division result corresponding to the third region division method includes thirty-six image regions C01 to C36.

[0120] Step 224 : Summarize the background structure features corresponding to the n types of region division results to obtain the first background structure feature of the first interface image.

[0121] The computer device may aggregate the background structural features corresponding to the n types of region division results to obtain a first background structural feature of the first interface image. Aggregating the background structural features corresponding to the n types of region division results may include combining the background structural features corresponding to the n types of region division results to obtain the first background structural feature of the first interface image, where the first background structural feature includes the background structural features corresponding to the n types of region division results; or may include merging the background structural features corresponding to the n types of region division results into the first background structural feature of the first interface image.

[0122] In some embodiments, for each of the n types of area division results, the background structure features are determined separately to obtain the first background structure features of the first interface image, including: for the i-th type of area division result among the n types of area division results, obtaining the background structure features of at least one specified image area in the i-th type of area division result, and obtaining the background structure features corresponding to the i-th type of area division result, where i is an integer less than or equal to n; summarizing the background structure features corresponding to each of the n types of area division results to obtain the first background structure features of the first interface image.

[0123] In some embodiments, for n types of region division results, a portion of the region division results may include the image area at the specified position, and the remaining portion of the region division results may not include the image area at the specified position. For example, as shown in FIG5 , the specified image areas are A1, C10, C11, C30, and C31, that is, the region division results corresponding to the second region division method do not include the image area at the specified position, and the region division results corresponding to the first region division method and the third region division method include the image area at the specified position. In this embodiment, different region division methods can characterize the characteristics of the background structure in the first interface image from different angles. By summarizing the background structure characteristics corresponding to each of the n types of region division results, the first background structure characteristics of the first interface image obtained can express richer information, which is conducive to more accurate scene recognition.

[0124] Through the above embodiment, based on the n types of area division results, the first background structure features of the first interface image are determined, and the background structure features of the first interface image at each granularity are taken into consideration, so that the first background structure features of the first interface image can better describe the background structure of the first interface image, thereby improving the accuracy of scene recognition of the application.

[0125] In some embodiments, an image analysis algorithm can be used to determine the background structural features of an interface image. An image analysis algorithm refers to an algorithm used to describe the structure of the background area of ​​an image. This application does not limit the specific image analysis algorithm. The following exemplifies several common methods for determining the background structural features of an interface image.

[0126] In some embodiments, the first background structural feature includes at least one of the color of at least one through line in the first background area, the number of at least one through line, the position of at least one through line, the color of a sub-area of ​​at least one specified position, or the brightness of a sub-area of ​​at least one specified position. A through line refers to a line that runs through the interface or a specified area in the interface along a certain direction on the interface. The through line can have a line width and visually appear to be a rectangle or a rounded rectangle. A sub-area is a part of the area included in the interface, such as an image area for displaying an image or a text area for displaying text. For example, as shown in Figure 6, through lines 611 to 622 are lines that run through the interface.

[0127] In some embodiments, the through lines can be represented as different colors according to their width (or height). For example, for a through line whose width (or height) exceeds a threshold, it can be represented as a first color; for a through line whose width (or height) does not exceed the threshold, it can be represented as a second color. The first color is different from the second color. Exemplarily, the first color can be green, and the second color can be red. Exemplarily, as shown in Figure 6, the widths of through lines 611, 618, 619 and 622 do not exceed the threshold, so they are represented as the second color, and the widths of through lines 612 to 617 and 621 all exceed the threshold, so they are represented as the first color. This application does not limit the above thresholds, and they can be set according to preset scenarios.

[0128] In some embodiments, the through-lines may include transverse through-lines and longitudinal through-lines. The through-lines 611 - 622 shown in FIG. 6 are all transverse through-lines.

[0129] In some embodiments, the above-mentioned first background structural features include at least one of the following: the color of at least one horizontal through-line in the first background area; the number of at least one horizontal through-line in the first background area; the position of at least one horizontal through-line in the first background area; the color of at least one vertical through-line in the first background area; the number of at least one vertical through-line in the first background area; the position of at least one vertical through-line in the first background area.

[0130] In some embodiments, the sub-region of the designated position may be a region consisting of one or more pixels in the interface image.

[0131] In some embodiments, the first background structure feature may include a combination of multiple background result features. For example, the first background structure feature may include at least one of the following: the number of at least one same-color continuous line in the first background area; the position of at least one same-color continuous line in the first background area; the number and position of at least one same-color continuous line in the first background area; and the color and brightness of a sub-area at at least one specified position in the first background area.

[0132] Of course, there may be other combinations, which are not listed here in this application.

[0133] Through the above method, the first background structure features of the first interface image are expressed in a simple way, avoiding complex and tedious feature extraction steps, improving the speed of determining the background structure features of the interface image, and further improving the scene recognition speed of the application.

[0134] In some embodiments, the scene recognition method of the above-mentioned application also includes: obtaining a first interface image that records the interface of the application in a preset scene, and obtaining a set of interface images to be evaluated; based on the first interface image in the set of interface images to be evaluated, evaluating the operation status of the application, and obtaining an operation evaluation result of the application.

[0135] In this embodiment, a first video is first obtained by recording the application interface. The content of the first video can be adjusted according to the application scenario in which the application operation evaluation is being performed. For example, if the evaluation is for the application startup performance, the first video includes the application startup process. Exemplarily, the first video includes the entire process from the user clicking the application to the display of the application startup interface.

[0136] Furthermore, the first video may be divided into frames to obtain a plurality of video frame images. During the framing, the first video may be divided into frames evenly according to a first time interval, that is, the time intervals between two adjacent video frame images are the same.

[0137] This application does not limit the specific duration of the first time interval. For example, the first time interval can be as short as possible within a certain range to ensure time accuracy. For another example, the first time interval can be as long as possible within a certain range to reduce the number of video frames obtained by framing. This certain range refers to a range that does not affect the accuracy of scene recognition by the application.

[0138] In some embodiments, the length of the first time interval can be adjusted based on the application scenario in which the application is being evaluated, or can vary based on the length of the first video, which is not limited in this application. For example, if the first video is long, the length of the first time interval is also relatively long; if the first video is short, the length of the first time interval is also relatively short.

[0139] Further, referring to steps 210 to 230 and related steps above, the computer device may traverse the plurality of video frame images, and use each traversed video frame image as a first interface image, wherein the first interface image includes a first interface element area where preset interface elements of the application are located, and also includes a first background area other than the first interface element area.

[0140] The computer device can determine the first background structure feature of the first interface image in the first background area; obtain the second background structure feature of the interface in a preset scene; and determine whether the first background structure feature and the second background structure feature meet the preset matching conditions.

[0141] When the first background structure feature and the second background structure feature meet the preset matching conditions, it is determined that the interface recorded in the first interface image is in a preset scene. When it is determined that the interface recorded in the first interface image is in the preset scene, the first interface image is added to the set of interface images to be evaluated, and the traversal is continued until the traversal is complete. Based on the first interface image in the set of interface images to be evaluated, the operation of the application is evaluated to obtain the application operation evaluation result.

[0142] The running status of an application may include at least one of the following: the startup status of the application, the instruction response status of the application. The startup status of the application may refer to the time required for the startup of the application. Taking the evaluation of the time required for the startup of an application as an example, the scenarios that need to be evaluated include preset scenarios: the application selection interface (such as the mobile phone desktop, computer desktop, etc.), the application startup interface (that is, the interface displayed when the application is started, such as the homepage of the application). In some embodiments, the above-mentioned preset scene includes a first sub-scene and a second sub-scene, the first sub-scene refers to the scene where the above-mentioned application selection interface is located, and the second sub-scene refers to the scene where the above-mentioned application startup interface is located.

[0143] At this time, you only need to determine the time interval between the last video frame image in the interface video frame image corresponding to the first sub-scene and the first video frame image in the interface video frame image corresponding to the second sub-scene to determine the time required to start the application, and determine the above time interval as the operation evaluation result of the application.

[0144] The application's command response status may include whether the application responds to the command. Therefore, this method can be used in automated testing of applications. Taking automated testing of applications as an example, the scenarios that need to be evaluated include a preset scenario: the application's command response interface.

[0145] In some embodiments, the preset scenario refers to the scenario that the command response interface of the application is in. The application testing process includes the process between sending a command to the application and the application responding to the command, and the process can be fully automated based on automated testing technology.

[0146] In this case, if the preset scene is not recognized in multiple video frames of the first video, it means that the application did not respond to the instruction and there is a problem with the application. If the preset scene is recognized in any video frame of the first video, it means that the application responded to the instruction and there is no problem with the application. Therefore, whether the preset scene is recognized in the video frame of the first video can be determined as the result of the application operation evaluation.

[0147] Of course, during the testing of the application, multiple scenarios can also be identified for multiple instructions. For example, the first instruction corresponds to scenario 1, and the second instruction corresponds to scenario 2. Therefore, scenario 1 and scenario 2 can be identified separately during the evaluation process.

[0148] In some embodiments, the application scene recognition method provided in the embodiments of this application can also be applied to terminal speed indicator evaluation (or speed analysis tasks), such as application startup speed, application instruction response speed, etc.; it can also be applied to automated assertions, such as automated testing. Of course, it can also be applied to other scenarios requiring scene recognition, such as identifying whether an image is a grassland scene, but this application is not limited to this.

[0149] The technical solution provided in the embodiment of the present application divides the video recorded of the interface of the application into frames to obtain multiple video frame images, identifies the interface in the multiple video frame images, and determines whether there is a video frame image of the interface belonging to a preset scene in the multiple video frame images, so as to realize the operation evaluation of the application and realize the full automation of the process of the operation evaluation of the application.

[0150] In summary, the embodiments of the present application provide a scenario recognition method for an application program, which can be used in the operation evaluation of the application program to achieve full automation of the operation evaluation process of the application program.

[0151] Exemplarily, as shown in FIG7 , the technical solution provided in the embodiment of the present application may include the following two parts: feature extraction 710 and scene determination 720 .

[0152] 1. Feature extraction

[0153] Obtain a second video (711). Divide the second video into frames to obtain video frame images (712). From the second video, select the starting video frame image in which the preset scene appears; use the starting video frame image as the second interface image under the preset scene (713). Use n different area division methods to divide the second interface image into regions, and obtain n different area division results, each of which includes one or more image regions, and n is a positive integer (714). For each of the n area division results, determine the background structure features (715). Screen and summarize the background structure features determined from each area division result to obtain the second background structure features (716) of the interface under the preset scene.

[0154] In step 712, in addition to splitting the second video into multiple video frame images, if the application operation evaluation includes speed analysis, uniform framing is used to ensure that the time between frames is fixed, and the framing interval should be short to ensure accuracy.

[0155] Step 714, hierarchical region division: Exemplarily, as shown in FIG6 , three region division methods are used to divide the second interface image into regions, where hierarchical division refers to dividing the second interface image into regions with different granularities. There are no restrictions on the number of layers (i.e., the number of different region division methods) and the number of region divisions (i.e., the number of image regions included in the region division results obtained by one region division method) for hierarchical region division, as long as the feature description can be effectively performed (i.e., the structure of the background of the second interface image can be effectively described). As shown in FIG6 , the core feature areas (specified image areas) A1, C10, C11, C30, and C31 of the preset scene can be found through 3 layers.

[0156] Step 715, identifying background structural features: In this step, any method that can effectively describe the structure of the background of the second interface image can be used. The most commonly used method is the through line of the same color as shown in FIG. 5 .

[0157] Isochromatic lines are generally classified into horizontal and vertical lines and are subject to width or height thresholds. Isochromatic lines whose width or height does not meet the thresholds are removed. The same calculation is performed on each image region (i.e., determining the Isochromatic lines), and the background structural features (represented by the Isochromatic lines) of all image regions can be obtained.

[0158] Step 716 extracts and records the main background structural features to obtain the second background structural features of the interface in the preset scene. As shown in Figure 5, the second background structural features of the second interface image include: A1 runs through 8 horizontally and 0 vertically, C10 runs through 1 vertically, C11 runs through 1 vertically, C30 runs through 1 vertically, and C31 runs through 1 vertically.

[0159] 2. Scene determination

[0160] Obtain a first video obtained by recording the interface of the application (721). Divide the first video into frames according to a first time interval to obtain a plurality of video frame images (722). For any one of the plurality of video frame images, determine the background structure features of the video frame image (723). Determine whether the traversal is completed (724). If not, use n different area division methods to divide the first interface image into regions to obtain n different area division results, each of which includes one or more image regions, and n is a positive integer (725). For each of the n area division results, determine the background structure features (726). Determine whether the first background structure feature and the second background structure feature meet the preset matching conditions (727). When the first background structure feature and the second background structure feature meet the preset matching conditions, determine that the interface recorded in the first interface image is in the preset scene, that is, the scene recognition is successful (728). If any video frame image does not recognize the preset scene, the scene does not appear (729).

[0161] The steps involved in scene determination can all refer to the methods of each step in feature extraction, and this application will not go into details here.

[0162] The technical solution provided by the embodiment of the present application determines the second background structure feature of the interface under the preset scene, and then matches the first background structure feature of the first interface image with the aforementioned second background structure feature to achieve scene recognition of the application. The processing is based on a simple image analysis algorithm, without the need for complex feature extraction steps, saving the time required for scene recognition of the application. Even in the case of complex scene analysis, good results can be achieved. Moreover, scene recognition based on background structure features can be applied to images obtained from different platforms and models.

[0163] The following are device embodiments of the present application, which can be used to implement the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.

[0164] Please refer to Figure 8, which shows a block diagram of a scene recognition device for an application provided by an embodiment of the present application. The device has the function of implementing the above-mentioned method example, and the function can be implemented by hardware or by executing corresponding software through hardware. The device can be the computer device introduced above, or it can be set in a computer device. As shown in Figure 8, the device 800 includes: an interface image acquisition module 810, a first determination module 820, a preset scene background structure feature acquisition module 825 and a second determination module 830.

[0165] The interface image acquisition module 810 is used to obtain the first video obtained by recording the interface of the application; extract the first interface image from the first video, the first interface image includes the first interface element area where the preset interface elements of the application are located, and also includes the first background area other than the first interface element area.

[0166] The first determining module 820 is configured to determine a first background structural feature of the first interface image in the first background area.

[0167] The preset scene background structure feature acquisition module 825 is used to acquire the second background structure feature of the interface in the preset scene.

[0168] The second determination module 830 is used to determine whether the first background structure feature and the second background structure feature meet the preset matching conditions; when the first background structure feature and the second background structure feature meet the preset matching conditions, it is determined that the interface recorded in the first interface image is in a preset scene.

[0169] In some embodiments, the first determination module 820 is used to divide the first interface image into regions to obtain multiple image regions; determine the image region divided from a specified position in the first interface image from the multiple image regions; obtain the background structure features of the determined image region to obtain the first background structure features of the first interface image.

[0170] In some embodiments, the first determination module 820 is used to divide the first interface image into regions using n different region division methods to obtain n different region division results, each region division result includes one or more image regions, and n is a positive integer; for each of the n region division results, the background structure features are determined respectively to obtain the first background structure features of the first interface image.

[0171] In some embodiments, the first determination module 820 is configured to obtain, for an i-th region division result among n region division results, background structural features of at least one specified image region in the i-th region division result, thereby obtaining a background structural feature corresponding to the i-th region division result, where i is an integer less than or equal to n; and to aggregate the background structural features corresponding to each of the n region division results to obtain a first background structural feature of the first interface image.

[0172] In some embodiments, the first background structural feature includes at least one of the color of at least one through line in the first background area, the number of at least one through line, the position of at least one through line, the color of a sub-area of ​​at least one specified position, or the brightness of a sub-area of ​​at least one specified position.

[0173] In some embodiments, the matching condition is that the first background structural feature and the second background structural feature are the same.

[0174] In some embodiments, as shown in FIG. 9 , the apparatus 800 further includes a third determining module 840 .

[0175] The third determination module 840 is used to binarize the first interface image to obtain a binary image; extract the contour of the binary image to obtain a contour image; determine the contour of the preset interface element in the contour image; and determine the first background area excluding the preset interface element in the first interface image based on the contour of the preset interface element in the contour image.

[0176] In some embodiments, as shown in FIG. 9 , the apparatus 800 further includes a fourth determining module 850 .

[0177] The fourth determination module 850 is used to obtain a first interface image that records the interface of the application in a preset scene, and obtain a set of interface images to be evaluated; based on the first interface image in the set of interface images to be evaluated, evaluate the operation status of the application and obtain an operation evaluation result of the application.

[0178] In some embodiments, as shown in FIG9 , the apparatus 800 further includes a preset scene background structure feature acquisition module 860 .

[0179] The preset scene background structure feature acquisition module 860 is used to obtain the second interface image under the preset scene. The second interface image includes the second interface element area where the preset interface elements of the application are located, and also includes a second background area other than the second interface element area; in the second background area, the background structure features of the second interface image are extracted to obtain the second background structure features of the interface under the preset scene.

[0180] In some embodiments, the preset scene background structure feature acquisition module 860 is used to obtain a second video obtained by recording the interface of the application in the preset scene; from the second video, select the starting video frame image where the preset scene appears; and use the starting video frame image as the second interface image in the preset scene.

[0181] In some embodiments, the preset scene background structure feature acquisition module 860 is used to obtain multiple candidate video frame images, the multiple candidate video frame images including video frame images in a video obtained by recording an interface under a preset scene; clustering the multiple candidate video frame images to obtain at least one cluster set; determining a cluster set that meets the preset feature conditions of the preset scene from the at least one cluster set; and selecting a second interface image under the preset scene from the video frame images in the determined cluster set.

[0182] The technical solution provided by the embodiment of the present application extracts the background structural features of the interface image from the background area of ​​the interface image, and determines whether the interface element area belongs to the interface of the preset scene by performing feature matching detection on the background structural features of the interface image and the background structural features of the preset scene. The processing is based on a simple image analysis algorithm, without the need for complex feature extraction steps, saving the time required for scene recognition of the application. Good results can also be achieved in the case of complex scene analysis. Moreover, scene recognition based on background structural features can be applied to images obtained from different platforms and different models.

[0183] It should be noted that, when the device provided in the above embodiment realizes its function, it only uses the division of the above-mentioned functional modules as an example. In actual application, the above-mentioned functions can be assigned to different functional modules according to actual needs, that is, the content structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0184] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0185] Please refer to Figure 10, which shows a schematic diagram of the structure of a computer device provided in one embodiment of the present application. The computer device can be any electronic device with data calculation, processing and storage functions. The computer device can be used to implement the scene recognition method of the application provided in the above embodiment. Specifically:

[0186] The computer device 1000 includes a central processing unit (CPU, central processing unit), GPU (graphics processing unit), and FPGA (field programmable gate array) 1001, a system memory 1004 including RAM (random-access memory) 1002 and ROM (read-only memory) 1003, and a system bus 1005 connecting the system memory 1004 and the central processing unit 1001. The computer device 1000 also includes a basic input / output system (I / O system) 1006 for facilitating information transmission between various components within the server, and a non-volatile storage device 1007 for storing an operating system 1013, application programs 1014, and other program modules 1015.

[0187] In some embodiments, the basic input / output system 1006 includes a display 1008 for displaying information and an input device 1009, such as a mouse or keyboard, for user input. Both the display 1008 and the input device 1009 are connected to the central processing unit 1001 via an input / output controller 1010 connected to the system bus 1005. The basic input / output system 1006 may also include an input / output controller 1010 for receiving and processing input from a variety of other devices, such as a keyboard, mouse, or electronic stylus. Similarly, the input / output controller 1010 also provides output to a display screen, printer, or other types of output devices.

[0188] The non-volatile storage device 1007 is connected to the central processing unit 1001 via a storage controller (not shown) connected to the system bus 1005. The non-volatile storage device 1007 and its associated computer-readable medium provide non-volatile storage for the computer device 1000. In other words, the non-volatile storage device 1007 may include a computer-readable medium (not shown) such as a hard disk or a CD-ROM (Compact Disc Read-Only Memory) drive.

[0189] Without loss of generality, the computer-readable medium may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer-readable instructions, data structures, program modules or other data. Computer storage media include RAM, ROM, EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory or other solid-state storage technology, CD-ROM, DVD (Digital Video Disc) or other optical storage, tape cassettes, magnetic tape, disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that the computer storage medium is not limited to the above-mentioned ones. The above-mentioned system memory 1004 and non-volatile storage device 1007 can be collectively referred to as memory.

[0190] According to an embodiment of the present application, the computer device 1000 can also be connected to a remote computer on a network such as the Internet for operation. That is, the computer device 1000 can be connected to the network 1012 via the network interface unit 1011 connected to the system bus 1005, or the network interface unit 1011 can be used to connect to other types of networks or remote computer systems (not shown).

[0191] The memory further includes a computer program, which is stored in the memory and configured to be executed by one or more processors to implement the scene recognition method of the above application.

[0192] In an exemplary embodiment, a computer-readable storage medium is further provided, wherein the storage medium stores a computer program, and when the computer program is executed by a processor of a computer device, the computer program implements the scene recognition method of the above application program.

[0193] Optionally, the computer-readable storage medium may include: ROM (Read-Only Memory), RAM (Random-Access Memory), SSD (Solid State Drives), or an optical disk, etc. Among them, the random access memory may include ReRAM (Resistance Random Access Memory) and DRAM (Dynamic Random Access Memory).

[0194] In an exemplary embodiment, a computer program is also provided, the computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the scene recognition method of the above application.

[0195] It should be noted that this application can display a prompt interface, pop-up window or output voice prompt information before collecting the user's relevant data and during the process of collecting the user's relevant data. The prompt interface, pop-up window or voice prompt information is used to remind the user that its relevant data is currently being collected, so that this application only starts to execute the relevant steps of obtaining the user's relevant data after obtaining the user's confirmation operation on the prompt interface or pop-up window. Otherwise (that is, when the user's confirmation operation on the prompt interface or pop-up window is not obtained), the relevant steps of obtaining the user's relevant data are terminated, that is, the user's relevant data is not obtained. In other words, all user data collected by this application (including the title information of the online meeting and the user account) are processed strictly in accordance with the requirements of relevant national laws and regulations. The informed consent or separate consent of the personal information subject is obtained only when the user agrees and authorizes it to be collected, and the subsequent data use and processing behavior is carried out within the scope of authorization of laws and regulations and the personal information subject. The collection, use and processing of relevant user data must comply with the relevant laws, regulations and standards of relevant countries and regions.

[0196] It should be understood that the term "plurality" used herein refers to two or more. "And / or" describes a relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, or B exists alone. The character " / " generally indicates an "or" relationship between the associated objects.

[0197] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0198] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present application, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.

Claims

1. A scene recognition method for an application, executed by a computer device, the method comprising: Obtaining a first video obtained by recording the interface of the application program; Extracting a first interface image from the first video, the first interface image including a first interface element area where a preset interface element of the application is located, and also including a first background area except the first interface element area; Determining a first background structural feature of the first interface image in the first background area; Acquire a second background structure feature of the interface in a preset scenario; Determining whether the first background structure feature and the second background structure feature meet a preset matching condition; and When the first background structure feature and the second background structure feature meet the preset matching condition, it is determined that the interface recorded in the first interface image is in the preset scene.

2. The method according to claim 1, wherein determining the first background structure feature of the first interface image in the first background area comprises: Dividing the first interface image into regions to obtain a plurality of image regions; Determining, from the plurality of image regions, an image region divided from a designated position in the first interface image; The background structure feature of the determined image area is acquired to obtain the first background structure feature of the first interface image.

3. The method according to claim 1, wherein determining the first background structure feature of the first interface image in the first background area comprises: Using n different area division methods to divide the first interface image into regions, obtaining n different area division results, each of which includes one or more image regions, and n is a positive integer; For each of the n types of region division results, background structural features are determined respectively to obtain first background structural features of the first interface image.

4. The method according to claim 3, wherein for each of the n types of area division results, respectively determining background structural features to obtain first background structural features of the first interface image comprises: For an i-th region division result among the n region division results, obtaining background structure features of at least one specified image region in the i-th region division result, and obtaining background structure features corresponding to the i-th region division result, where i is an integer less than or equal to n; The background structure features corresponding to the n types of area division results are summarized to obtain the first background structure feature of the first interface image.

5. According to the method described in any one of claims 1 to 4, the first background structural feature includes at least one of the color of at least one through line in the first background area, the number of at least one through line, the position of at least one through line, the color of a sub-area of ​​at least one specified position, or the brightness of a sub-area of ​​at least one specified position.

6. The method according to any one of claims 1 to 5, wherein the matching condition is that the first background structure feature and the second background structure feature are the same.

7. The method according to any one of claims 1 to 6, further comprising: Binarizing the first interface image to obtain a binary image; Extracting the contour of the binary image to obtain a contour image; Determining the outline of a preset interface element in the outline image; According to the outline of the preset interface element in the outline image, a first background area excluding the preset interface element is determined in the first interface image.

8. The method according to any one of claims 1 to 6, further comprising: Identifying a preset interface element included in the first interface image; In the first interface image, an area except the preset interface elements is determined as a first background area of ​​the first interface image.

9. The method according to any one of claims 1 to 8, further comprising: Acquire the first interface image recording the interface of the application in the preset scene, and obtain a set of interface images to be evaluated; Based on the first interface image in the set of interface images to be evaluated, the operation status of the application is evaluated to obtain an operation evaluation result of the application.

10. According to the method of any one of claims 1 to 9, the step of acquiring the second background structure feature of the interface in a preset scene comprises: Acquire a second interface image in a preset scene, wherein the second interface image includes a second interface element area where the preset interface element of the application is located, and also includes a second background area except the second interface element area; In the second background area, background structural features of the second interface image are extracted to obtain second background structural features of the interface in a preset scene.

11. The method according to claim 10, wherein acquiring the second interface image in a preset scene comprises: Acquire a second video obtained by recording the interface of the application program in a preset scenario; Selecting a starting video frame image in which the preset scene appears from the second video; The starting video frame image is used as the second interface image in a preset scene.

12. The method according to claim 10, wherein obtaining the second interface image in a preset scene comprises: Acquire a plurality of candidate video frame images, wherein the plurality of candidate video frame images include video frame images in a video obtained by recording an interface under a preset scene; Clustering multiple candidate video frame images to obtain at least one cluster set; Determining a cluster set that meets the preset feature condition of the preset scenario from the at least one cluster set; A second interface image under a preset scene is selected from the determined video frame images in the cluster set.

13. A scene recognition device for an application, the device comprising: An interface image acquisition module, used to acquire a first video obtained by recording the interface of the application program; Extracting a first interface image from the first video, the first interface image including a first interface element area where a preset interface element of the application is located, and also including a first background area except the first interface element area; A first determining module, configured to determine a first background structural feature of the first interface image in the first background area; A preset scene background structure feature acquisition module, used to acquire a second background structure feature of the interface under the preset scene; and A second determination module, used to determine whether the first background structure feature and the second background structure feature meet a preset matching condition; When the first background structure feature and the second background structure feature meet the preset matching condition, it is determined that the interface recorded in the first interface image is in the preset scene.

14. A computer device, comprising a processor and a memory, wherein a computer program is stored in the memory, and the processor is configured to execute the computer program to implement the method according to any one of claims 1 to 12.

15. A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, wherein the computer program is loaded and executed by a processor to implement the method according to any one of claims 1 to 12.

16. A computer program product, comprising a computer program, wherein the computer program is loaded and executed by a processor to implement the method according to any one of claims 1 to 12.

Citation Information

Patent Citations

  • Information processing method and device, electronic equipment and computer readable storage medium

    CN108875820A

  • Image scene recognition method and device based on artificial intelligence and electronic equipment

    CN112699855A

  • Real-time online photo clustering method and system based on background similarity

    CN113780424A

  • Image matching method and device, electronic equipment, storage medium and related product

    CN114067136A