A terminal control method, apparatus, device, and medium
By using a preset whitelist to detect live streaming viewing status at the terminal system level, the problem of low detection accuracy and efficiency in existing technologies is solved, and efficient and accurate live streaming status recognition is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- DOUYIN VISION CO LTD
- Filing Date
- 2021-09-30
- Publication Date
- 2026-04-28
AI Technical Summary
In existing technologies, the accuracy and efficiency of live streaming viewing status detection are relatively low, especially in image recognition methods where misjudgments are prone to occur.
By obtaining a preset whitelist at the terminal system level, including an activity whitelist and a function call whitelist, it detects whether the target program has entered the live streaming viewing state. The activity whitelist is used to match the running activity name, and the function call whitelist is used to match the functions of the live streaming SDK to determine the live streaming status.
It improves the efficiency and accuracy of detecting live streaming viewing status, requires no server involvement, can detect any application, and reduces false positives.
Smart Images

Figure CN115914658B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of live streaming technology, and in particular to a terminal control method, device, equipment and medium. Background Technology
[0002] With the continuous development of internet technology, live streaming is becoming increasingly widely used in learning as a new form of communication.
[0003] Online classes can be conducted via live streaming, but maintaining focus during these classes requires monitoring the viewer's attention. Currently, image recognition can be used to monitor viewer attention, but this method suffers from low accuracy and efficiency. Summary of the Invention
[0004] In order to solve the above-mentioned technical problems, or at least partially solve the above-mentioned technical problems, this disclosure provides a terminal control method, device, equipment and medium.
[0005] This disclosure provides a terminal control method, the method comprising:
[0006] Obtain a preset whitelist, wherein the preset whitelist includes an activity whitelist and / or a function call whitelist;
[0007] The target program is detected based on the preset whitelist to determine whether the target program has entered the live streaming viewing state. The target program is a running application.
[0008] This disclosure also provides a terminal control device, the device comprising:
[0009] The whitelist module is used to obtain a preset whitelist, wherein the preset whitelist includes an activity whitelist and / or a function call whitelist;
[0010] The status detection module is used to detect the target program based on the preset whitelist and determine whether the target program has entered the live broadcast viewing state. The target program is a running application.
[0011] This disclosure also provides an electronic device, the electronic device comprising: a processor; a memory for storing executable instructions of the processor; the processor being configured to read the executable instructions from the memory and execute the instructions to implement the terminal control method provided in this disclosure.
[0012] This disclosure also provides a computer-readable storage medium storing a computer program for executing the terminal control method provided in this disclosure.
[0013] Compared with the prior art, the technical solution provided in this disclosure has the following advantages: The terminal control scheme provided in this disclosure obtains a preset whitelist, wherein the preset whitelist includes an activity whitelist and / or a function call whitelist; based on the preset whitelist, the target program is detected to determine whether the target program has entered the live streaming viewing state, and the target program is a running application. By adopting the above technical solution, the preset whitelist can be used to detect whether a running application has entered the live streaming viewing state. Since the detection is performed at the terminal system level, no server involvement is required, detection can be performed on any application, and the efficiency and accuracy of live streaming viewing state detection are improved. Attached Figure Description
[0014] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.
[0015] Figure 1 A schematic flowchart of a terminal control method provided in an embodiment of this disclosure;
[0016] Figure 2 A flowchart illustrating another terminal control method provided in an embodiment of this disclosure;
[0017] Figure 3 A schematic diagram of a terminal control provided in an embodiment of this disclosure;
[0018] Figure 4 A schematic diagram illustrating another terminal control method provided in an embodiment of this disclosure;
[0019] Figure 5 This is a schematic diagram of the structure of a terminal control device provided in an embodiment of the present disclosure;
[0020] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0021] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0022] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.
[0023] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.
[0024] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0025] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0026] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0027] Figure 1 This is a flowchart illustrating a terminal control method provided in an embodiment of the present disclosure. The method can be executed by a terminal control device, which can be implemented using software and / or hardware, and is generally integrated into an electronic device. Figure 1 As shown, the method includes:
[0028] Step 101: Obtain the preset whitelist, which includes the activity whitelist and / or the function call whitelist.
[0029] The preset whitelist can be a whitelist pre-set in the terminal device for judging the live broadcast viewing status. In this embodiment of the disclosure, the preset whitelist can include two types: an activity whitelist and a function call whitelist.
[0030] An activity is a basic, schedulable unit of an application, representing the interface that a user can see. Each activity has a corresponding name. A live streaming interface refers to the interface in an application that is in live streaming viewing mode. Since the name of the live streaming interface can be different for each application, this embodiment of the disclosure can set an activity whitelist to store the names of the activities corresponding to the live streaming interfaces of pre-determined applications that can perform live streaming.
[0031] The function whitelist in this embodiment can store the entry and exit functions of the live streaming SDK (Software Development Kit) in different applications, used to determine the live streaming viewing status. The live streaming SDK can be a software development kit installed in an application and running based on the application. It runs by calling the application's resources to implement live streaming.
[0032] In this embodiment of the disclosure, the terminal device can obtain a pre-set whitelist. The whitelist supports updates, meaning it can be updated according to actual circumstances.
[0033] Step 102: Detect the target program based on the preset whitelist to determine whether the target program has entered the live broadcast viewing state. The target program is a running application.
[0034] The target program refers to the application currently running on the terminal device, and its specific nature is not limited. For example, the target program can be a live streaming application or a non-live streaming application. The live streaming viewing status refers to whether the user is currently watching the live stream.
[0035] Specifically, after obtaining the preset whitelist, the target program can be detected based on the activity whitelist and / or function call whitelist in the preset whitelist to determine whether the target program has entered the live broadcast viewing state.
[0036] In this embodiment of the disclosure, detecting the target program based on a preset whitelist to determine whether the target program has entered the live streaming viewing state may include: when the detection result of the target program based on the activity whitelist or the function call whitelist is a pass, it is determined that the target program has entered the live streaming viewing state; when the detection result of the target program based on both the activity whitelist and the function call whitelist is a fail, it is determined that the target program has not entered the live streaming viewing state.
[0037] A successful detection indicates that the target program passes the detection in either the activity whitelist or the function call whitelist, while a failed detection indicates that the target program fails the detection in both the activity whitelist and the function call whitelist.
[0038] Optionally, the detection result of the target program based on the function call whitelist is considered as a successful detection, including: obtaining the running activity of the target program; matching the name of the running activity in the activity whitelist; if the match is successful, the detection result is determined as a successful detection.
[0039] The terminal device can obtain the name of the running activity of the target program, that is, the name of the running activity corresponding to each opened interface. The name of the running activity is matched one by one with the name of the live broadcast interface in the activity whitelist. If there is a name with a matching degree greater than or equal to the matching degree threshold, the matching result is determined to be a successful match, indicating that the target program has a live broadcast interface among the open interfaces. Therefore, the detection result is determined to be a successful detection, and the target program enters the live broadcast viewing state.
[0040] Optionally, the detection result of the target program based on the function call whitelist is considered as a successful detection, including: when the target program is configured with a live streaming SDK, obtaining the function call of the live streaming SDK; if the function call of the live streaming SDK matches the entry function in the function call whitelist, then the detection result is determined to be a successful detection.
[0041] Since the target program can be an application configured with a live streaming SDK, the terminal device can obtain the calling functions of the live streaming SDK for the target program, match the calling functions with the entry functions in the calling function whitelist, and when the calling function in the live streaming SDK is the same as a certain entry function in the calling function whitelist, it means that the entry function of the live streaming interface has been called, the detection result is determined to be a successful detection, and the target program enters the live streaming viewing state.
[0042] Optionally, the detection result of the target program based on the activity whitelist and the function call whitelist is that the detection fails, including: when the name of the running activity fails to match in the activity whitelist and the function call of the live streaming SDK matches the exit function in the function call whitelist, the detection result is determined to be that the detection fails.
[0043] The terminal device matches the name of the running activity against the names of the corresponding live streaming activities in the activity whitelist one by one. If no name with a matching degree greater than or equal to the matching degree threshold is found, the matching result is determined to be a failure. Then, the target program can be detected based on the function call whitelist. If a function call in the live streaming SDK matches an exit function in the function call whitelist, it indicates that an exit function of the live streaming interface has been called, and the detection result is determined to be a failure, meaning the target program has not entered the live streaming viewing state. Optionally, the terminal device can also first detect the target program based on the function call whitelist. If it is determined that the function call in the live streaming SDK matches an exit function in the function call whitelist, then the target program can be detected based on the activity whitelist. If the name of the running activity fails to match in the activity whitelist, the detection result is determined to be a failure, meaning the target program has not entered the live streaming viewing state.
[0044] While image recognition can be used to detect live stream viewing status in related technologies, it fails to recognize images from user-replayed live stream videos, leading to false positives, low accuracy, and low efficiency. This solution detects live stream viewing status at the system level, avoiding false positives and improving both efficiency and accuracy while being able to detect any application.
[0045] The terminal control scheme provided in this disclosure obtains a preset whitelist, which includes an activity whitelist and / or a function call whitelist. Based on the preset whitelist, a target program is detected to determine whether it has entered live streaming viewing mode. The target program is a running application. Using this technical solution, the preset whitelist can detect whether a running application has entered live streaming viewing mode. Since the detection is performed at the terminal system level, no server involvement is required, and detection can be performed on any application, thus improving the efficiency and accuracy of live streaming viewing mode detection.
[0046] In some embodiments, the terminal control method may further include: when it is determined that the target program has not entered the live streaming viewing state, and a user's status confirmation operation on the target program is detected, adding the name of the target program's running activity and / or the call function of the configured live streaming SDK to a preset whitelist, wherein the status confirmation operation is used to determine that the target program has entered the live streaming viewing state.
[0047] The status confirmation operation can be triggered by a user's preset gesture or preset sound, etc., and is not limited to any specific action. After the terminal device determines that the target program has not entered the live streaming viewing state through the preset whitelist, if it detects a user's status confirmation operation on the target program, it means that although the terminal device judges that the target program has not entered the live streaming viewing state, the user has confirmed that they have entered it. This indicates that there is an omission in the preset whitelist. Subsequently, the name of the target program's running activity and / or the entry and exit functions of the live streaming SDK can be added to the preset whitelist to update the preset whitelist.
[0048] Optionally, when a new application capable of live streaming is added, the activity name corresponding to the new live streaming interface of that application can also be added to the activity whitelist within the preset whitelist; or, when the dwell time of an interface in an application reaches a duration threshold, confirming that the interface as a live streaming interface, the name of the activity corresponding to that interface can be added to the activity whitelist. The above methods for updating the preset whitelist are merely examples and not the only limitations.
[0049] In the above scheme, the preset whitelist can be updated and adjusted according to the actual situation, further improving the accuracy of detecting the live streaming viewing status.
[0050] In some embodiments, the terminal control method may further include: when the target program enters the live streaming viewing state, entering the anti-interference mode and performing anti-interference operations, the anti-interference operations including blocking notifications from preset applications.
[0051] When the target program enters live streaming mode, it indicates that the user may be entering a special scenario, such as online class mode or meeting mode. The terminal device can then enter a do-not-disturb mode and perform do-not-disturb operations. Do-not-disturb operations may include blocking notifications from preset applications. These preset applications can be determined based on actual circumstances; for example, they may include instant messaging programs, shopping programs, and map programs. Blocking notifications means not displaying notification information from the preset applications and intercepting their notification sounds. In this embodiment, once the do-not-disturb mode is entered, manual deactivation by the user is not supported, thus strengthening the do-not-disturb effect.
[0052] In some embodiments, the terminal control method may further include: when the target program exits the live streaming viewing state, or when the target program is closed or switched to background operation, exiting the anti-interference mode and stopping the anti-interference operation.
[0053] When the target program exits the live streaming viewing state, or when the target program is closed or switched to run in the background, the do-not-disturb mode can be automatically exited and the do-not-disturb operation can be stopped.
[0054] In the above solution, after determining whether to enter the do-not-disturb scenario based on the live stream viewing status, the do-not-disturb operation can be executed, reducing disturbances in the do-not-disturb scenario and helping users focus more on the current scenario, such as helping users focus on online classes and creating a better learning environment.
[0055] In some embodiments, after detecting that the target program has switched from running in the foreground to running in the background, the terminal control method may further include: displaying a floating window control of the target program, wherein the floating window control of the target program is used to switch the running state of the target program.
[0056] Among them, the floating window control can be an entry control for quickly returning to the target program. That is, the target program can be quickly switched from running in the background to running in the foreground through the floating window control. The floating window control can float on the top layer of the currently displayed interface, so that the user can trigger the floating window control when operating the currently displayed interface.
[0057] In this embodiment, the terminal device can periodically detect the running status of the target program. When it detects that the target program has switched from running in the foreground to running in the background, it indicates that the user has switched to the desktop or other programs. The aforementioned anti-interference operation can then be stopped, and the floating window control of the target program can be displayed on the current display screen. The specific position of the floating window control of the target program on the current display screen can be set according to actual conditions. For example, the floating window control of the target program can be displayed in any position that does not obstruct the content displayed on the current display screen.
[0058] It should be noted that the above floating window control can also be set to a small window area that can play live video data, so as to continue playing the live video data of the target program, achieve seamless playback, and avoid live streaming lag.
[0059] Optionally, the terminal control method provided in this embodiment may further include: stopping the anti-interference operation when it is detected that the target program exits the live streaming viewing state or is closed. The terminal device can stop the aforementioned anti-interference operation when it detects that the target program has exited the live streaming viewing state or has been closed. The above-mentioned automatic cessation of the anti-interference state upon the end of the live stream, the closure of the target program, or its background operation, without supporting user-defined settings or manual disabling of anti-interference, further enhances the effectiveness of the anti-interference mechanism.
[0060] Optionally, after displaying the floating window control of the target program, the method further includes: closing the floating window control of the target program when the closing condition is met. Optionally, the closing condition of the floating window control of the target program is met by: receiving a user's return trigger operation or close trigger operation on the floating window control of the target program, detecting that the target program has exited the live viewing state, or when the display time of the floating window control of the target program reaches a preset time after the real-time state of the target program enters the live viewing state.
[0061] In the above solution, after the floating window control is displayed, it can be closed based on various strategies. The floating window control has greater control flexibility and can better meet the needs of various scenarios, thereby improving the user experience.
[0062] Optionally, upon receiving a user's return trigger operation on the target program's floating window control, the system may further include: switching the target program to run in the foreground. After the terminal device detects the user's return trigger operation on the target program's floating window control, it can switch the target program from background to foreground running to continue the previous live broadcast. The floating window control allows for quick return to the target program's live broadcast interface, saving time and improving return efficiency.
[0063] In the above solution, by providing a floating window control, the running state of the program can be quickly switched, thereby quickly entering and exiting the do-not-disturb state, improving the flexibility of the do-not-disturb operation and thus enhancing the user experience.
[0064] Figure 2 This is a flowchart illustrating another terminal control method provided in this embodiment of the present disclosure. This embodiment further optimizes the above-mentioned terminal control method based on the above-mentioned embodiments.
[0065] like Figure 2 As shown, the method includes:
[0066] Step 201: Obtain the preset whitelist.
[0067] The preset whitelist includes an activity whitelist and / or a function call whitelist.
[0068] After step 201, steps 202 and / or 203 can be executed. When executing steps 202 and 203, step 202 can be executed first and then step 203, or step 203 can be executed first and then step 202.
[0069] Step 202: Check if the detection result of the target program based on the activity whitelist is "detection passed". If yes, proceed to step 205; otherwise, proceed to step 203.
[0070] The target program is a running application.
[0071] Specifically, the terminal device can obtain the running activity of the target program; match the name of the running activity in the activity whitelist; if the match is successful, the detection result is determined to be a successful detection, and step 205 is executed; if the match fails, step 203 is executed.
[0072] Step 203: Check whether the detection result of the target program based on the function call whitelist is a successful detection. If yes, proceed to step 205; otherwise, proceed to step 204.
[0073] Specifically, when the target program is configured with a live streaming SDK, obtain the calling function of the live streaming SDK; if the calling function of the live streaming SDK matches the entry function in the calling function whitelist, then execute step 205; if the calling function of the live streaming SDK matches the exit function in the calling function whitelist, then determine that the detection result is that the detection failed, and execute step 204.
[0074] Step 204: Determine that the target program is not in live streaming viewing mode.
[0075] If the name of the running activity fails to match in the activity whitelist, but the calling function of the live streaming SDK matches the exit function in the calling function whitelist, then the detection result is determined to be a failure, and the target program is determined not to have entered the live streaming viewing state.
[0076] Optionally, the terminal control method further includes: when it is determined that the target program has not entered the live viewing state, and a user's status confirmation operation on the target program is detected, the name of the target program's running activity and / or the call function of the configured live SDK are added to a preset whitelist, and the status confirmation operation is used to determine that the target program has entered the live viewing state.
[0077] Step 205: Confirm that the target program has entered the live streaming viewing state.
[0078] Step 206: Enter Do Not Disturb mode and perform the Do Not Disturb operation.
[0079] Do not disturb actions include blocking notifications from preset applications.
[0080] Step 207: When the target program exits the live streaming viewing state, or when the target program is closed or switched to running in the background, exit the do-not-disturb mode and stop the do-not-disturb operation.
[0081] The terminal control method in this disclosure embodiment will be further illustrated by a specific example below. For example, Figure 3 This is a schematic diagram of a terminal control provided in an embodiment of this disclosure. Figure 3A general architecture diagram of terminal control is shown, such as... Figure 3 As shown, the terminal device includes a system control module (Framework). This module monitors the foreground / background status and processes of the target program and includes the target program and assistant program shown in the diagram. The specific process can include: the system control module obtaining a preset whitelist, including an activity whitelist and a function call whitelist, and setting the function call whitelist in the virtual machine (ART). Taking an Android application as an example, Android applications are often Java applications, which run in a virtual machine. After the target program's process starts, the system control module can obtain the target program's running activities. If any function in the activity whitelist is included, the target program is determined to have entered live streaming viewing mode. The system control module can also obtain the call functions of the live streaming SDK installed in the target program. By modifying the virtual machine to trace (hook) the function call whitelist, if an entry function in the function call whitelist is called by the live streaming SDK, the target program is determined to have entered live streaming viewing mode. If an exit function in the function call whitelist is called by the live streaming SDK and the activity whitelist is not included in the running activities, the target program is determined not to have entered live streaming viewing mode.
[0082] like Figure 3 As shown, an assistant program has been added to the terminal device. This assistant program receives the result from the system control module indicating whether the device has entered live streaming viewing mode, and controls the terminal device to enter or exit do-not-disturb mode based on the result, performing corresponding operations. Furthermore, this assistant program can receive the activity lifecycle information of all interfaces of the target program from the system control module, and report this information to the cloud backend. The cloud backend then determines the dwell time for each interface based on its activity lifecycle and updates the activity whitelist accordingly. Optionally, if the dwell time of an interface is greater than or equal to a duration threshold, that interface can be identified as a live streaming interface, and the corresponding activity name can be added to the activity whitelist. Moreover, after the function call whitelist is updated, it can be uploaded to the cloud backend. The cloud backend sends the updated function call whitelist to the assistant program, which then sends the whitelist to the terminal device's system control module. By adding this assistant program, the live streaming viewing status of multiple target programs can be monitored and managed, and corresponding do-not-disturb operations can be performed based on whether the live streaming viewing mode has been entered, resulting in higher efficiency.
[0083] Regarding the above-mentioned determination of whether a target program enters live streaming viewing mode based on a function call whitelist, i.e., the process of tracing the function call whitelist, please refer to [link to relevant documentation]. Figure 4 For example, Figure 4This is a schematic diagram of another terminal control method provided in this embodiment of the disclosure. The specific process may include: application startup, i.e., when the target program's activity thread starts, loading the whitelist of call functions to be traced, i.e., the virtual machine initiates tracing and receives the class and method to be traced. A thread is started, waiting in a blocking call manner on the execution state of the function to be traced. The function to be traced is the entry and exit function of the live streaming SDK in the call function whitelist. Application behavior triggers class loading. During class loading, it is determined whether the class and method are to be traced. If so, the class name and method name are recorded, which can be in string form. Furthermore, for the function to be traced, optimized compilation is prohibited, i.e., it is prohibited from being compiled into native code, and it is prohibited from being inlined. Then, the unique identifier of the method can be recorded. The target program executes the method. The virtual machine determines whether it is a traced method through the unique identifier. If so, the thread call returns. That is, when the function to be traced is called, the thread blocking call will return, returning the call status: start live streaming, end live streaming, i.e., returning the result of whether to enter the live streaming viewing state. Afterwards, the result of whether or not you have entered the live broadcast viewing state can be notified to the assistant program so that the assistant program can perform subsequent anti-interference operations.
[0084] This solution provides a closed-loop detection method for live streaming viewing status, which can effectively identify the entry into live streaming viewing status, improve the detection efficiency and accuracy of live streaming viewing status, and thus provide anti-interference functions for special scenarios in live streaming viewing status from the product level. For example, it can determine the online class status based on the live streaming viewing status and enter the anti-interference mode in the online class scenario to perform anti-interference operations. Moreover, the above method can minimize the later maintenance costs within the feasible range.
[0085] The terminal control scheme provided in this disclosure obtains a preset whitelist, which includes an activity whitelist and / or a function call whitelist. Based on the preset whitelist, a target program is detected to determine whether it has entered live streaming viewing mode. The target program is a running application. Using this technical solution, the preset whitelist can detect whether a running application has entered live streaming viewing mode. Since the detection is performed at the terminal system level, no server involvement is required, and detection can be performed on any application, thus improving the efficiency and accuracy of live streaming viewing mode detection.
[0086] Figure 5 This is a schematic diagram of a terminal control device provided in an embodiment of the present disclosure. This device can be implemented by software and / or hardware and is generally integrated into an electronic device. Figure 5 As shown, the device includes:
[0087] The whitelist module 501 is used to obtain a preset whitelist, wherein the preset whitelist includes an activity whitelist and / or a function call whitelist;
[0088] The status detection module 502 is used to detect the target program based on the preset whitelist and determine whether the target program has entered the live broadcast viewing state. The target program is a running application.
[0089] Optionally, the state detection module 502 includes:
[0090] The first unit is used to determine that the target program enters the live streaming viewing state when the detection result of the target program based on the activity whitelist or the function call whitelist is that the detection is passed.
[0091] The second unit is used to determine that the target program has not entered the live streaming viewing state when the detection results of the target program based on the activity whitelist and the function call whitelist are both failures.
[0092] Optionally, the first unit includes a list subunit for:
[0093] Obtain the runtime activity of the target program;
[0094] The name of the running activity is matched against the activity whitelist. If a match is found, the detection result is determined to be a successful detection.
[0095] Optionally, the first unit includes a function subunit for:
[0096] If the target program is configured with a live streaming SDK, obtain the calling functions of the live streaming SDK;
[0097] If the calling function of the live streaming SDK matches the entry function in the whitelist of calling functions, the detection result is determined to be a successful detection.
[0098] Optionally, the second unit is used for:
[0099] If the name of the running activity fails to match in the activity whitelist, but the calling function of the live streaming SDK successfully matches the exit function in the calling function whitelist, then the detection result is determined to be a failed detection.
[0100] Optionally, the device further includes a list updating module for:
[0101] When it is determined that the target program has not entered the live streaming viewing state, and a user's status confirmation operation on the target program is detected, the name of the target program's running activity and / or the call function of the configured live streaming SDK are added to the preset whitelist. The status confirmation operation is used to determine that the target program has entered the live streaming viewing state.
[0102] Optionally, the device further includes a do-not-disturb module for:
[0103] When the target program enters live streaming mode, it enters anti-interference mode and performs anti-interference operations, including blocking notifications from preset applications.
[0104] Optionally, the device further includes a do-not-disturb exit module for:
[0105] When the target program exits the live streaming viewing state, or when the target program is closed or switched to background operation, the anti-disturbance mode is exited and the anti-disturbance operation is stopped.
[0106] The terminal control device provided in this disclosure can execute the terminal control method provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
[0107] This disclosure also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the terminal control method provided in any embodiment of this disclosure.
[0108] Figure 6 This is a schematic diagram of an electronic device provided in an embodiment of the present disclosure. See below for details. Figure 6 The diagram illustrates a structural schematic suitable for implementing the electronic device 600 in the embodiments of this disclosure. The electronic device 600 in the embodiments of this disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 6 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0109] like Figure 6As shown, electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 601, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 602 or a program loaded from storage device 608 into random access memory (RAM) 603. RAM 603 also stores various programs and data required for the operation of electronic device 600. Processing device 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.
[0110] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, magnetic tapes, hard disks, etc.; and communication devices 609. Communication device 609 allows electronic device 600 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 6 An electronic device 600 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.
[0111] 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 non-transitory 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 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, it performs the functions defined in the terminal control method of embodiments of this disclosure.
[0112] 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.
[0113] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0114] 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.
[0115] The aforementioned computer-readable medium carries one or more programs. When the aforementioned one or more programs are executed by the electronic device, the electronic device causes the electronic device to: obtain a preset whitelist, wherein the preset whitelist includes an activity whitelist and / or a function call whitelist; detect a target program based on the preset whitelist, and determine whether the target program has entered a live streaming viewing state, wherein the target program is a running application.
[0116] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages such as Java, Smalltalk, and C++, as well as 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).
[0117] 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.
[0118] The units described in the embodiments of this disclosure can be implemented in software or hardware. The names of the units are not, in some cases, intended to limit the specific unit.
[0119] 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.
[0120] 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. Machine-readable media 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.
[0121] According to one or more embodiments of this disclosure, this disclosure provides a terminal control method, including:
[0122] Obtain a preset whitelist, wherein the preset whitelist includes an activity whitelist and / or a function call whitelist;
[0123] The target program is detected based on the preset whitelist to determine whether the target program has entered the live streaming viewing state. The target program is a running application.
[0124] According to one or more embodiments of this disclosure, in the terminal control method provided by this disclosure, detecting a target program based on the preset whitelist and determining whether the target program has entered a live streaming viewing state includes:
[0125] When the detection result of the target program based on the activity whitelist or the function call whitelist is "detection passed", it is determined that the target program enters the live viewing state.
[0126] If the detection results of the target program based on the activity whitelist and the function call whitelist are both "failed", then it is determined that the target program has not entered the live broadcast viewing state.
[0127] According to one or more embodiments of this disclosure, in the terminal control method provided by this disclosure, the detection result of the target program based on the whitelist of calling functions is "detection passed", including:
[0128] Obtain the runtime activity of the target program;
[0129] The name of the running activity is matched against the activity whitelist. If a match is found, the detection result is determined to be a successful detection.
[0130] According to one or more embodiments of this disclosure, in the terminal control method provided by this disclosure, the detection result of the target program based on the whitelist of calling functions is "detection passed", including:
[0131] If the target program is configured with a live streaming SDK, obtain the calling functions of the live streaming SDK;
[0132] If the calling function of the live streaming SDK matches the entry function in the whitelist of calling functions, the detection result is determined to be a successful detection.
[0133] According to one or more embodiments of this disclosure, in the terminal control method provided by this disclosure, the detection result of the target program based on the activity whitelist and the function call whitelist is that both fail the detection, including:
[0134] If the name of the running activity fails to match in the activity whitelist, but the calling function of the live streaming SDK successfully matches the exit function in the calling function whitelist, then the detection result is determined to be a failed detection.
[0135] According to one or more embodiments of this disclosure, the terminal control method provided in this disclosure further includes:
[0136] When it is determined that the target program has not entered the live streaming viewing state, and a user's status confirmation operation on the target program is detected, the name of the target program's running activity and / or the call function of the configured live streaming SDK are added to the preset whitelist. The status confirmation operation is used to determine that the target program has entered the live streaming viewing state.
[0137] According to one or more embodiments of this disclosure, the terminal control method provided in this disclosure further includes:
[0138] When the target program enters live streaming mode, it enters anti-interference mode and performs anti-interference operations, including blocking notifications from preset applications.
[0139] According to one or more embodiments of this disclosure, the terminal control method provided in this disclosure further includes:
[0140] When the target program exits the live streaming viewing state, or when the target program is closed or switched to background operation, the anti-disturbance mode is exited and the anti-disturbance operation is stopped.
[0141] According to one or more embodiments of this disclosure, this disclosure provides a terminal control device, including:
[0142] The whitelist module is used to obtain a preset whitelist, wherein the preset whitelist includes an activity whitelist and / or a function call whitelist;
[0143] The status detection module is used to detect the target program based on the preset whitelist and determine whether the target program has entered the live broadcast viewing state. The target program is a running application.
[0144] According to one or more embodiments of this disclosure, in the terminal control device provided by this disclosure, the status detection module includes:
[0145] The first unit is used to determine that the target program enters the live streaming viewing state when the detection result of the target program based on the activity whitelist or the function call whitelist is that the detection is passed.
[0146] The second unit is used to determine that the target program has not entered the live streaming viewing state when the detection results of the target program based on the activity whitelist and the function call whitelist are both failures.
[0147] According to one or more embodiments of this disclosure, in the terminal control device provided by this disclosure, the first unit includes a list subunit, used for:
[0148] Obtain the runtime activity of the target program;
[0149] The name of the running activity is matched against the activity whitelist. If a match is found, the detection result is determined to be a successful detection.
[0150] According to one or more embodiments of this disclosure, in the terminal control device provided by this disclosure, the first unit includes a function subunit, used for:
[0151] If the target program is configured with a live streaming SDK, obtain the calling functions of the live streaming SDK;
[0152] If the calling function of the live streaming SDK matches the entry function in the whitelist of calling functions, the detection result is determined to be a successful detection.
[0153] According to one or more embodiments of this disclosure, in the terminal control device provided by this disclosure, the second unit is used for:
[0154] If the name of the running activity fails to match in the activity whitelist, but the calling function of the live streaming SDK successfully matches the exit function in the calling function whitelist, then the detection result is determined to be a failed detection.
[0155] According to one or more embodiments of this disclosure, the terminal control device provided in this disclosure further includes a list updating module, used for:
[0156] When it is determined that the target program has not entered the live streaming viewing state, and a user's status confirmation operation on the target program is detected, the name of the target program's running activity and / or the call function of the configured live streaming SDK are added to the preset whitelist. The status confirmation operation is used to determine that the target program has entered the live streaming viewing state.
[0157] According to one or more embodiments of this disclosure, the terminal control device provided in this disclosure further includes an anti-interference module, used for:
[0158] When the target program enters live streaming mode, it enters anti-interference mode and performs anti-interference operations, including blocking notifications from preset applications.
[0159] According to one or more embodiments of this disclosure, the terminal control device provided in this disclosure further includes an anti-interference exit module, used for:
[0160] When the target program exits the live streaming viewing state, or when the target program is closed or switched to background operation, the anti-disturbance mode is exited and the anti-disturbance operation is stopped.
[0161] According to one or more embodiments of this disclosure, this disclosure provides an electronic device, including:
[0162] processor;
[0163] Memory used to store the processor's executable instructions;
[0164] The processor is configured to read the executable instructions from the memory and execute the instructions to implement any of the terminal control methods provided in this disclosure.
[0165] According to one or more embodiments of the present disclosure, the present disclosure provides a computer-readable storage medium storing a computer program for performing any of the terminal control methods provided in the present disclosure.
[0166] 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.
[0167] 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.
[0168] 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 terminal control method, characterized in that, include: Obtain a preset whitelist, wherein the preset whitelist includes an activity whitelist and / or a function call whitelist; The target program is detected based on the preset whitelist to determine whether the target program has entered the live streaming viewing state. The target program is a running application. The step of detecting the target program based on the preset whitelist and determining whether the target program has entered the live streaming viewing state includes: When the detection result of the target program based on the activity whitelist or the function call whitelist is "detection passed", it is determined that the target program enters the live viewing state. If the detection results of the target program based on the activity whitelist and the function call whitelist are both "failed", then it is determined that the target program has not entered the live broadcast viewing state. The detection result of the target program based on the whitelist of called functions is "detection passed", including: If the target program is configured with a live streaming SDK, obtain the calling functions of the live streaming SDK; If the calling function of the live streaming SDK matches the entry function in the whitelist of calling functions, the detection result is determined to be a successful detection.
2. The method according to claim 1, characterized in that, The detection result of the target program based on the activity whitelist is "detection passed", including: Obtain the runtime activity of the target program; The name of the running activity is matched against the activity whitelist. If a match is found, the detection result is determined to be a successful detection.
3. The method according to claim 2, characterized in that, The detection results for the target program based on the activity whitelist and the function call whitelist both indicate that the detection failed, including: If the name of the running activity fails to match in the activity whitelist, but the calling function of the live streaming SDK successfully matches the exit function in the calling function whitelist, then the detection result is determined to be a failed detection.
4. The method according to claim 1, characterized in that, The method further includes: When it is determined that the target program has not entered the live streaming viewing state, and a user's status confirmation operation on the target program is detected, the name of the target program's running activity and / or the configured live streaming SDK calling function are added to the preset whitelist. The status confirmation operation is used to determine that the target program has entered the live streaming viewing state.
5. The method according to claim 1, characterized in that, The method further includes: When the target program enters live streaming mode, it enters anti-interference mode and performs anti-interference operations, including blocking notifications from preset applications.
6. The method according to claim 5, characterized in that, The method further includes: When the target program exits the live streaming viewing state, or when the target program is closed or switched to background operation, the anti-disturbance mode is exited and the anti-disturbance operation is stopped.
7. A terminal control device, characterized in that, include: The whitelist module is used to obtain a preset whitelist, wherein the preset whitelist includes an activity whitelist and / or a function call whitelist; The status detection module is used to detect the target program based on the preset whitelist and determine whether the target program has entered the live broadcast viewing state. The target program is a running application. The step of detecting the target program based on the preset whitelist and determining whether the target program has entered the live streaming viewing state includes: When the detection result of the target program based on the activity whitelist or the function call whitelist is "detection passed", it is determined that the target program enters the live viewing state. If the detection results of the target program based on the activity whitelist and the function call whitelist are both "failed", then it is determined that the target program has not entered the live broadcast viewing state. The detection result of the target program based on the whitelist of called functions is "detection passed", including: If the target program is configured with a live streaming SDK, obtain the calling functions of the live streaming SDK; If the calling function of the live streaming SDK matches the entry function in the whitelist of calling functions, the detection result is determined to be a successful detection.
8. An electronic device, characterized in that, The electronic device includes: processor; Memory used to store the processor's executable instructions; The processor is configured to read the executable instructions from the memory and execute the instructions to implement the terminal control method according to any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The storage medium stores a computer program for executing the terminal control method described in any one of claims 1-6.
Citation Information
Patent Citations
Terminal working mode control method, terminal and computer-readable medium
CN107894907A
Program running state monitoring method and device, electronic equipment and storage medium
CN110177300A
Process management method and system based on white list mechanism
CN110472409A
System function execution method and device, terminal and storage medium
CN111309210A