Application scene recognition method and device, equipment and storage medium

By extracting and matching the background structural features of the application display interface, the problem of low efficiency of complex scene recognition in the existing technology is solved, and fast and accurate scene recognition is achieved, which is suitable for a variety of platforms and models.

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

Patent Information

Application Number
CN202310318822.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-21
Publication Date
2024-09-24

AI Technical Summary

Technical Problem

Existing application scene recognition methods have limitations in complex scene recognition. In particular, template matching detection is difficult to identify targets that rotate or change in size, and the AI ​​model is inefficient in complex scene analysis and fade-out interference.

Method used

By extracting the background structural features of the application display interface and matching them with the background structural features of the target scene to determine whether the interface belongs to a specific scene, a simple image analysis algorithm is used to avoid complex feature extraction steps and is suitable for different platforms and models. image.

Benefits of technology

It improves the speed and accuracy of application scene recognition, is suitable for complex scene analysis, saves recognition time, and is suitable for images of different platforms and models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118691832A
    Figure CN118691832A
Patent Text Reader

Abstract

The invention discloses a scene recognition method and device for an application program, equipment and a storage medium, and relates to the technical field of computers and the Internet. The method comprises the steps of obtaining a first image corresponding to a first display interface of an application program; background structure features of the first image are determined from the background area of the first image, and the background structure features refer to features reflecting the structure of the background area; and when the background structure feature of the first image is matched with the background structure feature of the first scene, determining that the first display interface belongs to the display interface of the first scene. Processing is carried out based on a simple image analysis algorithm, a complex feature extraction step is not needed, and time needed by scene recognition of the application program is saved. And a good effect can also be obtained for the condition of complex scene analysis. Scene recognition is carried out based on background structure features, and the method can be suitable for images obtained by different platforms and different models.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

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

[0003] In the related technology, a scene recognition method for an application is provided, which can perform scene recognition on a first image through a trained AI (Artificial Intelligence) model to determine whether a first display interface belongs to a display interface of a first scene, and the first image is an image corresponding to the first display interface of the application.

[0004] However, the above methods have great limitations in complex scene recognition. Summary of the invention

[0005] The embodiment of the present application provides a scene recognition method, device, equipment and storage medium for an application. The technical solution provided by the embodiment of the present application is as follows.

[0006] According to one aspect of an embodiment of the present application, a scene recognition method for an application is provided, the method comprising:

[0007] Obtaining a first image corresponding to a first display interface of an application program;

[0008] Determining background structural features of the first image from a background region of the first image, wherein the background structural features refer to features reflecting a structure of the background region;

[0009] When the background structure feature of the first image matches the background structure feature of the first scene, it is determined that the first display interface belongs to the display interface of the first scene.

[0010] According to one aspect of an embodiment of the present application, a scene recognition device for an application is provided, the device comprising:

[0011] An acquisition module, used to acquire a first image corresponding to a first display interface of an application program;

[0012] A first determining module, configured to determine background structural features of the first image from a background region of the first image, wherein the background structural features refer to features reflecting a structure of the background region;

[0013] The second determination module is used to determine that the first display interface belongs to the display interface of the first scene when the background structure feature of the first image matches the background structure feature of the first scene.

[0014] According to one aspect of an embodiment of the present application, a terminal device is provided, the terminal device comprising a processor and a memory, the memory storing a computer program, and the processor being used to execute the computer program to implement the scene recognition method of the above-mentioned application.

[0015] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is loaded and executed by a processor to implement the scene recognition method of the above application.

[0016] According to one aspect of an embodiment of the present application, a computer program product is provided. The computer program product includes a computer program. The computer program is loaded and executed by a processor to implement the scene recognition method of the above application.

[0017] The technical solution provided in the embodiments of the present application can bring the following beneficial effects:

[0018] By extracting the background structure features of the first image in the background area of ​​the first image, and performing feature matching detection on the background structure features of the first image and the background structure features of the first scene, it is determined whether the first display interface belongs to the display interface of the first scene. Processing is performed 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. And scene recognition based on background structure features can be applied to images obtained from different platforms and models. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 It is a schematic diagram of an implementation environment of a solution provided by an embodiment of the present application;

[0020] Figure 2 is a flow chart of a scene recognition method of an application provided by an embodiment of the present application;

[0021] Figure 3 is a schematic diagram of framing provided by an embodiment of the present application;

[0022] Figure 4 It is a schematic diagram of a partition provided by an embodiment of the present application;

[0023] Figure 5 It is a schematic diagram of multiple partitioning methods provided by an embodiment of the present application;

[0024] Figure 6 is a schematic diagram of a same-color through-line provided by an embodiment of the present application;

[0025] Figure 7 is a flow chart of an application program operation evaluation method provided by an embodiment of the present application;

[0026] Figure 8 is a flow chart of a scene recognition method of an application provided by another embodiment of the present application;

[0027] Fig. 9 is a block diagram of a scene recognition device of an application provided by an embodiment of the present application;

[0028] Fig.10 is a block diagram of a scene recognition device of an application provided by another embodiment of the present application;

[0029] Fig.11 It is a structural block diagram of a computer device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0030] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

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

[0032] The recognition device 100 is used to recognize the first image and determine whether the first display interface of the application belongs to the display interface of the first 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, a vehicle-mounted terminal, etc.

[0033] Server 102 may 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 may be a background server of the target application, used to provide background services for the client of the target application.

[0034] The acquisition device 200 is used to acquire the first image corresponding to the first display interface of the application. The acquisition device 200 can be a terminal device. Terminal devices are electronic devices such as PCs (Personal Computers), tablet computers, 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.

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

[0036] In the scene recognition method for an application provided in the embodiment of the present application, the execution subject of each step may be a computer device. The computer device refers to an electronic device with data calculation, processing and storage capabilities. Figure 1 Taking the implementation environment of the scheme shown 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 by the server 102), or the acquisition device 200 and the recognition device 100 can be executed in cooperation with each other, and this application does not limit this. For the convenience 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.

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

[0038] However, in the above method 1, template matching detection has great limitations, mainly in that it can only move in parallel. If the matching target is rotated or changes in size, the algorithm cannot recognize it. Feature matching detection runs slowly, and even through local high-priority judgment, it is still difficult to break through the speed bottleneck.

[0039] In the above-mentioned method 2, the AI ​​model has great limitations in complex scene analysis, gradual interference and engineering automation.

[0040] The embodiment of the present application provides a scene recognition method for an application program. By extracting the background structure features of a first image corresponding to a first display interface of the application program, and matching the background structure features of the first image with the background structure features of the first scene, it is possible to determine whether the first display interface is a display interface of the first scene. The feature matching method can be applied to first images obtained on different platforms and different models. There is no need for a complex feature extraction process, which improves the speed of scene recognition for the application program.

[0041] Please refer to Figure 2 , which shows a flow chart of a scene recognition method for an application provided by an embodiment of the present application. The method may include at least one of the following steps 210 to 230.

[0042] Step 210: Acquire a first image corresponding to a first display interface of the application.

[0043] The application can be a system application installed in the terminal device, or a third-party application installed in the terminal device, which is not limited in this application.

[0044] The first display interface refers to the user interface of the application. The user interface can be any display interface within the application, for example, the user interface can be the startup interface of the application, or can be the function display interface of the application.

[0045] The first image refers to an image including the display content of the first display interface, such as a screenshot of the first display interface. The display content of the first display interface includes the foreground interface elements in the first display interface and the background area of ​​the first display interface. The foreground display elements of the first display interface may include pictures, texts, animations, etc. displayed in the first display interface.

[0046] Step 220: determining background structural features of the first image from the background region of the first image, where the background structural features are used to characterize the structure of the background region.

[0047] The background area of ​​the first image refers to other areas of the first image except for the foreground interface elements. The foreground interface elements may include various controls included in the first display interface, pictures, texts, animations, etc. displayed in the first display interface.

[0048] The background structure feature is used to characterize the structure of the background region, that is, the background structure feature is used to describe the structure of the background region of the first image.

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

[0050] Exemplarily, color can be used as the background structure feature of the first image to describe the structure of the background area of ​​the first image; brightness can be used as the background structure feature of the first image to describe the structure of the background area of ​​the first image; or through lines of the same color can be used to characterize the background structure feature of the first image.

[0051] In some embodiments, a background area of ​​the first image is determined based on the first image; and background structural features of the first image are determined from the background area of ​​the first image.

[0052] The present application does not limit the method for determining the background area of ​​the first image. For example, the first image can be binarized to obtain a binary image, and the background area of ​​the first image can be determined from the binary image. The binarization process can increase the difference between the foreground interface elements and the background area of ​​the first image, so that the background area of ​​the first image can be better identified.

[0053] Exemplarily, the first image may be subjected to contour extraction to obtain a contour image of the first image, and the background area of ​​the first image may be determined based on the contour image of the first image. The contour image of the first image displays the contour of the foreground interface element of the first image, and the background area of ​​the first image may be determined based on the contour lines displayed in the contour image of the first image. For example, the area outside the contour line circle is the background area of ​​the first image.

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

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

[0056] Step 230: When the background structure feature of the first image matches the background structure feature of the first scene, determine that the first display interface belongs to the display interface of the first scene.

[0057] The first scene refers to the scene to be identified, that is, the scene recognition method of the application provided in the embodiment of the present application is used to identify whether the first display interface corresponding to the first image belongs to the display interface of the first scene.

[0058] In some embodiments, the background structure feature of the first image matches the background structure feature of the first scene, which means that the background structure feature of the first image is the same as the background structure feature of the first scene.

[0059] In some embodiments, when the background structure feature of the first image is the same as the background structure feature of the first scene, it is determined that the first display interface belongs to the display interface of the first scene.

[0060] In some embodiments, when the background structure features of the first image do not match the background structure features of the first scene, it is determined that the first display interface does not belong to the display interface of the first scene.

[0061] In some embodiments, the background structure feature of the first scene is obtained based on a scene image of the first scene.

[0062] In some embodiments, a scene image of a first scene is acquired; background structural features of the scene image are determined from a background area of ​​the scene image, and the background structural features of the scene image are determined as the background structural features of the first scene.

[0063] In some embodiments, the various methods used in determining the background structural features of the first scene may be the same as or different from the various methods used in determining the background structural features of the first image, and this application does not limit this. The above methods may include: a method for determining the background area of ​​the first image, and a method for determining the background area of ​​the scene image.

[0064] In some embodiments, the background structure features of the first image are represented in the same way as the background structure features of the first scene. For example, if the background structure features of the first scene are represented by through lines, then the background structure features of the first image are also represented by through lines. For example, if the background structure features of the first scene are represented by the color of a specified sub-region, then the background structure features of the first image are also represented by the color of the corresponding specified sub-region.

[0065] The technical solution provided by the embodiment of the present application extracts the background structure features of the first image in the background area of ​​the first image, and determines whether the first display interface belongs to the display interface of the first scene by performing feature matching detection on the background structure features of the first image and the background structure features of the first 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. And scene recognition based on background structure features can be applicable to images obtained from different platforms and models.

[0066] In some embodiments, before step 230, at least one of steps 240 to 260 is further included.

[0067] Step 240: Acquire a scene image of the first scene, wherein the display interface in the scene image belongs to the display interface of the first scene.

[0068] In some embodiments, the scene image of the first scene refers to an image corresponding to the display interface of the first scene. The display interface of the first scene can be obtained from the user interface of the application. Exemplarily, the display interface of the first scene can be a screenshot of the user interface belonging to the first scene.

[0069] In some embodiments, the scene image of the first scene and the first image may have the same or different sizes, which is not limited in this application. For example, the scene image of the first scene and the first image may be from different models of terminal devices and have different sizes.

[0070] In some embodiments, the aspect ratio of the scene image of the first scene is equal to the aspect ratio of the first image, or the aspect ratio of the scene image of the first scene is approximately equal to the aspect ratio of the first image. That is, when the first display interface belongs to the display interface of the first scene, the scene image of the first scene and the display interface included in the first image display the same content, or the difference is small, and the deviation can be ignored.

[0071] In some embodiments, the scene image of the first scene may be obtained from a video including a display interface of the first scene.

[0072] In some embodiments, a starting image frame where the first scene appears is selected from the second video as the scene image of the first scene.

[0073] In some embodiments, the second video is divided into frames to obtain a plurality of image frames, and a starting image frame in which the first scene appears is selected from the plurality of image frames as the scene image of the first scene.

[0074] For example, Figure 3 As shown, the second video is divided into frames to obtain a plurality of image frames, and a starting image frame 310 where the first scene appears is selected from the plurality of image frames as the scene image of the first scene.

[0075] In some embodiments, other image frames in which the first scene appears may also be selected. For example, in the second video, image frames in which the background structure features of the first scene are obvious are selected as scene images of the first scene. This application does not limit this.

[0076] In some embodiments, the scene image of the first scene may be obtained by clustering multiple image frames.

[0077] In some embodiments, multiple candidate image frames are clustered to obtain at least one cluster set, a cluster set corresponding to the first scene is determined from the at least one cluster set, and a scene image of the first scene is determined from the image frames included in the cluster set corresponding to the first scene.

[0078] In some embodiments, the multiple candidate image frames may include scene images of multiple scenes, and by clustering the multiple candidate image frames, the scene images of different scenes may be clustered into respective cluster sets.

[0079] Step 250: Determine background structural features of the scene image from the background area of ​​the scene image.

[0080] In some embodiments, a background area of ​​the first scene is determined based on the scene image; and background structural features of the scene image are determined from the background area of ​​the scene image.

[0081] The method for determining the background area of ​​the first scene may be the same as the method for determining the background area of ​​the first image, and will not be described in detail in this application.

[0082] Step 260: Obtain background structural features of the first scene based on the background structural features of the scene image.

[0083] In some embodiments, the background structural features of the scene image are determined as the background structural features of the first scene.

[0084] Through the above method, the background structure features of the first scene are extracted from the scene image of the first scene to serve as the recognition standard for scene recognition of the first scene, rather than directly using the scene image of the first scene as a template image. This method can be applicable to images from different platforms and different models.

[0085] In some embodiments, when determining the background structural features of the first image from the background area of ​​the first image, the first image may be partitioned to extract the background structural features of the first image at a finer granularity.

[0086] In some embodiments, the above step 220 may be replaced by at least one of the following steps 221 to 222.

[0087] Step 221, partition the first image to obtain multiple image regions.

[0088] The present application does not limit the granularity of partitioning the first image, and it can be set according to the specific situation of the first scene. For example, the first image can be divided into 2 image areas, or the first image can be divided into 6 image areas. Figure 4 As shown, the first image 410 may be divided into six image areas (B1-B6).

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

[0090] In some embodiments, the granularity of partitioning the first image is the same as the method of partitioning the scene image. The above partitioning method can be understood as the position of each image area and the size ratio between each image area. For example, the scene image is divided into two areas, and the partitioning method refers to the partition ratio of the two areas. For example, area 1 and area 2 are arranged up and down, and their size ratio is 1:1, then the first image is divided into two upper and lower image areas according to the same partitioning method.

[0091] In some embodiments, the first image and the scene image have different sizes, but the size ratio between the image regions of the first image is the same as the size ratio between the image regions of the scene image.

[0092] Step 222: Acquire background structural features of at least one designated image area among the multiple image areas to obtain background structural features of the first image.

[0093] In some embodiments, a background region of at least one designated image region among the plurality of image regions is acquired, and background structural features of the at least one designated region are determined from the background region of the at least one designated region.

[0094] In some embodiments, the designated image area of ​​the first image corresponds to the designated image area of ​​the scene image in a one-to-one manner. Figure 4 As shown, the designated image area of ​​the scene image is B3, and the designated image area of ​​the first image is also B3.

[0095] In some embodiments, the designated image area may be set according to the background area of ​​the scene image, for example, an image area other than the image area that does not include the background area of ​​the scene image is determined as the designated image area. That is, the image area that does not include the background area of ​​the scene image is the non-designated image area, and the image area that includes the background area of ​​the scene area is the designated image area. Since the non-designated image area does not include the background area of ​​the first scene, the background structure features of the first scene cannot be extracted from the non-designated image area. Therefore, when determining the background structure features of the first scene, there is no need to consider the non-designated image area.

[0096] Similarly, since the partitioning method of the first image is the same as that of the scene image, the relative position of the designated image area of ​​the first image and the designated image area of ​​the scene image is the same, that is, the designated image area of ​​the first image and the designated image area of ​​the scene image are one-to-one corresponding.

[0097] Through the above method, the first image is partitioned and the background structure features of each specified image area are extracted respectively as the background structure features of the first image. The background structure features of the first image on a fine-grained basis can be extracted, and only the background structure features of the specified image area are extracted, thereby reducing the workload required for processing the first image.

[0098] In some embodiments, the first image may be partitioned in a variety of different ways to extract background structure features of the first image at multiple granularities.

[0099] In some embodiments, the above step 220 may be replaced by at least one of the following steps 223 to 224.

[0100] Step 223, partitioning the first image using n different partitioning methods to obtain n partitioning results; wherein different partitioning methods correspond to different partitioning results, and each partitioning result includes one or more image areas, and n is an integer greater than 1.

[0101] In some embodiments, the n different partitioning methods mentioned above may be partitioning results obtained by partitioning, with different numbers of image areas. For example, the partitioning result obtained by the first partitioning method includes 6 image areas, and the partitioning result obtained by the second partitioning method includes 36 image areas.

[0102] In some embodiments, the n different partitioning methods mentioned above may also be different positions or size ratios of the image areas in the partitioning results obtained by partitioning. For example, the partitioning result obtained by the first partitioning method includes three image areas arranged from top to bottom, and the size ratio between each image area is 1:1:1; the partitioning result obtained by the second partitioning method includes three image areas arranged from left to right, and the size ratio between each image area is 1:1:1; the partitioning result obtained by the third partitioning method includes three image areas arranged from left to right, and the size ratio between each image area is 1:1:2; the partitioning result obtained by the fourth partitioning method includes three image areas arranged from top to bottom, and the size ratio between each image area is 1:1:2.

[0103] In some embodiments, different partitioning methods correspond to different partitioning results, and each partitioning result includes one or more image regions. Figure 4 As shown, the partitioning result corresponding to the first partitioning method includes one image area A1, the partitioning result corresponding to the second partitioning method includes six image areas B1 to B6, and the partitioning result corresponding to the third partitioning method includes a total of thirty-six image areas C01 to C36.

[0104] Step 224 , obtaining background structure features of the first image based on the background structure features corresponding to the n types of partitioning results.

[0105] In some embodiments, the background structural features corresponding to the n types of partitioning results may be determined based on the designated image area included in the image areas corresponding to the n types of partitioning results.

[0106] In some embodiments, for the i-th partitioning result among n partitioning results, the background structure features of at least one specified image area in the i-th partitioning result are obtained to obtain the background structure features corresponding to the i-th partitioning result, where i is an integer less than or equal to n.

[0107] In some embodiments, the image areas included in each partition result may include a specified image area or may not include a specified image area. Figure 5 As shown, the designated image areas are A1, C10, C11, C30 and C31, that is, the partitioning results corresponding to the second partitioning method do not include the designated image areas, and the partitioning results corresponding to the first partitioning method and the third partitioning method include the designated image areas.

[0108] In some embodiments, the background structure features corresponding to the n types of partitioning results are determined as the background structure features of the first image.

[0109] Through the above method, based on n partitioning results, the background structure features of the first image are determined, and the background structure features of the first image at each granularity are taken into consideration, so that the background structure features of the first image can better describe the background structure of the first image and improve the accuracy of scene recognition of the application.

[0110] In some embodiments, an image analysis algorithm may be used to determine the background structural features of the first image. An image analysis algorithm refers to an algorithm used to describe the structure of the background region of an image. This application does not limit the specific image analysis algorithm. Several common methods for determining the background structural features of the first image are exemplified below.

[0111] In some embodiments, the background structure features include at least one of the following:

[0112] The color of at least one through line in the background area;

[0113] The number of at least one through line in the background area;

[0114] the position of at least one through line in the background region;

[0115] The color of a sub-region of at least one specified position in the background region;

[0116] The brightness of a sub-area of ​​at least one specified position in the background area.

[0117] The above-mentioned through line refers to a line with a width (or height) that can penetrate the first image or can penetrate the designated image area. Figure 6 As shown, through lines 611 ˜ 622 are lines that penetrate the first image.

[0118] In some embodiments, through-lines may be represented as different colors according to their width (or height). For example, through-lines whose width (or height) exceeds a threshold may be represented as a first color; through-lines whose width (or height) does not exceed the threshold may be represented as a second color. The first color is different from the second color. For example, the first color may be green, and the second color may be red. For example, Figure 6 As shown, 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. The above thresholds are not limited in this application and can be set according to the first scenario.

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

[0120] In some embodiments, the background structure features include at least one of the following:

[0121] the color of at least one horizontal line running through the background area;

[0122] The number of at least one horizontal through line in the background area;

[0123] the position of at least one transverse through-line in the background region;

[0124] the color of at least one vertical line running through the background area;

[0125] The number of at least one longitudinal through line in the background area;

[0126] The position of at least one longitudinal through-line in the background area.

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

[0128] In some embodiments, the above-mentioned background structural features can be combined with each other to form new background structural features.

[0129] For example, the background structure feature may include at least one of the following:

[0130] The number of at least one continuous line of the same color in the background area;

[0131] The position of at least one through line of the same color in the background area;

[0132] The number and position of at least one continuous line of the same color in the background area;

[0133] The color and brightness of a sub-region of at least one specified position in the background region.

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

[0135] Through the above method, the background structure features of the first image are expressed in a simple way, which avoids complicated and tedious feature extraction steps, improves the speed of determining the background structure features of the first image, and further improves the speed of scene recognition of the application.

[0136] Please refer to Figure 7 , which shows a flowchart of an application operation evaluation method provided by an embodiment of the present application. The method may include at least one of the following steps 710 to 740.

[0137] Step 710: Obtain a first video obtained by recording a display interface of an application.

[0138] The recording situation of the first video can be changed according to the application scenario of the operation evaluation method of the application, for example, the first video includes the startup process of the application. Exemplarily, the first video includes the process from the user clicking the application to the display of the startup interface of the application.

[0139] Step 720: divide the first video into frames according to the first time interval to obtain a plurality of image frames.

[0140] In some embodiments, the first video is evenly framed according to a first time interval, that is, the time interval between two adjacent image frames is the same to ensure that the time between frames is fixed.

[0141] The present application does not limit the specific duration of the first time interval. For example, the first time interval can be as small as possible within a certain range to ensure the accuracy of time. For another example, the first time interval can be as large as possible within a certain range to reduce the number of image frames obtained by framing. The certain range refers to a range that does not affect the accuracy of scene recognition of the application.

[0142] In some embodiments, the duration of the first time interval may change according to the change of the application scenario, or may change according to the duration of the first video, and this application does not limit this. For example, if the duration of the first video is long, the duration of the first time interval is also relatively long; if the duration of the first video is short, the duration of the first time interval is also relatively short.

[0143] Step 730: Identify a first image frame corresponding to a first scene from a plurality of image frames; wherein a display interface in the first image frame belongs to a display interface of the first scene.

[0144] In some embodiments, multiple image frames are traversed to identify a first image frame corresponding to a first scene among the multiple image frames.

[0145] The scene recognition method of the application provided in the above embodiment can be used to identify any one of the multiple image frames. That is, the scene recognition method of the application provided in the above embodiment is used to determine whether the display interface in the image frame belongs to the display interface of the first scene. If the display interface in the image frame belongs to the display interface of the first scene, the image frame is determined to be the first image frame; if the display interface in the image frame does not belong to the display interface of the first scene, the image frame is not the first image frame.

[0146] In some embodiments, the first image frame may be one image frame or multiple image frames.

[0147] Step 740: Determine the running evaluation result of the application based on the recognition result of the first image frame.

[0148] The operation evaluation of the application refers to the evaluation of the operation status of the application. The operation status of the application may include at least one of the following: the startup status of the application and the instruction response status of the application.

[0149] The startup status of an 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 the first scenario: the application selection interface (such as the mobile phone desktop, computer desktop, etc.), the application startup interface (i.e., the user interface displayed when the application is started, such as the application homepage).

[0150] The operation evaluation method of the application program may include at least one of the following steps 1 to 4.

[0151] Step 1: Obtain a first video obtained by recording the startup process of the application.

[0152] Step 2: Divide the first video into frames according to the first time interval to obtain multiple image frames.

[0153] Step 3: Identify a first image frame corresponding to a first scene from a plurality of image frames; wherein a display interface in the first image frame belongs to a display interface of the first scene.

[0154] Step 4: Based on the recognition result of the first image frame, determine the operation evaluation result of the application.

[0155] The first scene includes a first sub-scene and a second sub-scene. The first sub-scene refers to a scene corresponding to the application selection interface, and the second sub-scene refers to a startup interface of the application.

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

[0157] The instruction response of the application may include whether the application responds to the instruction. In this regard, the method can be used in the automated testing of the application. Taking the automated testing of the application as an example, the scenarios to be evaluated include the first scenario: the instruction response interface of the application.

[0158] The operation evaluation method of the application program may include at least one of the following steps 1 to 4.

[0159] Step 1: Obtain a first video obtained by recording a testing process of an application program.

[0160] Step 2: Divide the first video into frames according to the first time interval to obtain multiple image frames.

[0161] Step 3: Identify a fourth image frame corresponding to the first scene from the plurality of image frames; wherein the display interface in the first image frame belongs to the display interface of the first scene.

[0162] Step 4: Based on the recognition result of the first image frame, determine the operation evaluation result of the application.

[0163] The first scenario refers to the scenario corresponding to the command response interface of the above application.

[0164] The testing process of the application includes the process between sending instructions to the application and the application responding to the instructions. This process can be fully automated based on automated testing technology.

[0165] At this time, if the first image frame is not included in the multiple image frames of the first video, it means that the application has not responded to the instruction and there is a problem with the application; if the first image frame is included in the multiple image frames of the first video, it means that the application has responded to the instruction and there is no problem with the application. Therefore, whether the first image frame is included in the multiple image frames of the first video can be determined as the operation evaluation result of the application.

[0166] 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.

[0167] In some embodiments, the scene recognition method of the application provided in the embodiment of the present application can also be applied to the speed index evaluation of the terminal (or speed analysis task), such as the startup speed of the application, the instruction response speed of the application, etc.; it can also be applied to automated assertions, such as automated testing. Of course, it can also be applied to other scenes that require scene recognition, such as identifying whether an image belongs to a grassland scene, which is not limited by the present application.

[0168] The technical solution provided in the embodiment of the present application divides the video recorded of the display interface of the application into frames to obtain multiple image frames, identifies the display interface in the multiple image frames, and determines whether there is an image frame of the display interface belonging to the display interface of the scene to be identified in the multiple image frames, so as to realize the operation evaluation of the application, thereby realizing full automation of the process of operation evaluation of the application.

[0169] In summary, the embodiments of the present application provide a scene 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.

[0170] For example, Figure 8 As shown, the technical solution provided in the embodiment of the present application may include the following two parts: feature extraction 810 and scene determination 820.

[0171] 1. Feature extraction

[0172] The second video is obtained (scene feature extraction video 811), and the starting image frame where the first scene appears is selected from the second video as the scene image of the first scene (framing 812 and screening out frames with obvious scene features 813). From the background area of ​​the scene image, the background structural features of the scene image are determined (stratification and partitioning 814 and identification of background features 815); based on the background structural features of the scene image, the background structural features of the first scene are obtained (extracting and recording the main feature information of the scene 816).

[0173] Step 812, frame division: In addition to the basic process of dividing the video into multiple image frames, the following two points are also required.

[0174] 1. In the task of speed analysis, the framing needs to be uniform to ensure that the time between frames is fixed;

[0175] 2. In the task of velocity analysis, the frame interval should be short to ensure accuracy.

[0176] Step 814, hierarchical partitioning: illustratively, as Figure 6 As shown in Figure 1, three partitioning methods are used to partition the scene image, where hierarchical partitioning can be understood as different partitioning methods. Hierarchical partitioning has no restrictions on the number of layers (i.e., the number of different partitioning methods) and the number of partitions (i.e., the number of image regions included in the partitioning result obtained by one partitioning method), as long as the feature description can be effectively performed (i.e., the structure of the background of the scene image can be effectively described). Figure 6 As shown, the core feature areas (specified image areas) A1, C10, C11, C30 and C31 of the first scene can be found through three layers.

[0177] Step 815, identifying background features: that is, determining the background structural features of the scene image. In this step, any method that can effectively describe the structure of the background of the scene image can be used. The most commonly used methods are as follows: Figure 5 Same color through lines as shown.

[0178] The same color through-lines are generally divided into horizontal and vertical directions and have a width or height threshold. The same color through-lines whose width or height does not meet the threshold need to be removed. The same calculation is performed on each image area (i.e., determining the same color through-lines), and the background structure features of all image areas (the background structure features represented by the same color through-lines) can be obtained.

[0179] Step 816, extract and record the main feature information: Figure 5 The scene image shown has the following background structural features: A1 penetrates 8 horizontally and 0 vertically, C10 penetrates 1 vertically, C11 penetrates 1 vertically, C30 penetrates 1 vertically, and C31 penetrates 1 vertically.

[0180] 2. Scene determination

[0181] A first video (video to be analyzed 821) is obtained by recording the display interface of the application; the first video is divided into frames according to a first time interval to obtain multiple image frames (frame division 822); for any one of the multiple image frames, the background structure feature of the image frame is determined (traversing the frame group 823, judging whether the traversal is completed 824, layering and partitioning 825, and identifying background features 826); when the background structure feature of the first image matches the background structure feature of the first scene, it is determined that the first display interface belongs to the display interface of the first scene (determining whether the feature comparison is consistent 827, if it is consistent, the scene recognition is successful 828, if there is no consistent image frame, the scene does not appear 829).

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

[0183] The technical solution provided by the embodiment of the present application determines the background structure features of the first scene, matches the background structure features of the first image with the background structure features of the first scene, and determines whether the first display interface corresponding to the first image belongs to the first 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. And scene recognition based on background structure features can be applied to images obtained from different platforms and models.

[0184] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.

[0185] Please refer to Fig. 9 , which shows a block diagram of a scene recognition device of an application provided by an embodiment of the present application. The device has the function of implementing the above method example, and the function can be implemented by hardware or by hardware executing corresponding software. The device can be the terminal device described above, or it can be set in the terminal device. Fig. 9 As shown, the device 900 includes: an acquisition module 910 , a first determination module 920 and a second determination module 930 .

[0186] The acquisition module 910 is used to acquire a first image corresponding to a first display interface of an application.

[0187] The first determining module 920 is configured to determine background structural features of the first image from a background region of the first image, where the background structural features refer to features reflecting the structure of the background region.

[0188] The second determination module 930 is configured to determine that the first display interface belongs to a display interface of the first scene when the background structure feature of the first image matches the background structure feature of the first scene.

[0189] In some embodiments, the first determination module 920 is used to partition the first image to obtain multiple image regions; obtain background structural features of at least one specified image region among the multiple image regions to obtain background structural features of the first image.

[0190] In some embodiments, the first determination module 920 is used to partition the first image using n different partitioning methods to obtain n partitioning results; wherein different partitioning methods correspond to different partitioning results, and each partitioning result includes one or more image areas, and n is an integer greater than 1; based on the background structure features corresponding to the n partitioning results, the background structure features of the first image are obtained.

[0191] In some embodiments, the first determination module 920 is used to obtain the background structure features of at least one specified image area in the i-th partition result among the n partition results, and obtain the background structure features corresponding to the i-th partition result, where i is an integer less than or equal to n.

[0192] In some embodiments, the background structural features include at least one of the following:

[0193] The color of at least one through line in the background area;

[0194] The number of at least one through line in the background area;

[0195] The position of at least one through line in the background area;

[0196] The color of a sub-region of at least one designated position in the background region;

[0197] The brightness of a sub-region of at least one designated position in the background region.

[0198] In some embodiments, the second determination module 930 is used to determine that the first display interface belongs to the display interface of the first scene when the background structure feature of the first image is the same as the background structure feature of the first scene.

[0199] In some embodiments, Fig.10 As shown, the device 900 further includes a third determining module 940 .

[0200] The third determination module 940 is used to binarize the first image to obtain a binary image, and determine the background area of ​​the first image from the binary image; or, identify the foreground interface elements contained in the first image, and determine the area in the first image except the foreground interface elements as the background area of ​​the first image.

[0201] In some embodiments, Fig.10 As shown, the device 900 further includes a fourth determining module 950 .

[0202] The fourth determination module 950 is used to obtain a first video obtained by recording the display interface of the application; divide the first video into frames according to a first time interval to obtain a plurality of image frames; from the plurality of image frames, identify a first image frame corresponding to the first scene; wherein the display interface in the first image frame belongs to the display interface of the first scene; and determine an operation evaluation result of the application based on the recognition result of the first image frame.

[0203] In some embodiments, Fig.10 As shown, the device 900 also includes an obtaining module 960 .

[0204] The obtaining module 960 is used to obtain a scene image of the first scene, wherein a display interface in the scene image belongs to the display interface of the first scene; determine background structural features of the scene image from a background area of ​​the scene image; and obtain background structural features of the first scene based on the background structural features of the scene image.

[0205] In some embodiments, the obtaining module 960 is used to select, from the second video, a starting image frame in which the first scene appears, as a scene image of the first scene; or, cluster multiple candidate image frames to obtain at least one cluster set, determine a cluster set corresponding to the first scene from the at least one cluster set, and determine the scene image of the first scene from the image frames contained in the cluster set corresponding to the first scene.

[0206] The technical solution provided by the embodiment of the present application extracts the background structure features of the first image in the background area of ​​the first image, and determines whether the first display interface belongs to the display interface of the first scene by performing feature matching detection on the background structure features of the first image and the background structure features of the first 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. And scene recognition based on background structure features can be applicable to images obtained from different platforms and models.

[0207] It should be noted that the device provided in the above embodiment only uses the division of the above-mentioned functional modules as an example to implement its functions. In practical applications, 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.

[0208] Regarding the device 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.

[0209] Please refer to Fig.11 , 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:

[0210] The computer device 1100 includes a central processing unit (such as a CPU (Central Processing Unit), a GPU (Graphics Processing Unit) and an FPGA (Field Programmable Gate Array)) 1101, a system memory 1104 including a RAM (Random-Access Memory) 1102 and a ROM (Read-Only Memory) 1103, and a system bus 1105 connecting the system memory 1104 and the central processing unit 1101. The computer device 1100 also includes a basic input / output system (Input Output System, I / O system) 1106 for helping various devices in the server to transmit information, and a large-capacity storage device 1107 for storing an operating system 1113, application programs 1114 and other program modules 1115.

[0211] In some embodiments, the basic input / output system 1106 includes a display 1108 for displaying information and an input device 1109 such as a mouse and a keyboard for user inputting information. The display 1108 and the input device 1109 are connected to the central processing unit 1101 through an input / output controller 1110 connected to the system bus 1105. The basic input / output system 1106 may also include an input / output controller 1110 for receiving and processing inputs from a plurality of other devices such as a keyboard, a mouse, or an electronic stylus. Similarly, the input / output controller 1110 also provides output to a display screen, a printer, or other types of output devices.

[0212] The mass storage device 1107 is connected to the central processing unit 1101 via a mass storage controller (not shown) connected to the system bus 1105. The mass storage device 1107 and its associated computer readable medium provide non-volatile storage for the computer device 1100. That is, the mass storage device 1107 may include a computer readable medium (not shown) such as a hard disk or a CD-ROM (Compact Disc Read-Only Memory) drive.

[0213] 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, cassettes, tapes, disk storage or other magnetic storage devices. Of course, those skilled in the art will know that the computer storage medium is not limited to the above. The above-mentioned system memory 1104 and mass storage device 1107 can be collectively referred to as memory.

[0214] According to an embodiment of the present application, the computer device 1100 can also be connected to a remote computer on the network through a network such as the Internet. That is, the computer device 1100 can be connected to the network 1112 through the network interface unit 1111 connected to the system bus 1105, or the network interface unit 1111 can be used to connect to other types of networks or remote computer systems (not shown).

[0215] The memory also 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.

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

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

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

[0219] It should be noted that this application can display a prompt interface, pop-up window or output voice prompt information before collecting relevant data of users and during the process of collecting relevant data of users. The prompt interface, pop-up window or voice prompt information is used to prompt the user that relevant data is currently being collected, so that this application only starts to execute the relevant steps of obtaining relevant data of users after obtaining the confirmation operation issued by the user on the prompt interface or pop-up window, otherwise (that is, when the confirmation operation issued by the user on the prompt interface or pop-up window is not obtained), the relevant steps of obtaining relevant data of users are terminated, that is, the relevant data of users are 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 the laws and regulations of relevant countries, and the informed consent or separate consent of the subject of personal information is obtained only with the consent and authorization of the user. The subsequent data use and processing behavior is carried out within the scope of authorization of laws and regulations and the subject of personal information, and the collection, use and processing of relevant user data shall comply with the relevant laws, regulations and standards of relevant countries and regions.

[0220] It should be understood that the "plurality" mentioned in this article refers to two or more. "And / or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.

[0221] The above description is only an exemplary embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A scene recognition method for an application, characterized in that: The method comprises: Obtaining a first image corresponding to a first display interface of an application program; Determining background structural features of the first image from a background region of the first image, wherein the background structural features refer to features reflecting a structure of the background region; When the background structure feature of the first image matches the background structure feature of the first scene, it is determined that the first display interface belongs to the display interface of the first scene.

2. The method according to claim 1, characterized in that The determining, from the background area of ​​the first image, the background structure feature of the first image comprises: Partitioning the first image to obtain a plurality of image regions; Acquire background structural features of at least one designated image area among the multiple image areas to obtain background structural features of the first image.

3. The method according to claim 1, characterized in that The determining, from the background area of ​​the first image, the background structure feature of the first image comprises: Partitioning the first image using n different partitioning methods to obtain n partitioning results; wherein different partitioning methods correspond to different partitioning results, and each partitioning result includes one or more image regions, and n is an integer greater than 1; Based on the background structure features respectively corresponding to the n partitioning results, the background structure features of the first image are obtained.

4. The method according to claim 3, characterized in that The obtaining of the background structure features of the first image based on the background structure features respectively corresponding to the n types of partitioning results includes: For the i-th partitioning result among the n partitioning results, the background structure features of at least one specified image area in the i-th partitioning result are obtained to obtain the background structure features corresponding to the i-th partitioning result, where i is an integer less than or equal to n.

5. The method according to claim 1, characterized in that The background structure features include at least one of the following: The color of at least one through line in the background area; The number of at least one through line in the background area; The position of at least one through line in the background area; The color of a sub-region of at least one designated position in the background region; The brightness of a sub-region of at least one designated position in the background region.

6. The method according to claim 1, characterized in that The determining that the first display interface belongs to a display interface of the first scene when the background structure feature of the first image matches the background structure feature of the first scene includes: When the background structural features of the first image are the same as the background structural features of the first scene, it is determined that the first display interface belongs to the display interface of the first scene.

7. The method according to claim 1, characterized in that After obtaining the first image corresponding to the first display interface of the application, the method further includes: Binarizing the first image to obtain a binary image, and determining a background area of ​​the first image from the binary image; or, A foreground interface element included in the first image is identified, and an area in the first image other than the foreground interface element is determined as a background area of ​​the first image.

8. The method according to claim 1, characterized in that The method further comprises: Obtaining a first video obtained by recording a display interface of the application; Divide the first video into frames according to a first time interval to obtain a plurality of image frames; Identifying a first image frame corresponding to the first scene from the multiple image frames; wherein a display interface in the first image frame belongs to a display interface of the first scene; Based on the recognition result of the first image frame, an operation evaluation result of the application is determined.

9. The method according to claim 1, characterized in that: The method further comprises: Acquire a scene image of the first scene, where a display interface in the scene image belongs to the display interface of the first scene; Determining background structural features of the scene image from a background area of ​​the scene image; The background structure features of the first scene are obtained according to the background structure features of the scene image.

10. The method according to claim 9, characterized in that The acquiring the scene image of the first scene includes: Selecting, from the second video, a starting image frame in which the first scene appears as a scene image of the first scene; or, Clustering multiple candidate image frames to obtain at least one cluster set, determining a cluster set corresponding to the first scene from the at least one cluster set, and determining a scene image of the first scene from the image frames included in the cluster set corresponding to the first scene.

11. A scene recognition device for an application, characterized in that: The device comprises: An acquisition module, used to acquire a first image corresponding to a first display interface of an application program; A first determining module, configured to determine background structural features of the first image from a background region of the first image, wherein the background structural features refer to features reflecting a structure of the background region; The second determination module is used to determine that the first display interface belongs to the display interface of the first scene when the background structure feature of the first image matches the background structure feature of the first scene.

12. A terminal device, characterized in that: The terminal device comprises 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 10.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which is loaded and executed by a processor to implement the method according to any one of claims 1 to 10.

14. A computer program product, characterized in that The computer program product comprises a computer program, which is loaded and executed by a processor to implement the method according to any one of claims 1 to 10.