Recording method, device, equipment, medium and program product

By reading the global array of audio policy services and getting the application list, multiple applications are allowed to record sounds simultaneously, solving the limitations of multi-application recording in the Android system's default recording strategy and achieving a more flexible recording strategy.

CN119720170AActive Publication Date: 2025-03-28BOE TECHNOLOGY GROUP CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411899456.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-20
Publication Date
2025-03-28
Estimated Expiration
2044-12-20

AI Technical Summary

Technical Problem

The default recording strategy of the existing Android system has limitations in multi-application recording scenarios. Ordinary applications cannot record simultaneously, and cannot meet the needs of multiple applications simultaneous recording in special scenarios.

Method used

A recording method and device are provided, by reading a global array of audio policy services, obtaining a list of applications that can be recorded simultaneously, allowing multiple applications to record simultaneously.

Benefits of technology

The function of recording simultaneously by multiple applications is realized, solving the problem that the default recording strategy cannot meet the needs of recording simultaneously by multiple applications, and improving the user's personalized customization capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119720170A_ABST
    Figure CN119720170A_ABST
Patent Text Reader

Abstract

The invention discloses a recording method, a recording device, recording equipment, a medium and a program product, and relates to the technical field of computers, the method comprises the following steps: in response to a detected recording starting operation of a first application program, reading a global array corresponding to an audio strategy service, the global array being used for storing an identifier of a currently recording application program; if the global array comprises the identifier of the second application program, a first application list is obtained, and the first application list comprises identifiers of at least two application programs capable of recording at the same time; and in response to the identifier of the first application program and the identifier of the second application program contained in the first application list, allowing the second application program and the first application program to record at the same time. According to the invention, the limitation on multi-application recording when a default recording strategy is used in the prior art can be solved, and the requirement of a user for multi-application simultaneous recording is met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a recording method, apparatus, device, medium and program product. Background Art

[0002] Android all-in-one devices are multi-functional devices that integrate the Android operating system. They can provide users with a convenient operating experience. In terms of audio processing, they allow applications to record through the microphone. For example, the voice memo application can record voice through the microphone, and the social application can obtain and send voice messages through the microphone recording, etc., meeting the audio needs of users in different scenarios.

[0003] In the related technology, the Android system uses the default recording strategy to process the recording request of the application, that is, when the application uses the microphone to record, it must follow the system setting process, first request the microphone permission from the system, and then record through the system's audio architecture after obtaining authorization. When multiple applications request recording at the same time, the application that performs recording is determined based on factors such as the application's priority and running status. For example, when a privacy-sensitive application is recording, other applications cannot record; when multiple ordinary applications have recording requirements, only the application that opens recording later has the permission to record.

[0004] The above default recording strategy has limitations in multi-application recording. When recording between common applications at the same time, they will exclude each other, which cannot meet the needs of multi-application simultaneous recording in special scenarios. In addition, the default recording strategy cannot be modified, which cannot meet the user's personalized customization needs. Summary of the invention

[0005] The embodiments of the present application provide a recording method, apparatus, device, medium and program product, which can support simultaneous recording of multiple applications. The technical solution is as follows:

[0006] In one aspect, a recording method is provided, the method comprising:

[0007] In response to detecting a recording start operation of the first application, reading a global array corresponding to the audio policy service, the global array being used to store an identifier of the application currently recording;

[0008] If the global array includes the identifier of the second application, obtaining a first application list, wherein the first application list includes identifiers of at least two applications capable of recording simultaneously;

[0009] In response to the first application list including the identifier of the first application and the identifier of the second application, the second application is allowed to record simultaneously with the first application.

[0010] In another aspect, a recording device is provided, the device comprising:

[0011] An array reading module, configured to read a global array corresponding to the audio policy service in response to detecting a recording start operation of the first application, wherein the global array is used to store an identifier of the application currently recording;

[0012] an acquisition module, configured to acquire a first application list if the global array includes an identifier of a second application, wherein the first application list includes identifiers of at least two applications capable of recording simultaneously;

[0013] The recording module is used for allowing the second application to record simultaneously with the first application in response to the first application list containing the identifier of the first application and the identifier of the second application.

[0014] In an optional embodiment, the first application list includes multiple sub-lists, and the applications in the same sub-list have the permission to record simultaneously;

[0015] The recording module is further configured to allow the second application to record simultaneously with the first application in response to a sublist in the multiple sublists containing the identifier of the first application and the identifier of the second application.

[0016] In an optional embodiment, the recording module is further configured to allow the second application to record simultaneously with the first application in response to the first application list being empty.

[0017] In an optional embodiment, the acquisition module is further used to acquire the first application list when the simultaneous recording function is turned on and the mutually exclusive recording function is turned off, and the mutually exclusive recording function is used to limit the permission of at least two application programs to record simultaneously.

[0018] In an optional embodiment, the acquisition module is further used to acquire a second application list when the simultaneous recording function is turned off and the mutually exclusive recording function is turned on, wherein the second application list includes an identifier of a target application, and the target application refers to an application with exclusive recording permission;

[0019] The recording module is further used to determine the recording status of the first application based on the matching results between the identifier of the target application and the identifier of the first application and the identifier of the second application.

[0020] In an optional embodiment, the recording module is further configured to, in response to the identifier of the target application being the same as the identifier of the second application, not allow the first application to record.

[0021] In an optional embodiment, the recording module is further configured to, in response to the identifier of the target application being the same as the identifier of the first application, allow the first application to record and interrupt the second application to record.

[0022] In an optional embodiment, the recording module is further used to determine the recording status of the first application through a default recording process when the simultaneous recording function is turned off and the mutually exclusive recording function is turned off.

[0023] In an optional embodiment, the device further comprises:

[0024] An array updating module is used to add an identifier of the first application program to the global array.

[0025] In an optional embodiment, the device further comprises:

[0026] A configuration module is used to receive a first configuration operation, wherein the first configuration operation is used to determine the identifiers of applications included in the first application list; based on the first configuration operation, a candidate application list is displayed, wherein the candidate application list includes multiple applications that support a recording function; in response to receiving a selection operation for at least two applications in the candidate application list, the first application list is obtained based on the identifiers of the at least two applications.

[0027] In an optional embodiment, the configuration module is also used to receive a second configuration operation, wherein the second configuration operation is used to determine the identifier of a target application included in the second application list; based on the second configuration operation, a candidate application list is displayed, wherein the candidate application list includes identifiers of multiple applications that support the recording function; in response to receiving a selection operation for the target application in the candidate application list, the second application list is obtained based on the identifier of the target application.

[0028] In an optional embodiment, the first application and the second application are applications of any type.

[0029] On the other hand, a computer device is provided, comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement a recording method as described in any of the above-mentioned embodiments of the present application.

[0030] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction, at least one program, a code set or an instruction set is stored in the storage medium, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement a recording method as described in any of the above-mentioned embodiments of the present application.

[0031] On the other hand, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs any of the recording methods described in the above embodiments.

[0032] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:

[0033] Configure multiple applications with simultaneous recording permissions in advance, obtain a first application list, and set a global array to store the identifiers of applications that are recording. When a first application requests recording, if the global array indicates that a second application is currently recording, determine whether the first application has the permission to record simultaneously with the second application based on the first application list and the global array. If yes, assign recording permissions to the first application. This can solve the limitations of multi-application recording when using the default recording strategy in related technologies and meet the needs of multi-application recording at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0035] Figure 1 It is a schematic diagram of a recording process framework provided by an exemplary embodiment of the present application;

[0036] Figure 2 is a flow chart of a recording method provided by an exemplary embodiment of the present application;

[0037] Figure 3 is a schematic diagram of configuring a first application list provided by an exemplary embodiment of the present application;

[0038] Figure 4 is a schematic diagram of configuring a second application list provided by an exemplary embodiment of the present application;

[0039] Figure 5 is a flow chart of a method for simultaneously recording multiple applications provided by an exemplary embodiment of the present application;

[0040] Figure 6 is a flowchart of a multi-application mutually exclusive recording method provided by an exemplary embodiment of the present application;

[0041] Figure 7 is a structural block diagram of a recording device provided by an exemplary embodiment of the present application;

[0042] Figure 8 is a structural block diagram of a recording device provided by another exemplary embodiment of the present application;

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

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

[0045] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0046] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0047] It should be noted that the information and data involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0048] It should be understood that, although the terms first, second, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first parameter may also be referred to as the second parameter, and similarly, the second parameter may also be referred to as the first parameter. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0049] First, a brief introduction is given to the terms involved in the embodiments of this application:

[0050] Android all-in-one machine: a device that deeply integrates the Android operating system with computer hardware. The hardware components include a processor, memory, and a touch screen, and can install and run a large number of applications. Its operation method is similar to that of smartphones and tablets. The user touches the screen to select the target application, and the all-in-one machine runs the target application and realizes the program functions.

[0051] In the field of smart office, Android all-in-one computers can be used for video conferencing, document presentation, remote collaboration and other functions in corporate conference rooms to improve office efficiency; in the medical field, Android all-in-one computers are manifested as medical self-service terminals, which can realize functions such as registration, payment, and query of test reports, reducing patients' waiting time in queues and improving hospital service efficiency.

[0052] As a comprehensive multifunctional device that integrates the Android operating system, Android all-in-one computers have been widely used in many fields due to their many advantages, creating a convenient, efficient and habit-friendly operating environment for users. Android all-in-one computers have a built-in microphone, and various applications can record through the microphone.

[0053] For example, voice memo applications can record the user's spoken voice content through the microphone and store it locally; social applications can obtain voice messages through microphone recording and send them to chat.

[0054] In order to ensure the security and privacy of application recording, in Android all-in-one devices, when an application is recording, other applications are usually not allowed to record at the same time. Therefore, when there are multiple applications requesting to use the microphone for recording, the Android system sets a default recording policy for the recording requests of different applications, and determines the applications with recording permission based on the default recording policy.

[0055] In the default recording policy, there is usually a mutually exclusive recording relationship between applications other than privileged applications. Privileged applications refer to applications pre-installed on the all-in-one device with special permissions; applications other than privileged applications are called ordinary applications, which are mostly third-party applications and can be downloaded from app stores, official websites, etc.

[0056] When multiple ordinary applications request recording at the same time, the all-in-one device will only assign the recording permission to one of the ordinary applications, and silently process the other ordinary applications. Ordinary applications are mutually exclusive when recording, and the needs of multiple ordinary applications for recording at the same time cannot be met.

[0057] In addition, the default recording policy actually assigns a priority to each application, and handles resource conflicts when multiple applications request recording at the same time based on the priority, giving priority to high-priority applications. However, the priority of each application cannot be modified, and users cannot set the priority of each application according to usage requirements, nor can they specify multiple applications to record at the same time, which greatly limits the recording effect of the all-in-one device. For example, in special and complex scenarios such as multi-party conference online recording and multi-scene audio synchronous collection, it is impossible to meet the needs of users to simultaneously collect voice and record conference content through multiple applications in the all-in-one device.

[0058] This application provides a recording method that can configure the permission for simultaneous recording between multiple applications. The customized recording strategy includes two types: simultaneous recording strategy and mutually exclusive recording strategy. Users can choose one of the simultaneous recording strategy, mutually exclusive recording strategy and default recording strategy as the strategy for handling simultaneous recording of multiple applications.

[0059] When the simultaneous recording function is enabled and the mutually exclusive recording function is disabled, the simultaneous recording policy is used: multiple selected applications can record simultaneously, and unselected applications cannot record simultaneously with other applications.

[0060] When the simultaneous recording function is turned off and the mutually exclusive recording function is turned on, the mutually exclusive recording strategy is used: a selected application is set as a high-priority application. When the high-priority application is recording, it has exclusive recording permissions and cannot be interrupted; other unselected applications cannot record at the same time as the high-priority application, but can record at the same time with each other.

[0061] When the simultaneous recording function is disabled and the mutually exclusive recording function is disabled, the default recording policy is used.

[0062] The method provided in this application can meet the needs of users to customize applications with simultaneous recording permissions, solving the problem that multiple ordinary applications cannot record simultaneously.

[0063] Next, the recording process involved in the embodiment of the present application is described. Figure 1 It is a schematic diagram of the recording process framework provided by an exemplary embodiment of the present application.

[0064] The recording process framework diagram refers to the Android system audio frame diagram. The process of recording through the microphone by an application in an Android system all-in-one device involves the microphone collecting audio signals and the application obtaining audio signals from the microphone. Therefore, the recording process is mainly implemented by the Android system's audio framework.

[0065] The figure involves audio-related applications 110, audio framework 120, Java native interface 130, native audio framework 140, audio binder inter-process communication agent 150, media service 160, audio hardware abstraction layer 170, operating system kernel 180 and configuration module 190.

[0066] The audio-related applications 110 include applications that use audio, such as a recording application and a media player application.

[0067] Audio framework 120 refers to Audio Framework java, which is a software framework in the Android system for processing audio-related functions. It is mainly written in Java (in the Android system, the audio framework also has underlying parts written in other languages). The audio framework 120 provides a series of application programming interfaces, allowing audio-related applications 110 to easily implement audio playback, recording, audio device management and other functions.

[0068] The Java native interface 130 refers to JNI (Java Native Interface), which is a programming interface provided by the Java programming language and is used to call code written in a native language, such as C, C++ code, in a Java program, and also allows native code to call Java code. C / C++ code can be integrated into Java code through the JNI interface.

[0069] The Java native interface 130 mainly involves the following directory paths: (1) frameworks / base / core / jni (the first directory path), which mainly stores the relevant files used to implement the interaction between Java and native (such as C or C++) codes; (2) frameworks / base / media / jni (the second directory path), which mainly involves the implementation part of the interaction between Java and native codes of media functions in the Android system, and is an important link in the communication between the media framework and the underlying native code.

[0070] The local audio framework 140 refers to the Audio Framework Native, which is the part of the Android audio framework written in a native language (such as C or C++). Corresponding to the audio framework 120, it is at the bottom layer of audio processing, closer to the hardware device, and is mainly responsible for directly interacting with audio hardware (such as microphones, speakers, audio chips, etc.) and performing efficient and complex processing of audio data.

[0071] The local audio framework 140 mainly involves the following source files: (1) AudioRecord.cpp (audio recording source file), which is a C++ source file. In the audio processing mechanism of the Android system, it is mainly used to implement audio recording related functions. It is a key part of the implementation of the underlying audio recording function. It collaborates with other audio components of the system to provide audio recording services for upper-level applications; (2) AudioTrack.cpp (audio track source file), which is a C++ source file. It is mainly responsible for the implementation of audio playback related functions. It is an important part of the Android audio playback underlying mechanism. It works with other audio components to provide audio playback services for audio-related applications 110.

[0072] The audio binder inter-process communication agent 150 refers to Audio Binder IPC Proxies, which is a mechanism used to implement inter-process communication (IPC) in the Android system audio framework. In the Android system, different components (such as applications and system services) may run in different processes. When audio-related operations require cross-process communication, this proxy mechanism is used. Binder is an important IPC method in the Android system, and Audio Binder IPC Proxies is a proxy module specifically built for audio-related communications.

[0073] The audio binder inter-process communication agent 150 mainly involves the following source files: (1)

[0074] IAudioRecord.cpp (audio recording interface) defines a series of abstract interfaces for audio recording. These interfaces specify the basic operations of audio recording, such as starting recording, stopping recording, obtaining recording status and audio data, etc.; (2) IAudioTrack.cpp (audio track interface) defines abstract interfaces related to audio playback, including starting playback, pausing playback, stopping playback, setting playback parameters (such as volume, channel balance, etc.) and obtaining playback status, etc.; (3) IAudioFlinger.cpp (audio mixer interface) plays a key role in mixing and audio stream management in audio processing. It is responsible for mixing multiple audio sources, such as playing audio from multiple applications at the same time (such as a music player application and a voice navigation application running at the same time), and merging these audio streams into one or more output audio streams through a mixing algorithm; (4) lbinder.cpp (lightweight binder) defines how to pass data between different processes, call methods, and handle remote procedure calls.

[0075] Media Service 160 refers to Media Service, which is a system service in the Android system responsible for managing and processing various media-related operations. It mainly includes the following components: (1) AudioPolicyService, which is the maker of audio system policies (application recording policies) and is responsible for the policy selection of audio device switching and volume adjustment policies; (2) AudioFlinger, which is the executor of audio system policies and is responsible for the management of audio stream devices and the processing and transmission of audio stream data.

[0076] Among them, the several recording processes involved in this application are mainly implemented by AudioPolicyService.

[0077] The configuration module 190 includes a multi-application simultaneous recording configuration module 191 and a mutually exclusive recording configuration module 192. These two modules are respectively configured with two independent recording strategies, and the two recording strategies are parallel to the default recording strategy.

[0078] Configuration module 190 saves the switch of the simultaneous recording function, the switch of the mutually exclusive recording function, the first application list with simultaneous recording permission, and the second application list with high priority recording permission for AudioPolicyService to obtain and use. The state of the switch of the simultaneous recording function corresponds to the simultaneous recording configuration module 191, and the state of the switch of the mutually exclusive recording function corresponds to the mutually exclusive recording configuration module 192. Among them, the switch of the simultaneous recording function and the switch of the mutually exclusive recording function cannot be turned on at the same time.

[0079] When the AudioPolicyService processes the recording process, it determines whether to assign the recording permission to the application and how to assign the recording permission according to the recording policy configured in the configuration module 190 .

[0080] If the AudioPolicyService determines that the switch of the simultaneous recording function is turned on, it means that the request for simultaneous recording of multiple applications is processed based on the simultaneous recording configuration module 191, and the identifiers of multiple applications with simultaneous recording permissions are stored in the first application list. If the application currently requesting simultaneous recording is an application with an identifier stored in the first application list, the application currently requesting simultaneous recording is allowed to record simultaneously.

[0081] If the AudioPolicyService determines that the switch of the mutually exclusive recording function is turned on, it means that the request for simultaneous recording of multiple applications is processed based on the simultaneous mutually exclusive recording configuration module 192, and the identifier of the high-priority application is stored in the second application list. The high-priority application refers to the application that has exclusive recording permission. When the high-priority application is recording, other applications are not allowed to record at the same time. If a high-priority application with an identifier stored in the second application list exists in the application currently requesting simultaneous recording, only the high-priority application is allowed to record. If a high-priority application with an identifier stored in the second application list does not exist in the application currently requesting simultaneous recording, the application currently requesting simultaneous recording is allowed to record at the same time.

[0082] If AudioPolicyService determines that the switch of the mutually exclusive recording function is turned off and the switch of the simultaneous recording function is turned off, it means that the request for simultaneous recording of multiple applications is processed based on the default recording policy. The default recording policy includes the permission of whether applications can record simultaneously and whether there is a mutually exclusive recording relationship between applications, which will not be repeated here.

[0083] It is worth noting that AudioPolicyService maintains a global array, which is used to dynamically record all applications that are currently recording. When an application successfully starts recording, the identifier of the application is saved in the global array. When the application stops recording, the identifier of the application is removed from the global array. AudioPolicyService implements simultaneous recording and mutually exclusive recording functions for multiple applications based on the switches set by the configuration module 190, the application identifiers contained in the application list, and the identifiers of all currently recording applications, regardless of the type of application and the set audio source. The number of applications that record simultaneously is customized by the user and stored in the form of the first application list. The stronger the system performance of the all-in-one device, the more applications that can be set to record simultaneously. It can meet the user's needs to configure simultaneous recording permissions for any number of applications, and solve the limitation of the related technology that the default recording policy cannot achieve simultaneous recording of multiple ordinary applications.

[0084] The audio hardware abstraction layer 170 refers to Audio Hal, which is an intermediate layer in the Android system used to isolate audio hardware from upper-level audio frameworks and applications. Its main purpose is to provide a unified interface so that upper-level audio software (such as Audio Framework, Media Service, etc.) can operate audio hardware devices, including microphones, speakers, headphone interfaces, audio codecs, etc., in a hardware-independent manner. The audio hardware abstraction layer 170 mainly includes AudioHal Implementation (audio hardware abstraction layer implementation), which is the key link between upper-level audio software (such as Audio Framework, Media Service) and underlying audio hardware devices (such as microphones, speakers, audio codecs), converting abstract hardware operation interfaces into actual operation instructions for specific hardware devices.

[0085] The operating system kernel 180 refers to the Linux Kernel, which is responsible for managing the hardware resources and software processes of the system and providing core services and functions for the entire operating system. The operating system kernel 180 includes an Audio Driver, which enables the operating system to effectively control and utilize audio hardware to achieve audio playback, recording and other related functions.

[0086] Based on the above recording process framework diagram, the recording method provided by the present application is described. There are three recording strategies in the Android system integrated machine: the default recording strategy, the simultaneous recording strategy configured by the configuration module 190, and the mutually exclusive recording strategy. The default recording strategy, the simultaneous recording strategy, and the mutually exclusive recording strategy are three independent strategies, and only one of the recording strategies can be used to handle the problem of simultaneous recording of multiple applications.

[0087] The simultaneous recording strategy corresponds to a switch with a simultaneous recording function, and the mutually exclusive recording strategy corresponds to a switch with a mutually exclusive recording function. Only one of the two switches can be turned on at the same time.

[0088] When a first application starts recording and requests microphone permission, the all-in-one device first obtains the global array, which records the ID of the application currently recording. If the global array is empty, it means that no application is currently recording, so the first application is allowed to record, and the ID of the first application is added to the global array. When the first application finishes recording, the ID of the first application is deleted from the global array.

[0089] If the global array is not empty and contains the identifier of the second application, it means that the second application is currently recording. This is a multi-application simultaneous recording scenario. Get the switch status of the simultaneous recording function and the switch status of the mutually exclusive recording function. Determine the recording strategy to be used based on the switch status of the simultaneous recording function and the switch status of the mutually exclusive recording function.

[0090] 1. When the switch of the simultaneous recording function is turned on, the switch of the mutually exclusive recording function must be turned off, and the simultaneous recording strategy is used;

[0091] 2. When the switch of the mutually exclusive recording function is turned on, the switch of the recording function must be turned off at the same time, and the mutually exclusive recording strategy is used;

[0092] 3. When the switch of the simultaneous recording function is turned off, the default recording strategy is used.

[0093] In summary, the method provided by the present application enables users to configure recording strategies according to their own needs. When dealing with scenarios where multiple applications request recording at the same time, the recording strategies can be switched according to user needs to achieve functions such as simultaneous recording of multiple applications and mutually exclusive recording. In addition, when configuring simultaneous recording strategies and mutually exclusive recording strategies, the nature of the application is not distinguished, and multiple applications of different types are supported to record simultaneously. It also supports the exclusive recording rights of designated applications. Users can dynamically set the priority of the recording application according to their own needs, and flexibly achieve mutually exclusive recording between applications. There is no limit on the number of applications that record simultaneously, which depends on the performance of the Android system all-in-one machine.

[0094] In combination with the above-mentioned noun introduction and application scenarios, the recording method provided by the present application is described, and the method is performed by a terminal as an example. Figure 2 As shown, Figure 2 It is a flowchart of a recording method provided by an exemplary embodiment of the present application, and the method includes the following steps.

[0095] Step 210: In response to detecting a recording start operation of the first application, a global array corresponding to the audio policy service is read.

[0096] Taking the terminal as an Android system all-in-one device as an example, the first application is an application installed in the terminal, and the terminal runs the first application to implement the program function.

[0097] The audio policy service is responsible for audio policy management in the Android system to ensure the normal operation of audio functions. The audio policy service is the maker of the audio system policy (application recording policy), responsible for the policy selection of audio device switching, volume adjustment policy, etc.

[0098] The first application has a recording function. When a recording start operation of the first application is detected, it means that the first application requests recording through a microphone component in the terminal to obtain an audio signal.

[0099] The global array is used to store the identifier of the application currently recording. Based on the global array, it can be determined whether there is an application currently recording in the terminal at the current moment.

[0100] If the identification of the application program exists in the global array, it means that there are multiple applications requesting recording at the same time; if the identification of the application program does not exist in the global array, it means that only the first application program requests recording at present.

[0101] For example, if the global array contains the identification of application A, it means that application A is currently recording; if the global array contains the identifications of application A and application B, it means that application A and application B are currently recording at the same time.

[0102] The ID of the application in the global array is used to uniquely indicate the identity of the application. The ID of the application includes but is not limited to the following types:

[0103] (1) Application icon: It is a graphic symbol that usually contains elements such as color and special shapes. It is displayed on the terminal's home screen, application store, or application list.

[0104] (2) Application name: This is the textual name of the application, used to accurately refer to the application in environments such as app stores and device menus.

[0105] (3) Application numbering: Sort the applications in the terminal based on preset rules and assign a unique number to each application, and uniquely refer to the application based on the number. For example, assign numbers to applications based on the order in which the applications are installed on the terminal.

[0106] It should be noted that the above-mentioned identifications of the several types of applications are only used as examples. The identification type of the application can be arbitrary and can be customized by the user or a default identification can be assigned to the application by the terminal. This embodiment does not limit this.

[0107] Step 220: If the global array includes the identifier of the second application program, the first application list is obtained.

[0108] For example, the second application's identifier is included in the global array, indicating that the second application is recording at the current moment, and the recording start operation of the first application indicates that there are multiple applications requesting simultaneous recording. In the case of multiple applications requesting simultaneous recording, it is necessary to determine whether these applications have the permission to record simultaneously.

[0109] Optionally, the first application and the second application are any type of application, including but not limited to: (1) privileged application, which refers to an application pre-installed in the terminal, has special permissions, can act as a voice assistant to receive the user's voice commands, and control the application in the terminal; (2) privacy application, which refers to an application that is privacy-sensitive when recording. When recording, the privacy application usually involves information related to the user's privacy; (3) ordinary application, which refers to a third-party application different from privileged application and privacy application, which can usually be downloaded to the terminal from the official website or application store, or it can be a user-defined / self-developed application.

[0110] The first application list includes identifiers of at least two applications that can record audio simultaneously, and whether the first application is allowed to record audio is determined based on the first application list.

[0111] The user can configure the identifiers of the application programs included in the first application list, that is, the user can select the application programs that can record simultaneously.

[0112] Optionally, before obtaining the first application list, a first configuration operation is received, the first configuration operation being used to determine the identifiers of the applications included in the first application list. A candidate application list is displayed based on the first configuration operation, the candidate application list including multiple applications supporting the recording function. In response to receiving a selection operation for at least two applications in the candidate application list, the first application list is obtained based on the identifiers of the at least two applications.

[0113] Indicative, reference Figure 3 , Figure 3 This is a schematic diagram for configuring the first application list.

[0114] The candidate application list includes identifiers of four application programs: Application 1, Application 2, Application 3, and Application 4, corresponding to Application 1, Application 2, Application 3, and Application 4, respectively.

[0115] The identifiers of application 1, application 2, and application 3 are selected to obtain a first application list 300. Then, application 1, application 2, and application 3 are allowed to record simultaneously.

[0116] The following situations are included: (1) Application 1 and Application 2 record at the same time; (2) Application 1 and Application 3 record at the same time; (3) Application 2 and Application 3 record at the same time; (4) Application 1, Application 2, and Application 3 record at the same time.

[0117] The first application list 300 does not include the identification of application 4, and application 4 does not have the authority to record simultaneously with other applications. For example, when application 1 and application 2 are recording simultaneously, the recording start operation of application 4 is detected, and application 4 is not allowed to record.

[0118] Step 230: In response to the first application list including the identifier of the first application and the identifier of the second application, allowing the second application to record simultaneously with the first application.

[0119] Exemplarily, the first application list includes the following contents: an identifier of the first application, an identifier of the second application, and an identifier of the third application. The identifiers of the first application and the second application exist at the same time, allowing the second application and the first application to record simultaneously.

[0120] Among them, the process of simultaneous recording of the first application and the second application is as follows: the second application starts recording first, the microphone component in the terminal collects audio signals based on the recording start operation of the second application, and the second application obtains the audio signal from the microphone component; during the recording process of the second application, the recording start operation of the first application is detected. If the first application and the second application are allowed to record simultaneously, the first application can obtain the audio signal from the microphone component.

[0121] Optionally, in response to the first application list being empty, the second application is allowed to record simultaneously with the first application.

[0122] When the first application list is not empty, the application programs that can record simultaneously are determined based on the first application list. When the first application list is empty, it means that the user has not configured the permission for recording simultaneously for the specified application program, but all applications in the terminal are allowed to record simultaneously by default, so the first application program and the second application program are allowed to record simultaneously.

[0123] By leaving the first application list empty, the user's need to assign simultaneous recording permissions to all applications can be met, without the user having to select and configure multiple applications one by one, thereby improving the efficiency of the user's recording permission configuration process.

[0124] In some embodiments, the applications in the terminal may be grouped to specify that the applications in each group can record audio simultaneously with each other, while applications in different groups cannot record audio simultaneously.

[0125] Optionally, the first application list includes multiple sublists, and the applications in the same sublist have the permission to record simultaneously. In response to a sublist in the multiple sublists including the identifier of the first application and the identifier of the second application, the second application is allowed to record simultaneously with the first application.

[0126] Exemplarily, the first application list includes two sub-lists, the first sub-list includes the identifier of the first application, the identifier of the second application, and the identifier of the third application, and the second sub-list includes the identifier of the fourth application and the identifier of the fifth application.

[0127] Among them, there is a first sub-list containing both the identifier of the first application and the identifier of the second application, allowing the first application and the second application to record simultaneously.

[0128] The applications indicated in each sublist are allowed to record simultaneously, and applications from different sublists that do not appear in one sublist at the same time are not allowed to record simultaneously. For example, the fourth application and the fifth application from the second sublist are allowed to record simultaneously, but the first application from the first sublist and the fourth application from the second sublist are not allowed to record simultaneously.

[0129] The method of setting recording permissions by grouping can meet the needs of users to customize application recording permissions, improve the freedom of user customization operations, and enable users to set simultaneous recording permissions for applications separately.

[0130] After the first application starts recording, the identifier of the first application is added to the global array.

[0131] At this time, the global array contains the identifier of the first application and the identifier of the second application. When an application stops recording, the identifier of the application is deleted from the global array.

[0132] For example, when the first application and the second application are recording at the same time, the global array contains the identifier of the first application and the identifier of the second application; the second application ends recording before the first application, and the identifier of the second application is deleted from the global array; when the first application also ends recording, the identifier of the first application continues to be deleted from the global array, and the global array is empty.

[0133] In this application, there are multiple recording permission allocation processing procedures when multiple applications request simultaneous recording: default recording procedure, simultaneous recording procedure and mutually exclusive recording procedure. The above content describes the process of simultaneous recording procedure. After actually detecting the existence of the recording start operation of the application, it is necessary to first determine the processing procedure of the recording operation.

[0134] Optionally, the simultaneous recording process corresponds to a simultaneous recording function switch (control), and the mutually exclusive recording process corresponds to a mutually exclusive recording function switch. According to the on and off states of the simultaneous recording function switch and the mutually exclusive recording function switch, a recording process is selected from the default recording process, the simultaneous recording process and the mutually exclusive recording process to process the recording start request of the first application.

[0135] 1. When the simultaneous recording function is enabled and the mutually exclusive recording function is disabled, a first application list is obtained, wherein the mutually exclusive recording function is used to restrict the permission of at least two applications to record simultaneously.

[0136] Among them, the simultaneous recording function is turned on and means that the simultaneous recording function switch is in the turned-on state, and the mutually exclusive recording function is turned off and means that the mutually exclusive recording function switch is in the turned-off state. At most, only one of the simultaneous recording function switch and the mutually exclusive recording function switch can be turned on at the same time.

[0137] At this time, it is determined to use the simultaneous recording process to process the recording start operation of the first application, and a first application list can be obtained, which includes at least two applications with simultaneous recording permissions. According to the recording permissions configured in the first application list, it is determined whether to allow the first application to record.

[0138] 2. When the recording function is turned off and the mutually exclusive recording function is turned on, a second application list is obtained, the second application list includes an identifier of a target application, and the target application refers to an application that has exclusive recording permission.

[0139] Other applications that are not configured as target applications in the second application list have permission to record simultaneously.

[0140] At this time, it is determined to use the mutually exclusive recording process to process the recording start operation of the first application program, so that the second application list can be obtained.

[0141] Based on the matching results between the identifier of the target application and the identifier of the first application and the identifier of the second application, the recording status of the first application is determined.

[0142] Exemplarily, the target application does not allow other applications to record simultaneously when recording, and has higher authority than other applications when recording.

[0143] Optionally, in response to the identifier of the target application being the same as the identifier of the first application, the first application is allowed to record and the second application is interrupted from recording.

[0144] If the identifier of the first application is the same as the identifier of the target application, it means that the first application is the target application and the first application can exclusively occupy the recording permission, so the second application interrupts the recording and allows the first application to start recording.

[0145] Optionally, in response to the identifier of the target application being the same as the identifier of the second application, the first application is not allowed to record.

[0146] If the identifier of the second application is the same as the identifier of the target application, it means that the second application is the target application, and the second application has exclusive recording permission and continues recording, and the first application is not allowed to start recording.

[0147] Optionally, in response to the identifier of the target application being different from the identifier of the second application, and the identifier of the target application being different from the identifier of the first application, the first application and the second application are allowed to record simultaneously.

[0148] If the identifier of the first application and the identifier of the second application are both different from the identifier of the target application, then the first application and the second application are not the target application, and the first application and the second application are allowed to record simultaneously.

[0149] The identifiers of the target application programs included in the second application list may be customized by the user.

[0150] Optionally, a second configuration operation is received, the second configuration operation being used to determine an identifier of a target application included in the second application list. A candidate application list is displayed based on the second configuration operation, the candidate application list including identifiers of multiple applications supporting the recording function. In response to receiving a selection operation for a target application in the candidate application list, the second application list is obtained based on the identifier of the target application.

[0151] Indicative, Figure 4 This is a schematic diagram for configuring the second application list.

[0152] The candidate application list includes identifiers of four application programs: Application 1, Application 2, Application 3, and Application 4, corresponding to Application 1, Application 2, Application 3, and Application 4, respectively.

[0153] The number of target applications is one, the identifier of application 1 is selected, application 1 is determined as the target application, and the second application list 400 is obtained.

[0154] The following situations are included: (1) When Application 1 is recording, Application 2, Application 3 and Application 4 cannot interrupt the recording process of Application 1; (2) When any application among Application 2, Application 3 and Application 4 is recording, if the recording start operation of Application 1 is detected, Application 1 is allowed to record and the recording of other applications is interrupted.

[0155] 3. When both the simultaneous recording function and the mutually exclusive recording function are turned off, the recording status of the first application is determined through the default recording process.

[0156] The default recording process refers to the recording process pre-configured in the terminal. When multiple applications request recording at the same time, the application with recording permission is determined based on the type of each application. The default recording process cannot be modified, but the simultaneous recording process and the mutually exclusive recording process can be modified.

[0157] The default recording process is mainly as follows: There is usually a mutually exclusive relationship between recordings between other applications in the terminal except the privileged application, mainly including the following situations.

[0158] 1. When privileged applications and normal applications start recording at the same time;

[0159] Privileged applications refer to applications pre-installed on the terminal with special permissions. Privileged applications are mainly voice assistants of the terminal, which can collect user voice commands through microphone recording and control the terminal to implement various functions based on voice commands. For example, Google Assistant is a privileged application.

[0160] When a normal application is running in the foreground and a privileged application is running in the background, whether the two can record audio at the same time is determined based on whether the normal application is privacy-sensitive.

[0161] Privacy sensitivity means that the application has exclusive recording permissions when recording, and other applications cannot record at the same time.

[0162] For example, in the case where ordinary applications are not privacy-sensitive, when an ordinary application records through the microphone, if the user issues a voice command at this time, the privileged application can still record through the microphone and respond to the voice command.

[0163] For example, in a case where a normal application is privacy-sensitive, when the normal application records data through the microphone, if the user issues a voice command at this time, the privileged application cannot record data through the microphone or respond to the voice command input by the user.

[0164] When a privileged application displays a visible interface component at the top of the terminal's screen, a normal application cannot record audio at the same time.

[0165] 2. When the accessibility service and normal applications start recording at the same time;

[0166] Accessibility service is a service provided by the Android system to help people with disabilities (such as visual impairment, mobility impairment, etc.). When the accessibility service is turned on, a visible interface component will be displayed at the top of the terminal screen.

[0167] When there is a visible accessibility service UI component at the top of the screen, accessibility services and regular applications can record audio simultaneously.

[0168] When no accessibility service UI component is visible at the top of the screen, the accessibility service and the normal application are treated as two normal applications.

[0169] 3. When two common applications start recording at the same time;

[0170] Ordinary applications do not have the permission to record at the same time. When two ordinary applications start recording at the same time, the recording permission will only be assigned to one of the ordinary applications, and the other ordinary application will be processed silently (no recording).

[0171] If two normal apps are privacy-sensitive, the normal app with the top interface has permission to record audio.

[0172] If one of two common applications is privacy-sensitive and the other is not, the privacy-sensitive common application will record the audio, while the other common application will be processed silently.

[0173] If both common applications are privacy-sensitive, the common application that starts recording later will record, and the other common application will be processed silently.

[0174] 4. When the voice call application and the normal application start recording at the same time;

[0175] If the terminal is in a voice call, ordinary applications cannot record.

[0176] It is worth noting that only one of the above three recording processes can exist at the same time. Users can set the on / off status of the switch corresponding to each recording process and select the recording process to be executed to deal with the issue of permission allocation for simultaneous recording of multiple applications. In addition, although the names of the simultaneous recording process and the mutually exclusive recording process indicate the relationship between multiple applications (i.e., simultaneous recording and mutually exclusive recording), both the simultaneous recording process and the mutually exclusive recording process contain the simultaneous recording relationship and mutually exclusive recording relationship that may exist between different applications. The three recording processes are all designed to determine how to allocate recording permissions to applications requesting recording, and allow applications with recording permissions to start recording and interrupt recording for applications without recording permissions.

[0177] In summary, the method provided by the present application configures multiple applications with simultaneous recording permissions in advance, obtains a first application list, and sets a global array to store the identifiers of applications that are recording. When a first application requests recording, if the global array indicates that a second application is currently recording, then based on the first application list, it is determined whether the first application has the permission to record simultaneously with the second application. If so, the first application is assigned recording permissions. This can solve the limitations of multi-application recording when using the default recording strategy in the related art, and meet the needs of multi-application recording at the same time. On the basis of the default recording process, new support for user-defined simultaneous recording processes and mutually exclusive recording processes is added.

[0178] Figure 5 This is a flowchart of a method for simultaneous recording of multiple applications provided by an exemplary embodiment of the present application, which is used to describe the simultaneous recording process, with the prerequisite that the mutually exclusive recording function is not enabled. The method includes the following steps.

[0179] Step 501: Detecting a recording start operation of a first application.

[0180] The recording start operation indicates that the first application requests to start recording, and it is necessary to determine whether the current scenario is that multiple applications request to record simultaneously.

[0181] Step 502, obtaining a global array.

[0182] The global array stores the identifier of the application currently recording. If the global array is empty, it means that there is no application recording at present, the first application is the only application requesting recording, and the first application is allowed to record.

[0183] Step 503: If the global array is not empty, determine whether the simultaneous recording function is enabled.

[0184] If the global array is not empty, it is determined based on the identifier stored therein whether the application currently recording has the authority to record simultaneously with the first application.

[0185] Exemplarily, the identification of the second application program included in the global array is taken as an example for description.

[0186] In this embodiment, the mutually exclusive recording function is not enabled by default, so by determining whether the simultaneous recording function is enabled, the recording process type used when allocating the recording permission to the first application can be determined.

[0187] Step 504: If the simultaneous recording function is not enabled, the recording status of the first application is determined based on the default recording process.

[0188] The recording situations determined by the default recording process include the following:

[0189] (1) If the first application and the second application are both common applications, the recording permission is allocated to the first application that starts the recording later according to the order in which the recording operations of the first application and the second application are started;

[0190] (2) If both the first application and the second application are privacy-sensitive applications, the first application that starts recording later is assigned recording permission according to the order in which the recording operations of the first application and the second application are started;

[0191] (3) If one of the first application and the second application is a privacy-sensitive application and the other is a common application, the privacy-sensitive application is assigned recording permission, and when the privacy-sensitive application is recording, the other common application is not allowed to record;

[0192] (4) If one of the first application and the second application is a privileged application and the other is a common application, when the privileged application is running in the background, the first application and the second application are allowed to record simultaneously; when the privileged application is running in the foreground, only the privileged application is allowed to record;

[0193] (5) If one of the first application and the second application is a privileged application and the other is a privacy-sensitive application, only the privacy-sensitive application is allowed to record;

[0194] (6) If one of the first application and the second application is a call recording application and the other is a common application, only the call recording application is allowed to record;

[0195] (7) If one of the first application and the second application is a call recording application and the other is a privileged application, the first application and the second application are allowed to record simultaneously.

[0196] Step 505: If the recording function is turned on at the same time, obtain the first application list and determine whether the first application list is empty.

[0197] The first application list is configured with permissions for at least two applications to record simultaneously. When the first application list is obtained and it is determined that the first application list is empty, it means that all applications can record simultaneously. When the first application list is not empty, the first application list specifies that some applications can record simultaneously.

[0198] Step 506: If the first application list is empty, allow the first application to record.

[0199] At this time, the first application and the second application are recording simultaneously.

[0200] Step 507: If the first application list is not empty, obtain the identifier of the first application program.

[0201] If the first application list is not empty, the first application list contains identifiers of at least two application programs, and these application programs can record audio simultaneously.

[0202] Step 508: Determine whether the first application list contains both the identifier of the first application and the identifiers of the applications in the global array.

[0203] Exemplarily, the global array only includes the identifier of the second application, and then it is determined whether the identifier of the first application and the identifier of the second application exist in the first application list at the same time.

[0204] Step 509: If the first application list contains the identifier of the first application and the identifiers of the applications in the global array, the first application is allowed to record.

[0205] At this time, the first application and the second application are recording simultaneously.

[0206] Step 510: If the first application list does not contain the identifier of the first application, the first application and the second application are not allowed to record simultaneously.

[0207] The first application does not have permission to record audio simultaneously with other applications.

[0208] When the first application list includes the identifier of the second application, the second application continues to record, and the first application is not allowed to record.

[0209] When the first application list also does not include the identifier of the second application, according to the order of the recording start operations, the first application that starts the recording operation later is allowed to record, and the recording of the second application is interrupted.

[0210] Step 511, when the first application is recording, the identifier of the first application is stored in the global array.

[0211] The identifier of the first application is added to the global array, and the global array is updated in time to indicate that the first application is recording, so that when the recording start operation of other applications is detected, the recording permission of the application can be allocated more accurately.

[0212] In summary, the method provided in this embodiment describes how to execute the simultaneous recording process to assign recording permissions to applications. Users can customize at least two applications with simultaneous recording permissions according to their needs, which solves the limitation that multiple ordinary applications cannot record simultaneously in the default recording process.

[0213] Figure 6 This is a flowchart of a multi-application mutually exclusive recording method provided by an exemplary embodiment of the present application, which is used to describe the mutually exclusive recording process, with the premise that the simultaneous recording function is not enabled. The method includes the following steps.

[0214] Step 601: Detect a recording start operation of a first application and obtain a global array.

[0215] The recording start operation indicates that the first application requests to start recording, and it is necessary to determine whether the current scenario is that multiple applications request to record simultaneously.

[0216] The global array stores the identifier of the application currently recording. If the global array is empty, it means that there is no application recording at present, the first application is the only application requesting recording, and the first application is allowed to record.

[0217] Step 602: When the global array is not empty, determine whether the mutually exclusive recording function is enabled.

[0218] If the global array is not empty, it is determined according to the identifier stored therein whether the application currently recording has a mutually exclusive recording relationship with the first application or has the authority to record simultaneously.

[0219] In this embodiment, the simultaneous recording function is disabled by default, so by determining whether the mutually exclusive recording function is enabled, the recording process type used when allocating the recording permission to the first application can be determined.

[0220] Step 603: If the mutually exclusive recording function is not enabled, the recording status of the first application is determined based on the default recording process.

[0221] In the default recording process, the recording permission allocation status of the first application and the second application is determined according to the application type of the first application and the types of applications included in the global array.

[0222] Refer to step 504, which will not be described again here.

[0223] Step 604: If the mutually exclusive recording function is enabled, obtain the second application list and determine whether the second application list is empty.

[0224] The second application list is used to store identifiers of target application programs having exclusive recording permissions.

[0225] Step 605: If the second application list is empty, determine the recording status of the first application based on the default recording process.

[0226] When the second application list is empty, it means that the user has not set a high-priority target application, and the recording process type used when allocating the recording permission to the first application is determined to be the default recording process.

[0227] Step 606: If the second application list is not empty, determine whether there is an identifier of the target application in the global array.

[0228] Since the target application has exclusive rights when recording, it is necessary to determine whether there is a target application currently recording. Take the example that the global array only contains the identifier of the second application.

[0229] Step 607: If the target application's identifier exists in the global array, the first application is not allowed to record.

[0230] At this time, the second application is the target application. When the second application is recording, it has exclusive recording permission. Other applications cannot record at the same time as the second application, nor can they interrupt the recording of the second application. Therefore, the first application is not allowed to record.

[0231] Step 608: If the identifier of the target application does not exist in the global array, determine whether the first application is the target application.

[0232] Regardless of whether the first application is the target application, the first application is allowed to record. The purpose of the step of determining whether the first application is the target application is to determine whether the second application wants to interrupt the recording.

[0233] Step 609: If the first application is the target application, the first application is allowed to exclusively have the recording permission.

[0234] At this time, the second application interrupts the recording, deletes the identifier of the second application in the global array, and adds the identifier of the first application.

[0235] Step 610: If the first application is not the target application, allow the first application to record.

[0236] At this time, the first application and the second application are recording at the same time, and the identifier of the first application is added to the global array.

[0237] In summary, the method provided in this embodiment describes how to execute a mutually exclusive recording process to assign recording permissions to an application. The user can customize the target application with exclusive recording permissions according to needs, allowing other applications other than the target application to record at the same time, thereby solving the problem that ordinary applications in the default recording process do not meet the exclusive recording permissions in the default recording process due to the application type, and indirectly configure permissions for other applications other than the target application to record at the same time.

[0238] Figure 7 is a structural block diagram of a recording device provided by an exemplary embodiment of the present application, such as Figure 7 As shown, the device includes the following parts.

[0239] An array reading module 710, configured to read a global array corresponding to the audio policy service in response to detecting a recording start operation of the first application, wherein the global array is used to store an identifier of the application currently recording;

[0240] The acquisition module 720 is configured to acquire a first application list if the global array includes the identifier of the second application, wherein the first application list includes identifiers of at least two applications capable of recording simultaneously;

[0241] The recording module 730 is configured to allow the second application to record simultaneously with the first application in response to the first application list including the identifier of the first application and the identifier of the second application.

[0242] In an optional embodiment, the first application list includes multiple sub-lists, and the applications in the same sub-list have the permission to record simultaneously;

[0243] The recording module 730 is further configured to allow the second application to record simultaneously with the first application in response to the presence of a sublist in the multiple sublists containing the identifier of the first application and the identifier of the second application.

[0244] In an optional embodiment, the recording module 730 is further configured to allow the second application to record simultaneously with the first application in response to the first application list being empty.

[0245] In an optional embodiment, the acquisition module 720 is further used to acquire the first application list when the simultaneous recording function is turned on and the mutually exclusive recording function is turned off, and the mutually exclusive recording function is used to limit the permission of at least two applications to record simultaneously.

[0246] In an optional embodiment, the acquisition module 720 is further configured to acquire a second application list when the simultaneous recording function is turned off and the mutually exclusive recording function is turned on, wherein the second application list includes an identifier of a target application, and the target application refers to an application with exclusive recording permission;

[0247] The recording module 730 is further used to determine the recording status of the first application based on the matching results between the identifier of the target application and the identifier of the first application and the identifier of the second application.

[0248] In an optional embodiment, the recording module 730 is further configured to, in response to the identifier of the target application being the same as the identifier of the second application, not allow the first application to record.

[0249] In an optional embodiment, the recording module 730 is further configured to, in response to the identifier of the target application being the same as the identifier of the first application, allow the first application to record and interrupt the second application to record.

[0250] In an optional embodiment, the recording module 730 is further used to determine the recording status of the first application through a default recording process when the simultaneous recording function is turned off and the mutually exclusive recording function is turned off.

[0251] In an optional embodiment, if Figure 8 As shown, the device also includes:

[0252] The array updating module 740 is used to add the identifier of the first application to the global array.

[0253] In an optional embodiment, the device further comprises:

[0254] Configuration module 750 is used to receive a first configuration operation, wherein the first configuration operation is used to determine the identifiers of applications included in the first application list; based on the first configuration operation, display a candidate application list, wherein the candidate application list includes multiple applications that support a recording function; and in response to receiving a selection operation for at least two applications in the candidate application list, obtain the first application list based on the identifiers of the at least two applications.

[0255] In an optional embodiment, the configuration module 750 is also used to receive a second configuration operation, wherein the second configuration operation is used to determine the identifier of a target application included in the second application list; based on the second configuration operation, a candidate application list is displayed, wherein the candidate application list includes identifiers of multiple applications that support the recording function; in response to receiving a selection operation for the target application in the candidate application list, the second application list is obtained based on the identifier of the target application.

[0256] In an optional embodiment, the first application and the second application are applications of any type.

[0257] In summary, the recording device provided by the present application can configure multiple applications with simultaneous recording permissions in advance, obtain a first application list, and set a global array to store the identifiers of the applications being recorded. When a first application requests recording, if the global array indicates that a second application is currently recording, it is determined based on the first application list and the global array whether the first application has the permission to record simultaneously with the second application. If it does, the recording permission is allocated to the first application. This can solve the limitations of multi-application recording when using the default recording strategy in the related art and meet the needs of multi-application recording simultaneously.

[0258] It should be noted that the recording device provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the recording device provided in the above embodiment and the recording method embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0259] Fig. 9The block diagram of the structure of a computer device 900 provided by an exemplary embodiment of the present application is shown. The computer device 900 may be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, Moving Picture Experts Compression Standard Audio Layer 3), an MP4 (Moving Picture Experts Group Audio Layer IV, Moving Picture Experts Compression Standard Audio Layer 4) player, a laptop computer or a desktop computer. The computer device 900 may also be called a user device, a portable terminal, a laptop terminal, a desktop terminal or other names.

[0260] Typically, the computer device 900 includes a processor 901 and a memory 902 .

[0261] The processor 901 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 901 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 901 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 901 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 901 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0262] The memory 902 may include one or more computer-readable storage media, which may be non-transitory. The memory 902 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 902 is used to store at least one instruction, which is used to be executed by the processor 901 to implement the recording method provided in the method embodiment of the present application.

[0263] In some embodiments, the computer device 900 further includes some other components 903, and the type and quantity of the other components 903 can be selected based on the functional requirements of the computer device 900. Those skilled in the art will appreciate that Fig. 9 The structure shown in the figure does not constitute a limitation on the computer device 900, and the computer device 900 may include more or less components than those shown in the figure, or combine some components, or adopt a different arrangement of components.

[0264] Optionally, the computer readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a solid state drive (SSD), or an optical disk. Among them, the random access memory may include a resistance random access memory (ReRAM) and a dynamic random access memory (DRAM). The serial numbers of the above embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments.

[0265] An embodiment of the present application also provides a computer device, which includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement a recording method as described in any of the above embodiments of the present application.

[0266] An embodiment of the present application also provides a computer-readable storage medium, in which at least one instruction, at least one program, a code set or an instruction set is stored. The at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement a recording method as described in any of the above embodiments of the present application.

[0267] The embodiment of the present application also provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes any of the recording methods described in the above embodiments.

[0268] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

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

Claims

1. A recording method, characterized in that: The method comprises: In response to detecting a recording start operation of the first application, reading a global array corresponding to the audio policy service, the global array being used to store an identifier of the application currently recording; If the global array includes the identifier of the second application, obtaining a first application list, wherein the first application list includes identifiers of at least two applications capable of recording simultaneously; In response to the first application list including the identifier of the first application and the identifier of the second application, the second application is allowed to record simultaneously with the first application.

2. The method according to claim 1, characterized in that The first application list includes multiple sub-lists, and the applications in the same sub-list have the permission to record simultaneously; In response to the first application list including the identifier of the first application and the identifier of the second application, allowing the second application to record simultaneously with the first application includes: In response to a sublist in the multiple sublists including the identifier of the first application and the identifier of the second application, the second application is allowed to record simultaneously with the first application.

3. The method according to claim 1, characterized in that: After obtaining the first application list, the method further includes: In response to the first application list being empty, allowing the second application to record simultaneously with the first application.

4. The method according to any one of claims 1 to 3, characterized in that: The obtaining of the first application list includes: When the simultaneous recording function is enabled and the mutually exclusive recording function is disabled, the first application list is obtained, and the mutually exclusive recording function is used to limit the permission of at least two application programs to record simultaneously.

5. The method according to claim 4, characterized in that The method further comprises: When the simultaneous recording function is turned off and the mutually exclusive recording function is turned on, obtaining a second application list, wherein the second application list includes an identifier of a target application program, and the target application program refers to an application program that has exclusive recording authority; Based on the matching results between the identifier of the target application and the identifier of the first application and the identifier of the second application, the recording status of the first application is determined.

6. The method according to claim 5, characterized in that The determining the recording status of the first application based on the matching results between the identifier of the target application and the identifier of the first application and the identifier of the second application respectively includes: In response to the identifier of the target application being the same as the identifier of the second application, the first application is not allowed to record.

7. The method according to claim 5, characterized in that The determining the recording status of the first application based on the matching results between the identifier of the target application and the identifier of the first application and the identifier of the second application respectively includes: In response to the identifier of the target application being the same as the identifier of the first application, allowing the first application to record and interrupting the recording of the second application.

8. The method according to claim 4, characterized in that The method further comprises: When the simultaneous recording function is turned off and the mutually exclusive recording function is turned off, the recording status of the first application is determined through a default recording process.

9. The method according to any one of claims 1 to 3, characterized in that: After allowing the second application to record simultaneously with the first application, the method further includes: An identifier of the first application is added to the global array.

10. The method according to any one of claims 1 to 3, characterized in that: Before obtaining the first application list, the method further includes: receiving a first configuration operation, wherein the first configuration operation is used to determine an identifier of an application program included in the first application list; Displaying a candidate application list based on the first configuration operation, wherein the candidate application list includes multiple application programs that support a recording function; In response to receiving a selection operation on the at least two applications in the candidate application list, the first application list is obtained based on identifiers of the at least two applications.

11. The method according to claim 5, characterized in that Before obtaining the second application list, the method further includes: receiving a second configuration operation, wherein the second configuration operation is used to determine an identifier of a target application program included in the second application list; Displaying a candidate application list based on the second configuration operation, wherein the candidate application list includes identifiers of multiple application programs that support a recording function; In response to receiving a selection operation on the target application in the candidate application list, the second application list is obtained based on an identifier of the target application.

12. The method according to any one of claims 1 to 3, characterized in that: The first application and the second application are any type of application.

13. A recording device, characterized in that: The device comprises: An array reading module, configured to read a global array corresponding to the audio policy service in response to detecting a recording start operation of the first application, wherein the global array is used to store an identifier of the application currently recording; an acquisition module, configured to acquire a first application list if the global array includes an identifier of a second application, wherein the first application list includes identifiers of at least two applications capable of recording simultaneously; The recording module is used for allowing the second application to record simultaneously with the first application in response to the first application list containing the identifier of the first application and the identifier of the second application.

14. A computer device, characterized in that: The computer device includes a processor and a memory, wherein the memory stores at least one program, and the at least one program is loaded and executed by the processor to implement the recording method as described in any one of claims 1 to 12.

15. A computer-readable storage medium, characterized in that: The storage medium stores at least one program, and the at least one program is loaded and executed by the processor to implement the recording method as described in any one of claims 1 to 12.

16. A computer program product, characterized in that It comprises a computer program, which, when executed by a processor, implements the recording method as described in any one of claims 1 to 12.

Citation Information

Patent Citations

  • Recording control method and device, and display equipment

    CN112071338A

  • System, apparatus and method for providing service of an orally narrated fairy tale

    KR101790709B1

  • Systems and methods for identifying malware

    US8984632B1

  • File processing method, device, and system

    WO2015081468A1

  • Audio data processing method, terminal device, and computer-readable storage medium

    WO2022000829A1