Media data acquisition control method and device and electronic equipment
By introducing scene-related data acquisition control instances into terminal devices, and managing the use of media data acquisition tools based on permissions and visibility status, the problems of resource consumption and information leakage in existing technologies are solved, achieving more refined control and resource conservation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING ZITIAO NETWORK TECH CO LTD
- Filing Date
- 2024-10-23
- Publication Date
- 2026-04-24
AI Technical Summary
Existing technologies manage the permissions of media data acquisition tools at the application level, which leads to high system resource consumption and the risk of user information leakage.
By using scene-related data acquisition control instances, the permission information and visibility status information of the target scene are determined, and the use of media data acquisition tools by observers is controlled to be invoked or terminated.
It enables the use of media data acquisition tools to be managed at the scene level, reducing system resource consumption and lowering the risk of user information leakage.
Smart Images

Figure CN121918906A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to a media data acquisition and control method, apparatus, and electronic device. Background Technology
[0002] Terminal devices are typically equipped with media data capture tools (such as microphones and cameras) to collect media data. The operating system of the terminal device can provide an Application Programming Interface (API) to call the media data capture tools. Applications (APPs) running on the terminal device can call these APIs to use the media data capture tools to collect media data.
[0003] Currently, terminal devices manage access to media data collection tools at the application level. This means that once a user authorizes an application, the application remains in use for the entire duration of that application's lifecycle, leading to significant system resource consumption and potentially causing user information leaks. Summary of the Invention
[0004] This disclosure provides a media data acquisition and control method, apparatus, and electronic device.
[0005] In a first aspect, embodiments of this disclosure provide a media data acquisition control method, the method comprising: displaying a target scene and running a data acquisition control instance related to the target scene to perform the following target operations: determining permission information and visibility status information of the target scene; determining invocation information based on the permission information and the visibility status information; sending the invocation information to one or more observers in the target scene; wherein the invocation information indicates whether a media data acquisition tool can be invoked, and the observer is associated with the media data acquisition tool; and controlling the observer to invoke or terminate the invocation of the media data acquisition tool to acquire media data based on the invocation information.
[0006] Secondly, embodiments of this disclosure provide a media data acquisition control device, comprising: a first display unit, configured to display a target scene and run a data acquisition control instance related to the target scene to perform the following target operations: determining permission information and visibility status information of the target scene; determining invocation information based on the permission information and the visibility status information; sending the invocation information to one or more observers in the target scene; wherein the invocation information indicates whether a media data acquisition tool can be invoked, and the observer is associated with the media data acquisition tool; and a processing unit, configured to control the observer to invoke or terminate the invocation of the media data acquisition tool to acquire media data based on the invocation information.
[0007] Thirdly, embodiments of this disclosure provide an electronic device, including: a processor and a memory;
[0008] The memory stores computer-executed instructions;
[0009] The processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the method described in the first aspect above and various possible designs of the first aspect.
[0010] Fourthly, embodiments of this disclosure provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the methods described in the first aspect and various possible designs of the first aspect.
[0011] Fifthly, embodiments of this disclosure provide a computer program product, including a computer program that, when executed by a processor, implements the method described in the first aspect above and various possible designs of the first aspect.
[0012] The media data acquisition control method, apparatus, and electronic device provided in this disclosure display a target scene and run a data acquisition control instance related to the target scene to perform the following target operations: determining permission information and visibility status information of the target scene; determining invocation information based on the permission information and visibility status information; sending the invocation information to one or more observers in the target scene; wherein the invocation information indicates whether a media data acquisition tool can be invoked, and the observer is associated with the media data acquisition tool; based on the invocation information, controlling the observer to invoke or terminate the invocation of the media data acquisition tool to acquire media data. This realizes that the data acquisition control instance manages whether observers in the target scene can use the media data acquisition tool according to permission information and visibility status, thereby realizing scene-level control of the use of the media data acquisition tool. It can stop the use of the media data acquisition tool when it is not needed during the application's runtime cycle, which can reduce system resource consumption and reduce the risk of user information leakage. Attached Figure Description
[0013] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0014] Figure 1 This is a schematic diagram illustrating the microphone usage process in related technologies;
[0015] Figure 2 Flowchart of the media data acquisition and control method provided in the embodiments of this disclosure Figure 1 ;
[0016] Figure 3 This is a diagram illustrating the lifecycle of the window containing the target scene.
[0017] Figure 4 This is a lifecycle diagram of the target scenario;
[0018] Figure 5 This is a schematic diagram illustrating the display process of a target scene.
[0019] Figure 6 A diagram illustrating the changes in usage permissions for media data acquisition tools;
[0020] Figure 7 Flowchart of the media data acquisition and control method provided in the embodiments of this disclosure Figure 2 ;
[0021] Figure 8 This is a schematic diagram of the structure of the media data acquisition and control device provided in the embodiments of this disclosure;
[0022] Figure 9 This is a schematic diagram of the electronic device structure provided in an embodiment of this disclosure. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0024] Multiple applications can run on a terminal device (such as a mobile terminal). Different applications can call the API of the media data acquisition tool provided by the terminal device's operating system. Through the API, they can call the media data acquisition tool (such as a microphone and camera) set on the terminal device to acquire media data.
[0025] Currently, access to media data capture tools is managed at the application level. This means that once a user authorizes an application to use a media data capture tool, the application remains in a state of using the media data capture tool throughout its runtime. The microphone example is used below. Figure 1This is a diagram illustrating the microphone usage process, such as... Figure 1 As shown, a user can open application 101. After opening the application, the application can request microphone access permission 102. After the user grants permission, the application can call the microphone API provided by the operating system and use the microphone to collect audio data 103. Once the application has microphone access permission, the microphone remains in use by the application. Microphone use only stops when the application exits. Therefore, the microphone is used for a relatively long time during the application's lifecycle. However, the microphone is only used when sending voice messages, making voice calls, or video conferencing; it is not needed in other scenarios. But in other scenarios, users may misuse the microphone, potentially leading to the collection of user audio information and resulting in information leakage. For example, using the microphone too early, or failing to pause or turn off the microphone when the scenario ends and the user is temporarily unable to access it, can result in the microphone collecting unwanted audio information.
[0026] Therefore, managing permissions for media data acquisition tools at the application level can lead to significant system resource consumption and the risk of user information leakage.
[0027] The solution provided in this disclosure determines whether an observer in the target scene can invoke the media data acquisition tool's invocation information through scene-related data acquisition control instances. Based on the invocation information, the observer is allowed to invoke or terminate the invocation of the media data acquisition tool to collect media data. This controls the invocation of the media data acquisition tool by observers within the scene at the application scene level. In the event that the observer does not have the necessary permissions or the target scene is not visible, the invocation of the media data acquisition tool by each observer in the target scene is terminated. This reduces the duration of use of the media data acquisition tool, thereby reducing resource consumption, and also reduces the risk of user information leakage.
[0028] Please refer to Figure 2 , Figure 2 Flowchart of the media data acquisition and control method provided in this disclosure Figure 1 ,like Figure 2 As shown, the method includes the following steps:
[0029] S201: Display the target scene and run the data acquisition control instance related to the target scene to perform the following target operations: determine the permission information and the visibility status information of the target scene; determine the invocation information based on the permission information and the visibility status information; send the invocation information to one or more observers in the target scene; wherein the invocation information indicates whether the media data acquisition tool can be invoked, and the observer is associated with the media data acquisition tool.
[0030] S202: Based on the invocation information, control the observer to invoke or terminate the invocation of the media data acquisition tool to collect media data.
[0031] The entity executing the media data acquisition and control method can be a terminal device, specifically an application running on the terminal device.
[0032] The aforementioned application may include multiple interactive interfaces. The scenario in this disclosure refers to the interactive interface using a media data acquisition tool. The multiple interactive interfaces in the aforementioned application may include one or more of the aforementioned scenarios. The aforementioned media data acquisition tool includes a camera and / or microphone. The target scenario belongs to one or more scenarios of the application.
[0033] The target scenario mentioned above can be any one of the one or more scenarios mentioned above.
[0034] The target scenario described above may include one or more observers. These observers may include controls and execution logic related to the media data acquisition tool.
[0035] The execution logic described above could be, for example, the logic of invoking a media data acquisition tool to collect media data when preset conditions are met. These preset conditions could be, for example, receiving an operation to open the target page. The control described above could be associated with a media data acquisition tool, for example, a control used to invoke the media data acquisition tool.
[0036] When the target scene begins to be displayed, a data acquisition control instance can be run, which can be related to the target scene.
[0037] In some implementations, each scenario corresponds to a data acquisition control instance; that is, each scenario can have an independent data acquisition control instance to control the use of media data acquisition tools within that scenario. For each scenario, the use of media data acquisition tools within that scenario can be controlled by the corresponding data acquisition control instance. Setting up a data acquisition control instance for each scenario helps improve the timeliness and accuracy of controlling the use of media data acquisition tools within that scenario.
[0038] During the continuous display of the target scene, the aforementioned data acquisition and control instance periodically executes the aforementioned target operation.
[0039] The aforementioned permission information indicates whether the application in the target scenario has permission to use the media data acquisition tool. In some application scenarios, the application can send a request to the operating system to use the media data acquisition tool. Upon receiving the request, the operating system can prompt the user for permission. If the user grants permission, the application is authorized to use the media data acquisition tool. The operating system can also provide the application programming interface (API) of the media data acquisition tool to the application. Furthermore, the user can disable the application's use of the media data acquisition tool according to the operating system's settings. If the user disables the application's use of the media data acquisition tool, the application will not have permission to use it.
[0040] When the data acquisition control instance is running, it can use a preset permission detection method to detect whether the application has permission to use the media data acquisition tool.
[0041] The media data acquisition and control example described above can also obtain information about the visibility of the target scene, such as accessing the window manager, which maintains the visibility status of each window. The example can retrieve whether the window containing the target scene is visible from the window manager. For instance, it can obtain the stacking order of the target scene's window among multiple stacked windows and determine whether the window is visible based on this order. If a window is completely covered by other windows, it may be considered invisible. Furthermore, it can determine whether the target scene's window is the currently active window or has input focus; if so, it is determined that the target scene's window is visible.
[0042] In some application scenarios, the aforementioned observer is used to invoke the execution logic of a media data acquisition tool. If the invocation information indicates that the observer can invoke the media data acquisition tool, then the execution logic is allowed to directly invoke the media data acquisition tool to collect media data. The aforementioned observer can directly invoke the media data acquisition tool to collect media data.
[0043] If the above call information indicates that the observer cannot call the media data acquisition tool, then the above execution logic is prohibited from directly calling the media data acquisition tool to collect media data. The above observer cannot call the media data acquisition tool to collect media data.
[0044] In some implementations, the method further includes: displaying a first state or a second state corresponding to the observer based on the invocation information, wherein the first state indicates that the observer can invoke the media data acquisition tool, and the second state indicates that the observer cannot invoke the media data acquisition tool.
[0045] In these implementations, the observer is a control in the target scenario. In these application scenarios, if the invocation information indicates that the observer can invoke the media data acquisition tool, a first state corresponding to the observer can be displayed in the target scenario. The first state may include, for example, displaying the observer's identifier. If the invocation information indicates that the observer cannot invoke the media data acquisition tool, a second state corresponding to the observer can be displayed in the target scenario. The second state may include, for example, hiding the observer's identifier or displaying a "prohibited" identifier on the observer's identifier. The "prohibited" identifier can be any identifier representing prohibited use. By displaying the first or second state information of the observer according to the invocation information, users can intuitively understand whether the observer can invoke the media data acquisition tool, facilitating the user's use of the media data acquisition tool.
[0046] In this embodiment, when displaying a target scene, the data acquisition control instance related to the target scene determines the permission information and the visibility status information of the target scene; based on the permission information and the visibility status information, the invocation information is determined; the invocation information is sent to one or more observers in the target scene; wherein, the invocation information indicates whether the media data acquisition tool can be invoked, the observer is associated with the media data acquisition tool, and based on the invocation information, the observer is controlled to invoke or terminate the invocation of the media data acquisition tool to collect media data. This realizes that the data acquisition control instance manages whether the observers in the target scene can use the media data acquisition tool according to the permission information and visibility status, thereby realizing the control of the use of the media data acquisition tool at the scene level. It can realize the stopping of the use of the media data acquisition tool when it is not needed during the application runtime cycle, which can reduce system resource consumption and reduce the risk of user information leakage.
[0047] In some embodiments, determining the visibility state information of the target scene in the target operation includes the following sub-steps:
[0048] First, obtain the first visibility information of the window containing the target scene, the second visibility information of the target scene, and the occlusion relationship between the target scene and other user interface elements.
[0049] Secondly, based on at least one of the first visibility information, the second visibility information, and the occlusion relationship, the visibility state information of the target scene is determined.
[0050] The data acquisition and control instance described above can obtain first visibility information from a preset API provided by the operating system, or it can detect events related to the first lifecycle of the application in the target scenario. The first visibility information of the window is determined based on these first lifecycle-related events. This first visibility information includes whether the window is visible or invisible.
[0051] Please refer to Figure 3 , Figure 3 This is a diagram illustrating the lifecycle of the window containing the target scene. For example... Figure 3 As shown, the events within the aforementioned lifecycle include opening the application 301, creating a window 302, the window being in the foreground 303, the window being active 304, the window being inactive 305, the window going to the background 306, the window being destroyed 307, and closing the application 308. The events of creating a window 302, the window being in the foreground 303, the window being active 304, and the window being inactive 305 determine that the window is visible; the events of the window being inactive 305, the window going to the background 306, the window being destroyed 307, and the application being closed 308 determine that the window is invisible. The aforementioned window can switch between active and inactive states based on user actions. Furthermore, the aforementioned window can also move from the foreground to the background or from the background to the foreground based on user actions. That is, the aforementioned window can switch between visible and invisible states based on user actions.
[0052] The data acquisition and control instance can periodically detect events related to the second lifecycle of the window where the target scene is located, and then periodically change the first visibility information of the window where the target scene is located based on the detected event information.
[0053] The second visibility information includes whether the target scene is visible or invisible. The data acquisition and control example described above can periodically detect events related to the second lifecycle of the target scene. Please refer to... Figure 4 , Figure 4 This is a lifecycle diagram of the target scenario. (Example) Figure 4 As shown, the lifecycle of the target scene includes opening the application (401), creating the scene (402), displaying the scene (403), the scene disappearing (404), the scene being destroyed (405), and closing the application (406). If the data acquisition and control instance detects that the current event corresponding to the target scene is either creating the scene (402) or displaying the scene (403), it can determine that the target scene is visible. If it detects that the current event corresponding to the target scene is either disappearing (404), destroying the scene (405), or closing the application (406), then the target scene is not visible.
[0054] The data acquisition and control instance can periodically detect events related to the second lifecycle of the target scene, and then periodically change the second visibility information of the target scene based on the information of the detected events.
[0055] The data acquisition and control example described above can periodically detect the occlusion relationship between the target scene and other interface elements. For example, the data acquisition and control example can periodically obtain the stacking order of the target scene among multiple stacked interface elements, and determine whether the target scene is occluded based on this stacking order. Please refer to [reference needed]. Figure 5 , Figure 5 This is a schematic diagram illustrating the display process of a target scene. For example... Figure 5 As shown, the display process of the target scene can include displaying the target scene 501, no obstruction 502, obstruction 503, and scene disappearance. When the user performs the display operation of the target scene, the target scene can be displayed, and it can be displayed without obstruction 501. When the target scene is displayed and there is no obstruction 502, the target scene is visible. If, while the target scene is being displayed, the user opens other interface elements, resulting in interface element stacking, the stacking order can be used to determine whether other interface elements obstruct the target scene. If, based on the stacking order of other interface elements, it is determined that other interface elements obstruct the target scene 503, then the target scene is not visible. Furthermore, the user can perform the operation of closing the target scene, and the target scene disappears 504. When the target scene disappears, the target scene is not visible.
[0056] Furthermore, if the first visibility information indicates that the window containing the target scene is not visible, and / or the second visibility information indicates that the target scene is not visible, the target scene is determined to be in an invisible state;
[0057] If the first lifecycle information indicates that the window containing the target scene is visible, the second lifecycle information indicates that the target scene is visible, and the target scene is not obscured by other interface elements, then the target scene is in a visible state.
[0058] In other words, regardless of whether the window containing the target scene is invisible or the target scene itself is invisible, the target scene is considered invisible. Therefore, if the window containing the target scene is invisible or the target scene itself is invisible, the corresponding invocation information can be determined based on the invisible state of the target scene.
[0059] If the window containing the target scene is visible, the target scene is visible and not obscured, and the target scene is in a visible state, then the corresponding calling information can be determined based on the visibility state of the target scene.
[0060] These implementations provide rules for determining the visibility state of a target scene in different application scenarios, which is helpful for determining the visibility state of a target scene in different application scenarios.
[0061] In these embodiments, the visibility state information of the target scene is determined based on at least one of the following: first visibility information of the window containing the target scene, second visibility information of the target scene, and occlusion relationship between the target scene and other interface elements. This allows for the determination of the target scene's visibility in different application scenarios, thereby controlling the use of media data acquisition tools by observers related to the target scene in different application scenarios. This enables relatively fine-grained control over the target scene's use of media data acquisition tools.
[0062] In some embodiments, determining the invocation information based on permission information and visibility status information in step S202 above includes:
[0063] If the permission information indicates that there is no permission to use the media data acquisition tool, or the visibility status information indicates that the target scene is invisible, determine the first invocation information indicating that the media data acquisition tool cannot be invoked;
[0064] If the permission information indicates that the user has permission to use the media data acquisition tool, and the visibility status information indicates that the target scene is visible, then the second invocation information indicating that the user can invoke the media data acquisition tool is determined.
[0065] In other words, if the permission information indicates that the application in the target scenario does not have permission to use the media data acquisition tool, then the first invocation information indicating that the media data acquisition tool cannot be invoked can be determined.
[0066] If the target scene is invisible, the above first call information is also determined.
[0067] The second invocation information is determined to be the aforementioned second invocation information only when the permission information indicates that the user has permission to use the media data acquisition tool, and the visibility status information of the target scene indicates that the target scene is visible.
[0068] Understandably, the access permissions of the application hosting the target scenario to the media data acquisition tool can vary depending on user settings. Please refer to [link / reference]. Figure 6 , Figure 6 This is a diagram illustrating the process of changing usage permissions for media data acquisition tools. For example... Figure 6 As shown, when a user opens the application, if the application does not have permission to use the media data capture tool, it can send a permission request to the user to request permission to use the media data capture tool. If the user agrees to allow the application to use the media data capture tool, then the application has permission to use the media data capture tool. Even when the application has permission to use the media data capture tool, the user can modify the application's permission for using the media data capture tool in the operating system settings, for example, by disabling it, in which case the application will not have permission to use the media data capture tool.
[0069] If a user denies an application's right to use a media data collection tool based on a permission request, the application will not have permission to use the media data collection tool. When the application does not have permission to use the media data collection tool, the user can modify the application's permission to use the media data collection tool in the system settings interface, for example, by changing it to allow use, then the application will have the right to use the media data collection tool.
[0070] The data acquisition and control example described above can periodically detect changes in permissions and adjust the use of media data acquisition tools in the target scenario in a timely manner based on these changes.
[0071] Furthermore, the visibility state of the target scene changes continuously with user actions. For example, if the user opens other interface elements while the target scene is displayed, and these elements obscure the target scene, the target scene changes from visible to invisible. Similarly, if the user closes the target scene while it is displayed, the target scene changes from visible to invisible. Likewise, if the user closes the window containing the target scene while it is displayed, the target scene changes from visible to invisible. This data acquisition and control example can periodically detect the visibility state of the target scene. If it detects that the target scene's visibility state has changed from visible to invisible, it can prevent any observer of the target scene from using the media data acquisition tool based on the second invocation information.
[0072] In these embodiments, a first invocation message is determined when the permission information indicates that the media data acquisition tool is not authorized, or when the visibility status information indicates that the target scene is invisible. A second invocation message is determined when the permission information indicates that the media data acquisition tool is authorized and the visibility status information indicates that the target scene is visible. This allows the target scene to promptly prohibit the use of the media data acquisition tool when the user is not authorized or when the target scene is invisible, and promptly allow the target scene to use media data when the user is authorized and the target scene is visible. This concretizes the process of controlling the media data acquisition tool based on the permission information and the visibility status information of the target scene, which is beneficial for controlling the use of the media data acquisition tool at the scene level.
[0073] Please refer to Figure 7 , Figure 7 Flowchart of a publicly available media data acquisition and control method Figure 2 ,like Figure 7 As shown, the method includes the following steps:
[0074] S701: In response to the startup operation of the target scenario, create the target scenario and create and run the data acquisition and control instance related to the target scenario.
[0075] In this embodiment, the entity executing the media data acquisition control method can be a terminal device, specifically an application running on the terminal device.
[0076] The aforementioned application may include multiple interactive interfaces. The interface using the media data capture function within these interfaces can serve as a scene. The aforementioned media data capture tools include a camera and / or a microphone. The aforementioned target scene can be any of the aforementioned scenes.
[0077] The startup operation for the target scenario can be any operation used to start the target scenario, such as click, touch, or other trigger operations performed on the startup control corresponding to the target scenario.
[0078] Upon receiving the aforementioned startup operation, the executing entity can create a target scene. This creation could, for example, involve rendering the corresponding display interface based on the target scene's display information.
[0079] In some implementations, step S101 includes: calling the instance creation interface of the custom data acquisition control program to create a data acquisition control instance.
[0080] A custom data acquisition control program can be pre-built and provided to the application as an instance creation interface. Upon receiving the startup operation, the application can access the instance creation interface and create the data acquisition control instance. This data acquisition control instance corresponds to the target application scenario.
[0081] In these implementations, creating data acquisition control instances by calling the instance creation interface of a custom data acquisition control program can improve the efficiency of data acquisition control instance creation.
[0082] In some application scenarios, the target scenario mentioned above is the scenario registered with the data acquisition and control program. The execution entity can register one or more scenarios of the application with the data acquisition and control program based on user operations.
[0083] When a scene in the application is initiated, the application can send an instance creation request to the instance creation interface. This interface determines, based on the registration information, whether the scene indicated by the scene information carried in the instance creation request has been registered with the data acquisition control program. If the scene is registered, a data acquisition control instance is created, which then controls the use of the media data acquisition tool by the scene. If the scene is not registered, no data acquisition control instance is created.
[0084] Each of the application's multiple scenarios corresponds to a data acquisition and control instance.
[0085] While creating the target scene according to the aforementioned startup operations, the application can also invoke the aforementioned media data acquisition management program to create a data acquisition control instance. This data acquisition control instance is used to manage the use of the media data acquisition tool by one or more observers in the target scene.
[0086] S702: Display the target scene and run the data acquisition control instance related to the target scene to perform the following target operations: determine the permission information and the visibility status information of the target scene; determine the invocation information based on the permission information and the visibility status information; send the invocation information to one or more observers in the target scene; wherein the invocation information indicates whether the media data acquisition tool can be invoked, and the observer is associated with the media data acquisition tool.
[0087] S703: Based on the call information, control the observer to call or stop the media data acquisition tool to collect media data.
[0088] For specific implementation details of S702 to S703 above, please refer to... Figure 2 The relevant parts of the illustrated embodiment will not be described in detail here.
[0089] In this embodiment, when the target scene is started according to the startup operation of the target scene, a data acquisition control instance corresponding to the target scene can be created at the same time. Then, the data acquisition control instance can control the use of media data acquisition tools by one or more observers in the scene. This can control the use of media data acquisition tools in the target scene in a timely and accurate manner, thereby reducing resource consumption and the risk of user information leakage.
[0090] Corresponding to the above text Figure 1 , Figure 7 The media data acquisition control method in the embodiment, Figure 8 This is a schematic structural block diagram of a media content template processing apparatus provided in an embodiment of this disclosure. For ease of explanation, only the parts relevant to the embodiments of this disclosure are shown. (Refer to...) Figure 8 The device 80 includes: a first display unit 801 and a processing unit 802. Wherein,
[0091] The first display unit 801 is used to display the target scene and run a data acquisition control instance related to the target scene to perform the following target operations: determine permission information and visibility status information of the target scene; determine invocation information based on permission information and visibility status information; send invocation information to one or more observers in the target scene; wherein, the invocation information indicates whether the media data acquisition tool can be invoked, and the observer is associated with the media data acquisition tool;
[0092] The processing unit 802 is used to control the observer to call or stop calling the media data acquisition tool to acquire media data based on the call information.
[0093] In some embodiments, the data acquisition control instance running on the first display unit 801 performing the target operation further includes:
[0094] Obtain the first visibility information of the window containing the target scene, the second visibility information of the target scene, and the occlusion relationship between the target scene and other user interface elements;
[0095] The visibility state information of the target scene is determined based on at least one of the first visibility information, the second visibility information, and the occlusion relationship.
[0096] In some embodiments, the data acquisition control instance running on the first display unit 801 performing the target operation further includes:
[0097] If the first visibility information indicates that the window containing the target scene is not visible, and / or the second visibility information indicates that the target scene is not visible, the target scene is determined to be in an invisible state;
[0098] If the first lifecycle information indicates that the window containing the target scene is visible, the second lifecycle information indicates that the target scene is visible, and the target scene is not obscured by other interface elements, then the target scene is in a visible state.
[0099] In some embodiments, the data acquisition control instance running on the first display unit 801 performing the target operation further includes:
[0100] If the permission information indicates that there is no permission to use the media data acquisition tool, or the visibility status information indicates that the target scene is invisible, determine the first invocation information indicating that the media data acquisition tool cannot be invoked;
[0101] If the permission information indicates that the user has permission to use the media data acquisition tool, and the visibility status information indicates that the target scene is visible, then the second invocation information indicating that the user can invoke the media data acquisition tool is determined.
[0102] In some embodiments, the apparatus 80 further includes a creation unit (not shown), the creation unit being used for:
[0103] In response to the startup operation of the target scenario, the target scenario is created, and data acquisition and control instances related to the target scenario are created and run.
[0104] In some embodiments, the creation unit is further configured to: call the instance creation interface of the custom data acquisition control program to create a data acquisition control instance.
[0105] In some embodiments, the target scenario belongs to one or more scenarios of the application.
[0106] The scenario is the interactive interface of the media data acquisition tool; each scenario corresponds to a data acquisition control instance.
[0107] In some embodiments, the device 80 further includes a second display unit (not shown), the second display unit being used for:
[0108] Based on the call information, the observer is displayed in either the first state or the second state. The first state indicates that the observer can call the media data acquisition tool, while the second state indicates that the observer cannot call the media data acquisition tool.
[0109] To implement the above embodiments, this disclosure also provides an electronic device.
[0110] refer to Figure 9 The diagram illustrates a structural schematic of an electronic device 900 suitable for implementing embodiments of the present disclosure. The electronic device 900 can be a terminal device or a server. The terminal device can include, but is not limited to, mobile terminals such as mobile phones, laptops, digital radio receivers, personal digital assistants (PDAs), portable Android devices (PADs), portable media players (PMPs), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 9 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0111] like Figure 9 As shown, the electronic device 900 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage device 908 into a random access memory (RAM) 903. The RAM 903 also stores various programs and data required for the operation of the electronic device 900. The processing unit 901, ROM 902, and RAM 903 are interconnected via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0112] Typically, the following devices can be connected to I / O interface 905: input devices 906 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 907 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 908 including, for example, magnetic tapes, hard disks, etc.; and communication devices 909. Communication device 909 allows electronic device 900 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 9 An electronic device 900 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0113] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 909, or installed from a storage device 908, or installed from a ROM 902. When the computer program is executed by a processing device 901, it performs the functions defined in the methods of embodiments of this disclosure.
[0114] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0115] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0116] The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the methods shown in the above embodiments.
[0117] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0118] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0119] The units described in the embodiments of this disclosure can be implemented in software or in hardware. The names of the units are not, in some cases, intended to limit the specific unit.
[0120] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0121] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0122] In a first aspect, according to one or more embodiments of this disclosure, a media data acquisition control method is provided, comprising: displaying a target scene and running a data acquisition control instance related to the target scene to perform the following target operations: determining permission information and visibility status information of the target scene; determining invocation information based on the permission information and visibility status information; sending the invocation information to one or more observers in the target scene; wherein the invocation information indicates whether a media data acquisition tool can be invoked, and the observer is associated with the media data acquisition tool; and controlling the observer to invoke or terminate the invocation of the media data acquisition tool to acquire media data based on the invocation information.
[0123] According to one or more embodiments of this disclosure, determining the visibility status information of a target scene includes:
[0124] Obtain the first visibility information of the window containing the target scene, the second visibility information of the target scene, and the occlusion relationship between the target scene and other user interface elements;
[0125] The visibility state information of the target scene is determined based on at least one of the first visibility information, the second visibility information, and the occlusion relationship.
[0126] According to one or more embodiments of this disclosure, determining the visibility state information of a target scene based on at least one of first visibility information, second visibility information, and occlusion relationship includes:
[0127] If the first visibility information indicates that the window containing the target scene is not visible, and / or the second visibility information indicates that the target scene is not visible, the target scene is determined to be in an invisible state;
[0128] If the first lifecycle information indicates that the window containing the target scene is visible, the second lifecycle information indicates that the target scene is visible, and the target scene is not obscured by other interface elements, then the target scene is in a visible state.
[0129] According to one or more embodiments of this disclosure, determining invocation information based on permission information and visibility status information includes:
[0130] If the permission information indicates that there is no permission to use the media data acquisition tool, or the visibility status information indicates that the target scene is invisible, determine the first invocation information indicating that the media data acquisition tool cannot be invoked;
[0131] If the permission information indicates that the user has permission to use the media data acquisition tool, and the visibility status information indicates that the target scene is visible, then the second invocation information indicating that the user can invoke the media data acquisition tool is determined.
[0132] According to one or more embodiments of this disclosure, the method further includes:
[0133] In response to the startup operation of the target scenario, the target scenario is created, and data acquisition and control instances related to the target scenario are created and run.
[0134] According to one or more embodiments of this disclosure, a corresponding data acquisition control instance is created, including:
[0135] Create a data acquisition control instance by calling the instance creation interface of the custom data acquisition control program.
[0136] According to one or more embodiments of this disclosure, the target scenario belongs to one or more scenarios of an application.
[0137] The scenario is the interactive interface of the media data acquisition tool; each scenario corresponds to a data acquisition control instance.
[0138] According to one or more embodiments of this disclosure, the method further includes:
[0139] Based on the call information, the observer is displayed in either the first state or the second state. The first state indicates that the observer can call the media data acquisition tool, while the second state indicates that the observer cannot call the media data acquisition tool.
[0140] Secondly, according to one or more embodiments of this disclosure, a media data acquisition control device is provided, comprising:
[0141] The first display unit is used to display the target scene and run a data acquisition control instance related to the target scene to perform the following target operations: determine permission information and visibility status information of the target scene; determine invocation information based on permission information and visibility status information; send invocation information to one or more observers in the target scene; wherein, the invocation information indicates whether the media data acquisition tool can be invoked, and the observer is associated with the media data acquisition tool;
[0142] The processing unit is used to control the observer to invoke or terminate the invocation of the media data acquisition tool to acquire media data based on the invocation information.
[0143] According to one or more embodiments of this disclosure, the target operation performed by the data acquisition control instance running on the first display unit further includes:
[0144] Obtain the first visibility information of the window containing the target scene, the second visibility information of the target scene, and the occlusion relationship between the target scene and other user interface elements;
[0145] The visibility state information of the target scene is determined based on at least one of the first visibility information, the second visibility information, and the occlusion relationship.
[0146] According to one or more embodiments of this disclosure, the target operation performed by the data acquisition control instance running on the first display unit further includes:
[0147] If the first visibility information indicates that the window containing the target scene is not visible, and / or the second visibility information indicates that the target scene is not visible, the target scene is determined to be in an invisible state;
[0148] If the first lifecycle information indicates that the window containing the target scene is visible, the second lifecycle information indicates that the target scene is visible, and the target scene is not obscured by other interface elements, then the target scene is in a visible state.
[0149] According to one or more embodiments of this disclosure, the target operation performed by the data acquisition control instance running on the first display unit further includes:
[0150] If the permission information indicates that there is no permission to use the media data acquisition tool, or the visibility status information indicates that the target scene is invisible, determine the first invocation information indicating that the media data acquisition tool cannot be invoked;
[0151] If the permission information indicates that the user has permission to use the media data acquisition tool, and the visibility status information indicates that the target scene is visible, then the second invocation information indicating that the user can invoke the media data acquisition tool is determined.
[0152] According to one or more embodiments of this disclosure, the apparatus further includes a creation unit, the creation unit being configured to:
[0153] In response to the startup operation of the target scenario, the target scenario is created, and data acquisition and control instances related to the target scenario are created and run.
[0154] According to one or more embodiments of this disclosure, the creation unit is further configured to: call the instance creation interface of the custom data acquisition control program to create a data acquisition control instance.
[0155] According to one or more embodiments of this disclosure, the target scenario belongs to one or more scenarios of an application.
[0156] The scenario is the interactive interface of the media data acquisition tool; each scenario corresponds to a data acquisition control instance.
[0157] According to one or more embodiments of this disclosure, the apparatus further includes a second display unit, the second display unit being used for:
[0158] Based on the call information, the observer is displayed in either the first state or the second state. The first state indicates that the observer can call the media data acquisition tool, while the second state indicates that the observer cannot call the media data acquisition tool.
[0159] Thirdly, according to one or more embodiments of the present disclosure, an electronic device is provided, comprising: at least one processor and a memory;
[0160] The memory stores the instructions that the computer executes;
[0161] At least one processor executes computer execution instructions stored in memory, causing at least one processor to perform the methods described in the first aspect above and various possible designs of the first aspect.
[0162] Fourthly, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided that stores computer-executable instructions, which, when executed by a processor, implement the methods described in the first aspect and various possible designs of the first aspect.
[0163] Fifthly, according to one or more embodiments of the present disclosure, a computer program product is provided, including a computer program, and a method for implementing the first aspect and various possible designs of the first aspect when the computer program is executed by a processor.
[0164] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
[0165] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
[0166] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.
Claims
1. A media data acquisition and control method, characterized in that, include: Display the target scene and run a data acquisition control instance related to the target scene to perform the following target operations: determine permission information and visibility status information of the target scene; determine invocation information based on the permission information and visibility status information; send the invocation information to one or more observers in the target scene; wherein the invocation information indicates whether the media data acquisition tool can be invoked, and the observer is associated with the media data acquisition tool; Based on the invocation information, the observer is controlled to invoke or terminate the invocation of the media data acquisition tool to collect media data.
2. The method according to claim 1, characterized in that, Determining the visibility status information of the target scene includes: Obtain the first visibility information of the window where the target scene is located, the second visibility information of the target scene, and the occlusion relationship between the target scene and other user interface elements; The visibility state information of the target scene is determined based on at least one of the first visibility information, the second visibility information, and the occlusion relationship.
3. The method according to claim 2, characterized in that, Determining the visibility state information of the target scene based on at least one of the first visibility information, the second visibility information, and the occlusion relationship includes: If the first visibility information indicates that the window containing the target scene is not visible, and / or the second visibility information indicates that the target scene is not visible, the target scene is determined to be in an invisible state; If the first lifecycle information indicates that the window containing the target scene is visible, the second lifecycle information indicates that the target scene is visible, and the target scene is not obscured by other interface elements, then the target scene is in a visible state.
4. The method according to claim 1, characterized in that, The step of determining the invocation information based on the permission information and the visibility status information includes: If the permission information indicates that there is no permission to use the media data acquisition tool, or the visibility status information indicates that the target scene is invisible, the first invocation information indicating that the media data acquisition tool cannot be invoked is determined; If the permission information indicates that the user has permission to use the media data acquisition tool, and the visibility status information indicates that the target scene is visible, then a second invocation information indicating that the user can invoke the media data acquisition tool is determined.
5. The method according to any one of claims 1-4, characterized in that, The method further includes: In response to the startup operation of the target scenario, the target scenario is created, and the data acquisition and control instance associated with the target scenario is created and run.
6. The method according to claim 5, characterized in that, The creation of the corresponding data acquisition and control instance includes: The data acquisition control instance is created by calling the instance creation interface of the custom data acquisition control program.
7. The method according to claim 1, characterized in that, The target scenario belongs to one or more scenarios of the application. The scenario is the interactive interface for using the media data acquisition tool; each scenario corresponds to one data acquisition control instance.
8. The method according to claim 5, characterized in that, The method further includes: Based on the invocation information, the observer is displayed in either a first state or a second state, wherein the first state indicates that the observer can invoke the media data acquisition tool, and the second state indicates that the observer cannot invoke the media data acquisition tool.
9. A media data acquisition and control device, characterized in that, include: The first display unit is used to display the target scene and run a data acquisition control instance related to the target scene to perform the following target operations: determine permission information and visibility status information of the target scene; determine invocation information based on the permission information and the visibility status information; send the invocation information to one or more observers in the target scene; wherein the invocation information indicates whether a media data acquisition tool can be invoked, and the observer is associated with the media data acquisition tool; The processing unit is used to control the observer to call or terminate the call to the media data acquisition tool to acquire media data based on the call information.
10. An electronic device, characterized in that, include: Processor and memory; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, implement the method as described in any one of claims 1 to 8.
12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the methods described in claims 1 to 8, or displays an observer corresponding to a first state or a second state, wherein the first state indicates that the observer can invoke the media data acquisition tool, and the second state indicates that the observer cannot invoke the method described in any one of the media data acquisition tools.