WO2012037792A1 - Method for managing terminal during audio resource conflict and terminal thereof - Google Patents

Method for managing terminal during audio resource conflict and terminal thereof Download PDF

Info

Publication number
WO2012037792A1
WO2012037792A1 PCT/CN2011/071136 CN2011071136W WO2012037792A1 WO 2012037792 A1 WO2012037792 A1 WO 2012037792A1 CN 2011071136 W CN2011071136 W CN 2011071136W WO 2012037792 A1 WO2012037792 A1 WO 2012037792A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
java
audio resource
audio
instant messaging
Prior art date
Application number
PCT/CN2011/071136
Other languages
French (fr)
Chinese (zh)
Inventor
王莉
蒋晓燕
刘刚
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2012037792A1 publication Critical patent/WO2012037792A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a method for managing a terminal in conflict of audio resources and the terminal. Background technique
  • Java applications include Java instant messaging applications and Java non-instant messaging applications, Java instant messaging applications including Tencent QQ, MSN, etc.; Java non-instant messaging applications include Java games, Java music playback applications.
  • Java instant messaging applications usually only need to temporarily occupy audio resources after preempting audio. For example, Tencent QQ, preempts audio resources when coming to the information, and uses the resources once, that is, a prompt tone; Java non-immediate communication applications are usually preempted. Audio resources occupying audio for a long time, such as Java music playback applications, playing an audio file takes a long time to occupy audio resources.
  • the limited audio resources of the terminal will collide.
  • the method for solving the conflict of terminal audio resources is too single, and cannot be applied to both Java instant messaging applications and Java non-instant messaging applications.
  • the following defects are often encountered: After the Java instant messaging application preempts audio and uses audio resources for a short time, Unable to release audio resources in time, resulting in waste of audio resources; releasing audio resources in the gap between Java non-immediate communication applications playing multiple audio files, and releasing audio resources, the application of the preempted resources restores the use of resources. When the user enjoys the Java non-immediate communication application, it is audibly interfered with by other applications.
  • the invention provides a method for managing a terminal when an audio resource conflicts, and the terminal, which solves the problem that the terminal consumes audio resources when the audio resource conflicts.
  • the present invention uses the following technical solutions:
  • a method for managing a terminal application when an audio resource conflicts includes:
  • the terminal determines the type of the terminal application that preempts the audio resource; if the application that preempts the audio resource is a Java instant messaging application, the Java instant messaging application occupies the audio resource and uses the audio resource immediately Audio resource, the application of the preempted audio resource restores the use of audio resources;
  • the application for preempting the audio resource is a Java non-instant messaging application
  • the Java non-instant messaging application occupies an audio resource, and until the Java non-immediate communication application exits, the audio resource is released, and the application of the preempted audio resource is restored.
  • the occupation of audio resources is a Java non-instant messaging application
  • the rules for preempting the audio resource by the Java instant messaging application are as follows: The highest priority is to preempt the lower priority, and the same priority is in the time sequence of performing the preemption operation, and the time in the latter preemption time is in the former.
  • the rule that the Java non-immediate communication application preempts the audio resource is: before the audio resource is occupied, sending a message to notify the application that is preempted by the audio resource to release the audio resource through the message mechanism of the application layer; releasing the audio resource in the Java non-instant communication application Before the audio resource, the application layer sends a message to notify the application that is preempted of the audio resource to resume the use of the audio resource.
  • the method for determining the type of the terminal application that preempts the audio resource includes: determining the type of the Java application according to the identifier of the preset Java application.
  • the identification identifier of the Java application includes: adding a new attribute in the descriptor jad file of the Java application, where the newly added attribute is used to identify the Java application as a Java instant messaging application or a Java non-instant communication application.
  • the identification identifier of the Java application includes a MIDlet-Name of the Java application (mobile letter)
  • the name of the device applet), the MIDlet-Name of the Java application is used to identify the Java application as a Java instant messaging application or a Java non-instant messaging application.
  • a terminal includes an application type judging module and an audio resource management module, where: the application type judging module is configured to determine, when an audio resource conflict occurs in the terminal, a type of the terminal application that preempts the audio resource;
  • the audio resource management module is configured to manage audio resources according to the judgment result of the application type determining module, where the specific management manner is: if the application for preempting the audio resource is a Java instant messaging application, the Java instant messaging application occupies an audio resource After the audio resource is used once, the audio resource is released immediately, and the application that is preempted by the audio resource resumes the use of the audio resource; if the application that preempts the audio resource is a Java non-immediate communication application, the Java non-immediate communication application occupies the audio resource. Until the Java non-immediate communication application exits, the audio resource is released, and the application that is preempted by the audio resource resumes occupation of the audio resource.
  • the application type determining module determines the type of the Java application according to the identifier of the preset Java application.
  • the audio resource management module controls the application of the Java non-instant communication application to send a message to notify the preempted audio resource through the message mechanism of the application layer before occupying the audio resource. Release the audio resource; before the Java non-immediate communication application releases the audio resource, the audio resource management module controls the Java non-immediate communication application to send a message through the application layer message mechanism to notify the application recovery of the preempted audio resource. Use of audio resources.
  • the application type determining module includes a Java virtual machine of the terminal.
  • the present invention provides a method for managing a terminal when an audio resource conflicts, and the terminal, which realizes that when the application for preempting the audio resource is a Java instant messaging application, the Java instant messaging application occupies the audio resource and uses the audio resource once. Immediate release of audio resources, timely recovery of the application of the preempted resources to restore the use of audio resources; the application of preempting audio resources is Java non In instant messaging applications, Java non-immediate communication applications monopolize audio resources to achieve continuous playback of multiple audio files, until the Java non-immediate communication application exits, releasing audio resources, and restoring the application of the preempted resources to restore the use of audio resources. Increased user experience. DRAWINGS
  • FIG. 1 is a flowchart of management when an audio conflict occurs in a terminal application according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of a terminal module according to an embodiment of the present invention
  • FIG. 3 is a flowchart of management when an audio conflict occurs between a Java application of a mobile terminal and a local application of the terminal according to an embodiment of the present invention. detailed description
  • FIG. 1 is a flowchart of management when an audio conflict occurs in a terminal application according to the present invention, as shown in FIG. 1: Step S101: When an audio resource conflict occurs in a terminal, determine a type of a terminal application that preempts an audio resource, if the audio resource is preempted If the application is a Java instant messaging application, step S102 is performed, if the application for preempting the audio resource is a Java non-instant messaging application, step S104 is performed;
  • Step S102 After the Java instant messaging application occupies the audio resource and uses the audio resource once, the audio resource is immediately released.
  • Step S103 The application that is preempted by the audio resource resumes the use of the audio resource, and the Java instant messaging application continues to run, waiting for the next preemption of the audio resource.
  • Step S104 The Java non-immediate communication application occupies the audio resource until the Java non-immediate communication application exits, and then releases the audio resource;
  • Step S105 The application that is preempted by the resource restores the occupation of the audio resource.
  • the application for preempting the audio resource is a Java instant messaging application
  • the application that is preempted by the audio resource may be another Java instant messaging application, a Java non-instant messaging application, and the terminal local application.
  • the application for preempting resources is a Java non-immediate communication application
  • the application for preempting the audio resource may be another Java non-instant messaging application, a Java instant messaging application, a terminal local application, and the terminal local application does not include mobile communication.
  • Java instant messaging applications include applications that can send and receive Internet messages instantly, such as the popular instant messaging tools Tencent QQ, MSN, etc.; Java non-instant messaging applications include Java music playback applications, Java games with background music, and so on. Java instant messaging applications usually only need to temporarily occupy audio resources after preempting audio resources. For example, Tencent QQ preempts audio resources when coming to the information, and emits a prompt tone when using the resources once. Java non-immediate communication applications usually occupy audio resources for a long time after preempting audio. For example, in Java music playback applications, playing an audio file takes a long time to occupy audio resources.
  • the Java instant messaging application can occupy the audio resource and release the audio resource immediately after using the audio resource, and the application that is preempted by the audio resource restores the use of the resource; and the Java non-instant communication application can occupy the audio resource.
  • the Java non-immediate communication application exits the audio resource is released, and the application that is preempted by the resource restores the occupation of the resource, and the non-instant communication application applies the interval of playing multiple audio files, and does not release the audio resource, thereby avoiding The gap between non-instant messaging applications that play multiple audio files is intervened by other applications.
  • the rules for preempting audio resources by the Java instant messaging application are as follows: The highest priority is to occupy the lower priority, and the same priority is in the time sequence of performing the preemption operation, and the time in the latter is the former. Specifically, the priority is set by the platform-based media resource management mechanism. When the terminal audio resource conflicts, the higher-priority ones preempt the lower priority and the same priority level according to the time sequence of performing the preemption operation. Performing a preemption operation in the latter preempts the execution of the preemption operation in the former.
  • the Java non-immediate communication application sends a message to notify the preempted audio resource application to release the audio resource by using the message mechanism of the application layer before the audio resource is occupied, until the Java non-immediate communication application exits, releasing the audio resource, the Java Non-instant messaging applications re-pass
  • the message mechanism of the application layer sends a message to notify the application that is preempting the audio resource to resume the use of the audio resource.
  • Determining the type of the terminal application that preempts the resource includes: determining the type of the Java application according to the identifier of the preset Java application, and the Java application includes a Java instant messaging application and a Java non-instant communication application.
  • the identification identifier of the Java application may include:
  • Method 1 When the operator or the manufacturer customizes the Java application, an attribute may be added to the Java application's jad file, and the newly added attribute is used to identify the Java instant messaging application or the Java non-instant messaging application; for example, New properties in the jad file of the Java instant messaging application: MIDlet-Usecase-IM, where IM (Instant Messaging), according to its attribute value True or False, indicates whether the application is a Java instant messaging application, Java The virtual machine needs to identify and record the attribute value when installing the Java instant messaging application, so that the type of the application can be clarified according to the recorded attribute value when there is an audio conflict, and the attribute name and the attribute value have multiple definition forms, which are not limited to the above. DETAILED DESCRIPTION OF THE INVENTION As long as it is a property agreed between a Java application and a virtual machine.
  • Method 2 This method is usually applied to non-customized Java applications. Since the MIDlet-Name of Java applications usually changes very little, different versions only differ in the version number, so Java can be recognized by the MIDlet-Name of the Java application.
  • the type of application for example: If the MIDlet-Name of the Java application contains keywords such as QQ/Messenger, the application is identified as a Java instant messaging application. Identify Java by setting such keywords for instant messaging applications For instant messaging applications, applications without such keywords are Java non-instant messaging applications.
  • the present invention also relates to a terminal. Referring to FIG. 2, FIG. 2 is a schematic diagram of a terminal module according to the present invention, which includes an application type determining module S201 and an audio resource management module S202.
  • the application type determining module S201 is configured to determine when a resource conflict occurs in the terminal.
  • the audio resource management module S202 is configured to manage the audio resource according to the judgment result of the application type determining module S201, and the specific management manner is: if the application for preempting the audio resource is a Java instant messaging application, Java instant communication After the class application occupies the audio resource and uses the audio resource once, the audio resource is immediately released, and the application that is preempted by the audio resource resumes the use of the audio resource; if the application that preempts the resource is a Java non-immediate communication application, the Java non-immediate communication application occupies The audio resource, until the Java non-immediate communication application exits, releases the audio resource, and the application that is preempted by the audio resource resumes occupation of the audio resource.
  • the audio resource management module S202 controls the Java non-instant communication application to send an message to notify the preempted audio resource to release the audio through the message mechanism of the application layer before occupying the audio resource. Before the Java non-immediate communication application releases the audio resource, the audio resource management module S202 controls the Java non-immediate communication application to send a message through the application layer message mechanism to notify the application that is preempted of the audio resource to restore the use of the audio resource.
  • the application type judging module S201 generally includes a Java virtual machine of the terminal, and the terminal includes a mobile terminal or the like.
  • the application type determining module determines the type of the Java application according to the identifier of the preset Java application.
  • the identification identifier can be set in two ways: Method 1: When the operator or the manufacturer customizes the Java application, an attribute can be added to the Java application's jad file, which is used to identify the Java instant messaging application or The Java non-instant messaging application; for example, adding a property to a jad file of a Java instant messaging application: MIDlet-Usecase-IM, where IM (Instant Messaging), according to its attributes The value is True or False to indicate whether the application is a Java instant messaging application.
  • the Java virtual machine needs to identify and record the attribute value when installing the Java instant messaging application, so that the application is clarified according to the recorded attribute value when there is an audio conflict.
  • the types, attribute names, and attribute values have various definitions, and are not limited to the above specific implementation manners, as long as the attributes agreed between the Java application and the virtual machine can be agreed upon.
  • Method 2 This method is usually applied to non-customized Java applications. Since the MIDlet-Name (the name of the mobile information device applet) of the Java application usually rarely changes, different versions only differ in the version number, so through Java.
  • the MIDlet-Name of the application can identify the type of the Java application, for example: If the MIDlet-Name of the Java application contains a keyword such as QQ/Messenger, the application is identified as a Java instant messaging application. Java instant messaging applications are identified by setting such keywords for instant messaging applications. Applications without such keywords are Java non-instant messaging applications.
  • the terminal releases the audio resource immediately after the audio resource is preempted by the instant messaging application, and the audio resource is released immediately after the audio resource is used once.
  • the application of the preempted resource restores the use of the audio resource in time, and the non-instant communication application monopolizes the audio resource after exclusive use.
  • the audio resource realizes continuous playback of multiple audio files until the non-immediate communication application exits, and the application that recovers the preempted audio resource resumes the use of the audio resource, thereby improving the user experience.
  • Embodiment 1 is a diagrammatic representation of Embodiment 1:
  • FIG. 3 is a flowchart of management when an audio conflict occurs between a Java application of a mobile terminal and a local application of a terminal according to an embodiment of the present invention.
  • a Tencent QQ, Java non-application of a Java instant messaging application is used.
  • the Java music playing application of the instant messaging application and the local application of the mobile terminal are as shown in FIG. 3:
  • Step S301 When the audio resource conflict occurs in the terminal, the Java virtual machine determines the type of the Java application that preempts the audio resource. If the audio resource is the Tencent QQ of the Java instant messaging application, step S302 is performed, if the audio resource is preempted Java non-instant messaging application Java music playback application, step S306;
  • Step S302 Tencent QQ occupies the audio resource of the mobile terminal, and immediately releases the audio resource after completing the playing of the message prompt tone;
  • Step S303 The local application that is preempted by the audio resource restores the use of the audio resource, and the Tencent QQ continues to run, waiting for the next time to preempt the audio resource;
  • Step S304 Tencent QQ once again seizes the audio resource, completes the playback of the second message prompt tone, and releases the audio resource again;
  • Step S305 The local application that is preempted by the resource restores the use of the audio resource again, and the Tencent QQ continues to run, waiting for the third time to seize the audio resource, or the Tencent QQ exits.
  • Step S306 The Java music playing application occupies an audio resource, and completes continuous playing of the audio file.
  • Step S307 The Java music playing application exits, releasing the audio resource, and the local application of the preempted resource restores the use of the audio resource.
  • the mobile terminal releases the audio resource immediately after the audio resource is preempted by the Tencent QQ and the audio resource is used once, and the local application of the preempted resource is restored in time to restore the use of the audio resource; or the audio is played in the Java music playback application.
  • the exclusive audio resource realizes continuous playback of multiple audio files until the Java music playing application exits, and the local application that is preempted by the resource restores the use of the audio resource, thereby improving the user experience.

Abstract

The present invention discloses a method for managing a terminal during audio resource conflict and the terminal thereof. The method involves judging the type of a terminal application which preempts the audio resources when the audio resource conflict happens to the terminal. If the application which preempts the audio resources is an Java instant messaging type of application, said Java instant messaging type of application occupies the audio resources and uses the audio resources only once, then releases the audio resources at once, and the usage of audio resources is recovered by the application whose audio resources are preempted; if the application which preempts the audio resources is an Java non-instant messaging type of application, said Java non-instant messaging type of application occupies the audio resources, and releases the audio resources until said Java non-instant messaging type of application quits, then the occupation of audio resources is recovered by the application whose audio resources are preempted. Through the present invention, the occupation problem of audio resources in the terminal during audio resource conflict is solved, and the user experience is improved.

Description

一种终端在音频资源冲突时的管理方法及该终端 技术领域  Management method for terminal when audio resource conflicts and terminal
本发明涉及通讯技术领域, 尤其涉及一种终端在音频资源冲突时的管 理方法及该终端。 背景技术  The present invention relates to the field of communications technologies, and in particular, to a method for managing a terminal in conflict of audio resources and the terminal. Background technique
随着通讯技术的发展, Java应用的终端越来越多。 Java应用包括 Java 即时通信类应用和 Java非即时通信类应用, Java即时通信类应用包括腾讯 QQ、 MSN等; Java非即时通信类应用包括 Java游戏、 Java音乐播放应用 等。 Java即时通信类应用通常只需要在抢占音频后, 短暂的占用音频资源, 比如腾讯 QQ,在来信息时抢占音频资源,并一次使用资源,即发出提示音; Java 非即时通信类应用通常在抢占音频后较长时间的占用音频资源, 比如 Java音乐播放应用, 播放一个音频文件需要较长时间的占用音频资源。 但 是当多个终端应用需要占用音频资源时, 终端有限的音频资源就会发生冲 突。 而目前解决终端音频资源冲突的方法过于单一, 无法同时适用于 Java 即时通信类应用和 Java非即时通信类应用, 往往存在以下缺陷: 在 Java即 时通信类应用抢占音频并短暂的使用音频资源后, 无法及时地释放音频资 源, 而导致音频资源的浪费; 在 Java非即时通信类应用播放多个音频文件 的间隙释放了音频资源, 释放音频资源后, 被抢占资源的应用恢复了对资 源的使用, 而导致用户在享用 Java非即时通信类应用时, 在听觉上受到了 其他应用的干扰, 比如, 在终端用户享用 Java音乐播放应用时, 在听完一 首歌和等待下一首歌的间隙, 恢复了被抢占资源的应用对音频资源的使用, 那么在此间隙, 终端用户听到的声音就是对 Java音乐播放应用的干扰。 发明内容 With the development of communication technologies, there are more and more terminals for Java applications. Java applications include Java instant messaging applications and Java non-instant messaging applications, Java instant messaging applications including Tencent QQ, MSN, etc.; Java non-instant messaging applications include Java games, Java music playback applications. Java instant messaging applications usually only need to temporarily occupy audio resources after preempting audio. For example, Tencent QQ, preempts audio resources when coming to the information, and uses the resources once, that is, a prompt tone; Java non-immediate communication applications are usually preempted. Audio resources occupying audio for a long time, such as Java music playback applications, playing an audio file takes a long time to occupy audio resources. However, when multiple terminal applications need to occupy audio resources, the limited audio resources of the terminal will collide. At present, the method for solving the conflict of terminal audio resources is too single, and cannot be applied to both Java instant messaging applications and Java non-instant messaging applications. The following defects are often encountered: After the Java instant messaging application preempts audio and uses audio resources for a short time, Unable to release audio resources in time, resulting in waste of audio resources; releasing audio resources in the gap between Java non-immediate communication applications playing multiple audio files, and releasing audio resources, the application of the preempted resources restores the use of resources. When the user enjoys the Java non-immediate communication application, it is audibly interfered with by other applications. For example, when the end user enjoys the Java music playing application, after listening to a song and waiting for the next song, The use of audio resources by the application of the preempted resource is restored, and in this gap, the sound heard by the end user is an interference to the Java music playing application. Summary of the invention
本发明提供一种终端在音频资源冲突时的管理方法及该终端, 解决了 终端在音频资源冲突时音频资源的占用问题。  The invention provides a method for managing a terminal when an audio resource conflicts, and the terminal, which solves the problem that the terminal consumes audio resources when the audio resource conflicts.
为解决上述技术问题, 本发明釆用以下技术方案:  In order to solve the above technical problems, the present invention uses the following technical solutions:
一种终端应用在音频资源冲突时的管理方法, 包括:  A method for managing a terminal application when an audio resource conflicts includes:
在终端发生音频资源冲突时, 判断抢占音频资源的终端应用的类型; 如果抢占音频资源的应用为 Java即时通信类应用, 所述 Java即时通信 类应用占据音频资源并使用一次音频资源后, 立即释放音频资源, 被抢占 音频资源的应用恢复对音频资源的使用;  When the audio resource conflict occurs in the terminal, determine the type of the terminal application that preempts the audio resource; if the application that preempts the audio resource is a Java instant messaging application, the Java instant messaging application occupies the audio resource and uses the audio resource immediately Audio resource, the application of the preempted audio resource restores the use of audio resources;
如果抢占音频资源的应用为 Java非即时通信类应用, 所述 Java非即时 通信类应用占据音频资源, 直到所述 Java非即时通信类应用退出, 则释放 音频资源, 被抢占音频资源的应用恢复对音频资源的占用。  If the application for preempting the audio resource is a Java non-instant messaging application, the Java non-instant messaging application occupies an audio resource, and until the Java non-immediate communication application exits, the audio resource is released, and the application of the preempted audio resource is restored. The occupation of audio resources.
所述 Java即时通信类应用抢占音频资源的规则为: 优先级高者抢占优 先级低者, 同一优先级下按照执行抢占操作的时间顺序, 时间在后者抢占 时间在前者。  The rules for preempting the audio resource by the Java instant messaging application are as follows: The highest priority is to preempt the lower priority, and the same priority is in the time sequence of performing the preemption operation, and the time in the latter preemption time is in the former.
所述 Java非即时通信类应用抢占音频资源的规则为: 在占据音频资源 前, 通过应用层的消息机制发送消息通知被抢占音频资源的应用释放音频 资源; 在所述 Java非即时通信类应用释放音频资源前, 再次通过应用层的 消息机制发送消息通知被抢占音频资源的应用恢复对音频资源的使用。  The rule that the Java non-immediate communication application preempts the audio resource is: before the audio resource is occupied, sending a message to notify the application that is preempted by the audio resource to release the audio resource through the message mechanism of the application layer; releasing the audio resource in the Java non-instant communication application Before the audio resource, the application layer sends a message to notify the application that is preempted of the audio resource to resume the use of the audio resource.
所述判断抢占音频资源的终端应用的类型的方法包括: 根据预设的 Java应用的识别标识判断所述 Java应用的类型。  The method for determining the type of the terminal application that preempts the audio resource includes: determining the type of the Java application according to the identifier of the preset Java application.
所述 Java应用的识别标识包括: 在所述 Java应用的描述符 jad文件中 新增属性, 所述新增属性用以识别所述 Java应用为 Java即时通信类应用或 Java非即时通信类应用。  The identification identifier of the Java application includes: adding a new attribute in the descriptor jad file of the Java application, where the newly added attribute is used to identify the Java application as a Java instant messaging application or a Java non-instant communication application.
所述 Java应用的识别标识包括所述 Java应用的 MIDlet-Name (移动信 息设备小程序的名称), 所述 Java应用的 MIDlet-Name用以识别所述 Java 应用为 Java即时通信类应用或 Java非即时通信类应用。 The identification identifier of the Java application includes a MIDlet-Name of the Java application (mobile letter) The name of the device applet), the MIDlet-Name of the Java application is used to identify the Java application as a Java instant messaging application or a Java non-instant messaging application.
一种终端, 包括应用类型判断模块、 音频资源管理模块, 其中: 所述应用类型判断模块用于在终端发生音频资源冲突时, 判断抢占音 频资源的终端应用的类型;  A terminal includes an application type judging module and an audio resource management module, where: the application type judging module is configured to determine, when an audio resource conflict occurs in the terminal, a type of the terminal application that preempts the audio resource;
所述音频资源管理模块用于根据所述应用类型判断模块的判断结果管 理音频资源, 具体管理方式为: 如果抢占音频资源的应用为 Java即时通信 类应用, 所述 Java即时通信类应用占据音频资源并使用一次音频资源后, 立即释放音频资源, 被抢占音频资源的应用恢复对音频资源的使用; 如果 抢占音频资源的应用为 Java非即时通信类应用, 所述 Java非即时通信类应 用占据音频资源, 直到所述 Java非即时通信类应用退出, 则释放音频资源, 被抢占音频资源的应用恢复对音频资源的占用。  The audio resource management module is configured to manage audio resources according to the judgment result of the application type determining module, where the specific management manner is: if the application for preempting the audio resource is a Java instant messaging application, the Java instant messaging application occupies an audio resource After the audio resource is used once, the audio resource is released immediately, and the application that is preempted by the audio resource resumes the use of the audio resource; if the application that preempts the audio resource is a Java non-immediate communication application, the Java non-immediate communication application occupies the audio resource. Until the Java non-immediate communication application exits, the audio resource is released, and the application that is preempted by the audio resource resumes occupation of the audio resource.
所述应用类型判断模块根据预设的 Java应用的识别标识判断所述 Java 应用的类型。  The application type determining module determines the type of the Java application according to the identifier of the preset Java application.
如果抢占音频资源的应用为 Java非即时通信类应用, 所述音频资源管 理模块控制所述 Java非即时通信类应用在占据音频资源前, 通过应用层的 消息机制发送消息通知被抢占音频资源的应用释放音频资源; 在所述 Java 非即时通信类应用释放音频资源前, 所述音频资源管理模块控制所述 Java 非即时通信类应用再次通过应用层的消息机制发送消息通知被抢占音频资 源的应用恢复对音频资源的使用。  If the application for preempting the audio resource is a Java non-immediate communication application, the audio resource management module controls the application of the Java non-instant communication application to send a message to notify the preempted audio resource through the message mechanism of the application layer before occupying the audio resource. Release the audio resource; before the Java non-immediate communication application releases the audio resource, the audio resource management module controls the Java non-immediate communication application to send a message through the application layer message mechanism to notify the application recovery of the preempted audio resource. Use of audio resources.
所述应用类型判断模块包括所述终端的 Java虚拟机。  The application type determining module includes a Java virtual machine of the terminal.
本发明提供一种终端在音频资源冲突时的管理方法及该终端, 实现了 终端在抢占音频资源的应用为 Java即时通讯类应用时, Java即时通讯类应 用占据音频资源并一次使用音频资源后, 立即释放音频资源, 及时恢复被 抢占资源的应用恢复对音频资源的使用; 在抢占音频资源的应用为 Java非 即时通信应用时, Java 非即时通信应用独占音频资源实现多个音频文件的 连续播放, 直到该 Java非即时通信应用退出, 才释放音频资源, 恢复被抢 占资源的应用恢复对音频资源的使用。 提高了用户体验度。 附图说明 The present invention provides a method for managing a terminal when an audio resource conflicts, and the terminal, which realizes that when the application for preempting the audio resource is a Java instant messaging application, the Java instant messaging application occupies the audio resource and uses the audio resource once. Immediate release of audio resources, timely recovery of the application of the preempted resources to restore the use of audio resources; the application of preempting audio resources is Java non In instant messaging applications, Java non-immediate communication applications monopolize audio resources to achieve continuous playback of multiple audio files, until the Java non-immediate communication application exits, releasing audio resources, and restoring the application of the preempted resources to restore the use of audio resources. Increased user experience. DRAWINGS
图 1为本发明实施例终端应用发生音频冲突时的管理流程图; 图 2为本发明实施例终端模块示意图;  1 is a flowchart of management when an audio conflict occurs in a terminal application according to an embodiment of the present invention; FIG. 2 is a schematic diagram of a terminal module according to an embodiment of the present invention;
图 3为本发明实施例移动终端 Java应用与终端本地应用发生音频冲突 时的管理流程图。 具体实施方式  FIG. 3 is a flowchart of management when an audio conflict occurs between a Java application of a mobile terminal and a local application of the terminal according to an embodiment of the present invention. detailed description
下面通过具体实施方式结合附图对本发明作进一步详细说明。  The present invention will be further described in detail below with reference to the accompanying drawings.
如图 1 ,为本发明终端应用发生音频冲突时的管理流程图,如图 1所示: 步骤 S101、 在终端发生音频资源冲突时, 判断抢占音频资源的终端应 用的类型, 如果抢占音频资源的应用为 Java即时通信类应用, 则执行步骤 S102 , 如果抢占音频资源的应用为 Java 非即时通信类应用, 则执行步骤 S104;  FIG. 1 is a flowchart of management when an audio conflict occurs in a terminal application according to the present invention, as shown in FIG. 1: Step S101: When an audio resource conflict occurs in a terminal, determine a type of a terminal application that preempts an audio resource, if the audio resource is preempted If the application is a Java instant messaging application, step S102 is performed, if the application for preempting the audio resource is a Java non-instant messaging application, step S104 is performed;
步骤 S102、 Java即时通信类应用占据音频资源并使用一次音频资源后, 立即释放音频资源;  Step S102: After the Java instant messaging application occupies the audio resource and uses the audio resource once, the audio resource is immediately released.
步骤 S103、 被抢占音频资源的应用恢复对音频资源的使用, Java即时 通信类应用继续运行, 等待下一次抢占音频资源。  Step S103: The application that is preempted by the audio resource resumes the use of the audio resource, and the Java instant messaging application continues to run, waiting for the next preemption of the audio resource.
步骤 S104、 Java非即时通信类应用占据音频资源, 直到该 Java非即时 通信类应用退出, 再释放音频资源;  Step S104: The Java non-immediate communication application occupies the audio resource until the Java non-immediate communication application exits, and then releases the audio resource;
步骤 S105、 被抢占资源的应用恢复对音频资源的占用。  Step S105: The application that is preempted by the resource restores the occupation of the audio resource.
抢占音频资源的应用为 Java即时通信类应用时, 被抢占音频资源的应 用可以是另一 Java即时通信类应用、 Java非即时通信类应用、 终端本地应 用; 抢占资源的应用为 Java非即时通信类应用时, 被抢占音频资源的应用 可以是另一 Java非即时通信类应用、 Java即时通信类应用、终端本地应用 , 终端本地应用不包括手机通讯中优先级最高的来电业务、 短信息业务等。 When the application for preempting the audio resource is a Java instant messaging application, the application that is preempted by the audio resource may be another Java instant messaging application, a Java non-instant messaging application, and the terminal local application. When the application for preempting resources is a Java non-immediate communication application, the application for preempting the audio resource may be another Java non-instant messaging application, a Java instant messaging application, a terminal local application, and the terminal local application does not include mobile communication. The highest priority call service, short message service, etc.
Java 即时通信类应用包括能够即时发送和接收互联网消息的应用, 如 常用的即时通信工具腾讯 QQ、 MSN等; Java非即时通信类应用有 Java音 乐播放应用、 有背景音乐的 Java游戏等。 Java即时通信类应用通常只需要 在抢占音频资源后, 短暂的占用音频资源, 比如腾讯 QQ, 在来信息时抢占 音频资源, 并一次使用资源即发出提示音。 Java 非即时通信类应用通常在 抢占音频后较长时间的占用音频资源, 比如 Java音乐播放应用, 播放一个 音频文件需要较长时间的占用音频资源。 通过本发明, 可以实现 Java即时 通信类应用占据音频资源并使用一次音频资源后, 立即释放音频资源, 被 抢占音频资源的应用恢复对资源的使用; 还可以实现 Java非即时通信类应 用占据音频资源, 直到该 Java非即时通信类应用退出, 则释放音频资源, 被抢占资源的应用恢复对资源的占用, 在非即时通信类应用多个音频文件 播放的间隙, 也不释放音频资源, 避免了在非即时通信类应用多个音频文 件播放的间隙受到其他应用的介入。  Java instant messaging applications include applications that can send and receive Internet messages instantly, such as the popular instant messaging tools Tencent QQ, MSN, etc.; Java non-instant messaging applications include Java music playback applications, Java games with background music, and so on. Java instant messaging applications usually only need to temporarily occupy audio resources after preempting audio resources. For example, Tencent QQ preempts audio resources when coming to the information, and emits a prompt tone when using the resources once. Java non-immediate communication applications usually occupy audio resources for a long time after preempting audio. For example, in Java music playback applications, playing an audio file takes a long time to occupy audio resources. Through the invention, the Java instant messaging application can occupy the audio resource and release the audio resource immediately after using the audio resource, and the application that is preempted by the audio resource restores the use of the resource; and the Java non-instant communication application can occupy the audio resource. Until the Java non-immediate communication application exits, the audio resource is released, and the application that is preempted by the resource restores the occupation of the resource, and the non-instant communication application applies the interval of playing multiple audio files, and does not release the audio resource, thereby avoiding The gap between non-instant messaging applications that play multiple audio files is intervened by other applications.
进一步, Java即时通信类应用抢占音频资源的规则为: 优先级高者抢 占优先级低者, 同一优先级下按照执行抢占操作的时间顺序, 时间在后者 抢占时间在前者。 具体为基于平台的媒体资源管理机制设定的优先级, Java 即时通信类应用在终端音频资源发生冲突时, 优先级高者抢占优先级低者、 同一优先级下按照执行抢占操作的时间顺序, 执行抢占操作在后者抢占执 行抢占操作在前者。  Further, the rules for preempting audio resources by the Java instant messaging application are as follows: The highest priority is to occupy the lower priority, and the same priority is in the time sequence of performing the preemption operation, and the time in the latter is the former. Specifically, the priority is set by the platform-based media resource management mechanism. When the terminal audio resource conflicts, the higher-priority ones preempt the lower priority and the same priority level according to the time sequence of performing the preemption operation. Performing a preemption operation in the latter preempts the execution of the preemption operation in the former.
进一步, Java 非即时通信类应用在占据音频资源前, 通过应用层的消 息机制发送消息通知被抢占音频资源的应用释放音频资源, 直到该 Java非 即时通信类应用退出, 释放音频资源前, 该 Java非即时通信类应用再次通 过应用层的消息机制发送消息通知被抢占音频资源的应用恢复对音频资源 的使用。 Further, the Java non-immediate communication application sends a message to notify the preempted audio resource application to release the audio resource by using the message mechanism of the application layer before the audio resource is occupied, until the Java non-immediate communication application exits, releasing the audio resource, the Java Non-instant messaging applications re-pass The message mechanism of the application layer sends a message to notify the application that is preempting the audio resource to resume the use of the audio resource.
判断抢占资源的终端应用的类型包括: 根据预设的 Java应用的识别标 识判断所述 Java应用的类型, Java应用包括 Java即时通信类应用和 Java 非即时通信类应用。  Determining the type of the terminal application that preempts the resource includes: determining the type of the Java application according to the identifier of the preset Java application, and the Java application includes a Java instant messaging application and a Java non-instant communication application.
在具体实施过程中, Java应用的识别标识可包括:  In a specific implementation process, the identification identifier of the Java application may include:
方式一: 运营商或制造商定制 Java应用时, 可以在 Java应用的 jad文 件中新增属性,该新增属性用以识别 Java 即时通信类应用或所述 Java非即 时通信类应用; 例如, 在 Java 即时通信类应用的 jad 文件中新增属性: MIDlet-Usecase-IM, 其中 IM ( Instant Messaging, 即时通讯), 根据其属性 值为 True或者 False来标志该应用是否为 Java即时通信类应用, Java虚拟 机需要在安装 Java即时通信类应用时识别并记录该属性值, 以便在有音频 冲突时根据记录的属性值明确该应用的类型, 属性名和属性值有多种定义 形式, 不局限在以上的具体实施方式, 只要是 Java应用与虚拟机协商达成 一致的属性均可。  Method 1: When the operator or the manufacturer customizes the Java application, an attribute may be added to the Java application's jad file, and the newly added attribute is used to identify the Java instant messaging application or the Java non-instant messaging application; for example, New properties in the jad file of the Java instant messaging application: MIDlet-Usecase-IM, where IM (Instant Messaging), according to its attribute value True or False, indicates whether the application is a Java instant messaging application, Java The virtual machine needs to identify and record the attribute value when installing the Java instant messaging application, so that the type of the application can be clarified according to the recorded attribute value when there is an audio conflict, and the attribute name and the attribute value have multiple definition forms, which are not limited to the above. DETAILED DESCRIPTION OF THE INVENTION As long as it is a property agreed between a Java application and a virtual machine.
在 Java应用的 jad文件中新增属性还可以有其他方式, 例如, 在 Java 非即时通信类应用的 jad文件中新增属性, 才艮据其属性值为 True或者 False 来标志该应用是否为 Java非即时通信类应用; 还例如, 在 Java即时通信类 应用和 Java非即时通信类应用的 jad文件中都新增属性, 才艮据其属性名来 标志该应用为 Java即时通信类应用还是 Java非即时通信类应用;  There are other ways to add attributes to the Java application's jad file. For example, if you add a property to the jad file of a Java non-instant messaging application, it will indicate whether the application is Java according to its attribute value True or False. Non-instant messaging applications; for example, new attributes are added to the Java instant messaging application and the Java non-instant messaging application's jad file, and the application is marked as a Java instant messaging application or a Java non based on its attribute name. Instant messaging applications;
方式二: 该方式通常应用在非定制的 Java应用上, 由于 Java应用的 MIDlet-Name 通常很少变化, 不同版本仅仅在版本号上有所区别, 因此通 过 Java应用的 MIDlet-Name可以识别出 Java应用的类型, 比如: 如果 Java 应用的 MIDlet-Name中包含如 QQ/Messenger这类关键词,则识别该应用为 Java即时通信类应用。通过设定即时通信类应用的这类关键词 ,识别出 Java 即时通信类应用, 没有这类关键词的应用即为 Java非即时通信类应用。 本发明还涉及一种终端, 请参考图 2, 图 2为本发明终端模块示意图, 包括应用类型判断模块 S201、 音频资源管理模块 S202, 应用类型判断模块 S201用于在终端发生资源冲突时, 判断抢占资源的终端应用的类型; 音频 资源管理模 S202块用于根据应用类型判断模块 S201的判断结果管理音频 资源, 具体管理方式为: 如果抢占音频资源的应用为 Java即时通信类应用, Java 即时通信类应用占据音频资源并使用一次音频资源后, 立即释放音频 资源, 被抢占音频资源的应用恢复对音频资源的使用; 如果抢占资源的应 用为 Java非即时通信类应用, Java非即时通信类应用占据音频资源, 直到 所述 Java非即时通信类应用退出, 则释放音频资源, 被抢占音频资源的应 用恢复对音频资源的占用。 Method 2: This method is usually applied to non-customized Java applications. Since the MIDlet-Name of Java applications usually changes very little, different versions only differ in the version number, so Java can be recognized by the MIDlet-Name of the Java application. The type of application, for example: If the MIDlet-Name of the Java application contains keywords such as QQ/Messenger, the application is identified as a Java instant messaging application. Identify Java by setting such keywords for instant messaging applications For instant messaging applications, applications without such keywords are Java non-instant messaging applications. The present invention also relates to a terminal. Referring to FIG. 2, FIG. 2 is a schematic diagram of a terminal module according to the present invention, which includes an application type determining module S201 and an audio resource management module S202. The application type determining module S201 is configured to determine when a resource conflict occurs in the terminal. The type of the terminal application that preempts the resource; the audio resource management module S202 is configured to manage the audio resource according to the judgment result of the application type determining module S201, and the specific management manner is: if the application for preempting the audio resource is a Java instant messaging application, Java instant communication After the class application occupies the audio resource and uses the audio resource once, the audio resource is immediately released, and the application that is preempted by the audio resource resumes the use of the audio resource; if the application that preempts the resource is a Java non-immediate communication application, the Java non-immediate communication application occupies The audio resource, until the Java non-immediate communication application exits, releases the audio resource, and the application that is preempted by the audio resource resumes occupation of the audio resource.
进一步, 如果抢占资源的应用为 Java非即时通信类应用, 音频资源管 理模块 S202控制 Java非即时通信类应用在占据音频资源前,通过应用层的 消息机制发送消息通知被抢占音频资源的应用释放音频资源; Java非即时 通信类应用释放音频资源前,音频资源管理模块 S202控制 Java非即时通信 类应用再次通过应用层的消息机制发送消息通知被抢占音频资源的应用恢 复对音频资源的使用。  Further, if the application for preempting the resource is a Java non-instant messaging application, the audio resource management module S202 controls the Java non-instant communication application to send an message to notify the preempted audio resource to release the audio through the message mechanism of the application layer before occupying the audio resource. Before the Java non-immediate communication application releases the audio resource, the audio resource management module S202 controls the Java non-immediate communication application to send a message through the application layer message mechanism to notify the application that is preempted of the audio resource to restore the use of the audio resource.
在具体实施方式中,应用类型判断模块 S201通常包括终端的 Java虚拟 机, 终端包括移动终端等。  In a specific implementation, the application type judging module S201 generally includes a Java virtual machine of the terminal, and the terminal includes a mobile terminal or the like.
在具体实施方式中, 所述应用类型判断模块根据预设的 Java应用的识 别标识判断所述 Java应用的类型。 该识别标识可以通过两种方式设定: 方式一: 在运营商或制造商定制 Java应用时,可以在 Java应用的 jad文 件中新增属性,该新增属性用以识别 Java 即时通信类应用或所述 Java非即 时通信类应用; 例如, 在 Java 即时通信类应用的 jad 文件中新增属性: MIDlet-Usecase-IM, 其中 IM ( Instant Messaging, 即时通讯), 根据其属性 值为 True或者 False来标志该应用是否为 Java即时通信类应用 , Java虚拟 机需要在安装 Java即时通信类应用时识别并记录该属性值, 以便在有音频 冲突时根据记录的属性值明确该应用的类型, 属性名和属性值有多种定义 形式, 不局限在以上的具体实施方式, 只要是 Java应用与虚拟机协商达成 一致的属性均可。 In a specific implementation, the application type determining module determines the type of the Java application according to the identifier of the preset Java application. The identification identifier can be set in two ways: Method 1: When the operator or the manufacturer customizes the Java application, an attribute can be added to the Java application's jad file, which is used to identify the Java instant messaging application or The Java non-instant messaging application; for example, adding a property to a jad file of a Java instant messaging application: MIDlet-Usecase-IM, where IM (Instant Messaging), according to its attributes The value is True or False to indicate whether the application is a Java instant messaging application. The Java virtual machine needs to identify and record the attribute value when installing the Java instant messaging application, so that the application is clarified according to the recorded attribute value when there is an audio conflict. The types, attribute names, and attribute values have various definitions, and are not limited to the above specific implementation manners, as long as the attributes agreed between the Java application and the virtual machine can be agreed upon.
在 Java应用的 jad文件中新增属性还可以有其他方式, 例如, 在 Java 非即时通信类应用的 jad文件中新增属性, 才艮据其属性值为 True或者 False 来标志该应用是否为 Java非即时通信类应用; 还例如, 在 Java即时通信类 应用和 Java非即时通信类应用的 jad文件中都新增属性, 才艮据其属性名来 标志该应用为 Java即时通信类应用还是 Java非即时通信类应用;  There are other ways to add attributes to the Java application's jad file. For example, if you add a property to the jad file of a Java non-instant messaging application, it will indicate whether the application is Java according to its attribute value True or False. Non-instant messaging applications; for example, new attributes are added to the Java instant messaging application and the Java non-instant messaging application's jad file, and the application is marked as a Java instant messaging application or a Java non based on its attribute name. Instant messaging applications;
方式二: 该方式通常应用在非定制的 Java应用上, 由于 Java应用的 MIDlet-Name (移动信息设备小程序的名称)通常很少变化, 不同版本仅仅 在版本号上有所区别, 因此通过 Java应用的 MIDlet-Name可以识别出 Java 应用的类型, 比如: 如果 Java应用的 MIDlet-Name中包含如 QQ/Messenger 这类关键词, 则识别该应用为 Java即时通信类应用。 通过设定即时通信类 应用的这类关键词, 识别出 Java即时通信类应用, 没有这类关键词的应用 即为 Java非即时通信类应用。  Method 2: This method is usually applied to non-customized Java applications. Since the MIDlet-Name (the name of the mobile information device applet) of the Java application usually rarely changes, different versions only differ in the version number, so through Java. The MIDlet-Name of the application can identify the type of the Java application, for example: If the MIDlet-Name of the Java application contains a keyword such as QQ/Messenger, the application is identified as a Java instant messaging application. Java instant messaging applications are identified by setting such keywords for instant messaging applications. Applications without such keywords are Java non-instant messaging applications.
本实施例实现了终端在即时通讯类应用抢占音频资源并一次使用音频 资源后立即释放音频资源, 及时恢复被抢占资源的应用恢复对音频资源的 使用, 非即时通信应用在抢占音频资源后, 独占音频资源实现多个音频文 件的连续播放, 直到非即时通信应用退出, 恢复被抢占音频资源的应用恢 复对音频资源的使用, 提高了用户体验度。  In this embodiment, the terminal releases the audio resource immediately after the audio resource is preempted by the instant messaging application, and the audio resource is released immediately after the audio resource is used once. The application of the preempted resource restores the use of the audio resource in time, and the non-instant communication application monopolizes the audio resource after exclusive use. The audio resource realizes continuous playback of multiple audio files until the non-immediate communication application exits, and the application that recovers the preempted audio resource resumes the use of the audio resource, thereby improving the user experience.
实施例一:  Embodiment 1:
图 3为本发明实施例移动终端 Java应用与终端本地应用发生音频冲突 时的管理流程图, 本实施例中以 Java即时通信类应用的腾讯 QQ、 Java非 即时通信类应用的 Java音乐播放应用、 移动终端本地应用为例, 如图 3所 示: FIG. 3 is a flowchart of management when an audio conflict occurs between a Java application of a mobile terminal and a local application of a terminal according to an embodiment of the present invention. In this embodiment, a Tencent QQ, Java non-application of a Java instant messaging application is used. For example, the Java music playing application of the instant messaging application and the local application of the mobile terminal are as shown in FIG. 3:
步骤 S301、 在终端发生音频资源冲突时, Java虚拟机判断抢占音频资 源的 Java应用的类型, 如果抢占音频资源的是 Java即时通信类应用的腾讯 QQ, 则执行步骤 S302, 如果抢占音频资源的是 Java非即时通信类应用的 Java音乐播放应用, 则执行步骤 S306;  Step S301: When the audio resource conflict occurs in the terminal, the Java virtual machine determines the type of the Java application that preempts the audio resource. If the audio resource is the Tencent QQ of the Java instant messaging application, step S302 is performed, if the audio resource is preempted Java non-instant messaging application Java music playback application, step S306;
步骤 S302、 腾讯 QQ占据移动终端的音频资源, 完成一次消息提示音 的播放后, 立即释放音频资源;  Step S302: Tencent QQ occupies the audio resource of the mobile terminal, and immediately releases the audio resource after completing the playing of the message prompt tone;
步骤 S303、被抢占音频资源的本地应用恢复音频资源的使用,腾讯 QQ 继续运行, 等待下一次抢占音频资源;  Step S303: The local application that is preempted by the audio resource restores the use of the audio resource, and the Tencent QQ continues to run, waiting for the next time to preempt the audio resource;
步骤 S304、 腾讯 QQ再次抢占音频资源, 完成第二次消息提示音的播 放, 再次释放音频资源;  Step S304: Tencent QQ once again seizes the audio resource, completes the playback of the second message prompt tone, and releases the audio resource again;
步骤 S305、被抢占资源的本地应用再次恢复音频资源的使用,腾讯 QQ 继续运行, 等待第三次抢占音频资源, 或者腾讯 QQ退出。  Step S305: The local application that is preempted by the resource restores the use of the audio resource again, and the Tencent QQ continues to run, waiting for the third time to seize the audio resource, or the Tencent QQ exits.
步骤 S306、 Java音乐播放应用占据音频资源, 完成对音频文件的连续 播放;  Step S306: The Java music playing application occupies an audio resource, and completes continuous playing of the audio file.
步骤 S307、 Java音乐播放应用退出, 释放音频资源, 被抢占资源的本 地应用恢复音频资源的使用。  Step S307: The Java music playing application exits, releasing the audio resource, and the local application of the preempted resource restores the use of the audio resource.
本实施例实现了一种移动终端在腾讯 QQ抢占音频资源并一次使用音 频资源后立即释放音频资源, 及时恢复被抢占资源的本地应用恢复对音频 资源的使用; 或者在 Java音乐播放应用在抢占音频资源后, 独占音频资源 实现多个音频文件的连续播放, 直到 Java音乐播放应用退出, 被抢占资源 的本地应用恢复对音频资源的使用, 提高了用户体验度。  In this embodiment, the mobile terminal releases the audio resource immediately after the audio resource is preempted by the Tencent QQ and the audio resource is used once, and the local application of the preempted resource is restored in time to restore the use of the audio resource; or the audio is played in the Java music playback application. After the resource, the exclusive audio resource realizes continuous playback of multiple audio files until the Java music playing application exits, and the local application that is preempted by the resource restores the use of the audio resource, thereby improving the user experience.
以上内容是结合具体的实施方式对本发明所作的进一步详细说明, 不 能认定本发明的具体实施只局限于这些说明。 对于本发明所属技术领域的 普通技术人员来说, 在不脱离本发明构思的前提下, 还可以做出若干简单 推演或替换, 都应当视为属于本发明的保护范围。 The above is a further detailed description of the present invention in connection with the specific embodiments, and the specific implementation of the invention is not limited to the description. For the technical field to which the present invention pertains A person skilled in the art can make some simple deductions or substitutions without departing from the inventive concept, and should be considered as belonging to the scope of protection of the present invention.

Claims

权利要求书 Claim
1、 一种终端应用在音频资源冲突时的管理方法, 其特征在于, 该方法 包括:  A method for managing a terminal application in an audio resource conflict, the method comprising:
在终端发生音频资源冲突时, 判断抢占音频资源的终端应用的类型; 如果抢占音频资源的应用为 Java即时通信类应用, 所述 Java即时通信 类应用占据音频资源并使用一次音频资源后, 立即释放音频资源, 被抢占 音频资源的应用恢复对音频资源的使用;  When the audio resource conflict occurs in the terminal, determine the type of the terminal application that preempts the audio resource; if the application that preempts the audio resource is a Java instant messaging application, the Java instant messaging application occupies the audio resource and uses the audio resource immediately Audio resource, the application of the preempted audio resource restores the use of audio resources;
如果抢占音频资源的应用为 Java非即时通信类应用, 所述 Java非即时 通信类应用占据音频资源, 直到所述 Java非即时通信类应用退出, 再释放 音频资源, 然后, 被抢占音频资源的应用恢复对音频资源的占用。  If the application for preempting the audio resource is a Java non-instant messaging application, the Java non-instant messaging application occupies the audio resource until the Java non-instant messaging application exits, then releases the audio resource, and then the application that is preempted by the audio resource Restore the occupation of audio resources.
2、 如权利要求 1所述的方法, 其特征在于, 所述 Java即时通信类应用 抢占音频资源的规则为: 优先级高者抢占优先级低者, 同一优先级下按照 执行抢占操作的时间顺序, 时间在后者抢占时间在前者。  The method of claim 1, wherein the rule for preempting the audio resource by the Java instant messaging application is: the highest priority, the lower priority, and the chronological order of performing the preemption operation under the same priority Time is in the latter to seize time in the former.
3、 如权利要求 1所述的方法, 其特征在于, 所述 Java非即时通信类应 用抢占音频资源的规则为: 在占据音频资源前, 通过应用层的消息机制发 送消息通知被抢占音频资源的应用释放音频资源; 在所述 Java非即时通信 类应用释放音频资源前, 再次通过应用层的消息机制发送消息通知被抢占 音频资源的应用恢复对音频资源的使用。  The method according to claim 1, wherein the rule that the Java non-immediate communication application preempts the audio resource is: sending a message to notify the preempted audio resource by using a message mechanism of the application layer before occupying the audio resource The application releases the audio resource; before the Java non-immediate communication application releases the audio resource, the application layer sends a message to notify the application that is preempted by the audio resource to resume the use of the audio resource.
4、 如权利要求 1所述的方法, 其特征在于, 所述判断抢占音频资源的 终端应用的类型的方法包括: 根据预设的 Java应用的识别标识判断所述 Java应用的类型。  The method according to claim 1, wherein the determining the type of the terminal application for preempting the audio resource comprises: determining the type of the Java application according to the identifier of the preset Java application.
5、 如权利要求 4所述的方法, 其特征在于, 所述 Java应用的识别标识 包括: 在所述 Java应用的描述符 jad文件中新增属性, 所述新增属性用以 识别所述 Java应用为 Java即时通信类应用或 Java非即时通信类应用。  The method of claim 4, wherein the identifier of the Java application comprises: adding an attribute to a descriptor jad file of the Java application, where the newly added attribute is used to identify the Java The application is a Java instant messaging application or a Java non-instant messaging application.
6、 如权利要求 4所述的方法, 其特征在于, 所述 Java应用的识别标识 包括所述 Java应用的 MIDlet-Name,所述 Java应用的 MIDlet-Name用以识 别所述 Java应用为 Java即时通信类应用或 Java非即时通信类应用。 6. The method of claim 4, wherein the identification identifier of the Java application The MIDlet-Name of the Java application is included, and the MIDlet-Name of the Java application is used to identify the Java application as a Java instant messaging application or a Java non-instant messaging application.
7、 一种终端, 其特征在于, 该终端包括应用类型判断模块、 音频资源 管理模块, 其中:  A terminal, comprising: an application type determining module and an audio resource management module, wherein:
所述应用类型判断模块用于在终端发生音频资源冲突时, 判断抢占音 频资源的终端应用的类型;  The application type determining module is configured to determine, when the terminal has an audio resource conflict, a type of the terminal application that preempts the audio resource;
所述音频资源管理模块用于根据所述应用类型判断模块的判断结果管 理音频资源, 具体管理方式为: 如果抢占音频资源的应用为 Java即时通信 类应用, 所述 Java即时通信类应用占据音频资源并使用一次音频资源后, 立即释放音频资源, 被抢占音频资源的应用恢复对音频资源的使用; 如果 抢占音频资源的应用为 Java非即时通信类应用, 所述 Java非即时通信类应 用占据音频资源, 直到所述 Java非即时通信类应用退出, 再释放音频资源, 然后, 被抢占音频资源的应用再恢复对音频资源的占用。  The audio resource management module is configured to manage audio resources according to the judgment result of the application type determining module, where the specific management manner is: if the application for preempting the audio resource is a Java instant messaging application, the Java instant messaging application occupies an audio resource After the audio resource is used once, the audio resource is released immediately, and the application that is preempted by the audio resource resumes the use of the audio resource; if the application that preempts the audio resource is a Java non-immediate communication application, the Java non-immediate communication application occupies the audio resource. Until the Java non-immediate communication application exits, the audio resource is released, and then the application that is preempted by the audio resource resumes the occupation of the audio resource.
8、 如权利要求 7所述的终端, 其特征在于, 所述应用类型判断模块根 据预设的 Java应用的识别标识判断所述 Java应用的类型。  The terminal according to claim 7, wherein the application type determining module determines the type of the Java application according to the identification identifier of the preset Java application.
9、 如权利要求 7所述的终端, 其特征在于, 如果抢占音频资源的应用 为 Java非即时通信类应用, 所述音频资源管理模块控制所述 Java非即时通 信类应用在占据音频资源前, 通过应用层的消息机制发送消息通知被抢占 音频资源的应用释放音频资源; 在所述 Java非即时通信类应用释放音频资 源前, 所述音频资源管理模块控制所述 Java非即时通信类应用再次通过应 用层的消息机制发送消息通知被抢占音频资源的应用恢复对音频资源的使 用。  The terminal according to claim 7, wherein if the application for preempting the audio resource is a Java non-instant messaging application, the audio resource management module controls the Java non-instant messaging application to occupy the audio resource. Sending a message to notify the preempted audio resource application release audio resource by using a message mechanism of the application layer; before the Java non-immediate communication type application releases the audio resource, the audio resource management module controls the Java non-immediate communication application to pass again The message mechanism of the application layer sends a message to notify the application that is preempted of the audio resource to resume the use of the audio resource.
10、 如权利要求 7或 8所述的终端, 其特征在于, 所述应用类型判断 模块包括所述终端的 Java虚拟机。  The terminal according to claim 7 or 8, wherein the application type determining module comprises a Java virtual machine of the terminal.
PCT/CN2011/071136 2010-09-26 2011-02-21 Method for managing terminal during audio resource conflict and terminal thereof WO2012037792A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201010292136.6 2010-09-26
CN201010292136.6A CN101944048B (en) 2010-09-26 2010-09-26 Management method of terminal in audio resource conflict and terminal

Publications (1)

Publication Number Publication Date
WO2012037792A1 true WO2012037792A1 (en) 2012-03-29

Family

ID=43436047

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/071136 WO2012037792A1 (en) 2010-09-26 2011-02-21 Method for managing terminal during audio resource conflict and terminal thereof

Country Status (2)

Country Link
CN (1) CN101944048B (en)
WO (1) WO2012037792A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017206902A1 (en) * 2016-05-31 2017-12-07 广东欧珀移动通信有限公司 Application control method and related device

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101944048B (en) * 2010-09-26 2014-12-10 中兴通讯股份有限公司 Management method of terminal in audio resource conflict and terminal
CN102135913A (en) * 2011-03-18 2011-07-27 宇龙计算机通信科技(深圳)有限公司 Method and device for responding application
CN105045555A (en) * 2015-07-22 2015-11-11 北京元心科技有限公司 Configuration file based method and apparatus for implementing audio conflict resolution
CN105224369A (en) * 2015-10-14 2016-01-06 深圳Tcl数字技术有限公司 Application start method and system
CN105260269A (en) * 2015-11-02 2016-01-20 广东欧珀移动通信有限公司 Backup method and device as well as terminal for chatting records
CN108958692A (en) * 2017-05-17 2018-12-07 中兴通讯股份有限公司 A kind of audio occupancy treating method and apparatus
CN107995369B (en) * 2017-12-19 2021-01-29 广州市千钧网络科技有限公司 Method, device and equipment for solving audio conflict
WO2020103076A1 (en) * 2018-11-22 2020-05-28 深圳市欢太科技有限公司 Audio playback processing method and apparatus, terminal and computer-readable storage medium
CN111818220B (en) * 2019-04-12 2021-12-28 成都鼎桥通信技术有限公司 Service processing method, device and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1777315A (en) * 2004-11-15 2006-05-24 Lg电子株式会社 Method for managing resources in a mobile phone
US7284244B1 (en) * 2000-05-02 2007-10-16 Microsoft Corporation Resource manager architecture with dynamic resource allocation among multiple configurations
US20090119773A1 (en) * 2007-11-02 2009-05-07 D Amore Tianyu Li Apparatus and methods of configurable system event and resource arbitration management
CN101442582A (en) * 2007-11-21 2009-05-27 大唐移动通信设备有限公司 Method and apparatus for scheduling audio resource concurrence of dynamic application
CN101600011A (en) * 2008-06-03 2009-12-09 中兴通讯股份有限公司 The concurrent playing method and device of mobile multimedia terminal
CN101944048A (en) * 2010-09-26 2011-01-12 中兴通讯股份有限公司 Management method of terminal in audio resource conflict and terminal

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7284244B1 (en) * 2000-05-02 2007-10-16 Microsoft Corporation Resource manager architecture with dynamic resource allocation among multiple configurations
CN1777315A (en) * 2004-11-15 2006-05-24 Lg电子株式会社 Method for managing resources in a mobile phone
US20090119773A1 (en) * 2007-11-02 2009-05-07 D Amore Tianyu Li Apparatus and methods of configurable system event and resource arbitration management
CN101442582A (en) * 2007-11-21 2009-05-27 大唐移动通信设备有限公司 Method and apparatus for scheduling audio resource concurrence of dynamic application
CN101600011A (en) * 2008-06-03 2009-12-09 中兴通讯股份有限公司 The concurrent playing method and device of mobile multimedia terminal
CN101944048A (en) * 2010-09-26 2011-01-12 中兴通讯股份有限公司 Management method of terminal in audio resource conflict and terminal

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017206902A1 (en) * 2016-05-31 2017-12-07 广东欧珀移动通信有限公司 Application control method and related device
US10496445B2 (en) 2016-05-31 2019-12-03 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Method for controlling application and related devices
US10671437B2 (en) 2016-05-31 2020-06-02 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Method for controlling application and related devices

Also Published As

Publication number Publication date
CN101944048A (en) 2011-01-12
CN101944048B (en) 2014-12-10

Similar Documents

Publication Publication Date Title
WO2012037792A1 (en) Method for managing terminal during audio resource conflict and terminal thereof
JP6332774B2 (en) Network function virtualized NFV failure management apparatus, device, and method
WO2019238004A1 (en) Alarm method and device
CN110673964A (en) Audio playing control method and device of vehicle-mounted system
US20070162594A1 (en) Controlled disconnection of a network device
WO2014059650A1 (en) Method and apparatus for managing audio file
WO2013123732A1 (en) Multimedia resource management method and device for mobile terminal
CN111858007A (en) Task scheduling method and device based on message middleware
CN102427465A (en) Voice service proxy method and device and system for integrating voice application through proxy
CN109658934B (en) Method and device for controlling multimedia app through voice
WO2012012970A1 (en) Self-starting installation method, system and device of management software
CN112533188B (en) Output processing method and device of play source
WO2008019893A1 (en) An apparatus for managing outputs of applications
CN105959466B (en) The treating method and apparatus of audio data
CN115694699A (en) Time delay parameter acquisition method and device, electronic equipment and storage medium
CN109032812A (en) A kind of mobile terminal and its method for limiting, the storage medium of interprocess communication
TW200803282A (en) Technique for controlling external communication of embedded device using proxy server
CN111381798B (en) Audio processing method, device, terminal and storage medium
CN112068794A (en) Audio mixing control method, device, electronic device and storage medium
US20070298841A1 (en) Approach for Module Configuration Management for an Integrated Telecommunication Platform
CN109005068B (en) Configuration method of cluster virtual machine qos
CN114968456B (en) Method and device for controlling terminal
CN104580098B (en) A kind of service sharing method and device
JP2005234658A (en) Task management program and task management device
CN109361620B (en) Data sending method, device, equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11826319

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11826319

Country of ref document: EP

Kind code of ref document: A1