Scene recognition method and device, storage medium and electronic device

By obtaining frame rate parameters and window parameters to identify the application scenario types in the cloud desktop system, the problem of image display abnormalities caused by the inability to automatically identify the scene types in the prior art is solved, and correct image acquisition and display are achieved.

CN113064689BActive Publication Date: 2025-03-18XIAN WANXIANG ELECTRONICS TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110327061.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-26
Publication Date
2025-03-18
Estimated Expiration
2041-03-26

AI Technical Summary

Technical Problem

The existing cloud desktop system cannot automatically recognize the scene type when changes, resulting in abnormal image display.

Method used

By obtaining the frame rate parameters of the target source end and determining the window parameters of the target window in the display desktop, combining the frame rate parameters and window parameters to identify the application scenario type of the display desktop.

Benefits of technology

It realizes automatic identification of application scenario types, thereby correctly instructing the acquisition side to acquire desktop images, solving the problem of abnormal image display.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113064689B_ABST
    Figure CN113064689B_ABST
Patent Text Reader

Abstract

The present invention discloses a scene recognition method and device, a storage medium and an electronic device. The method comprises: obtaining a frame rate parameter of a target source end, wherein the frame rate parameter comprises a capture frame rate of an image captured by the target source end on a display desktop; determining a target window in the display desktop, obtaining window parameters corresponding to the target window, wherein the target window is used to represent a window located at the top display layer in the display desktop, and the window parameters comprise performance parameters related to image display processing of the target window; and identifying the scene type of an application scene corresponding to the display desktop of the target source end according to the frame rate parameter and the window parameter. The present invention solves the technical problem of abnormal image display caused by failure to identify the scene type.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computers, and in particular to a scene recognition method and device, a storage medium and an electronic device. Background Art

[0002] The cloud desktop system usually includes a cloud server and a receiving end. A source end corresponding to the receiving end is set in the cloud server. The source end usually exists in the form of a virtual machine VM. The virtual machine VM includes a capture end and an encoder. The capture end is used to capture the source screen running in the virtual machine VM, and send the source screen to the hard-core encoder for encoding. The hard-core encoder sends the encoded data to the receiving end. After decoding, the receiving end displays the image corresponding to the source screen on the display of the receiving end.

[0003] As the application of cloud desktop systems becomes more and more widespread, cloud desktop systems can be roughly divided into office scenarios and game scenarios based on the application scenarios of cloud desktop systems. When the application scenario is a game scenario, the source screen collected by the acquisition end is the game interface of the game program running in the virtual machine VM. The acquisition end directly sends all the data of the collected game program to the hardcore encoder for encoding. When the application scenario is an office scenario, the virtual machine VM runs an operating system, and the operating system usually runs different applications to meet office needs. Correspondingly, the acquisition end needs to collect the desktop image of the operating system. In different application scenarios, the objects corresponding to the desktop screens collected by the acquisition end are different, and accordingly, the desktop screens to be displayed by the receiving end are also different.

[0004] In the prior art, the office scene and the game scene require the user to select and switch the scene through the receiving end, that is, the scene switching of the cloud desktop system depends on the scene switching command received by the receiving end, and the automatic recognition of the scene cannot be realized. Therefore, without receiving the switching command, if the scene type changes, the source end cannot adaptively identify the current scene type, and cannot correctly instruct the acquisition end to capture the correct desktop screen, resulting in the problem that the image on the receiving end cannot be displayed normally.

[0005] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0006] The embodiments of the present invention provide a scene recognition method and device, a storage medium and an electronic device, so as to at least solve the technical problem of abnormal image display caused by failure to recognize scene types.

[0007] According to one aspect of an embodiment of the present invention, a scene recognition method is provided, comprising: obtaining a frame rate parameter of a target source end, wherein the frame rate parameter includes a capture frame rate at which the target source end performs image capture on a screen of a display desktop; determining a target window in the display desktop, and obtaining window parameters corresponding to the target window, wherein the target window is used to represent a window located at the top display layer in the display desktop, and the window parameters include performance parameters of the target window related to image display processing; and identifying a scene type of an application scenario corresponding to the display desktop of the target source end according to the frame rate parameter and the window parameter.

[0008] According to another aspect of an embodiment of the present invention, a scene recognition device is also provided, including: an acquisition module, used to acquire frame rate parameters of a target source end, wherein the frame rate parameters include a capture frame rate at which the target source end performs image capture on a display desktop; a determination module, used to determine a target window in the display desktop, and acquire window parameters corresponding to the target window, wherein the target window is used to represent a window located at the top display layer in the display desktop, and the window parameters include performance parameters of the target window related to image display processing; an identification module, used to identify a scene type of an application scene corresponding to the display desktop of the target source end according to the frame rate parameters and the window parameters.

[0009] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned scene recognition method when running.

[0010] According to another aspect of an embodiment of the present invention, there is provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the scene recognition method through the computer program.

[0011] In the embodiment of the present invention, a method is adopted in which a frame rate parameter is obtained and a target window is determined to obtain a window parameter indicating the image processing performance of the target window, thereby identifying an application scenario corresponding to the display desktop according to the frame rate parameter in combination with the window parameter. By identifying the application scenario in combination with the frame rate parameter indicating the acquisition frame rate and the window parameter indicating the image processing capability of the target window, the scene type of the application scenario of the display desktop is determined and the application scenario is automatically identified, thereby achieving the technical effect of performing acquisition and processing on the display desktop in a corresponding manner according to the application scenario of the display desktop, and further solving the technical problem of abnormal image display caused by the inability to identify the scene type. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0013] Figure 1 is a schematic diagram of an application environment of an optional scene recognition method according to an embodiment of the present invention;

[0014] Figure 2 is a flow chart of an optional scene recognition method according to an embodiment of the present invention;

[0015] Figure 3 is a flow chart of an optional scene recognition method according to an embodiment of the present invention;

[0016] Figure 4 is a flow chart of an optional scene recognition method according to an embodiment of the present invention;

[0017] Figure 5 is a flow chart of an optional scene recognition method according to an embodiment of the present invention;

[0018] Figure 6 is a flow chart of an optional scene recognition method according to an embodiment of the present invention;

[0019] Figure 7 is a flow chart of an optional scene recognition method according to an embodiment of the present invention;

[0020] Figure 8 is a schematic structural diagram of an optional scene recognition device according to an embodiment of the present invention;

[0021] Fig. 9 It is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0022] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0023] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0024] According to one aspect of an embodiment of the present invention, a scene recognition method is provided. Optionally, the scene recognition method can be applied to, but is not limited to, Figure 1 In the environment shown. The source end 102 exchanges data with the receiving end 122 through the server 110. The source end 102 receives the control instruction given to the receiving end 122 through the server 110, and the source end 102 displays the corresponding desktop screen in the display desktop in response to the control instruction, and encodes the image data corresponding to the desktop screen according to the scene type of the application scene of the display desktop, and sends the encoded image data to the receiving end 122 so that the receiving end 122 displays the desktop screen in the corresponding display.

[0025] Optionally, a database 104 and a processing engine 106 are running in the source end 102. The database 104 is used to store the display desktop of the source end and the corresponding data and parameters. The processing engine 106 is used to analyze and process to determine the scene type of the application scenario corresponding to the display desktop. Specifically, the processing engine 106 executes S102 to S106 in sequence. Obtain a frame rate parameter, wherein the frame rate parameter includes a capture frame rate at which the source end performs image capture on the screen of the display desktop. Determine a target window and obtain window parameters. Among them, the target window is used to represent a window located at the top display layer in the display desktop, and the window parameters include performance parameters of the target window related to image display processing. Identify the scene type, and identify the scene type of the application scenario corresponding to the display desktop of the target source end according to the frame rate parameter and the window parameter.

[0026] Optionally, in this embodiment, the above-mentioned source end 102 and the receiving end 122 can both be terminal devices, including but not limited to at least one of the following: mobile phones (such as Android phones, IOS phones, etc.), laptops, tablet computers, PDAs, MIDs (Mobile Internet Devices), PADs, desktop computers, smart TVs, etc. The above-mentioned server 110 can be a single server, or a server cluster composed of multiple servers, or a cloud server. The above is only an example, and no limitation is made to this in this embodiment. The above-mentioned server 110 performs data interaction between the source end 102 and the receiving end 122, which can be but not limited to network-based implementation. The above-mentioned network can include but is not limited to: wired network, wireless network, wherein the wired network includes: local area network, metropolitan area network and wide area network, and the wireless network includes: Bluetooth, WIFI and other networks that realize wireless communication.

[0027] As an optional implementation, Figure 2 As shown, the above scene recognition method includes:

[0028] S202, obtaining a frame rate parameter of the target source end, wherein the frame rate parameter includes a capture frame rate at which the target source end captures an image of a display desktop;

[0029] S204, determining a target window in the display desktop, and obtaining window parameters corresponding to the target window, wherein the target window is used to represent a window located at the top display layer in the display desktop, and the window parameters include performance parameters of the target window related to image display processing;

[0030] S206: Identify the scene type of the application scene corresponding to the display desktop of the target source end according to the frame rate parameter and the window parameter.

[0031] Optionally, the displayed desktop is a desktop screen displayed in the operating system of the target source end, and specifically, it can be a desktop screen displayed in the operating system at the current time. The current time can be the current time period or the current moment.

[0032] Optionally, the frame rate parameter may include, but is not limited to: display frame rate, acquisition frame rate, and refresh frame rate. The display frame rate is used to indicate the frame rate at which the target source end displays the desktop screen of the current display desktop, the acquisition frame rate is used to indicate the frame rate at which the target source end acquires images of the display desktop, and the refresh frame rate is used to indicate the refresh frame rate of the graphics card of the target source end.

[0033] Optionally, the top layer of the display in the display desktop can be the front layer of the layer display, and the front layer of the window display. The front layer of the layer display refers to the first layer of the layer display in the front, and the windows in the front layer will not be blocked by the windows of other layers at any window size. The front layer of the window display refers to the window that is currently displayed in the front in the window layer existing on the display desktop, and the window displayed in the front will not be blocked by other windows at any window size. It should be noted that the number of target windows that are at the top layer of the display, i.e., displayed in the front, is one.

[0034] Optionally, the performance parameters related to image display processing refer to the performance parameters of the target window performing display processing on the display image in its window, which may include but are not limited to: display degree parameters of the target window for the display image in the display desktop, and processing capability parameters of the target window for the display image.

[0035] Optionally, the display degree parameter may be a display degree of the display window relative to the display desktop, or a display degree of the display image relative to the target window.

[0036] Optionally, the processing capability parameter may be a parameter indicating its ability to perform image processing on the displayed image, for example, the complexity of the image processing performed on the displayed image, the type of image processing performed on the displayed image, and a processing instruction for performing image processing on the displayed image. The processing instruction is not limited to a rendering instruction for image rendering, a recognition instruction for image recognition, a segmentation instruction for image segmentation, etc.

[0037] In an embodiment of the present application, a method is adopted in which a frame rate parameter is obtained and a target window is determined to obtain a window parameter indicating the image processing performance of the target window, thereby identifying an application scenario corresponding to the display desktop according to the frame rate parameter in combination with the window parameter. By identifying the application scenario in combination with the frame rate parameter indicating the acquisition frame rate and the window parameter indicating the image processing capability of the target window, the scene type of the application scenario of the display desktop is determined and the application scenario is automatically identified, thereby achieving the technical effect of performing acquisition and processing on the display desktop in a corresponding manner according to the application scenario of the display desktop, and further solving the technical problem of abnormal image display caused by the inability to identify the scene type.

[0038] As an optional implementation, Figure 3 As shown, the window parameters corresponding to the target window are as follows:

[0039] S302, obtaining display parameters of the target window, wherein the display parameters are parameters indicating the display degree of the target window in the display desktop;

[0040] S304, acquiring image parameters of the target window, wherein the image parameters are used to indicate the type of image processing performed on the displayed image in the target window;

[0041] S306: The display parameters and image parameters are used as window parameters.

[0042] Optionally, the display parameter may be the display size of the target window relative to the display image, or the display clarity of the target window relative to the display image. The display parameter of the display size may be: the size of the target window, the display ratio of the target window relative to the display desktop, or the size of the display image. The display parameter of the display clarity may be: the resolution of the display image.

[0043] Optionally, the type of image processing performed on the displayed image can be a type of image processing performed on the displayed image classified according to the execution purpose, such as indicating a drawing type to be performed, including 2D drawing for drawing two-dimensional graphics and 3D drawing for drawing three-dimensional graphics; indicating a processing type to be performed, including color processing, grayscale processing, etc.

[0044] In an embodiment of the present application, display parameters are determined according to the display degree of the target window in the display desktop, and image parameters are determined according to the image processing type of the target window on the displayed image, so that the display parameters and image parameters are used as window parameters to reflect the performance of the target window in image display and image processing, so as to determine the scene type of the application scenario according to the target window combined with the frame rate parameters to realize scene recognition.

[0045] As an optional implementation, Figure 4 As shown, the display parameters of the target window are obtained as follows:

[0046] S402, obtaining the window size of the target window, wherein the window size includes the width and height of the target window;

[0047] S404, calculating the display ratio of the target window in the display desktop according to the window size;

[0048] S406, using the display ratio as a display parameter.

[0049] Optionally, the window size of the target window can be obtained by calling a corresponding data interface to obtain the width and height of the target window through the operating system. Taking the operating system of the target source end as a Windows system as an example, the target window handle HWND is obtained through Windows API, and the width value and height value of the target window are obtained through the target window handle HWND.

[0050] Optionally, calculating the display ratio of the target window in the display desktop according to the window size includes: calculating the display area of ​​the target window according to the window size, obtaining the desktop area of ​​the display desktop, and calculating the ratio of the display area to the desktop area to obtain the display ratio of the target window in the display desktop.

[0051] In the embodiment of the present application, the area ratio of the target window and the display desktop is used as a display parameter, and the area occupied by the target window in the display desktop is used to measure the display degree of the target window to the display image, so as to determine the importance of the target window relative to the display desktop in the image display, thereby determining the application scenario type corresponding to the display desktop.

[0052] As an optional implementation, Figure 5 As shown, the above-mentioned image parameters of the target window are obtained including:

[0053] S502, determining an application identifier of a target window, wherein the application identifier is used to identify a target application running the target window;

[0054] S504, obtaining an image rendering instruction for the display image according to the application identifier, wherein the image rendering instruction is used to instruct to perform rendering processing on the display image;

[0055] S506: Use the instruction type of the image rendering instruction as an image parameter.

[0056] Optionally, the application identifier of the target window may be, but is not limited to, an application name or an application abbreviation of the target application corresponding to the target window. The application abbreviation may be a name abbreviation, a string code, etc. that can uniquely refer to the target program.

[0057] As an optional implementation manner, the image rendering instruction for obtaining the display image according to the application identifier includes:

[0058] Locate the application process started by the target application according to the application identifier;

[0059] Find image rendering instructions in the application process opened by the target application;

[0060] Determines the instruction type of the image rendering instruction.

[0061] Optionally, the instruction type of the image rendering instruction may be a type classified according to the execution purpose of executing the image rendering instruction, for example, a drawing type for executing drawing purpose.

[0062] Optionally, determining the instruction type of the image rendering instruction may be: determining the system type of the operating system in the target source end, and determining the instruction type corresponding to the image rendering instruction according to the system type of the operating system. The rendering instructions corresponding to the instruction type may be different in different operating system types. For example, the rendering instruction corresponding to the 2D drawing type in the Windows system is GDI, and the rendering instruction corresponding to the Linux system and the Android system is Xlib; the rendering instruction corresponding to the 3D drawing type in the Windows system is Direct 3D, the rendering instruction corresponding to the Linux system is OpenGL, and the rendering instruction corresponding to the Android system is OpenGL ES.

[0063] As an optional implementation, Figure 6 As shown, after determining the instruction type of the image rendering instruction, the above also includes:

[0064] S602, determining a target instruction type corresponding to a target parameter;

[0065] S604, comparing the instruction type of the image rendering instruction with the target instruction type;

[0066] S606, when the instruction type of the image rendering instruction is the same as the target instruction type, determining that the image parameters are consistent with the target parameters;

[0067] S608: When the instruction type of the image rendering instruction is different from the target instruction type, determine that the image parameters are inconsistent with the target parameters.

[0068] Optionally, a target parameter is preset, and the target parameter is used to indicate the target instruction type. For example, setting the target parameter to a drawing type indicates that the rendering instruction is an instruction type of the drawing type.

[0069] Optionally, comparing the instruction type of the image rendering instruction with the target instruction type may be comparing the target instruction corresponding to the image rendering instruction and the target instruction type in the system type of the operating system. When the image rendering instruction and the target instruction are the same rendering instruction, it is determined that the instruction type of the image rendering instruction is the same as the target instruction type. When the image rendering instruction and the target instruction are not the same rendering instruction, it is determined that the instruction type of the image rendering instruction is different from the target instruction type. For example: the image rendering instruction of the target window is OpenGL, the target parameter and the target instruction type are the drawing type, and the target instruction corresponding to the drawing type in the corresponding Linux system operating system is OpenGL. Since the image rendering instruction is consistent with the target instruction, it is determined that the instruction type of the image rendering instruction is the same as the target instruction type, and then it is determined that the image parameter is consistent with the target parameter.

[0070] In an embodiment of the present application, the instruction type of the image rendering instruction in the target window is used as an image parameter to indicate the processing performance parameters of the target window for displaying the image, so as to measure the image processing type of the target window according to the image rendering instruction to determine the application scenario of displaying the desktop and realize the identification of the application scenario type.

[0071] As an optional implementation manner, the scene type of the application scene corresponding to the display desktop of the target source end identified according to the frame rate parameter and the window parameter includes:

[0072] When the frame rate parameter is greater than or equal to the frame rate threshold or the frame rate parameter is less than the frame rate threshold and the display parameter is greater than or equal to the display threshold and the image parameter is consistent with the target parameter, determining that the scene type of the application scene corresponding to the display desktop of the target source end is a game scene;

[0073] When the frame rate parameter is less than the frame rate threshold and the display parameter is less than the display threshold, or the frame rate parameter is less than the frame rate threshold and the display parameter is greater than or equal to the display threshold, and the image parameter is inconsistent with the target parameter, it is determined that the scene type of the application scene corresponding to the display desktop of the target source end is an office scene.

[0074] Optionally, after obtaining the frame rate parameter, the frame rate parameter is compared with the frame rate threshold. The value of the frame rate parameter is compared with the frame rate threshold to obtain the magnitude relationship between the frame rate parameter and the frame rate threshold.

[0075] Optionally, after acquiring the display parameter, the display parameter is compared with the display threshold, and the value of the display parameter is compared with the display threshold to obtain the magnitude relationship between the display parameter and the display threshold.

[0076] Optionally, the scene type of the application scene is identified according to the frame rate parameter and the window parameter in a preset judgment order. The preset judgment order may be the frame rate parameter, the window parameter, and the judgment order of the window parameter may be the display parameter, the image parameter. The preset judgment order may be the frame rate parameter, the display parameter, the image parameter.

[0077] Optionally, the scene type of the application scene can be identified according to the preset judgment order. The preset judgment order can be executed until the scene type of the application scene is determined. When the scene type of the application scene is determined, the judgment is stopped. For example, when the scene type can be determined only based on the frame rate parameter, the window parameter can be not judged.

[0078] Optionally, the scenario type for identifying the application scenario may be as follows: Figure 7As shown. Execute S702 to obtain the frame rate parameter. Specifically, the acquisition frame rate of the target source end is used as the frame rate parameter. When the frame rate parameter is obtained, execute S704 to determine whether the frame rate parameter is greater than or equal to the frame rate threshold. If S704 determines that it is yes, that is, the frame rate parameter is greater than or equal to the frame rate threshold, execute S716 to determine that the application scenario type is a game scenario.

[0079] If S704 is judged as no, that is, the frame rate parameter is less than the frame rate threshold, execute S706 to obtain the display parameters. Specifically, determine the target window displayed in the front of the display desktop, obtain the window size of the target window and calculate the display area of ​​the target window, and use the ratio of the display area of ​​the target window to the desktop area of ​​the display desktop as the display parameter. If the display parameters are obtained, execute S708 to determine whether the display parameters are less than the display threshold. If S708 is judged as yes, that is, the display parameters are less than the display threshold, execute S714 to determine that the application scenario type is an office scenario.

[0080] If S708 is judged as no, that is, the display parameters are less than the display threshold, execute S710 to obtain the image parameters. Specifically, locate the application process enabled by the corresponding target application through the target window, search for image rendering instructions in the application process, and use the instruction type of the image rendering instructions as the image parameters. When the image parameters are obtained, execute S712 to determine whether the image parameters are consistent with the target parameters. If S712 is judged as yes, that is, the image parameters are consistent with the target parameters, execute S716 to determine that the application scene type is a game scene. If S712 is judged as no, that is, the image parameters are inconsistent with the target parameters, execute S714 to determine that the application scene type is an office scene.

[0081] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.

[0082] According to another aspect of the embodiments of the present invention, a scene recognition device for implementing the above scene recognition method is also provided. Figure 8 As shown, the device comprises:

[0083] An acquisition module 802 is used to acquire a frame rate parameter of a target source end, wherein the frame rate parameter includes a capture frame rate at which the target source end captures an image of a display desktop;

[0084] The determination module 804 is used to determine the target window in the display desktop and obtain the window parameters corresponding to the target window, wherein the target window is used to represent the window located at the top layer of the display desktop, and the window parameters include the performance parameters of the target window related to the image display processing;

[0085] The identification module 806 is used to identify the scene type of the application scene corresponding to the display desktop of the target source end according to the frame rate parameter and the window parameter.

[0086] Optionally, the acquisition module 802 includes:

[0087] A first acquisition unit, configured to acquire a display parameter of a target window, wherein the display parameter is a parameter indicating a display degree of the target window in the display desktop;

[0088] A second acquisition unit, used for acquiring image parameters of the target window, wherein the image parameters are used for indicating the type of image processing performed on the display image in the target window;

[0089] Combined unit for passing display parameters and image parameters as window parameters.

[0090] Optionally, the first acquiring unit includes:

[0091] A size unit, used to obtain the window size of the target window, wherein the window size includes the width and height of the target window;

[0092] A calculation unit, used for calculating the display ratio of the target window in the display desktop according to the window size;

[0093] The first parameter unit is used to use the display ratio as a display parameter.

[0094] Optionally, the second obtaining unit includes:

[0095] An identification unit, used to determine an application identification of a target window, wherein the application identification is used to identify a target application running the target window;

[0096] An instruction unit, used for acquiring an image rendering instruction for displaying an image according to an application identifier, wherein the image rendering instruction is used for instructing to perform rendering processing on the displaying image;

[0097] The second parameter unit is used to use the instruction type of the image rendering instruction as an image parameter.

[0098] Optionally, the identification unit includes:

[0099] A positioning unit, used to locate the application process started by the target application according to the application identifier;

[0100] A search unit, used to search for image rendering instructions in an application process started by a target application;

[0101] A determination unit is used to determine the instruction type of the image rendering instruction.

[0102] Optionally, the scene recognition device further includes:

[0103] A type unit, used to determine a target instruction type corresponding to a target parameter after determining an instruction type of the image rendering instruction;

[0104] A comparison unit, used for comparing the instruction type of the image rendering instruction with the target instruction type;

[0105] A third parameter unit, when the instruction type of the image rendering instruction is the same as the target instruction type, determines that the image parameter is consistent with the target parameter;

[0106] The fourth parameter unit determines that the image parameter is inconsistent with the target parameter when the instruction type of the image rendering instruction is different from the target instruction type.

[0107] Optionally, the identification module 806 includes:

[0108] A first identification unit is used to determine that the scene type of the application scene corresponding to the display desktop of the target source end is a game scene when the frame rate parameter is greater than or equal to the frame rate threshold or the frame rate parameter is less than the frame rate threshold and the display parameter is greater than or equal to the display threshold and the image parameter is consistent with the target parameter;

[0109] The second identification unit is used to determine that the scene type of the application scene corresponding to the display desktop of the target source end is an office scene when the frame rate parameter is less than the frame rate threshold and the display parameter is less than the display threshold or the frame rate parameter is less than the frame rate threshold and the display parameter is greater than or equal to the display threshold and the image parameter is inconsistent with the target parameter.

[0110] In an embodiment of the present application, a method is adopted in which a frame rate parameter is obtained and a target window is determined to obtain a window parameter indicating the image processing performance of the target window, thereby identifying an application scenario corresponding to the display desktop according to the frame rate parameter in combination with the window parameter. By identifying the application scenario in combination with the frame rate parameter indicating the acquisition frame rate and the window parameter indicating the image processing capability of the target window, the scene type of the application scenario of the display desktop is determined and the application scenario is automatically identified, thereby achieving the technical effect of performing acquisition and processing on the display desktop in a corresponding manner according to the application scenario of the display desktop, and further solving the technical problem of abnormal image display caused by the inability to identify the scene type.

[0111] According to another aspect of the embodiments of the present invention, an electronic device for implementing the above-mentioned scene recognition method is also provided. The electronic device may be Figure 1 The terminal device (source end) or server shown in FIG. This embodiment is described by taking the electronic device as a terminal device as an example. Fig. 9 As shown, the electronic device includes a memory 902 and a processor 904. The memory 902 stores a computer program, and the processor 904 is configured to execute the steps in any of the above method embodiments through the computer program.

[0112] Optionally, in this embodiment, the electronic device may be located in at least one network device among a plurality of network devices of a computer network.

[0113] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0114] S1, obtaining a frame rate parameter of a target source end, wherein the frame rate parameter includes a capture frame rate at which the target source end captures an image of a display desktop;

[0115] S2, determining a target window in the display desktop, and obtaining window parameters corresponding to the target window, wherein the target window is used to represent a window located at the top layer of the display desktop, and the window parameters include performance parameters of the target window related to image display processing;

[0116] S3, identifying the scene type of the application scene corresponding to the display desktop of the target source end according to the frame rate parameter and the window parameter.

[0117] Alternatively, a person skilled in the art may understand that: Fig. 9 The structure shown is for illustration only, and the electronic device may also be a smart phone (such as an Android phone, an IOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, and other terminal devices. Fig. 9 The structure of the electronic device is not limited. Fig. 9 More or fewer components (such as network interfaces, etc.) as shown in, or with Fig. 9 Different configurations are shown.

[0118] Among them, the memory 902 can be used to store software programs and modules, such as the program instructions / modules corresponding to the scene recognition method and device in the embodiment of the present invention. The processor 904 executes various functional applications and data processing by running the software programs and modules stored in the memory 902, that is, realizing the above-mentioned scene recognition method. The memory 902 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 902 may further include a memory remotely located relative to the processor 904, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Among them, the memory 902 can be specifically, but not limited to, used to store information such as display desktop, frame rate parameters, window parameters, etc. As an example, such as Fig. 9 As shown, the memory 902 may include but is not limited to the acquisition module 802, the determination module 804, and the identification module 806 in the scene recognition device. In addition, it may also include but is not limited to other module units in the scene recognition device, which will not be repeated in this example.

[0119] Optionally, the transmission device 906 is used to receive or send data via a network. Specific examples of the above-mentioned network may include a wired network and a wireless network. In one example, the transmission device 906 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 906 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0120] In addition, the electronic device further includes: a display 908 for displaying the display desktop and the target window; and a connection bus 910 for connecting various module components in the electronic device.

[0121] In other embodiments, the terminal device or server may be a node in a distributed system, wherein the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the multiple nodes through network communication. Among them, the nodes may form a peer-to-peer (P2P, Peer To Peer) network, and any form of computing device, such as a server, terminal and other electronic devices, may become a node in the blockchain system by joining the peer-to-peer network.

[0122] According to one aspect of the present application, a computer program product or computer program is provided, the computer program product or computer program including computer instructions, the computer instructions being 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 performs the method provided in various optional implementations of the above scene recognition. The computer program is configured to perform the steps of any of the above method embodiments when it is run.

[0123] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:

[0124] S1, obtaining a frame rate parameter of a target source end, wherein the frame rate parameter includes a capture frame rate at which the target source end captures an image of a display desktop;

[0125] S2, determining a target window in the display desktop, and obtaining window parameters corresponding to the target window, wherein the target window is used to represent a window located at the top layer of the display desktop, and the window parameters include performance parameters of the target window related to image display processing;

[0126] S3, identifying the scene type of the application scene corresponding to the display desktop of the target source end according to the frame rate parameter and the window parameter.

[0127] Optionally, in this embodiment, a person of ordinary skill in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing hardware related to the terminal device through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.

[0128] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0129] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which can be personal computers, servers or network devices, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.

[0130] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0131] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0132] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0133] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0134] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A scene recognition method, characterized in that: include: Acquire a frame rate parameter of the target source end, wherein the frame rate parameter includes a capture frame rate at which the target source end captures an image of a display desktop; Determine a target window in the display desktop, and obtain window parameters corresponding to the target window, wherein the target window is used to represent a window located at the top display layer in the display desktop, and the window parameters include performance parameters of the target window related to image display processing; Identify the scene type of the application scene corresponding to the display desktop of the target source end according to the frame rate parameter and the window parameter; The acquiring window parameters corresponding to the target window comprises: Acquire a display parameter of the target window, wherein the display parameter is a parameter indicating a display degree of the target window in the display desktop; Acquire image parameters of the target window, wherein the image parameters are used to indicate the type of image processing performed on the displayed image in the target window; The display parameters and the image parameters are used as the window parameters.

2. The method according to claim 1, characterized in that The acquiring the display parameters of the target window comprises: Acquire the window size of the target window, wherein the window size includes the width and height of the target window; Calculating the display ratio of the target window in the display desktop according to the window size; The display ratio is used as the display parameter.

3. The method according to claim 1, characterized in that The acquiring of the image parameters of the target window comprises: Determine an application identifier of the target window, wherein the application identifier is used to identify a target application running the target window; Acquire an image rendering instruction for the display image according to the application identifier, wherein the image rendering instruction is used to instruct to perform rendering processing on the display image; The instruction type of the image rendering instruction is used as the image parameter.

4. The method according to claim 3, characterized in that The acquiring the image rendering instruction of the display image according to the application identifier comprises: Locating the application process started by the target application according to the application identifier; Searching for the image rendering instruction in an application process started by the target application; An instruction type of the image rendering instruction is determined.

5. The method according to claim 4, characterized in that After determining the instruction type of the image rendering instruction, the method further includes: Determine the target instruction type corresponding to the target parameter; comparing the instruction type of the image rendering instruction with the target instruction type; In a case where the instruction type of the image rendering instruction is the same as the target instruction type, determining that the image parameters are consistent with the target parameters; In a case where the instruction type of the image rendering instruction is different from the target instruction type, it is determined that the image parameters are inconsistent with the target parameters.

6. The method according to claim 5, characterized in that The identifying, according to the frame rate parameter and the window parameter, the scene type of the application scene corresponding to the display desktop of the target source end includes: When the frame rate parameter is greater than or equal to the frame rate threshold or the frame rate parameter is less than the frame rate threshold and the display parameter is greater than or equal to the display threshold and the image parameter is consistent with the target parameter, determining that the scene type of the application scene corresponding to the display desktop of the target source end is a game scene; When the frame rate parameter is less than the frame rate threshold and the display parameter is less than the display threshold, or the frame rate parameter is less than the frame rate threshold and the display parameter is greater than or equal to the display threshold, and the image parameter is inconsistent with the target parameter, it is determined that the scene type of the application scene corresponding to the display desktop of the target source end is an office scene.

7. A scene recognition device, characterized in that: include: An acquisition module, used to acquire a frame rate parameter of a target source end, wherein the frame rate parameter includes a capture frame rate at which the target source end captures an image of a display desktop; A determination module, used to determine a target window in the display desktop, and obtain window parameters corresponding to the target window, wherein the target window is used to represent a window located at the top display layer in the display desktop, and the window parameters include performance parameters of the target window related to image display processing; an identification module, configured to identify a scene type of an application scene corresponding to the display desktop of the target source end according to the frame rate parameter and the window parameter; The acquisition module comprises: A first acquisition unit, configured to acquire a display parameter of a target window, wherein the display parameter is a parameter indicating a display degree of the target window in the display desktop; A second acquisition unit, used for acquiring image parameters of the target window, wherein the image parameters are used for indicating the type of image processing performed on the display image in the target window; Combined unit for passing display parameters and image parameters as window parameters.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, and the program executes the method described in any one of claims 1 to 6 when executed.

9. An electronic device, comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 6 through the computer program.

Citation Information

Patent Citations

  • Desktop content transmission method and system of virtual desktop and related components

    CN111245879A