WO2023001054A1 - Priority configuration method and apparatus for audio playing, and device and storage medium - Google Patents

Priority configuration method and apparatus for audio playing, and device and storage medium Download PDF

Info

Publication number
WO2023001054A1
WO2023001054A1 PCT/CN2022/105703 CN2022105703W WO2023001054A1 WO 2023001054 A1 WO2023001054 A1 WO 2023001054A1 CN 2022105703 W CN2022105703 W CN 2022105703W WO 2023001054 A1 WO2023001054 A1 WO 2023001054A1
Authority
WO
WIPO (PCT)
Prior art keywords
audio
priority
audio stream
configuration information
target
Prior art date
Application number
PCT/CN2022/105703
Other languages
French (fr)
Chinese (zh)
Inventor
许超杰
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2023001054A1 publication Critical patent/WO2023001054A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • 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/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • 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

Definitions

  • the embodiments of the present application relate to the technical field of media playing, and in particular to a priority configuration method, device, device and storage medium for audio playing.
  • a pair of headphones is capable of establishing wireless connections between multiple devices such as mobile phones, tablets, laptops, and more.
  • the earphone can decide which device to play the audio stream according to the pre-stored priority configuration information.
  • the headset Since the headset does not have a display screen, the user cannot directly set the above priority configuration information on the headset.
  • the user sets the priority configuration information on the device (such as a mobile phone) connected to the headset, and then sends the priority configuration information to the headset through the device, and the headset stores the priority configuration information.
  • Embodiments of the present application provide a priority configuration method, device, device and storage medium for audio playback. Described technical scheme is as follows:
  • a method for configuring priority for audio playback is provided, the method is performed by an audio playback device, and the method includes:
  • the user behavior data includes data for controlling the audio playback device to switch and play different audio streams
  • the priority configuration information corresponding to the target scene mode is updated, and the priority configuration information is used to configure priority relationships among multiple audio streams.
  • a priority configuration device for audio playback comprising:
  • a mode determination module configured to determine the target scene mode where the audio playback device is located
  • a data acquisition module configured to acquire user behavior data generated in the target scene mode, where the user behavior data includes data for controlling the audio playback device to switch and play different audio streams;
  • a configuration updating module configured to update priority configuration information corresponding to the target scene mode based on the user behavior data, where the priority configuration information is used to configure priority relationships among various audio streams.
  • an audio playback device includes a processor and a memory, a computer program is stored in the memory, and the computer program is executed by the processor to realize The above-mentioned priority configuration method for audio playback.
  • a computer-readable storage medium is provided, and a computer program is stored in the storage medium, and the computer program is executed by a processor, so as to implement the above-mentioned priority configuration method for audio playback.
  • a computer program product or computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium.
  • the processor of the audio playback device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the audio playback device executes the above-mentioned priority configuration method for audio playback.
  • Fig. 1 is a schematic diagram of a scheme implementation environment provided by an embodiment of the present application.
  • Fig. 2 is a schematic diagram of time slice division in LE Audio (Low Energy Audio, low power consumption audio) provided by an embodiment of the present application;
  • Fig. 3 is the schematic diagram of the state transition of the ASE (Audio Stream Endpoint, audio data stream end point) state machine provided by one embodiment of the present application;
  • Fig. 4 is a flowchart of a priority configuration method for audio playback provided by an embodiment of the present application
  • FIG. 5 is a flowchart of an audio playback control method provided by an embodiment of the present application.
  • FIG. 6 is a flow chart of the connection establishment phase provided by an embodiment of the present application.
  • Fig. 7 is a flow chart of the initialization stage of the ASE state machine provided by one embodiment of the present application.
  • FIG. 8 is a flow chart of the audio stream playing and switching stages provided by an embodiment of the present application.
  • Fig. 9 is a block diagram of a priority configuration device for audio playback provided by an embodiment of the present application.
  • FIG. 10 is a block diagram of a device for configuring priorities for audio playback provided by another embodiment of the present application.
  • Fig. 11 is a structural block diagram of an audio playback device provided by an embodiment of the present application.
  • FIG. 1 shows a schematic diagram of a solution implementation environment provided by an embodiment of the present application.
  • the solution implementation environment may include an audio playback device 10 and multiple connection devices 20 .
  • the audio playing device 10 refers to an electronic device capable of playing audio.
  • the audio playback device 10 may be electronic devices such as earphones and speakers.
  • the audio playback device 10 may be a TWS (True Wireless Stereo, true wireless stereo) earphone.
  • the connection device 20 refers to an electronic device that communicates with the audio playback device 10 .
  • the connection device 20 may be an electronic device such as a mobile phone, a tablet computer, a notebook computer, a desktop computer, a multimedia playback device, or a wearable device.
  • the audio playback device 10 can establish communication connections with multiple connection devices 20 .
  • the audio playback device 10 is an earphone, and the earphone establishes a communication connection with multiple connection devices 20 such as a mobile phone, a tablet computer, and a notebook computer.
  • the connection device 20 may send an audio stream to the audio playback device 10 through the communication connection, and then the audio playback device 10 decodes and plays the audio stream.
  • the communication connection between the audio playback device 10 and the connection device 20 is a wireless communication connection.
  • the communication connection between the audio playback device 10 and the connection device 20 is a Bluetooth connection.
  • the audio playback device 10 and the connection device 20 communicate through Bluetooth LE Audio technology (hereinafter referred to as LE Audio).
  • LE Audio is a Bluetooth audio technology standard.
  • CIG Connected Isochronous Group, Connection Synchronization Group
  • CIS Connected Isochronous Stream, Connection Synchronization Stream
  • LE Audio a transmission channel and transmission strategy for time-dependent data are defined. That is, for the single-send-multiple-receive scenario, the protocol determines how the sender and receiver allocate sending and receiving time slices, so as to ensure that all receivers can meet the transmission requirements under certain synchronization requirements. As shown in FIG.
  • each Event can be regarded as a CIG
  • each Subevent can be regarded as a CIS
  • an Event can include multiple Subevents.
  • the Bluetooth master device will send data to the Bluetooth slave device, that is, M to S in Figure 2; the Bluetooth slave device will also reply to the Bluetooth master device, that is, S to M in Figure 2. In this way, a Bluetooth master device can communicate with several Bluetooth slave devices at the same time.
  • Figure 3 is an ASE state machine for managing and controlling audio streams.
  • ASE an operation can only be delivered in a certain state.
  • the states shown in Figure 3 are described as follows:
  • connection release state the CIS connection has been destroyed
  • CIS is bidirectional
  • ASE is unidirectional
  • one ASE state machine is only used to manage and control data from one party to the other.
  • the above method of setting priority configuration information not only requires the assistance of other devices other than the earphone, but also needs manual setting by the user, which is complicated and cumbersome.
  • the audio playback device (such as earphones) can realize the setting of priority configuration information without the assistance of other devices.
  • the audio playback setting collects and records user behavior data
  • the user behavior data includes Control the audio playback device to switch and play the data of different audio streams, and then automatically update the priority configuration information based on the user behavior data, realizing the automatic setting and updating of the priority configuration information, without the assistance of other devices, and without manual settings by the user, fully Reduced complexity.
  • the corresponding priority configuration information is set respectively, so that when the audio playback device is in different scene modes, the audio stream can be played and controlled with the priority configuration information suitable for the current scene mode, so that Audio playback control is more accurate and better meets user needs.
  • FIG. 4 shows a flowchart of a method for configuring priorities for audio playback provided by an embodiment of the present application.
  • the method can be applied in the solution implementation environment shown in FIG. 1 , as the execution subject of each step can be the audio playback device 10, the method can include the following steps (410-430):
  • Step 410 determine the target scene mode of the audio playback device.
  • the audio playback device can be in different scene modes, which can be preset and stored in the audio playback device by technicians (such as the staff of the manufacturer of the audio playback device), or can be set and stored in the audio playback device by the user. in the device.
  • Different scenario modes correspond to different usage scenarios and also correspond to different priority requirements.
  • Table 1 scene configuration information is stored in the audio playback device, and the scene configuration information includes the corresponding relationship between the identifier of the scene mode and the name of the scene mode. Among them, the reserved scene modes can be added by users.
  • the audio playback device determines the target scene mode it is currently in, and the target scene mode may be any one of the scene modes configured in the scene configuration information.
  • the audio playback device uses one of the following methods to determine the target scene mode it is in:
  • Method 1 collect user voice data, and identify the user voice data to determine the target scene mode.
  • the user can control the audio playback device to enter a certain target scene mode by voice. For example, when the user says "enter home mode", the audio playback device collects the user's voice data generated by the user's speech, and then recognizes the user's voice data through voice recognition, semantic analysis and other technologies to determine the current target scene mode.
  • Method 2 collect environmental audio data, and identify the environmental audio data to determine the target scene mode.
  • Environmental audio data refers to audio data generated in the environment where the audio playback device is located.
  • at least one feature information corresponding to each scene mode is preset, and the feature information corresponding to the environmental audio data is obtained by identifying the environmental audio data.
  • the feature information corresponding to the environmental audio data corresponds to a certain scene mode
  • the feature information matches it is determined that the matched scene mode is the target scene mode.
  • the feature information corresponding to the family scene mode includes but is not limited to at least one of the following: the volume is greater than a first threshold, there are multiple speakers, and the voices of the speakers appear irregularly, and so on.
  • the specific content of the feature information corresponding to each scene mode is not limited, which can be reasonably set according to requirements.
  • Mode 3 In response to a user operation on the audio playback device, determine a target scene mode based on the user operation. The user can also control the audio playback device to enter a certain target scene mode by touching or tapping the audio playback device. For example, double-tap for home mode, triple-tap for meeting mode, and so on.
  • the above-mentioned control device may be a device such as a mobile phone, a tablet computer, a PC (Personal Computer, personal computer) connected to the audio playback device, or other devices such as a router, which is not limited in this application.
  • a device such as a mobile phone, a tablet computer, a PC (Personal Computer, personal computer) connected to the audio playback device, or other devices such as a router, which is not limited in this application.
  • the method for determining the target scene mode described above is only exemplary and explanatory, and the present application does not limit that the target scene mode may also be determined in other ways.
  • Step 420 acquiring user behavior data generated in the target scene mode, where the user behavior data includes data for controlling the audio playback device to switch and play different audio streams.
  • the user behavior data includes data for controlling a certain audio stream to preempt or not preempt another audio stream for playback.
  • the user behavior data includes data for controlling the audio stream belonging to the target audio stream type, preempting or not preempting other audio streams for playback.
  • the types of audio streams that can be played by the audio playback device may include two types: media and telephony.
  • audio stream types can also be extended to other types or audio streams can be divided from different classification granularities.
  • media can be further subdivided into audio and video calls, Various types such as music playback and video playback, which are not limited in this application.
  • the audio playback device is playing media and a call comes in at this time
  • the user chooses to answer it, record the user behavior data that the phone preempts the media for playback, and if the user chooses to reject the call, record the user behavior that the phone does not preempt the media for playback data.
  • the user behavior data includes data for controlling audio streams from the target connected device, preempting or not preempting other audio streams for playback.
  • the target connection device refers to one connection device among the plurality of connection devices connected to the audio playback device.
  • the audio playback device connects device 1 and device 2, the audio playback device is playing the audio stream from device 1, and the user controls the audio stream from device 2 to preempt the audio stream from device 1 for playback, then record the audio from device 2 The stream preempts the audio stream from device 1 for playback of user behavior data.
  • the user behavior data includes data for controlling the audio stream from the target connected device and belonging to the target audio stream type to preempt or not preempt other audio streams for playback.
  • the audio playback device is playing a phone call from device 1.
  • device 2 has a phone call. If the user chooses to answer the phone call of device 2, the user behavior data that the phone of device 2 preempts the phone of device 1 to play will be recorded. If If the user chooses to reject the phone call of device 2, the user behavior data that the phone of device 2 does not preempt the phone of device 1 to play is recorded.
  • the audio playback device is playing the media from device 1. At this time, device 1 has a phone call.
  • the phone of device 1 will record the user behavior data of playing the media of device 1, If the user chooses to reject the phone call of device 1, the user behavior data that the phone call of device 1 does not seize the media of device 1 for playback is recorded.
  • the audio playback device is playing the media from device 1.
  • device 2 has a phone call. If the user chooses to answer the phone call of device 2, the phone of device 2 will record the user behavior data of playing the media of device 1, If the user chooses to reject the phone call of device 2, the user behavior data that the phone call of device 2 does not seize the media of device 1 for playback is recorded.
  • Step 430 Based on the user behavior data, update the priority configuration information corresponding to the target scene mode, where the priority configuration information is used to configure the priority relationship among multiple audio streams.
  • the audio playback device After acquiring the user behavior data generated in the target scene mode, the audio playback device updates the priority configuration information corresponding to the target scene mode based on the user behavior data.
  • the priority configuration information is used to configure priority relationships among multiple audio stream types.
  • the priority configuration information includes: an identifier of the audio stream type, and a priority value corresponding to the identifier of the audio stream type.
  • audio stream type Identifier of the audio stream type priority value Telephone 0x01 0 media 0x02 0 reserve 0x00 0
  • the priority values corresponding to the identifiers of each audio stream type can be the same, for example, they are all 0; or, in the priority configuration information of initialization settings, the identifiers of each audio stream type correspond to
  • the priority value of can also be different, for example, set according to the default priority value.
  • the priority corresponding to the target audio stream type The level value is updated to increase the priority of the target audio stream type. Taking the larger priority value as an example, the higher the priority, the above update of the priority value corresponding to the target audio stream type may add 1 to the priority value corresponding to the target audio stream type. For example, if the user behavior data includes controlling the phone to preempt the media to play, add 1 to the corresponding priority value of the phone; if the user behavior data includes controlling the phone not to preempt the media to play, then keep the respective priority values of the phone and the media unchanged.
  • priority relationships between different audio stream types can be automatically set based on user behavior data.
  • the priority configuration information is used to configure priority relationships among audio streams of multiple connected devices.
  • the priority configuration information includes: an identifier of the connected device, and a priority value corresponding to the identifier of the connected device.
  • the priority values corresponding to the identifiers of each connected device can be the same, for example, they are all 0; or, in the priority configuration information of initialization settings, the priority values corresponding to the identifiers of each connected device
  • the priority value can also be different, for example, set according to the default priority value.
  • the priority value corresponding to the target connected device Update to elevate the priority of the target connected device. Taking a larger priority value as an example, a higher priority value is used as an example. In the foregoing update of the priority value corresponding to the target connection device, 1 may be added to the priority value corresponding to the target connection device.
  • the user behavior data includes controlling the audio stream from device 2 to preempt the audio stream from device 1 for playback, then add 1 to the corresponding priority value of device 2; the user behavior data includes controlling the audio stream from device 2 not to preempt the audio stream from device 1 1 audio stream, keep the corresponding priority value of each connected device unchanged.
  • priority relationships between audio streams of different connected devices can be automatically set based on user behavior data.
  • the priority configuration information is used to configure the priority relationship between multiple audio stream types, and is used to configure the priority relationship of the same or different audio stream types of different connected devices of the audio playback device.
  • the priority configuration information includes: an identifier of the connected device, an identifier of the audio stream type, and a priority value corresponding to the identifier of the connected device and the identifier of the audio stream type.
  • the priority configuration information includes: a combination identifier and a priority value corresponding to the combination identifier, wherein the combination identifier is used to distinguish between different connection devices and the combination of the audio stream type .
  • combination combination identifier priority value device 1 media 0x01 0 device 1 phone 0x02 0 device 2 media 0x03 0 device 2 phone 0x04 0 reserve 0x00 0
  • the target The priority value corresponding to the target audio stream type of the connected device is updated to increase the priority of the target audio stream type of the target connected device. Taking the larger priority value as an example, the higher the priority, the above update of the priority value corresponding to the target audio stream type of the target connected device may add 1 to the priority value corresponding to the target audio stream type of the target connected device.
  • the priority value corresponding to the phone of the device 2 is increased by 1, and other priority values remain unchanged.
  • the priority value corresponding to the phone of the device 1 is increased by 1, and other priority values remain unchanged.
  • the priority value corresponding to the phone of the device 2 is increased by 1, and other priority values remain unchanged.
  • the priority relationship between different audio stream types of the same connected device can be automatically set, and the priority relationship between the same/different audio stream types of different connected devices can be set automatically.
  • the audio playback device (such as a headset) can realize the setting of priority configuration information without the assistance of other devices.
  • the audio playback setting collects and records user behavior data
  • the user behavior data includes the data that controls the audio playback device to switch and play different audio streams, and then automatically updates the priority configuration information based on the user behavior data, realizing the automatic setting and updating of the priority configuration information without the assistance of other devices or Manual setting by the user fully reduces the complexity.
  • the corresponding priority configuration information is set respectively, so that when the audio playback device is in different scene modes, the audio stream can be played and controlled with the priority configuration information suitable for the current scene mode, so that Audio playback control is more accurate and better meets user needs.
  • the audio playback device implements audio playback control by performing the following steps:
  • Step 510 During the process of playing the first audio stream in the target scene mode, if a playback instruction for the second audio stream is received, determine the first audio stream and the second audio stream according to the priority configuration information corresponding to the target scene mode. Priority relationship between streams.
  • the audio playback device can determine the first audio stream type and the second audio stream type, the first audio stream type refers to the audio stream type to which the first audio stream belongs, and the second audio stream type refers to the audio stream type to which the second audio stream belongs Audio stream type: determine the priority between the first audio stream and the second audio stream according to the priority relationship between the first audio stream type and the second audio stream type defined in the priority configuration information corresponding to the target scene mode relation.
  • the first audio stream refers to an audio stream of a video service between an audio playback device (such as a headset) and a first connection device (such as a notebook computer), and the second audio stream refers to an audio stream between the audio playback device (such as a headset) and the first connection device (such as a notebook computer).
  • the audio stream of the telephone service between two connected devices such as a mobile phone
  • the first audio stream type is media
  • the second audio stream type is telephone, assuming that the priority of the telephone is determined to be higher than that of the media according to the priority configuration information priority, the priority of the second audio stream is higher than that of the first audio stream.
  • the priority configuration information corresponds to the target scene mode, it is used to configure a priority relationship between audio streams of multiple connected devices in the target scene mode.
  • the priority configuration information is shown in Table 3 above.
  • the audio playback device can determine the first connection device and the second connection device, the first connection device refers to the connection device to which the first audio stream belongs, and the second connection device refers to the connection device to which the second audio stream belongs; according to the target
  • the priority relationship between the first connected device and the second connected device defined in the priority configuration information corresponding to the scene mode determines the priority relationship between the first audio stream and the second audio stream.
  • the first audio stream refers to an audio stream of a video service between an audio playback device (such as a headset) and a first connection device (such as a notebook computer), and the second audio stream refers to an audio stream between the audio playback device (such as a headset) and the first connection device (such as a notebook computer).
  • the audio stream of the telephone service between two connected devices such as mobile phones
  • it is determined that the priority of the second connected device is higher than that of the first connected device the priority of the second audio stream is high Priority for the first audio stream.
  • the audio playback device can determine the first combination and the second combination, the first combination refers to the combination of the audio stream type to which the first audio stream belongs and the connection device, and the second combination refers to the audio stream type to which the second audio stream belongs A combination with the connected device; according to the priority relationship between the first combination and the second combination defined in the priority configuration information corresponding to the target scene mode, determine the priority relationship between the first audio stream and the second audio stream.
  • the first audio stream refers to an audio stream of a video service between an audio playback device (such as a headset) and a first connection device (such as a notebook computer), and the second audio stream refers to an audio stream between the audio playback device (such as a headset) and the first connection device (such as a notebook computer).
  • the first combination is media + the first connected device
  • the second combination is the phone + the second connected device.
  • the second combination is determined If the priority of the second combination is higher than that of the first combination, then the priority of the second audio stream is higher than that of the first audio stream.
  • Step 520 if the priority of the second audio stream is higher than that of the first audio stream, pause playing the first audio stream and play the second audio stream.
  • pausing the playback of the first audio stream includes: switching the first state machine from the transmitting state to the stop transmitting state, and the first state machine is a state machine corresponding to the first audio stream; disconnecting the audio playback device from the An audio stream transmission connection between first connected devices, where the first connected device is a device that transmits a first audio stream to an audio playback device.
  • the first state machine is the ASE state machine
  • the transmitting state refers to the state in which the audio stream data has started to be transmitted, such as the Streaming state in the ASE state machine
  • the stop transmission state refers to the state in which the audio stream transmission has stopped, such as the ASE state Disabled status of the machine.
  • the parameter configuration completion state refers to the state in which the two parties of the Bluetooth connection have configured CIG/CIS related parameters, such as the QoS Configured state in the ASE state machine.
  • playing the second audio stream includes: switching the second state machine from the parameter configuration completion state to the connection establishment state, where the second state machine is a state machine corresponding to the second audio stream;
  • the audio stream transmission connection between the two connected devices, the second connected device is a device that transmits the second audio stream to the audio playback device;
  • the second state machine is switched from the connection establishment state to the transmitting state; through the connection with the second connected device
  • the audio stream transmission connection between them receives the second audio stream from the second connected device; and plays the received second audio stream.
  • the second state machine can also be an ASE state machine
  • the parameter configuration completion state refers to the state in which the two parties of the Bluetooth connection have configured CIG/CIS related parameters, such as the QoS Configured state in the ASE state machine
  • the connection establishment state is Refers to the state in which the CIS connection and data path used to transmit the audio stream have been established, such as the enabling state in the ASE state machine
  • the transmitting state refers to the state in which the audio stream data has begun to be transmitted, such as the streaming state in the ASE state machine.
  • the audio playback device may also play prompt information in audio form, prompting the user to select the first audio stream or the second audio stream for playback.
  • the user feeds back the audio stream to be played in voice form according to the prompt information, and the audio playback device determines the audio stream to be played through voice collection and semantic recognition.
  • the audio playback device can determine the priority relationship between each audio stream based on the priority configuration information, so as to The playback and switching of audio streams are automatically controlled, so that audio can be played more intelligently in multi-connection scenarios.
  • the technical solution of the present application will be exemplarily introduced and described by taking the audio playback device as an earphone, the first connection device as a notebook computer, and the second connection device as a mobile phone as an example.
  • Step 601 the headset creates a default priority attribute table.
  • the headset creates a default priority attribute table (that is, the priority configuration information described above) according to the format of Table 2, assuming that the priority of the phone is the highest.
  • Step 602 establish a connection between the mobile phone and the headset through BLE (Bluetooth Low Energy, Bluetooth Low Energy).
  • BLE Bluetooth Low Energy, Bluetooth Low Energy
  • step 603 the earphone creates three ASE state machines for the mobile phone, and the initial states of the three ASE state machines are all in the Idle state.
  • each audio stream corresponds to an ASE state machine, which is used to manage and control the audio stream.
  • ASE state machine For mobile phones, there are requirements for making calls and playing media, and three ASE state machines need to be created. Among them, one ASE state machine is used to receive the phone audio stream of the mobile phone, marked as ASE0_0, the other ASE state machine is used to transmit the audio stream of the microphone to the mobile phone, marked as ASE0_1, and another ASE state machine is used for media playback, marked as for ASE0_2.
  • Step 604 the mobile phone and the earphone interact with the audio codec capability to configure the audio codec and decoder.
  • step 605 a connection is established between the notebook computer and the earphone through BLE.
  • Step 606 the earphone creates an ASE state machine for the notebook computer, and the initial state of the ASE state machine is the Idle state.
  • Step 607 the notebook computer and the earphone interact with the audio codec capability to configure the audio codec and decoder.
  • the headset For each ASE state machine created, the headset needs to initialize it. As shown in Figure 7, in the initialization phase of the ASE state machine, the following steps (701-706) are included:
  • Step 701 after the BLE is connected, the initial state of the ASE state machine is the Idle state.
  • the mobile phone determines the audio codec capabilities supported by both parties (the mobile phone and the headset).
  • Step 703 the mobile phone configures its own audio codec capability, and then sends an audio codec configuration command to the earphone.
  • Step 704 after the earphone receives the audio codec configuration instruction, configure its own audio codec capability, then switch the ASE state machine from the initial state to the codec configuration completion state (that is, switch from the Idle state to the Codec Configured state), and send to The mobile phone sends the CIS configuration parameters supported by the headset.
  • Step 705 After the mobile phone receives the CIS configuration parameters sent by the headset, it determines the CIS configuration parameters supported by both parties, then configures its own CIS, and sends a QoS configuration command to the headset, and the QoS configuration command is used to instruct the headset to configure its own CIS , the QoS configuration instruction includes the CIS parameters configured by the mobile phone.
  • Step 706 after the earphone receives the QoS configuration instruction, switch the ASE state machine from the codec configuration completion state to the parameter configuration completion state (that is, switch from the Codec Configured state to the QoS Configured state), and save the CIS configuration parameters sent by the mobile phone.
  • the earphone can automatically set and update the priority attribute table (that is, the priority configuration information mentioned above) based on the user behavior data in the manner described in the above embodiments.
  • Step 801 when the notebook computer connected to the earphone wants to play media (such as music or video), the notebook computer will send an enable (Enable) command to the earphone, and the parameters carried in the activation command include that the audio stream type currently to be transmitted is media .
  • media such as music or video
  • Step 802 After receiving the activation instruction, the earphone switches the state machine ASE1_0 in the parameter configuration completed state (QoS_Configured state) to the connection establishment state (Enabling state).
  • step 803 the laptop computer sends an instruction to create a CIS to the headset, and a CIS connection is established between the laptop computer and the headset.
  • Step 804 after the headset preparation (configuration of CIS related parameters) is completed, it can automatically send the receiver start ready (Receiver Start Ready) command to itself, and switch the state machine ASE1_0 from the connection establishment state (Enabling state) to the transmitting state (Streaming state) status), and notify the laptop.
  • the receiver start ready Receiver Start Ready
  • the state machine ASE1_0 from the connection establishment state (Enabling state) to the transmitting state (Streaming state) status
  • Step 805 after receiving the notification, the notebook computer starts to transmit the audio stream data of the media.
  • Step 806 when the earphone is currently playing the media in the notebook computer, if the earphone receives an activation (Enable) instruction from the mobile phone, the priority attribute table is retrieved, if the audio stream type (such as a phone) priority in the activation instruction is greater than the current The type of audio stream to play, continue the following operations, otherwise ignore the activation command.
  • an activation (Enable) instruction from the mobile phone
  • the priority attribute table is retrieved, if the audio stream type (such as a phone) priority in the activation instruction is greater than the current The type of audio stream to play, continue the following operations, otherwise ignore the activation command.
  • step 807 the headset automatically sends a Disable command to itself, switches the state machine ASE1_0 from the streaming state (Streaming state) to the stopping transmission state (Disabling state), and terminates the CIS connection between the headset and the notebook.
  • Step 808 the earphone automatically sends the receiver stop ready (Receiver Stop Ready) command to itself, and switches the state machine ASE1_0 from the stop transmission state (Disabling state) to the parameter configuration completion state (QoS_Configured state).
  • the enable command is a standard command in LE Audio, which will carry parameters related to the context (Context) in the metadata (Metadata), which is defined as an audio stream type in this technical solution.
  • different priority attribute tables may be set for different scene modes.
  • the audio playback device determines the priority attribute table corresponding to the target scene mode from the multiple stored priority attribute tables. For example, for conference scenarios and non-conference scenarios, corresponding priority attribute tables are set respectively.
  • the priority attribute table corresponding to the meeting scene the priority of the media is higher than the priority of the phone; in the priority attribute table corresponding to the non-conference scene, the priority of the phone is higher than the priority of the media.
  • an appropriate priority attribute table can be used in different scenarios to determine the priority relationship between audio streams, so that the determination of the priority is adapted to the scenario and better meets the actual needs of the user.
  • the audio playback device in response to an instruction to enable the automatic switching function, enables the automatic switching function, which refers to the function of automatically switching audio streams for playback according to the priority configuration information that meets the available conditions; wherein , the available condition means that the priority configuration information is generated based on user behavior data within a specific period of time.
  • the user can independently choose to enable or disable the automatic switching function.
  • the audio playback device can determine the priority between different audio streams based on the priority configuration information in the manner described in the above embodiment. relationship; when the automatic switching function is turned off, the audio playback device can prompt the user to manually select different audio streams for switching and playing.
  • the priority configuration information can be used only when the available conditions are met, so as to ensure the accuracy of the priority configuration information and avoid audio switching control errors as much as possible. For example, if a person develops a habit in 21 days, after collecting 21 days of user behavior data, priority configuration information that meets the available conditions can be generated based on the 21 days of user behavior data, and then the user is prompted whether to enable the automatic switching function.
  • FIG. 9 shows a block diagram of an apparatus for configuring priorities for audio playback provided by an embodiment of the present application.
  • the device has the function of realizing the above-mentioned method example, and the function may be realized by hardware, or may be realized by executing corresponding software by the hardware.
  • the apparatus may be the audio playback device described above, or may be set in the audio playback device.
  • the device 900 includes: a mode determination module 910 , a data acquisition module 920 and a configuration update module 930 .
  • the mode determination module 910 is configured to determine the target scene mode of the audio playback device.
  • the data acquisition module 920 is configured to acquire user behavior data generated in the target scene mode, where the user behavior data includes data for controlling the audio playback device to switch and play different audio streams.
  • the configuration updating module 930 is configured to update priority configuration information corresponding to the target scene mode based on the user behavior data, where the priority configuration information is used to configure priority relationships among various audio streams.
  • the priority configuration information is used to configure the priority relationship between multiple audio stream types, and the priority configuration information includes: the identifier of the audio stream type, and the audio The priority value corresponding to the stream type identifier.
  • the configuration update module 930 is configured to: if the user behavior data includes data that controls the audio stream belonging to the target audio stream type and preempts other audio streams for playback, then update the corresponding audio stream of the target scene mode In the priority configuration information, the priority value corresponding to the target audio stream type is updated.
  • the priority configuration information is used to configure the priority relationship between multiple audio stream types, and to configure the priority of the same or different audio stream types of different connected devices of the audio playback device. level relationship.
  • the priority configuration information includes: the identifier of the connected device, the identifier of the audio stream type, and the identifier corresponding to the identifier of the connected device and the identifier of the audio stream type the priority value;
  • the priority configuration information includes: a combination identifier and a priority value corresponding to the combination identifier, wherein the combination identifier is used to distinguish between different combinations of the connection device and the audio stream type .
  • the configuration update module 930 is configured to, if the user behavior data includes data that controls the audio stream from the target connected device and belongs to the target audio stream type to preempt other audio streams for playback, then update the In the priority configuration information corresponding to the target scene mode, the priority value corresponding to the target audio stream type of the target connection device is updated.
  • the mode determining module 910 is configured to collect user voice data, identify the user voice data to determine the target scene mode; or collect environmental audio data, and perform Identify and determine the target scene mode; or, in response to a user operation on the audio playback device, determine the target scene mode based on the user operation; or receive scene switching information from the control device, and switch according to the scene information identifying the target scene mode.
  • the apparatus 900 further includes: a priority determination module 940 and a playback control module 950 .
  • the priority determination module 940 is configured to, during the process of playing the first audio stream in the target scene mode, if a playback instruction for the second audio stream is received, according to the priority configuration information corresponding to the target scene mode, A priority relationship between the first audio stream and the second audio stream is determined.
  • the play control module 950 is configured to pause playing the first audio stream and play the second audio stream if the priority of the second audio stream is higher than the priority of the first audio stream.
  • the playback control module 950 is configured to:
  • the first connection device is a device for transmitting the first audio stream to the audio playback device.
  • the playback control module 950 is further configured to switch the first state machine from the transmission stop state to parameter configuration after switching the first state machine from the transmission state to the transmission stop state finished condition.
  • the playback control module 950 is further configured to:
  • the second state machine being a state machine corresponding to the second audio stream
  • the second connection device is a device that transmits the second audio stream to the audio playback device
  • the device 900 further includes: a function enabling module 960 .
  • the function enabling module 960 is configured to enable the automatic switching function in response to the enabling instruction of the automatic switching function, and the automatic switching function refers to the function of automatically switching audio streams for playing according to the priority configuration information that meets the available conditions ;
  • the availability condition means that the priority configuration information is generated based on user behavior data within a specific period of time.
  • the audio playback device (such as a headset) can realize the setting of priority configuration information without the assistance of other devices.
  • the audio playback setting collects and records user behavior data
  • the user behavior data includes the data that controls the audio playback device to switch and play different audio streams, and then automatically updates the priority configuration information based on the user behavior data, realizing the automatic setting and updating of the priority configuration information without the assistance of other devices or Manual setting by the user fully reduces the complexity.
  • the corresponding priority configuration information is set respectively, so that when the audio playback device is in different scene modes, the audio stream can be played and controlled with the priority configuration information suitable for the current scene mode, so that Audio playback control is more accurate and better meets user needs.
  • the division of the above-mentioned functional modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional modules according to the needs.
  • the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
  • the device and the method embodiment provided by the above embodiment belong to the same idea, and the specific implementation process thereof is detailed in the method embodiment, and will not be repeated here.
  • FIG. 11 shows a structural block diagram of an audio playback device provided by an embodiment of the present application.
  • the audio playback device can be used to realize the functions of the above-mentioned priority configuration method for audio playback.
  • the audio playback device 110 may include: a processor 111 , a receiver 112 , a transmitter 113 , a memory 114 and a bus 115 .
  • the processor 111 includes one or more processing cores, and the processor 101 executes various functional applications and information processing by running software programs and modules.
  • the receiver 112 and the transmitter 113 can be implemented as a communication component, which can be a communication chip.
  • the memory 114 is connected to the processor 111 through the bus 115 .
  • the memory 114 may be used to store a computer program, and the processor 111 is used to execute the computer program, so as to implement various steps in the foregoing method embodiments.
  • memory 114 can be realized by any type of volatile or nonvolatile storage device or their combination, and volatile or nonvolatile storage device includes but not limited to: RAM (Random-Access Memory, random access memory) And ROM (Read-Only Memory, read-only memory), EPROM (Erasable Programmable Read-Only Memory, erasable programmable read-only memory), EEPROM (Electrically Erasable Programmable Read-Only Memory, electrically erasable programmable read-only memory memory), flash memory or other solid-state storage technology, CD-ROM (Compact Disc Read-Only Memory, CD-ROM), DVD (Digital Video Disc, high-density digital video disc) or other optical storage, tape cartridges, tapes, disks storage or other magnetic storage devices.
  • RAM Random-Access Memory, random access memory
  • ROM Read-Only Memory, read-only memory
  • EPROM Erasable Programmable Read-Only Memory, erasable programmable read-only memory
  • EEPROM Electrically Eras
  • a computer-readable storage medium is also provided, and a computer program is stored in the storage medium.
  • the computer program is executed by a processor of an audio playback device, the above-mentioned requirements for audio playback are realized. priority configuration method.
  • the computer-readable storage medium may include: ROM, RAM, SSD (Solid State Drives, solid state disk) or optical disc, etc.
  • the random access memory may include ReRAM (Resistance Random Access Memory, resistive random access memory) and DRAM (Dynamic Random Access Memory, dynamic random access memory).
  • a computer program product or computer program comprising computer instructions stored in a computer readable storage medium.
  • the processor of the audio playback device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the audio playback device executes the above audio playback priority configuration method.
  • the "plurality” mentioned herein refers to two or more than two.
  • “And/or” describes the association relationship of associated objects, indicating that there may be three types of relationships, for example, A and/or B may indicate: A exists alone, A and B exist simultaneously, and B exists independently.
  • the character "/” generally indicates that the contextual objects are an "or” relationship.
  • the numbering of the steps described herein only exemplarily shows a possible sequence of execution among the steps. In some other embodiments, the above-mentioned steps may not be executed according to the order of the numbers, such as two different numbers The steps are executed at the same time, or two steps with different numbers are executed in the reverse order as shown in the illustration, which is not limited in this embodiment of the present application.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Security & Cryptography (AREA)
  • Telephone Function (AREA)
  • Telephonic Communication Services (AREA)

Abstract

A priority configuration method and apparatus for audio playing, and a device and a storage medium, which relate to the technical field of media playing. The method comprises: determining a target scenario mode of an audio playing device (410); acquiring user behavior data generated in the target scenario mode, wherein the user behavior data comprises data for controlling the audio playing device to switch the playing of different audio streams (420); and on the basis of the user behavior data, updating priority configuration information corresponding to the target scenario mode, wherein the priority configuration information is used for configuring the priority relationship between a variety of audio streams (430). By means of the method, automatic setting and updating of priority configuration information are realized without the assistance of other devices and manual setting by a user, thereby fully reducing the complexity. In addition, for different scenario modes, corresponding priority configuration information is set, such that audio playing control is more accurate, and user requirements are better satisfied.

Description

针对音频播放的优先级配置方法、装置、设备及存储介质Priority configuration method, device, equipment and storage medium for audio playback
本申请要求于2021年07月22日提交的申请号为202110831393.0、发明名称为“针对音频播放的优先级配置方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202110831393.0 and the invention title "Priority configuration method, device, equipment and storage medium for audio playback" submitted on July 22, 2021, the entire content of which is by reference incorporated in this application.
技术领域technical field
本申请实施例涉及媒体播放技术领域,特别涉及一种针对音频播放的优先级配置方法、装置、设备及存储介质。The embodiments of the present application relate to the technical field of media playing, and in particular to a priority configuration method, device, device and storage medium for audio playing.
背景技术Background technique
目前,一副耳机能够与多台设备(如手机、平板电脑、笔记本电脑等)之间建立无线连接。耳机可以根据预先存储的优先级配置信息,决定将哪个设备上的音频流播放出来。Currently, a pair of headphones is capable of establishing wireless connections between multiple devices such as mobile phones, tablets, laptops, and more. The earphone can decide which device to play the audio stream according to the pre-stored priority configuration information.
由于耳机并不具备显示屏,因此用户无法直接在耳机上设置上述优先级配置信息。在相关技术中,用户在耳机连接的设备(如手机)上设置上述优先级配置信息,然后通过该设备将优先级配置信息发送给耳机,耳机存储该优先级配置信息。Since the headset does not have a display screen, the user cannot directly set the above priority configuration information on the headset. In the related technology, the user sets the priority configuration information on the device (such as a mobile phone) connected to the headset, and then sends the priority configuration information to the headset through the device, and the headset stores the priority configuration information.
发明内容Contents of the invention
本申请实施例提供了一种针对音频播放的优先级配置方法、装置、设备及存储介质。所述技术方案如下:Embodiments of the present application provide a priority configuration method, device, device and storage medium for audio playback. Described technical scheme is as follows:
根据本申请实施例的一个方面,提供了一种针对音频播放的优先级配置方法,所述方法由音频播放设备执行,所述方法包括:According to an aspect of the embodiment of the present application, a method for configuring priority for audio playback is provided, the method is performed by an audio playback device, and the method includes:
确定所述音频播放设备所处的目标场景模式;Determine the target scene mode where the audio playback device is located;
获取在所述目标场景模式下产生的用户行为数据,所述用户行为数据包括控制所述音频播放设备切换播放不同音频流的数据;Acquiring user behavior data generated in the target scene mode, the user behavior data includes data for controlling the audio playback device to switch and play different audio streams;
基于所述用户行为数据,对所述目标场景模式对应的优先级配置信息进行更新,所述优先级配置信息用于配置多种音频流之间的优先级关系。Based on the user behavior data, the priority configuration information corresponding to the target scene mode is updated, and the priority configuration information is used to configure priority relationships among multiple audio streams.
根据本申请实施例的一个方面,提供了一种针对音频播放的优先级配置装置,所述装置包括:According to an aspect of the embodiment of the present application, there is provided a priority configuration device for audio playback, the device comprising:
模式确定模块,用于确定音频播放设备所处的目标场景模式;A mode determination module, configured to determine the target scene mode where the audio playback device is located;
数据获取模块,用于获取在所述目标场景模式下产生的用户行为数据,所述用户行为数据包括控制所述音频播放设备切换播放不同音频流的数据;A data acquisition module, configured to acquire user behavior data generated in the target scene mode, where the user behavior data includes data for controlling the audio playback device to switch and play different audio streams;
配置更新模块,用于基于所述用户行为数据,对所述目标场景模式对应的优先级配置信息进行更新,所述优先级配置信息用于配置多种音频流之间的优先级关系。A configuration updating module, configured to update priority configuration information corresponding to the target scene mode based on the user behavior data, where the priority configuration information is used to configure priority relationships among various audio streams.
根据本申请实施例的一个方面,提供了一种音频播放设备,所述音频播放设备包括处理器和存储器,所述存储器中存储有计算机程序,所述计算机程序由所述处理器执行,以实现上述针对音频播放的优先级配置方法。According to an aspect of the embodiments of the present application, an audio playback device is provided, the audio playback device includes a processor and a memory, a computer program is stored in the memory, and the computer program is executed by the processor to realize The above-mentioned priority configuration method for audio playback.
根据本申请实施例的一个方面,提供了一种计算机可读存储介质,所述存储介质中存储有计算机程序,所述计算机程序由处理器执行,以实现上述针对音频播放的优先级配置方法。According to an aspect of an embodiment of the present application, a computer-readable storage medium is provided, and a computer program is stored in the storage medium, and the computer program is executed by a processor, so as to implement the above-mentioned priority configuration method for audio playback.
根据本申请实施例的一个方面,提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。音频播放设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该音频播放设备执行上述针对音频播放的优先级配置方法。According to an aspect of the embodiments of the present application, a computer program product or computer program is provided, the computer program product or computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the audio playback device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the audio playback device executes the above-mentioned priority configuration method for audio playback.
附图说明Description of drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings that need to be used in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. For those skilled in the art, other drawings can also be obtained based on these drawings without creative effort.
图1是本申请一个实施例提供的方案实施环境的示意图;Fig. 1 is a schematic diagram of a scheme implementation environment provided by an embodiment of the present application;
图2是本申请一个实施例提供的LE Audio(Low Energy Audio,低功耗音频)中时间片划分的示意图;Fig. 2 is a schematic diagram of time slice division in LE Audio (Low Energy Audio, low power consumption audio) provided by an embodiment of the present application;
图3是本申请一个实施例提供的ASE(Audio Stream Endpoint,音频数据流端点)状态机的状态转换的示意图;Fig. 3 is the schematic diagram of the state transition of the ASE (Audio Stream Endpoint, audio data stream end point) state machine provided by one embodiment of the present application;
图4是本申请一个实施例提供的针对音频播放的优先级配置方法的流程图;Fig. 4 is a flowchart of a priority configuration method for audio playback provided by an embodiment of the present application;
图5是本申请一个实施例提供的音频播放控制方法的流程图;FIG. 5 is a flowchart of an audio playback control method provided by an embodiment of the present application;
图6是本申请一个实施例提供的连接建立阶段的流程图;FIG. 6 is a flow chart of the connection establishment phase provided by an embodiment of the present application;
图7是本申请一个实施例提供的ASE状态机的初始化阶段的流程图;Fig. 7 is a flow chart of the initialization stage of the ASE state machine provided by one embodiment of the present application;
图8是本申请一个实施例提供的音频流播放和切换阶段的流程图;FIG. 8 is a flow chart of the audio stream playing and switching stages provided by an embodiment of the present application;
图9是本申请一个实施例提供的针对音频播放的优先级配置装置的框图;Fig. 9 is a block diagram of a priority configuration device for audio playback provided by an embodiment of the present application;
图10是本申请另一个实施例提供的针对音频播放的优先级配置装置的框图;FIG. 10 is a block diagram of a device for configuring priorities for audio playback provided by another embodiment of the present application;
图11是本申请一个实施例提供的音频播放设备的结构框图。Fig. 11 is a structural block diagram of an audio playback device provided by an embodiment of the present application.
具体实施方式detailed description
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。In order to make the purpose, technical solution and advantages of the present application clearer, the implementation manners of the present application will be further described in detail below in conjunction with the accompanying drawings.
请参考图1,其示出了本申请一个实施例提供的方案实施环境的示意图。该方案实施环境可以包括音频播放设备10和多个连接设备20。Please refer to FIG. 1 , which shows a schematic diagram of a solution implementation environment provided by an embodiment of the present application. The solution implementation environment may include an audio playback device 10 and multiple connection devices 20 .
音频播放设备10是指具备音频播放能力的电子设备。例如,音频播放设备10可以是耳机、音箱等电子设备。在一个示例中,音频播放设备10可以是TWS(True Wireless Stereo,真无线立体声)耳机。The audio playing device 10 refers to an electronic device capable of playing audio. For example, the audio playback device 10 may be electronic devices such as earphones and speakers. In an example, the audio playback device 10 may be a TWS (True Wireless Stereo, true wireless stereo) earphone.
连接设备20是指与音频播放设备10之间进行通信连接的电子设备。例如,连接设备20可以是手机、平板电脑、笔记本电脑、台式电脑、多媒体播放设备、可穿戴设备等电子设备。在一些场景中,音频播放设备10能够与多个连接设备20建立通信连接。例如在图1所示场景中,音频播放设备10为耳机,该耳机与手机、平板电脑、笔记本电脑等多个连接设备20建立通信连接。连接设备20可以通过上述通信连接向音频播放设备10发送音频流,然后由音频播放设备10对该音频流进行解码播放。The connection device 20 refers to an electronic device that communicates with the audio playback device 10 . For example, the connection device 20 may be an electronic device such as a mobile phone, a tablet computer, a notebook computer, a desktop computer, a multimedia playback device, or a wearable device. In some scenarios, the audio playback device 10 can establish communication connections with multiple connection devices 20 . For example, in the scenario shown in FIG. 1 , the audio playback device 10 is an earphone, and the earphone establishes a communication connection with multiple connection devices 20 such as a mobile phone, a tablet computer, and a notebook computer. The connection device 20 may send an audio stream to the audio playback device 10 through the communication connection, and then the audio playback device 10 decodes and plays the audio stream.
在一些实施例中,音频播放设备10与连接设备20之间的通信连接为无线通信连接。例如,音频播放设备10与连接设备20之间的通信连接为蓝牙连接。In some embodiments, the communication connection between the audio playback device 10 and the connection device 20 is a wireless communication connection. For example, the communication connection between the audio playback device 10 and the connection device 20 is a Bluetooth connection.
在一些实施例中,音频播放设备10与连接设备20之间通过蓝牙LE Audio技术(以下简称LE Audio)进行通信。LE Audio是一种蓝牙音频技术标准。LE Audio中提出了CIG(Connected Isochronous Group,连接同步组)/CIS(Connected Isochronous Stream,连接同步流)的概念,用于传输音频流。简单地说,定义了一个有时间依赖的数据的传输通道和传输策略。即,针对单发多收场景,通过协议确定了发送方和接收方如何分配发送和接收时间片,从而保证所有的接收方都能在一定的同步要求下满足传输要求。如图2所示,对于每一个Event(事件)可以看作一个CIG,其中每一个Subevent(子事件)可以看作是一个CIS,一个Event可以包括多个Subevent。在每个CIS中,蓝牙主设备会向蓝牙从设备发送数据,即图2中的M to S;蓝牙从设备也会回复蓝牙主设备,即图2中的S to M。这样,一个蓝牙主设备就可以同时和若干个蓝牙从设备进行通信。In some embodiments, the audio playback device 10 and the connection device 20 communicate through Bluetooth LE Audio technology (hereinafter referred to as LE Audio). LE Audio is a Bluetooth audio technology standard. The concept of CIG (Connected Isochronous Group, Connection Synchronization Group)/CIS (Connected Isochronous Stream, Connection Synchronization Stream) is proposed in LE Audio, which is used to transmit audio streams. Simply put, a transmission channel and transmission strategy for time-dependent data are defined. That is, for the single-send-multiple-receive scenario, the protocol determines how the sender and receiver allocate sending and receiving time slices, so as to ensure that all receivers can meet the transmission requirements under certain synchronization requirements. As shown in FIG. 2 , each Event (event) can be regarded as a CIG, and each Subevent (subevent) can be regarded as a CIS, and an Event can include multiple Subevents. In each CIS, the Bluetooth master device will send data to the Bluetooth slave device, that is, M to S in Figure 2; the Bluetooth slave device will also reply to the Bluetooth master device, that is, S to M in Figure 2. In this way, a Bluetooth master device can communicate with several Bluetooth slave devices at the same time.
LE Audio中提出了ASE的概念,用于控制音频流。图3是用于管理控制音频流的ASE状态机。对于ASE,一个操作只能在一定的状态下才能下发。图3所示的状态描述如下:The concept of ASE is proposed in LE Audio to control the audio stream. Figure 3 is an ASE state machine for managing and controlling audio streams. For ASE, an operation can only be delivered in a certain state. The states shown in Figure 3 are described as follows:
Idle,初始状态;Idle, the initial state;
Codec Configured(编解码配置完成状态),蓝牙连接的两方已配置音频流编解码能力;Codec Configured (codec configuration complete status), the two parties connected by Bluetooth have configured the audio stream codec capability;
QoS Configured(参数配置完成状态),蓝牙连接的两方已配置CIG/CIS相关的参数;QoS Configured (parameter configuration completed state), the two parties of the Bluetooth connection have configured CIG/CIS related parameters;
Enabling(连接建立状态),用于传输音频流的CIS连接和数据通路已建立;Enabling (connection establishment status), the CIS connection and data path for transmitting audio streams have been established;
Streaming(正在传输状态),音频流数据已开始传输;Streaming (transmitting state), the audio stream data has started to transmit;
Disabling(停止传输状态),音频流传输已停止;Disabling (stop transmission status), audio streaming has stopped;
Releasing(连接释放状态),CIS连接已销毁;Releasing (connection release state), the CIS connection has been destroyed;
对于上述CIS和ASE,CIS是双向的,ASE是单向的,一个ASE状态机只用于管理控制从一方到另一方的数据。For the above CIS and ASE, CIS is bidirectional, ASE is unidirectional, and one ASE state machine is only used to manage and control data from one party to the other.
然而,上述设置优先级配置信息的方式,不仅需要耳机之外的其他设备协助,还需要用户手动设置,较为复杂繁琐。However, the above method of setting priority configuration information not only requires the assistance of other devices other than the earphone, but also needs manual setting by the user, which is complicated and cumbersome.
本申请实施例提供的技术方案,音频播放设备(如耳机)无需其他设备的辅助,即可实现优先级配置信息的设置,具体地,音频播放设置通过采集记录用户行为数据,该用户行为数据包括控制音频播放设备切换播放不同音频流的数据,然后基于该用户行为数据自动化地更新优先级配置信息,实现了优先级配置信息的自动化设置与更新,无需其他设备辅助,也无需用户手动设置,充分降低了复杂度。另外,针对不同的场景模式,分别设置对应的优先级配置信息,从而在音频播放设备处于不同场景模式下,能够以适合当前所处的场景模式的优先级配置信息对音频流进行播放控制,使得音频播放控制更加地准确,更好地满足用户需求。According to the technical solution provided by the embodiment of the present application, the audio playback device (such as earphones) can realize the setting of priority configuration information without the assistance of other devices. Specifically, the audio playback setting collects and records user behavior data, and the user behavior data includes Control the audio playback device to switch and play the data of different audio streams, and then automatically update the priority configuration information based on the user behavior data, realizing the automatic setting and updating of the priority configuration information, without the assistance of other devices, and without manual settings by the user, fully Reduced complexity. In addition, for different scene modes, the corresponding priority configuration information is set respectively, so that when the audio playback device is in different scene modes, the audio stream can be played and controlled with the priority configuration information suitable for the current scene mode, so that Audio playback control is more accurate and better meets user needs.
下面,通过几个实施例对本申请技术方案进行介绍说明。In the following, the technical solution of the present application will be described through several embodiments.
请参考图4,其示出了本申请一个实施例提供的针对音频播放的优先级配置方法的流程图。该方法可应用于图1所示的方案实施环境中,如各步骤的执行主体可以是音频播放设备10,该方法可以包括以下几个步骤(410~430):Please refer to FIG. 4 , which shows a flowchart of a method for configuring priorities for audio playback provided by an embodiment of the present application. The method can be applied in the solution implementation environment shown in FIG. 1 , as the execution subject of each step can be the audio playback device 10, the method can include the following steps (410-430):
步骤410,确定音频播放设备所处的目标场景模式。 Step 410, determine the target scene mode of the audio playback device.
音频播放设备可以处于不同的场景模式中,该场景模式可以由技术人员(如音频播放设备的生产厂家的工作人员)预先设置并存储在音频播放设备中,也可以由用户设置并存储在音频播放设备中。不同的场景模式对应于不同的使用场景,也对应着不同的优先级需求。示例性地,如下表1所示,音频播放设备中存储有场景配置信息,该场景配置信息包括场景模式的标志符和场景模式的名称之间的对应关系。其中,预留的场景模式可供用户自定义添加。The audio playback device can be in different scene modes, which can be preset and stored in the audio playback device by technicians (such as the staff of the manufacturer of the audio playback device), or can be set and stored in the audio playback device by the user. in the device. Different scenario modes correspond to different usage scenarios and also correspond to different priority requirements. Exemplarily, as shown in Table 1 below, scene configuration information is stored in the audio playback device, and the scene configuration information includes the corresponding relationship between the identifier of the scene mode and the name of the scene mode. Among them, the reserved scene modes can be added by users.
表1Table 1
场景模式scene mode 标志符identifier
家庭family 0x010x01
会议Meeting 0x020x02
工作Work 0x030x03
开车drive 0x040x04
预留reserve 0x000x00
音频播放设备确定自身当前所处的目标场景模式,该目标场景模式可以是场景配置信息中配置的场景模式中的任意一种。The audio playback device determines the target scene mode it is currently in, and the target scene mode may be any one of the scene modes configured in the scene configuration information.
在一些实施例中,音频播放设备采用如下方式之一确定自身所处的目标场景模式:In some embodiments, the audio playback device uses one of the following methods to determine the target scene mode it is in:
方式一:采集用户语音数据,对用户语音数据进行识别确定目标场景模式。用户可以通过语音控制音频播放设备进入到某一目标场景模式。例如,用户说“进入家庭模式”,音频播放设备采集用户说话所产生的用户语音数据,然后通过语音识别、语义分析等技术,对用户语音数据进行识别,确定当前所处的目标场景模式。Method 1: collect user voice data, and identify the user voice data to determine the target scene mode. The user can control the audio playback device to enter a certain target scene mode by voice. For example, when the user says "enter home mode", the audio playback device collects the user's voice data generated by the user's speech, and then recognizes the user's voice data through voice recognition, semantic analysis and other technologies to determine the current target scene mode.
方式二:采集环境音频数据,对环境音频数据进行识别确定目标场景模式。环境音频数 据是指音频播放设备所处的环境中产生的音频数据。示例性地,预先设定每一种场景模式分别对应的至少一项特征信息,识别环境音频数据得到该环境音频数据对应的特征信息,当环境音频数据对应的特征信息与某一场景模式对应的特征信息相匹配时,确定该匹配的场景模式即为目标场景模式。例如,家庭场景模式对应的特征信息包括但不限于以下至少之一:音量大于第一阈值、说话人数量为多个且说话人声不规则出现,等等。在本申请实施例中,对每一种场景模式对应的特征信息的具体内容不作限定,这可以根据需求进行合理设定。Method 2: collect environmental audio data, and identify the environmental audio data to determine the target scene mode. Environmental audio data refers to audio data generated in the environment where the audio playback device is located. Exemplarily, at least one feature information corresponding to each scene mode is preset, and the feature information corresponding to the environmental audio data is obtained by identifying the environmental audio data. When the feature information corresponding to the environmental audio data corresponds to a certain scene mode When the feature information matches, it is determined that the matched scene mode is the target scene mode. For example, the feature information corresponding to the family scene mode includes but is not limited to at least one of the following: the volume is greater than a first threshold, there are multiple speakers, and the voices of the speakers appear irregularly, and so on. In the embodiment of the present application, the specific content of the feature information corresponding to each scene mode is not limited, which can be reasonably set according to requirements.
方式三:响应于针对音频播放设备的用户操作,基于用户操作确定目标场景模式。用户也可以通过触摸、敲击音频播放设备的形式,控制音频播放设备进入到某一目标场景模式。例如,双连击进入家庭模式、三连击进入会议模式,等等。Mode 3: In response to a user operation on the audio playback device, determine a target scene mode based on the user operation. The user can also control the audio playback device to enter a certain target scene mode by touching or tapping the audio playback device. For example, double-tap for home mode, triple-tap for meeting mode, and so on.
方式四:接收来自控制设备的场景切换信息,根据场景切换信息确定目标场景模式。用户还可以通过控制设备向音频播放设备发送场景切换信息,该场景切换信息中可以包括切换至的目标场景模式的标志符,音频播放设备根据该场景切换信息确定目标场景模式。上述控制设备可以是与音频播放设备相连的手机、平板电脑、PC(Personal Computer,个人计算机)等设备,也可以是路由器等其他设备,本申请对此不作限定。Way 4: Receive scene switching information from the control device, and determine the target scene mode according to the scene switching information. The user may also send scene switching information to the audio playback device through the control device, the scene switching information may include an identifier of the target scene mode to switch to, and the audio playback device determines the target scene mode according to the scene switching information. The above-mentioned control device may be a device such as a mobile phone, a tablet computer, a PC (Personal Computer, personal computer) connected to the audio playback device, or other devices such as a router, which is not limited in this application.
上文介绍的确定目标场景模式的方式仅是示例性和解释性的,本申请并不限定还可以采用其他方式确定目标场景模式。The method for determining the target scene mode described above is only exemplary and explanatory, and the present application does not limit that the target scene mode may also be determined in other ways.
步骤420,获取在目标场景模式下产生的用户行为数据,该用户行为数据包括控制音频播放设备切换播放不同音频流的数据。 Step 420, acquiring user behavior data generated in the target scene mode, where the user behavior data includes data for controlling the audio playback device to switch and play different audio streams.
用户行为数据包括控制某一音频流抢占或不抢占另一音频流进行播放的数据。The user behavior data includes data for controlling a certain audio stream to preempt or not preempt another audio stream for playback.
示例性地,用户行为数据包括控制属于目标音频流类型的音频流,抢占或不抢占其他音频流进行播放的数据。音频播放设备所能播放的音频流类型可以包括媒体和电话这两种类型。当前,在一些其他实施例中,音频流类型除了包括媒体和电话之外,还可以扩展出其他类型或者从不同的分类粒度对音频流进行划分,例如媒体还可以进一步细分为音视频通话、音乐播放、视频播放等多种类型,本申请对此不作限定。例如,音频播放设备正在播放媒体,此时有电话拨入,如果用户选择接听,则记录电话抢占媒体进行播放的用户行为数据,如果用户选择拒接,则记录电话不抢占媒体进行播放的用户行为数据。Exemplarily, the user behavior data includes data for controlling the audio stream belonging to the target audio stream type, preempting or not preempting other audio streams for playback. The types of audio streams that can be played by the audio playback device may include two types: media and telephony. Currently, in some other embodiments, in addition to media and telephony, audio stream types can also be extended to other types or audio streams can be divided from different classification granularities. For example, media can be further subdivided into audio and video calls, Various types such as music playback and video playback, which are not limited in this application. For example, if the audio playback device is playing media and a call comes in at this time, if the user chooses to answer it, record the user behavior data that the phone preempts the media for playback, and if the user chooses to reject the call, record the user behavior that the phone does not preempt the media for playback data.
示例性地,用户行为数据包括控制来自目标连接设备的音频流,抢占或不抢占其他音频流进行播放的数据。目标连接设备是指音频播放设备连接的多个连接设备中的某一个连接设备。例如,音频播放设备连接设备1和设备2,音频播放设备正在播放来自设备1的音频流,用户控制来自设备2的音频流抢占来自设备1的音频流进行播放,那么记录该来自设备2的音频流抢占来自设备1的音频流进行播放的用户行为数据。Exemplarily, the user behavior data includes data for controlling audio streams from the target connected device, preempting or not preempting other audio streams for playback. The target connection device refers to one connection device among the plurality of connection devices connected to the audio playback device. For example, the audio playback device connects device 1 and device 2, the audio playback device is playing the audio stream from device 1, and the user controls the audio stream from device 2 to preempt the audio stream from device 1 for playback, then record the audio from device 2 The stream preempts the audio stream from device 1 for playback of user behavior data.
示例性地,用户行为数据包括控制来自目标连接设备的、属于目标音频流类型的音频流,抢占或不抢占其他音频流进行播放的数据。例如,音频播放设备正在播放来自设备1的电话,此时设备2有电话拨入,如果用户选择接听设备2的电话,则记录设备2的电话抢占设备1的电话进行播放的用户行为数据,如果用户选择拒接设备2的电话,则记录设备2的电话不抢占设备1的电话进行播放的用户行为数据。又例如,音频播放设备正在播放来自设备1的媒体,此时设备1有电话拨入,如果用户选择接听设备1的电话,则记录设备1的电话抢占设备1的媒体进行播放的用户行为数据,如果用户选择拒接设备1的电话,则记录设备1的电话不抢占设备1的媒体进行播放的用户行为数据。再例如,音频播放设备正在播放来自设备1的媒体,此时设备2有电话拨入,如果用户选择接听设备2的电话,则记录设备2的电话抢占设备1的媒体进行播放的用户行为数据,如果用户选择拒接设备2的电话,则记录设备2的电话不抢占设备1的媒体进行播放的用户行为数据。Exemplarily, the user behavior data includes data for controlling the audio stream from the target connected device and belonging to the target audio stream type to preempt or not preempt other audio streams for playback. For example, the audio playback device is playing a phone call from device 1. At this time, device 2 has a phone call. If the user chooses to answer the phone call of device 2, the user behavior data that the phone of device 2 preempts the phone of device 1 to play will be recorded. If If the user chooses to reject the phone call of device 2, the user behavior data that the phone of device 2 does not preempt the phone of device 1 to play is recorded. For another example, the audio playback device is playing the media from device 1. At this time, device 1 has a phone call. If the user chooses to answer the phone call of device 1, the phone of device 1 will record the user behavior data of playing the media of device 1, If the user chooses to reject the phone call of device 1, the user behavior data that the phone call of device 1 does not seize the media of device 1 for playback is recorded. For another example, the audio playback device is playing the media from device 1. At this time, device 2 has a phone call. If the user chooses to answer the phone call of device 2, the phone of device 2 will record the user behavior data of playing the media of device 1, If the user chooses to reject the phone call of device 2, the user behavior data that the phone call of device 2 does not seize the media of device 1 for playback is recorded.
步骤430,基于用户行为数据,对目标场景模式对应的优先级配置信息进行更新,该优先级配置信息用于配置多种音频流之间的优先级关系。Step 430: Based on the user behavior data, update the priority configuration information corresponding to the target scene mode, where the priority configuration information is used to configure the priority relationship among multiple audio streams.
音频播放设备获取在目标场景模式下产生的用户行为数据之后,基于该用户行为数据, 对目标场景模式对应的优先级配置信息进行更新。After acquiring the user behavior data generated in the target scene mode, the audio playback device updates the priority configuration information corresponding to the target scene mode based on the user behavior data.
在一些实施例中,优先级配置信息用于配置多种音频流类型之间的优先级关系。示例性地,如表2所示,该优先级配置信息包括:音频流类型的标志符,以及与音频流类型的标志符对应的优先级数值。In some embodiments, the priority configuration information is used to configure priority relationships among multiple audio stream types. Exemplarily, as shown in Table 2, the priority configuration information includes: an identifier of the audio stream type, and a priority value corresponding to the identifier of the audio stream type.
表2Table 2
音频流类型audio stream type 音频流类型的标志符Identifier of the audio stream type 优先级数值priority value
电话Telephone 0x010x01 00
媒体media 0x020x02 00
预留reserve 0x000x00 00
在初始化设置的优先级配置信息中,各个音频流类型的标志符对应的优先级数值可以相同,例如均为0;或者,在初始化设置的优先级配置信息中,各个音频流类型的标志符对应的优先级数值也可以不同,例如按照默认的优先级数值进行设定。In the priority configuration information of initialization settings, the priority values corresponding to the identifiers of each audio stream type can be the same, for example, they are all 0; or, in the priority configuration information of initialization settings, the identifiers of each audio stream type correspond to The priority value of can also be different, for example, set according to the default priority value.
另外,优先级数值可以是越大代表优先级越高,反之越小代表优先级越低;或者,优先级数值也可以是越小代表优先级越高,反之越大代表优先级越低。In addition, the larger the priority value, the higher the priority, and vice versa, the lower the priority; or, the smaller the priority value, the higher the priority, and vice versa, the lower the priority.
在一些实施例中,若用户行为数据包括控制属于目标音频流类型的音频流,抢占其他音频流进行播放的数据,则对目标场景模式对应的优先级配置信息中,目标音频流类型对应的优先级数值进行更新,以提升目标音频流类型的优先级。以优先级数值越大代表优先级越高为例,上述对目标音频流类型对应的优先级数值进行更新,可以将目标音频流类型对应的优先级数值加1。例如,用户行为数据包括控制电话抢占媒体进行播放,则将电话对应的优先级数值加1;用户行为数据包括控制电话不抢占媒体进行播放,则保持电话和媒体分别对应的优先级数值不变。In some embodiments, if the user behavior data includes data that controls the audio stream belonging to the target audio stream type and preempts other audio streams for playback, then in the priority configuration information corresponding to the target scene mode, the priority corresponding to the target audio stream type The level value is updated to increase the priority of the target audio stream type. Taking the larger priority value as an example, the higher the priority, the above update of the priority value corresponding to the target audio stream type may add 1 to the priority value corresponding to the target audio stream type. For example, if the user behavior data includes controlling the phone to preempt the media to play, add 1 to the corresponding priority value of the phone; if the user behavior data includes controlling the phone not to preempt the media to play, then keep the respective priority values of the phone and the media unchanged.
在此示例中,可以基于用户行为数据,自动化地设置不同音频流类型之间的优先级关系。In this example, priority relationships between different audio stream types can be automatically set based on user behavior data.
在另一些实施例中,优先级配置信息用于配置多个连接设备的音频流之间的优先级关系。示例性地,如表3所示,该优先级配置信息包括:连接设备的标志符,以及与连接设备的标志符对应的优先级数值。In some other embodiments, the priority configuration information is used to configure priority relationships among audio streams of multiple connected devices. Exemplarily, as shown in Table 3, the priority configuration information includes: an identifier of the connected device, and a priority value corresponding to the identifier of the connected device.
表3table 3
连接设备connect device 连接设备的标志符Identifier of the connected device 优先级数值priority value
设备1equipment 1 0x010x01 00
设备2device 2 0x020x02 00
设备3device 3 0x030x03 00
预留reserve 0x000x00 00
在初始化设置的优先级配置信息中,各个连接设备的标志符对应的优先级数值可以相同,例如均为0;或者,在初始化设置的优先级配置信息中,各个连接设备的标志符对应的优先级数值也可以不同,例如按照默认的优先级数值进行设定。In the priority configuration information of initialization settings, the priority values corresponding to the identifiers of each connected device can be the same, for example, they are all 0; or, in the priority configuration information of initialization settings, the priority values corresponding to the identifiers of each connected device The priority value can also be different, for example, set according to the default priority value.
另外,优先级数值可以是越大代表优先级越高,反之越小代表优先级越低;或者,优先级数值也可以是越小代表优先级越高,反之越大代表优先级越低。In addition, the larger the priority value, the higher the priority, and vice versa, the lower the priority; or, the smaller the priority value, the higher the priority, and vice versa, the lower the priority.
在一些实施例中,若用户行为数据包括控制来自目标连接设备的音频流,抢占其他音频流进行播放的数据,则对目标场景模式对应的优先级配置信息中,目标连接设备对应的优先级数值进行更新,以提升目标连接设备的优先级。以优先级数值越大代表优先级越高为例,上述对目标连接设备对应的优先级数值进行更新,可以将目标连接设备对应的优先级数值加1。例如,用户行为数据包括控制来自设备2的音频流抢占来自设备1的音频流进行播放,则将设备2对应的优先级数值加1;用户行为数据包括控制来自设备2的音频流不抢占来自设备1的音频流进行播放,则保持各个连接设备分别对应的优先级数值不变。In some embodiments, if the user behavior data includes data that controls the audio stream from the target connected device and preempts other audio streams for playback, then in the priority configuration information corresponding to the target scene mode, the priority value corresponding to the target connected device Update to elevate the priority of the target connected device. Taking a larger priority value as an example, a higher priority value is used as an example. In the foregoing update of the priority value corresponding to the target connection device, 1 may be added to the priority value corresponding to the target connection device. For example, if the user behavior data includes controlling the audio stream from device 2 to preempt the audio stream from device 1 for playback, then add 1 to the corresponding priority value of device 2; the user behavior data includes controlling the audio stream from device 2 not to preempt the audio stream from device 1 1 audio stream, keep the corresponding priority value of each connected device unchanged.
在此示例中,可以基于用户行为数据,自动化地设置不同连接设备的音频流之间的优先级关系。In this example, priority relationships between audio streams of different connected devices can be automatically set based on user behavior data.
在另一些实施例中,优先级配置信息用于配置多种音频流类型之间的优先级关系,以及用于配置音频播放设备的不同连接设备的相同或不同音频流类型的优先级关系。In some other embodiments, the priority configuration information is used to configure the priority relationship between multiple audio stream types, and is used to configure the priority relationship of the same or different audio stream types of different connected devices of the audio playback device.
示例性地,如表4所示,优先级配置信息包括:连接设备的标志符、音频流类型的标志符,以及与连接设备的标志符和音频流类型的标志符对应的优先级数值。Exemplarily, as shown in Table 4, the priority configuration information includes: an identifier of the connected device, an identifier of the audio stream type, and a priority value corresponding to the identifier of the connected device and the identifier of the audio stream type.
表4Table 4
Figure PCTCN2022105703-appb-000001
Figure PCTCN2022105703-appb-000001
示例性地,如表5所示,优先级配置信息包括:组合标志符以及与组合标志符对应的优先级数值,其中,组合标志符用于区分不同的连接设备和所述音频流类型的组合。Exemplarily, as shown in Table 5, the priority configuration information includes: a combination identifier and a priority value corresponding to the combination identifier, wherein the combination identifier is used to distinguish between different connection devices and the combination of the audio stream type .
表5table 5
组合combination 组合标志符combination identifier 优先级数值priority value
设备1媒体device 1 media 0x010x01 00
设备1电话device 1 phone 0x020x02 00
设备2媒体device 2 media 0x030x03 00
设备2电话device 2 phone 0x040x04 00
预留reserve 0x000x00 00
在一些实施例中,若用户行为数据包括控制来自目标连接设备的、属于目标音频流类型的音频流,抢占其他音频流进行播放的数据,则对目标场景模式对应的优先级配置信息中,目标连接设备的目标音频流类型对应的优先级数值进行更新,以提升目标连接设备的目标音频流类型的优先级。以优先级数值越大代表优先级越高为例,上述对目标连接设备的目标音频流类型对应的优先级数值进行更新,可以将目标连接设备的目标音频流类型对应的优先级数值加1。例如,用户行为数据包括控制设备2的电话抢占设备1的电话进行播放,则将设备2的电话对应的优先级数值加1,其他优先级数值保持不变。又例如,用户行为数据包括控制设备1的电话抢占设备1的媒体进行播放,则将设备1的电话对应的优先级数值加1,其他优先级数值保持不变。再例如,用户行为数据包括控制设备2的电话抢占设备1的媒体进行播放,则将设备2的电话对应的优先级数值加1,其他优先级数值保持不变。In some embodiments, if the user behavior data includes data that controls the audio stream from the target connected device and belongs to the target audio stream type, and preempts other audio streams for playback, then in the priority configuration information corresponding to the target scene mode, the target The priority value corresponding to the target audio stream type of the connected device is updated to increase the priority of the target audio stream type of the target connected device. Taking the larger priority value as an example, the higher the priority, the above update of the priority value corresponding to the target audio stream type of the target connected device may add 1 to the priority value corresponding to the target audio stream type of the target connected device. For example, if the user behavior data includes the phone of the control device 2 preempting the phone of the device 1 to play, then the priority value corresponding to the phone of the device 2 is increased by 1, and other priority values remain unchanged. For another example, if the user behavior data includes that the phone of the control device 1 preempts the media of the device 1 to play, then the priority value corresponding to the phone of the device 1 is increased by 1, and other priority values remain unchanged. For another example, if the user behavior data includes that the phone of the control device 2 preempts the media of the device 1 to play, then the priority value corresponding to the phone of the device 2 is increased by 1, and other priority values remain unchanged.
在此示例中,可以基于用户行为数据,自动化地设置同一连接设备的不同音频流类型之间的优先级关系,以及设置不同连接设备的相同/不同音频流类型之间的优先级关系。In this example, based on user behavior data, the priority relationship between different audio stream types of the same connected device can be automatically set, and the priority relationship between the same/different audio stream types of different connected devices can be set automatically.
综上所述,本申请实施例提供的技术方案,音频播放设备(如耳机)无需其他设备的辅助,即可实现优先级配置信息的设置,具体地,音频播放设置通过采集记录用户行为数据,该用户行为数据包括控制音频播放设备切换播放不同音频流的数据,然后基于该用户行为数据自动化地更新优先级配置信息,实现了优先级配置信息的自动化设置与更新,无需其他设备辅助,也无需用户手动设置,充分降低了复杂度。另外,针对不同的场景模式,分别设置对应的优先级配置信息,从而在音频播放设备处于不同场景模式下,能够以适合当前所处的场景模式的优先级配置信息对音频流进行播放控制,使得音频播放控制更加地准确,更好地满足用户需求。To sum up, in the technical solution provided by the embodiment of the present application, the audio playback device (such as a headset) can realize the setting of priority configuration information without the assistance of other devices. Specifically, the audio playback setting collects and records user behavior data, The user behavior data includes the data that controls the audio playback device to switch and play different audio streams, and then automatically updates the priority configuration information based on the user behavior data, realizing the automatic setting and updating of the priority configuration information without the assistance of other devices or Manual setting by the user fully reduces the complexity. In addition, for different scene modes, the corresponding priority configuration information is set respectively, so that when the audio playback device is in different scene modes, the audio stream can be played and controlled with the priority configuration information suitable for the current scene mode, so that Audio playback control is more accurate and better meets user needs.
在示例性实施例中,如图5所示,音频播放设备通过执行如下步骤实现音频播放控制:In an exemplary embodiment, as shown in FIG. 5, the audio playback device implements audio playback control by performing the following steps:
步骤510,在目标场景模式下播放第一音频流的过程中,若接收到针对第二音频流的播放指令,则根据目标场景模式对应的优先级配置信息,确定第一音频流和第二音频流之间的优先级关系。Step 510: During the process of playing the first audio stream in the target scene mode, if a playback instruction for the second audio stream is received, determine the first audio stream and the second audio stream according to the priority configuration information corresponding to the target scene mode. Priority relationship between streams.
在一些实施例中,如果目标场景模式对应的优先级配置信息,用于配置目标场景模式下多种音频流类型之间的优先级关系。例如该优先级配置信息如上述表2所示。那么,音频播放设备可以确定第一音频流类型和第二音频流类型,该第一音频流类型是指第一音频流所属的音频流类型,第二音频流类型是指第二音频流所属的音频流类型;根据目标场景模式对应的优先级配置信息中定义的第一音频流类型和第二音频流类型之间的优先级关系,确定第一音频流和第二音频流之间的优先级关系。In some embodiments, if the priority configuration information corresponding to the target scene mode is used to configure the priority relationship among multiple audio stream types in the target scene mode. For example, the priority configuration information is shown in Table 2 above. Then, the audio playback device can determine the first audio stream type and the second audio stream type, the first audio stream type refers to the audio stream type to which the first audio stream belongs, and the second audio stream type refers to the audio stream type to which the second audio stream belongs Audio stream type: determine the priority between the first audio stream and the second audio stream according to the priority relationship between the first audio stream type and the second audio stream type defined in the priority configuration information corresponding to the target scene mode relation.
例如,第一音频流是指音频播放设备(如耳机)与第一连接设备(如笔记本电脑)之间的视频业务的音频流,第二音频流是指该音频播放设备(如耳机)与第二连接设备(如手机)之间的电话业务的音频流,那么第一音频流类型即为媒体,第二音频流类型即为电话,假设按照优先级配置信息,确定电话的优先级高于媒体的优先级,则第二音频流的优先级高于第一音频流的优先级。For example, the first audio stream refers to an audio stream of a video service between an audio playback device (such as a headset) and a first connection device (such as a notebook computer), and the second audio stream refers to an audio stream between the audio playback device (such as a headset) and the first connection device (such as a notebook computer). The audio stream of the telephone service between two connected devices (such as a mobile phone), then the first audio stream type is media, and the second audio stream type is telephone, assuming that the priority of the telephone is determined to be higher than that of the media according to the priority configuration information priority, the priority of the second audio stream is higher than that of the first audio stream.
在一些实施例中,如果目标场景模式对应的优先级配置信息,用于配置目标场景模式下多个连接设备的音频流之间的优先级关系。例如该优先级配置信息如上述表3所示。那么,音频播放设备可以确定第一连接设备和第二连接设备,该第一连接设备是指第一音频流所属的连接设备,第二连接设备是指第二音频流所属的连接设备;根据目标场景模式对应的优先级配置信息中定义的第一连接设备和第二连接设备之间的优先级关系,确定第一音频流和第二音频流之间的优先级关系。In some embodiments, if the priority configuration information corresponds to the target scene mode, it is used to configure a priority relationship between audio streams of multiple connected devices in the target scene mode. For example, the priority configuration information is shown in Table 3 above. Then, the audio playback device can determine the first connection device and the second connection device, the first connection device refers to the connection device to which the first audio stream belongs, and the second connection device refers to the connection device to which the second audio stream belongs; according to the target The priority relationship between the first connected device and the second connected device defined in the priority configuration information corresponding to the scene mode determines the priority relationship between the first audio stream and the second audio stream.
例如,第一音频流是指音频播放设备(如耳机)与第一连接设备(如笔记本电脑)之间的视频业务的音频流,第二音频流是指该音频播放设备(如耳机)与第二连接设备(如手机)之间的电话业务的音频流,假设按照优先级配置信息,确定第二连接设备的优先级高于第一连接设备的优先级,则第二音频流的优先级高于第一音频流的优先级。For example, the first audio stream refers to an audio stream of a video service between an audio playback device (such as a headset) and a first connection device (such as a notebook computer), and the second audio stream refers to an audio stream between the audio playback device (such as a headset) and the first connection device (such as a notebook computer). The audio stream of the telephone service between two connected devices (such as mobile phones), assuming that according to the priority configuration information, it is determined that the priority of the second connected device is higher than that of the first connected device, the priority of the second audio stream is high Priority for the first audio stream.
在另一些示例中,如果目标场景模式对应的优先级配置信息,用于配置多种音频流类型之间的优先级关系,以及用于配置音频播放设备的不同连接设备的相同或不同音频流类型的优先级关系。例如该优先级配置信息如上述表4或表5所示。那么,音频播放设备可以确定第一组合和第二组合,该第一组合是指第一音频流所属的音频流类型和连接设备的组合,第二组合是指第二音频流所属的音频流类型和连接设备的组合;根据目标场景模式对应的优先级配置信息中定义的第一组合和第二组合之间的优先级关系,确定第一音频流和第二音频流之间的优先级关系。In other examples, if the priority configuration information corresponding to the target scene mode is used to configure the priority relationship between multiple audio stream types, and is used to configure the same or different audio stream types of different connected devices of the audio playback device priority relationship. For example, the priority configuration information is shown in Table 4 or Table 5 above. Then, the audio playback device can determine the first combination and the second combination, the first combination refers to the combination of the audio stream type to which the first audio stream belongs and the connection device, and the second combination refers to the audio stream type to which the second audio stream belongs A combination with the connected device; according to the priority relationship between the first combination and the second combination defined in the priority configuration information corresponding to the target scene mode, determine the priority relationship between the first audio stream and the second audio stream.
例如,第一音频流是指音频播放设备(如耳机)与第一连接设备(如笔记本电脑)之间的视频业务的音频流,第二音频流是指该音频播放设备(如耳机)与第二连接设备(如手机)之间的电话业务的音频流,那么第一组合即为媒体+第一连接设备,第二组合即为电话+第二连接设备,假设按照优先级配置信息,确定第二组合的优先级高于第一组合的优先级,则第二音频流的优先级高于第一音频流的优先级。For example, the first audio stream refers to an audio stream of a video service between an audio playback device (such as a headset) and a first connection device (such as a notebook computer), and the second audio stream refers to an audio stream between the audio playback device (such as a headset) and the first connection device (such as a notebook computer). For the audio stream of the telephone service between two connected devices (such as mobile phones), the first combination is media + the first connected device, and the second combination is the phone + the second connected device. Assuming that the information is configured according to the priority, the second combination is determined If the priority of the second combination is higher than that of the first combination, then the priority of the second audio stream is higher than that of the first audio stream.
步骤520,若第二音频流的优先级高于第一音频流的优先级,则暂停播放第一音频流,并播放第二音频流。 Step 520, if the priority of the second audio stream is higher than that of the first audio stream, pause playing the first audio stream and play the second audio stream.
在一些实施例中,暂停播放第一音频流,包括:将第一状态机从正在传输状态切换至停止传输状态,第一状态机是第一音频流对应的状态机;断开音频播放设备与第一连接设备之间的音频流传输连接,第一连接设备是向音频播放设备传输第一音频流的设备。例如,第一状态机为ASE状态机,正在传输状态是指音频流数据已开始传输的状态,如ASE状态机中的Streaming状态,停止传输状态是指音频流传输已停止的状态,如ASE状态机中的Disabling状态。In some embodiments, pausing the playback of the first audio stream includes: switching the first state machine from the transmitting state to the stop transmitting state, and the first state machine is a state machine corresponding to the first audio stream; disconnecting the audio playback device from the An audio stream transmission connection between first connected devices, where the first connected device is a device that transmits a first audio stream to an audio playback device. For example, the first state machine is the ASE state machine, and the transmitting state refers to the state in which the audio stream data has started to be transmitted, such as the Streaming state in the ASE state machine, and the stop transmission state refers to the state in which the audio stream transmission has stopped, such as the ASE state Disabled status of the machine.
在一些实施例中,将第一状态机从正在传输状态切换至停止传输状态之后,还包括:将第一状态机从停止传输状态切换至参数配置完成状态。参数配置完成状态是指蓝牙连接的两方已配置CIG/CIS相关的参数的状态,如ASE状态机中的QoS Configured状态。通过将第一状态机从停止传输状态切换至参数配置完成状态,能够在第二音频流播放完成之后,尽可能 快速地恢复第一音频流的播放。In some embodiments, after switching the first state machine from the transmitting state to the stopped transmission state, further comprising: switching the first state machine from the stopped transmission state to the parameter configuration completed state. The parameter configuration completion state refers to the state in which the two parties of the Bluetooth connection have configured CIG/CIS related parameters, such as the QoS Configured state in the ASE state machine. By switching the first state machine from the stop transmission state to the parameter configuration completion state, after the completion of the second audio stream playback, the playback of the first audio stream can be resumed as quickly as possible.
在一些实施例中,播放第二音频流,包括:将第二状态机从参数配置完成状态切换至连接建立状态,第二状态机是第二音频流对应的状态机;建立音频播放设备与第二连接设备之间的音频流传输连接,第二连接设备是向音频播放设备传输第二音频流的设备;将第二状态机从连接建立状态切换至正在传输状态;通过与第二连接设备之间的音频流传输连接,接收来自第二连接设备的第二音频流;对接收到的第二音频流进行播放。类似地,第二状态机也可以为ASE状态机,参数配置完成状态是指蓝牙连接的两方已配置CIG/CIS相关的参数的状态,如ASE状态机中的QoS Configured状态;连接建立状态是指用于传输音频流的CIS连接和数据通路已建立的状态,如ASE状态机中的Enabling状态;正在传输状态是指音频流数据已开始传输的状态,如ASE状态机中的Streaming状态。In some embodiments, playing the second audio stream includes: switching the second state machine from the parameter configuration completion state to the connection establishment state, where the second state machine is a state machine corresponding to the second audio stream; The audio stream transmission connection between the two connected devices, the second connected device is a device that transmits the second audio stream to the audio playback device; the second state machine is switched from the connection establishment state to the transmitting state; through the connection with the second connected device The audio stream transmission connection between them receives the second audio stream from the second connected device; and plays the received second audio stream. Similarly, the second state machine can also be an ASE state machine, and the parameter configuration completion state refers to the state in which the two parties of the Bluetooth connection have configured CIG/CIS related parameters, such as the QoS Configured state in the ASE state machine; the connection establishment state is Refers to the state in which the CIS connection and data path used to transmit the audio stream have been established, such as the enabling state in the ASE state machine; the transmitting state refers to the state in which the audio stream data has begun to be transmitted, such as the streaming state in the ASE state machine.
在一些实施例中,在第一音频流和第二音频流具有相同优先级的情况下,音频播放设备也可以音频形式播放提示信息,提示用户选择第一音频流或者第二音频流进行播放。用户根据该提示信息,以语音形式反馈所要播放的音频流,音频播放设备通过语音采集和语义识别,确定出所要播放的音频流。In some embodiments, when the first audio stream and the second audio stream have the same priority, the audio playback device may also play prompt information in audio form, prompting the user to select the first audio stream or the second audio stream for playback. The user feeds back the audio stream to be played in voice form according to the prompt information, and the audio playback device determines the audio stream to be played through voice collection and semantic recognition.
综上所述,本申请实施例提供的技术方案,通过在音频播放设备中设置优先级配置信息,使得音频播放设备能够基于该优先级配置信息确定各个音频流之间的优先级关系,从而对音频流的播放和切换进行自动控制,从而在多连接的场景下,更加智能地播放音频。To sum up, in the technical solution provided by the embodiment of the present application, by setting the priority configuration information in the audio playback device, the audio playback device can determine the priority relationship between each audio stream based on the priority configuration information, so as to The playback and switching of audio streams are automatically controlled, so that audio can be played more intelligently in multi-connection scenarios.
下面,以音频播放设备为耳机,第一连接设备为笔记本电脑,第二连接设备为手机为例,对本申请技术方案进行示例性介绍说明。In the following, the technical solution of the present application will be exemplarily introduced and described by taking the audio playback device as an earphone, the first connection device as a notebook computer, and the second connection device as a mobile phone as an example.
如图6所示,在连接建立阶段,包括如下步骤(601~607):As shown in Figure 6, in the connection establishment phase, the following steps (601-607) are included:
步骤601,耳机创建默认的优先级属性表。Step 601, the headset creates a default priority attribute table.
例如,耳机按照表2的格式,创建默认的优先级属性表(也即上文所述的优先级配置信息),假设电话的优先级最高。For example, the headset creates a default priority attribute table (that is, the priority configuration information described above) according to the format of Table 2, assuming that the priority of the phone is the highest.
步骤602,手机与耳机之间通过BLE(Bluetooth Low Energy,蓝牙低功耗)建立连接。Step 602, establish a connection between the mobile phone and the headset through BLE (Bluetooth Low Energy, Bluetooth Low Energy).
步骤603,耳机为手机创建三个ASE状态机,该三个ASE状态机的初始状态均为Idle状态。In step 603, the earphone creates three ASE state machines for the mobile phone, and the initial states of the three ASE state machines are all in the Idle state.
其中,每一路音频流对应于一个ASE状态机,用于管理控制该路音频流。对于手机而言,有打电话和播放媒体的需求,需要创建三个ASE状态机。其中,一个ASE状态机用于接收手机的电话音频流,记为ASE0_0,另一个ASE状态机用于向手机传输麦克风的音频流,记为ASE0_1,还有一个ASE状态机用于媒体播放,记为ASE0_2。Wherein, each audio stream corresponds to an ASE state machine, which is used to manage and control the audio stream. For mobile phones, there are requirements for making calls and playing media, and three ASE state machines need to be created. Among them, one ASE state machine is used to receive the phone audio stream of the mobile phone, marked as ASE0_0, the other ASE state machine is used to transmit the audio stream of the microphone to the mobile phone, marked as ASE0_1, and another ASE state machine is used for media playback, marked as for ASE0_2.
步骤604,手机和耳机交互音频编解码能力,用于配置音频编码器和解码器。Step 604, the mobile phone and the earphone interact with the audio codec capability to configure the audio codec and decoder.
步骤605,笔记本电脑与耳机之间通过BLE建立连接。In step 605, a connection is established between the notebook computer and the earphone through BLE.
步骤606,耳机为笔记本电脑创建一个ASE状态机,该ASE状态机的初始状态为Idle状态。Step 606, the earphone creates an ASE state machine for the notebook computer, and the initial state of the ASE state machine is the Idle state.
对于笔记本电脑而言,有播放媒体的需求,创建一个ASE状态机,记为ASE1_0。For laptops, there is a need to play media, and an ASE state machine is created, which is recorded as ASE1_0.
步骤607,笔记本电脑和耳机交互音频编解码能力,用于配置音频编码器和解码器。Step 607, the notebook computer and the earphone interact with the audio codec capability to configure the audio codec and decoder.
对于创建的每一个ASE状态机,耳机均需要对其进行初始化。如图7所示,在ASE状态机的初始化阶段,包括如下步骤(701~706):For each ASE state machine created, the headset needs to initialize it. As shown in Figure 7, in the initialization phase of the ASE state machine, the following steps (701-706) are included:
步骤701,BLE连接后,ASE状态机的初始状态为Idle状态。Step 701, after the BLE is connected, the initial state of the ASE state machine is the Idle state.
步骤702,手机确定两方(手机和耳机)都支持的音频编解码能力。In step 702, the mobile phone determines the audio codec capabilities supported by both parties (the mobile phone and the headset).
步骤703,手机配置自身的音频编解码能力,然后给耳机发送音频编解码配置指令。Step 703, the mobile phone configures its own audio codec capability, and then sends an audio codec configuration command to the earphone.
步骤704,耳机收到音频编解码配置指令之后,配置自身的音频编解码能力,然后将ASE状态机从初始状态切换至编解码配置完成状态(即从Idle状态切换至Codec Configured状态),并且向手机发送该耳机支持的CIS配置参数。Step 704, after the earphone receives the audio codec configuration instruction, configure its own audio codec capability, then switch the ASE state machine from the initial state to the codec configuration completion state (that is, switch from the Idle state to the Codec Configured state), and send to The mobile phone sends the CIS configuration parameters supported by the headset.
步骤705,手机收到耳机发送的CIS配置参数之后,确定出两方都支持的CIS配置参数,然后配置自身的CIS,向耳机发送QoS配置指令,该QoS配置指令用于指示耳机配置自身的CIS,该QoS配置指令中包括手机配置的CIS参数。Step 705: After the mobile phone receives the CIS configuration parameters sent by the headset, it determines the CIS configuration parameters supported by both parties, then configures its own CIS, and sends a QoS configuration command to the headset, and the QoS configuration command is used to instruct the headset to configure its own CIS , the QoS configuration instruction includes the CIS parameters configured by the mobile phone.
步骤706,耳机收到QoS配置指令之后,将ASE状态机从编解码配置完成状态切换至参数配置完成状态(即从Codec Configured状态切换至QoS Configured状态),并保存手机发来的CIS配置参数。Step 706, after the earphone receives the QoS configuration instruction, switch the ASE state machine from the codec configuration completion state to the parameter configuration completion state (that is, switch from the Codec Configured state to the QoS Configured state), and save the CIS configuration parameters sent by the mobile phone.
在图7中,仅以手机中的某一个ASE状态机的初始化过程为例进行介绍说明,手机或者笔记本电脑中的其他ASE状态机的初始化过程与此相同或类似,此处不作赘述。In FIG. 7 , only the initialization process of a certain ASE state machine in the mobile phone is used as an example for description. The initialization process of other ASE state machines in the mobile phone or notebook computer is the same or similar, and will not be repeated here.
在优先级配置阶段,耳机可以按照上文实施例所介绍的方式,基于用户行为数据,自动化地设置和更新优先级属性表(也即上文所述的优先级配置信息)。In the priority configuration stage, the earphone can automatically set and update the priority attribute table (that is, the priority configuration information mentioned above) based on the user behavior data in the manner described in the above embodiments.
如图8所示,在音频流播放和切换阶段,可以包括如下步骤(801~808):As shown in Figure 8, in the audio stream playing and switching stages, the following steps (801-808) may be included:
步骤801,当和耳机相连的笔记本电脑要播放媒体(如音乐或者视频)时,笔记本电脑会向耳机发送激活(Enable)指令,该激活指令中携带的参数包括当前要传输的音频流类型为媒体。Step 801, when the notebook computer connected to the earphone wants to play media (such as music or video), the notebook computer will send an enable (Enable) command to the earphone, and the parameters carried in the activation command include that the audio stream type currently to be transmitted is media .
步骤802,耳机收到激活指令后,将处于参数配置完成状态(QoS_Configured状态)的状态机ASE1_0切换到连接建立状态(Enabling状态)。Step 802: After receiving the activation instruction, the earphone switches the state machine ASE1_0 in the parameter configuration completed state (QoS_Configured state) to the connection establishment state (Enabling state).
步骤803,笔记本电脑向耳机发送创建CIS的指令,笔记本电脑和耳机之间创建CIS连接。In step 803, the laptop computer sends an instruction to create a CIS to the headset, and a CIS connection is established between the laptop computer and the headset.
步骤804,耳机准备(配置CIS相关参数)完成后就可以自动下发接收方启动就绪(Receiver Start Ready)指令给自身,将状态机ASE1_0从连接建立状态(Enabling状态)切换到正在传输状态(Streaming状态),并通知笔记本电脑。Step 804, after the headset preparation (configuration of CIS related parameters) is completed, it can automatically send the receiver start ready (Receiver Start Ready) command to itself, and switch the state machine ASE1_0 from the connection establishment state (Enabling state) to the transmitting state (Streaming state) status), and notify the laptop.
步骤805,笔记本电脑收到通知后,开始传输媒体的音频流数据。Step 805, after receiving the notification, the notebook computer starts to transmit the audio stream data of the media.
步骤806,耳机当前正在播放笔记本电脑中的媒体时,如果耳机收到手机的激活(Enable)指令,检索优先级属性表,如果该激活指令中的音频流类型(如电话)优先级大于当前正在播放的音频流类型,继续下述操作,否则忽略该激活指令。Step 806, when the earphone is currently playing the media in the notebook computer, if the earphone receives an activation (Enable) instruction from the mobile phone, the priority attribute table is retrieved, if the audio stream type (such as a phone) priority in the activation instruction is greater than the current The type of audio stream to play, continue the following operations, otherwise ignore the activation command.
步骤807,耳机自动下发去激活(Disable)指令给自身,将状态机ASE1_0从正在传输状态(Streaming状态)切换到停止传输状态(Disabling状态),终止耳机和笔记本之间的CIS连接。In step 807, the headset automatically sends a Disable command to itself, switches the state machine ASE1_0 from the streaming state (Streaming state) to the stopping transmission state (Disabling state), and terminates the CIS connection between the headset and the notebook.
步骤808,耳机自动下发接收方停止就绪(Receiver Stop Ready)指令给自身,将状态机ASE1_0从停止传输状态(Disabling状态)切换到参数配置完成状态(QoS_Configured状态)。Step 808, the earphone automatically sends the receiver stop ready (Receiver Stop Ready) command to itself, and switches the state machine ASE1_0 from the stop transmission state (Disabling state) to the parameter configuration completion state (QoS_Configured state).
后续,耳机与手机之间创建CIS连接传输电话的音频流数据,以及相应的状态机的状态切换控制,与耳机与笔记本电脑之间创建CIS连接传输媒体的音频流数据,以及相应的状态机的状态切换控制相类似,此处不再赘述。Subsequently, create a CIS connection between the headset and the mobile phone to transmit the audio stream data of the phone, as well as the state switching control of the corresponding state machine, create a CIS connection between the headset and the laptop to transmit the audio stream data of the media, and the corresponding state machine. The state switching control is similar and will not be repeated here.
需要说明的是,激活(Enable)指令是LE Audio中标准的指令,其中会携带元数据(Metadata)中包含上下文(Context)相关的参数,本技术方案中将其定义为音频流类型。It should be noted that the enable command is a standard command in LE Audio, which will carry parameters related to the context (Context) in the metadata (Metadata), which is defined as an audio stream type in this technical solution.
在示例性实施例中,针对不同的场景模式,可以设置不同的优先级属性表(也即上文介绍的优先级配置信息)。在目标场景模式下,音频播放设备从存储的多个优先级属性表中,确定与目标场景模式相对应的优先级属性表。例如,针对会议场景和非会议场景,分别设置对应的优先级属性表。在会议场景对应的优先级属性表中,媒体的优先级高于电话的优先级;在非会议场景对应的优先级属性表中,电话的优先级高于媒体的优先级。这样,可以在不同场景下使用合适的优先级属性表来确定音频流之间的优先级关系,使得优先级的确定与场景相适配,更好地满足用户实际需求。In an exemplary embodiment, different priority attribute tables (that is, the priority configuration information introduced above) may be set for different scene modes. In the target scene mode, the audio playback device determines the priority attribute table corresponding to the target scene mode from the multiple stored priority attribute tables. For example, for conference scenarios and non-conference scenarios, corresponding priority attribute tables are set respectively. In the priority attribute table corresponding to the meeting scene, the priority of the media is higher than the priority of the phone; in the priority attribute table corresponding to the non-conference scene, the priority of the phone is higher than the priority of the media. In this way, an appropriate priority attribute table can be used in different scenarios to determine the priority relationship between audio streams, so that the determination of the priority is adapted to the scenario and better meets the actual needs of the user.
在示例性实施例中,响应于自动切换功能的开启指令,音频播放设备开启自动切换功能,该自动切换功能是指依据符合可用条件的优先级配置信息,自动切换音频流进行播放的功能; 其中,可用条件是指优先级配置信息是基于特定时段内的用户行为数据生成的。用户可以自主选择开启或者关闭自动切换功能,在自动切换功能处于开启状态的情况下,音频播放设备可以按照上文实施例介绍的方式,基于优先级配置信息确定出不同音频流之间的优先级关系;在自动切换功能处于关闭状态的情况下,音频播放设备可以提示用户手动选择不同音频流进行切换播放。另外,优先级配置信息可以在符合可用条件的情况下才被使用,以保证该优先级配置信息的准确性,尽可能地避免音频切换控制错误。例如,人在21天养成一个习惯,可在采集到21天的用户行为数据之后,基于该21天的用户行为数据生成符合可用条件的优先级配置信息,然后提示用户是否开启自动切换功能。In an exemplary embodiment, in response to an instruction to enable the automatic switching function, the audio playback device enables the automatic switching function, which refers to the function of automatically switching audio streams for playback according to the priority configuration information that meets the available conditions; wherein , the available condition means that the priority configuration information is generated based on user behavior data within a specific period of time. The user can independently choose to enable or disable the automatic switching function. When the automatic switching function is enabled, the audio playback device can determine the priority between different audio streams based on the priority configuration information in the manner described in the above embodiment. relationship; when the automatic switching function is turned off, the audio playback device can prompt the user to manually select different audio streams for switching and playing. In addition, the priority configuration information can be used only when the available conditions are met, so as to ensure the accuracy of the priority configuration information and avoid audio switching control errors as much as possible. For example, if a person develops a habit in 21 days, after collecting 21 days of user behavior data, priority configuration information that meets the available conditions can be generated based on the 21 days of user behavior data, and then the user is prompted whether to enable the automatic switching function.
下述为本申请装置实施例,可以用于执行本申请方法实施例。对于本申请装置实施例中未披露的细节,请参照本申请方法实施例。The following are device embodiments of the present application, which can be used to implement the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.
请参考图9,其示出了本申请一个实施例提供的针对音频播放的优先级配置装置的框图。该装置具有实现上述方法示例的功能,所述功能可以由硬件实现,也可以由硬件执行相应的软件实现。该装置可以是上文介绍的音频播放设备,也可以设置在音频播放设备中。该装置900包括:模式确定模块910、数据获取模块920和配置更新模块930。Please refer to FIG. 9 , which shows a block diagram of an apparatus for configuring priorities for audio playback provided by an embodiment of the present application. The device has the function of realizing the above-mentioned method example, and the function may be realized by hardware, or may be realized by executing corresponding software by the hardware. The apparatus may be the audio playback device described above, or may be set in the audio playback device. The device 900 includes: a mode determination module 910 , a data acquisition module 920 and a configuration update module 930 .
模式确定模块910,用于确定音频播放设备所处的目标场景模式。The mode determination module 910 is configured to determine the target scene mode of the audio playback device.
数据获取模块920,用于获取在所述目标场景模式下产生的用户行为数据,所述用户行为数据包括控制所述音频播放设备切换播放不同音频流的数据。The data acquisition module 920 is configured to acquire user behavior data generated in the target scene mode, where the user behavior data includes data for controlling the audio playback device to switch and play different audio streams.
配置更新模块930,用于基于所述用户行为数据,对所述目标场景模式对应的优先级配置信息进行更新,所述优先级配置信息用于配置多种音频流之间的优先级关系。The configuration updating module 930 is configured to update priority configuration information corresponding to the target scene mode based on the user behavior data, where the priority configuration information is used to configure priority relationships among various audio streams.
在示例性实施例中,所述优先级配置信息用于配置多种音频流类型之间的优先级关系,所述优先级配置信息包括:所述音频流类型的标志符,以及与所述音频流类型的标志符对应的优先级数值。In an exemplary embodiment, the priority configuration information is used to configure the priority relationship between multiple audio stream types, and the priority configuration information includes: the identifier of the audio stream type, and the audio The priority value corresponding to the stream type identifier.
在一些实施例中,所述配置更新模块930,用于若所述用户行为数据包括控制属于目标音频流类型的音频流,抢占其他音频流进行播放的数据,则对所述目标场景模式对应的优先级配置信息中,所述目标音频流类型对应的优先级数值进行更新。In some embodiments, the configuration update module 930 is configured to: if the user behavior data includes data that controls the audio stream belonging to the target audio stream type and preempts other audio streams for playback, then update the corresponding audio stream of the target scene mode In the priority configuration information, the priority value corresponding to the target audio stream type is updated.
在示例性实施例中,所述优先级配置信息用于配置多种音频流类型之间的优先级关系,以及用于配置所述音频播放设备的不同连接设备的相同或不同音频流类型的优先级关系。In an exemplary embodiment, the priority configuration information is used to configure the priority relationship between multiple audio stream types, and to configure the priority of the same or different audio stream types of different connected devices of the audio playback device. level relationship.
在一些实施例中,所述优先级配置信息包括:所述连接设备的标志符、所述音频流类型的标志符,以及与所述连接设备的标志符和所述音频流类型的标志符对应的优先级数值;In some embodiments, the priority configuration information includes: the identifier of the connected device, the identifier of the audio stream type, and the identifier corresponding to the identifier of the connected device and the identifier of the audio stream type the priority value;
或者,所述优先级配置信息包括:组合标志符以及与所述组合标志符对应的优先级数值,其中,所述组合标志符用于区分不同的所述连接设备和所述音频流类型的组合。Alternatively, the priority configuration information includes: a combination identifier and a priority value corresponding to the combination identifier, wherein the combination identifier is used to distinguish between different combinations of the connection device and the audio stream type .
在一些实施例中,所述配置更新模块930,用于若所述用户行为数据包括控制来自目标连接设备的、属于目标音频流类型的音频流,抢占其他音频流进行播放的数据,则对所述目标场景模式对应的优先级配置信息中,所述目标连接设备的目标音频流类型对应的优先级数值进行更新。In some embodiments, the configuration update module 930 is configured to, if the user behavior data includes data that controls the audio stream from the target connected device and belongs to the target audio stream type to preempt other audio streams for playback, then update the In the priority configuration information corresponding to the target scene mode, the priority value corresponding to the target audio stream type of the target connection device is updated.
在示例性实施例中,所述模式确定模块910,用于采集用户语音数据,对所述用户语音数据进行识别确定所述目标场景模式;或者,采集环境音频数据,对所述环境音频数据进行识别确定所述目标场景模式;或者,响应于针对所述音频播放设备的用户操作,基于所述用户操作确定所述目标场景模式;或者,接收来自控制设备的场景切换信息,根据所述场景切换信息确定所述目标场景模式。In an exemplary embodiment, the mode determining module 910 is configured to collect user voice data, identify the user voice data to determine the target scene mode; or collect environmental audio data, and perform Identify and determine the target scene mode; or, in response to a user operation on the audio playback device, determine the target scene mode based on the user operation; or receive scene switching information from the control device, and switch according to the scene information identifying the target scene mode.
在示例性实施例中,如图10所示,所述装置900还包括:优先级确定模块940和播放控制模块950。In an exemplary embodiment, as shown in FIG. 10 , the apparatus 900 further includes: a priority determination module 940 and a playback control module 950 .
优先级确定模块940,用于在所述目标场景模式下播放第一音频流的过程中,若接收到针对第二音频流的播放指令,则根据所述目标场景模式对应的优先级配置信息,确定所述第 一音频流和所述第二音频流之间的优先级关系。The priority determination module 940 is configured to, during the process of playing the first audio stream in the target scene mode, if a playback instruction for the second audio stream is received, according to the priority configuration information corresponding to the target scene mode, A priority relationship between the first audio stream and the second audio stream is determined.
播放控制模块950,用于若所述第二音频流的优先级高于所述第一音频流的优先级,则暂停播放所述第一音频流,并播放所述第二音频流。The play control module 950 is configured to pause playing the first audio stream and play the second audio stream if the priority of the second audio stream is higher than the priority of the first audio stream.
在一些实施例中,所述播放控制模块950,用于:In some embodiments, the playback control module 950 is configured to:
将第一状态机从正在传输状态切换至停止传输状态,所述第一状态机是所述第一音频流对应的状态机;Switching the first state machine from the transmitting state to the stopping transmission state, the first state machine being the state machine corresponding to the first audio stream;
断开所述音频播放设备与第一连接设备之间的音频流传输连接,所述第一连接设备是向所述音频播放设备传输所述第一音频流的设备。disconnecting the audio stream transmission connection between the audio playback device and a first connection device, where the first connection device is a device for transmitting the first audio stream to the audio playback device.
在一些实施例中,所述播放控制模块950,还用于在将第一状态机从正在传输状态切换至停止传输状态之后,将所述第一状态机从所述停止传输状态切换至参数配置完成状态。In some embodiments, the playback control module 950 is further configured to switch the first state machine from the transmission stop state to parameter configuration after switching the first state machine from the transmission state to the transmission stop state finished condition.
在一些实施例中,所述播放控制模块950,还用于:In some embodiments, the playback control module 950 is further configured to:
将第二状态机从参数配置完成状态切换至连接建立状态,所述第二状态机是所述第二音频流对应的状态机;Switching the second state machine from the parameter configuration completion state to the connection establishment state, the second state machine being a state machine corresponding to the second audio stream;
建立所述音频播放设备与第二连接设备之间的音频流传输连接,所述第二连接设备是向所述音频播放设备传输所述第二音频流的设备;Establishing an audio stream transmission connection between the audio playback device and a second connection device, the second connection device is a device that transmits the second audio stream to the audio playback device;
将所述第二状态机从所述连接建立状态切换至正在传输状态;switching the second state machine from the connection establishment state to the transmitting state;
通过与所述第二连接设备之间的音频流传输连接,接收来自所述第二连接设备的所述第二音频流;receiving the second audio stream from the second connected device via an audio streaming connection with the second connected device;
对接收到的所述第二音频流进行播放。Play the received second audio stream.
在示例性实施例中,如图10所示,所述装置900还包括:功能开启模块960。In an exemplary embodiment, as shown in FIG. 10 , the device 900 further includes: a function enabling module 960 .
功能开启模块960,用于响应于自动切换功能的开启指令,开启所述自动切换功能,所述自动切换功能是指依据符合可用条件的所述优先级配置信息,自动切换音频流进行播放的功能;其中,所述可用条件是指所述优先级配置信息是基于特定时段内的用户行为数据生成的。The function enabling module 960 is configured to enable the automatic switching function in response to the enabling instruction of the automatic switching function, and the automatic switching function refers to the function of automatically switching audio streams for playing according to the priority configuration information that meets the available conditions ; Wherein, the availability condition means that the priority configuration information is generated based on user behavior data within a specific period of time.
综上所述,本申请实施例提供的技术方案,音频播放设备(如耳机)无需其他设备的辅助,即可实现优先级配置信息的设置,具体地,音频播放设置通过采集记录用户行为数据,该用户行为数据包括控制音频播放设备切换播放不同音频流的数据,然后基于该用户行为数据自动化地更新优先级配置信息,实现了优先级配置信息的自动化设置与更新,无需其他设备辅助,也无需用户手动设置,充分降低了复杂度。另外,针对不同的场景模式,分别设置对应的优先级配置信息,从而在音频播放设备处于不同场景模式下,能够以适合当前所处的场景模式的优先级配置信息对音频流进行播放控制,使得音频播放控制更加地准确,更好地满足用户需求。To sum up, in the technical solution provided by the embodiment of the present application, the audio playback device (such as a headset) can realize the setting of priority configuration information without the assistance of other devices. Specifically, the audio playback setting collects and records user behavior data, The user behavior data includes the data that controls the audio playback device to switch and play different audio streams, and then automatically updates the priority configuration information based on the user behavior data, realizing the automatic setting and updating of the priority configuration information without the assistance of other devices or Manual setting by the user fully reduces the complexity. In addition, for different scene modes, the corresponding priority configuration information is set respectively, so that when the audio playback device is in different scene modes, the audio stream can be played and controlled with the priority configuration information suitable for the current scene mode, so that Audio playback control is more accurate and better meets user needs.
需要说明的是,上述实施例提供的装置,在实现其功能时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的装置与方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that, when realizing the functions of the device provided by the above-mentioned embodiments, the division of the above-mentioned functional modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional modules according to the needs. 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 device and the method embodiment provided by the above embodiment belong to the same idea, and the specific implementation process thereof is detailed in the method embodiment, and will not be repeated here.
请参考图11,其示出了本申请一个实施例提供的音频播放设备的结构框图。该音频播放设备可用于实现上述针对音频播放的优先级配置方法的功能。该音频播放设备110可以包括:处理器111、接收器112、发射器113、存储器114和总线115。Please refer to FIG. 11 , which shows a structural block diagram of an audio playback device provided by an embodiment of the present application. The audio playback device can be used to realize the functions of the above-mentioned priority configuration method for audio playback. The audio playback device 110 may include: a processor 111 , a receiver 112 , a transmitter 113 , a memory 114 and a bus 115 .
处理器111包括一个或者一个以上处理核心,处理器101通过运行软件程序以及模块,从而执行各种功能应用以及信息处理。The processor 111 includes one or more processing cores, and the processor 101 executes various functional applications and information processing by running software programs and modules.
接收器112和发射器113可以实现为一个通信组件,该通信组件可以是一块通信芯片。The receiver 112 and the transmitter 113 can be implemented as a communication component, which can be a communication chip.
存储器114通过总线115与处理器111相连。The memory 114 is connected to the processor 111 through the bus 115 .
存储器114可用于存储计算机程序,处理器111用于执行该计算机程序,以实现上述方法实施例中的各个步骤。The memory 114 may be used to store a computer program, and the processor 111 is used to execute the computer program, so as to implement various steps in the foregoing method embodiments.
此外,存储器114可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,易失性或非易失性存储设备包括但不限于:RAM(Random-Access Memory,随机存储器)和ROM(Read-Only Memory,只读存储器)、EPROM(Erasable Programmable Read-Only Memory,可擦写可编程只读存储器)、EEPROM(Electrically Erasable Programmable Read-Only Memory,电可擦写可编程只读存储器)、闪存或其他固态存储其技术,CD-ROM(Compact Disc Read-Only Memory,只读光盘)、DVD(Digital Video Disc,高密度数字视频光盘)或其他光学存储、磁带盒、磁带、磁盘存储或其他磁性存储设备。In addition, memory 114 can be realized by any type of volatile or nonvolatile storage device or their combination, and volatile or nonvolatile storage device includes but not limited to: RAM (Random-Access Memory, random access memory) And ROM (Read-Only Memory, read-only memory), EPROM (Erasable Programmable Read-Only Memory, erasable programmable read-only memory), EEPROM (Electrically Erasable Programmable Read-Only Memory, electrically erasable programmable read-only memory memory), flash memory or other solid-state storage technology, CD-ROM (Compact Disc Read-Only Memory, CD-ROM), DVD (Digital Video Disc, high-density digital video disc) or other optical storage, tape cartridges, tapes, disks storage or other magnetic storage devices.
在示例性实施例中,还提供了一种计算机可读存储介质,所述存储介质中存储有计算机程序,所述计算机程序在被音频播放设备的处理器执行时,以实现上述针对音频播放的优先级配置方法。在一些实施例中,该计算机可读存储介质可以包括:ROM、RAM、SSD(Solid State Drives,固态硬盘)或光盘等。其中,随机存取记忆体可以包括ReRAM(Resistance Random Access Memory,电阻式随机存取记忆体)和DRAM(Dynamic Random Access Memory,动态随机存取存储器)。In an exemplary embodiment, a computer-readable storage medium is also provided, and a computer program is stored in the storage medium. When the computer program is executed by a processor of an audio playback device, the above-mentioned requirements for audio playback are realized. priority configuration method. In some embodiments, the computer-readable storage medium may include: ROM, RAM, SSD (Solid State Drives, solid state disk) or optical disc, etc. Wherein, the random access memory may include ReRAM (Resistance Random Access Memory, resistive random access memory) and DRAM (Dynamic Random Access Memory, dynamic random access memory).
在示例性实施例中,还提供了一种计算机程序产品或计算机程序,所述计算机程序产品或计算机程序包括计算机指令,所述计算机指令存储在计算机可读存储介质中。音频播放设备的处理器从所述计算机可读存储介质中读取所述计算机指令,所述处理器执行所述计算机指令,使得所述音频播放设备执行上述针对音频播放的优先级配置方法。In an exemplary embodiment, there is also provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the audio playback device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the audio playback device executes the above audio playback priority configuration method.
应当理解的是,在本文中提及的“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。另外,本文中描述的步骤编号,仅示例性示出了步骤间的一种可能的执行先后顺序,在一些其它实施例中,上述步骤也可以不按照编号顺序来执行,如两个不同编号的步骤同时执行,或者两个不同编号的步骤按照与图示相反的顺序执行,本申请实施例对此不作限定。It should be understood that the "plurality" mentioned herein refers to two or more than two. "And/or" describes the association relationship of associated objects, indicating that there may be three types of relationships, for example, A and/or B may indicate: A exists alone, A and B exist simultaneously, and B exists independently. The character "/" generally indicates that the contextual objects are an "or" relationship. In addition, the numbering of the steps described herein only exemplarily shows a possible sequence of execution among the steps. In some other embodiments, the above-mentioned steps may not be executed according to the order of the numbers, such as two different numbers The steps are executed at the same time, or two steps with different numbers are executed in the reverse order as shown in the illustration, which is not limited in this embodiment of the present application.
以上所述仅为本申请的示例性实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The above are only exemplary embodiments of the application, and are not intended to limit the application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the application shall be included in the protection of the application. within range.

Claims (20)

  1. 一种针对音频播放的优先级配置方法,所述方法由音频播放设备执行,所述方法包括:A priority configuration method for audio playback, the method is performed by an audio playback device, and the method includes:
    确定所述音频播放设备所处的目标场景模式;Determine the target scene mode where the audio playback device is located;
    获取在所述目标场景模式下产生的用户行为数据,所述用户行为数据包括控制所述音频播放设备切换播放不同音频流的数据;Acquiring user behavior data generated in the target scene mode, the user behavior data includes data for controlling the audio playback device to switch and play different audio streams;
    基于所述用户行为数据,对所述目标场景模式对应的优先级配置信息进行更新,所述优先级配置信息用于配置多种音频流之间的优先级关系。Based on the user behavior data, the priority configuration information corresponding to the target scene mode is updated, and the priority configuration information is used to configure priority relationships among multiple audio streams.
  2. 根据权利要求1所述的方法,其中,所述优先级配置信息用于配置多种音频流类型之间的优先级关系,所述优先级配置信息包括:所述音频流类型的标志符,以及与所述音频流类型的标志符对应的优先级数值。The method according to claim 1, wherein the priority configuration information is used to configure a priority relationship between multiple audio stream types, and the priority configuration information includes: an identifier of the audio stream type, and The priority value corresponding to the identifier of the audio stream type.
  3. 根据权利要求1所述的方法,其中,所述基于所述用户行为数据,对所述目标场景模式对应的优先级配置信息进行更新,包括:The method according to claim 1, wherein the updating the priority configuration information corresponding to the target scene mode based on the user behavior data includes:
    若所述用户行为数据包括控制属于目标音频流类型的音频流,抢占其他音频流进行播放的数据,则对所述目标场景模式对应的优先级配置信息中,所述目标音频流类型对应的优先级数值进行更新。If the user behavior data includes data that controls the audio stream belonging to the target audio stream type and preempts other audio streams for playback, then in the priority configuration information corresponding to the target scene mode, the priority corresponding to the target audio stream type Level values are updated.
  4. 根据权利要求1所述的方法,其中,所述优先级配置信息用于配置多种音频流类型之间的优先级关系,以及用于配置所述音频播放设备的不同连接设备的相同或不同音频流类型的优先级关系。The method according to claim 1, wherein the priority configuration information is used to configure the priority relationship between multiple audio stream types, and to configure the same or different audio streams of different connected devices of the audio playback device. The priority relationship of stream types.
  5. 根据权利要求4所述的方法,其中,The method according to claim 4, wherein,
    所述优先级配置信息包括:所述连接设备的标志符、所述音频流类型的标志符,以及与所述连接设备的标志符和所述音频流类型的标志符对应的优先级数值;The priority configuration information includes: an identifier of the connected device, an identifier of the audio stream type, and a priority value corresponding to the identifier of the connected device and the identifier of the audio stream type;
    或者,or,
    所述优先级配置信息包括:组合标志符以及与所述组合标志符对应的优先级数值,其中,所述组合标志符用于区分不同的所述连接设备和所述音频流类型的组合。The priority configuration information includes: a combination identifier and a priority value corresponding to the combination identifier, wherein the combination identifier is used to distinguish different combinations of the connection device and the audio stream type.
  6. 根据权利要求1所述的方法,其中,所述基于所述用户行为数据,对所述目标场景模式对应的优先级配置信息进行更新,包括:The method according to claim 1, wherein the updating the priority configuration information corresponding to the target scene mode based on the user behavior data includes:
    若所述用户行为数据包括控制来自目标连接设备的、属于目标音频流类型的音频流,抢占其他音频流进行播放的数据,则对所述目标场景模式对应的优先级配置信息中,所述目标连接设备的目标音频流类型对应的优先级数值进行更新。If the user behavior data includes data that controls the audio stream from the target connected device and belongs to the target audio stream type, and preempts other audio streams for playback, then in the priority configuration information corresponding to the target scene mode, the target The priority value corresponding to the target audio stream type of the connected device is updated.
  7. 根据权利要求1所述的方法,其中,所述确定所述音频播放设备所处的目标场景模式,包括:The method according to claim 1, wherein said determining the target scene mode of the audio playback device comprises:
    采集用户语音数据,对所述用户语音数据进行识别确定所述目标场景模式;Collecting user voice data, identifying the user voice data to determine the target scene mode;
    或者,or,
    采集环境音频数据,对所述环境音频数据进行识别确定所述目标场景模式;Collecting environmental audio data, identifying the environmental audio data to determine the target scene mode;
    或者,or,
    响应于针对所述音频播放设备的用户操作,基于所述用户操作确定所述目标场景模式;In response to a user operation on the audio playback device, determining the target scene mode based on the user operation;
    或者,or,
    接收来自控制设备的场景切换信息,根据所述场景切换信息确定所述目标场景模式。The scene switching information from the control device is received, and the target scene mode is determined according to the scene switching information.
  8. 根据权利要求7所述的方法,其中,所述目标场景模式是场景配置信息中配置的场景模式,所述场景模式包括家庭、会议、工作、开车、预留中的至少一种。The method according to claim 7, wherein the target scene mode is a scene mode configured in scene configuration information, and the scene mode includes at least one of family, meeting, work, driving, and reservation.
  9. 根据权利要求8所述的方法,其中,所述场景模式是技术人员预先配置并存储在所述音频播放设备中的,所述技术人员是所述音频播放设备的生产厂家的工作人员;The method according to claim 8, wherein the scene mode is pre-configured and stored in the audio playback device by a technician, and the technician is a staff member of a manufacturer of the audio playback device;
    或,or,
    所述场景模式是由用户设置并存储在所述音频播放设备中的。The scene mode is set by the user and stored in the audio playback device.
  10. 根据权利要求1至9任一所述的方法,其中,所述音频流类型包括电话、媒体、预留中的至少一种。The method according to any one of claims 1 to 9, wherein the audio stream type includes at least one of telephony, media, and reservation.
  11. 一种针对音频播放的优先级配置装置,所述装置包括:A priority configuration device for audio playback, the device comprising:
    模式确定模块,用于确定音频播放设备所处的目标场景模式;A mode determination module, configured to determine the target scene mode where the audio playback device is located;
    数据获取模块,用于获取在所述目标场景模式下产生的用户行为数据,所述用户行为数据包括控制所述音频播放设备切换播放不同音频流的数据;A data acquisition module, configured to acquire user behavior data generated in the target scene mode, where the user behavior data includes data for controlling the audio playback device to switch and play different audio streams;
    配置更新模块,用于基于所述用户行为数据,对所述目标场景模式对应的优先级配置信息进行更新,所述优先级配置信息用于配置多种音频流之间的优先级关系。A configuration updating module, configured to update priority configuration information corresponding to the target scene mode based on the user behavior data, where the priority configuration information is used to configure priority relationships among various audio streams.
  12. 根据权利要求11所述的装置,其中,所述优先级配置信息用于配置多种音频流类型之间的优先级关系,所述优先级配置信息包括:所述音频流类型的标志符,以及与所述音频流类型的标志符对应的优先级数值。The device according to claim 11, wherein the priority configuration information is used to configure a priority relationship between multiple audio stream types, and the priority configuration information includes: an identifier of the audio stream type, and The priority value corresponding to the identifier of the audio stream type.
  13. 根据权利要求11所述的装置,其中,所述配置更新模块,用于若所述用户行为数据包括控制属于目标音频流类型的音频流,抢占其他音频流进行播放的数据,则对所述目标场景模式对应的优先级配置信息中,所述目标音频流类型对应的优先级数值进行更新。The device according to claim 11, wherein the configuration update module is configured to: if the user behavior data includes data that controls the audio stream belonging to the target audio stream type and preempts other audio streams for playback, then update the target In the priority configuration information corresponding to the scene mode, the priority value corresponding to the target audio stream type is updated.
  14. 根据权利要求11所述的装置,其中,所述优先级配置信息用于配置多种音频流类型之间的优先级关系,以及用于配置所述音频播放设备的不同连接设备的相同或不同音频流类型的优先级关系。The device according to claim 11, wherein the priority configuration information is used to configure the priority relationship between multiple audio stream types, and is used to configure the same or different audio streams of different connected devices of the audio playback device. The priority relationship of stream types.
  15. 根据权利要求14所述的装置,其中,The apparatus of claim 14, wherein,
    所述优先级配置信息包括:所述连接设备的标志符、所述音频流类型的标志符,以及与所述连接设备的标志符和所述音频流类型的标志符对应的优先级数值;The priority configuration information includes: an identifier of the connected device, an identifier of the audio stream type, and a priority value corresponding to the identifier of the connected device and the identifier of the audio stream type;
    或者,or,
    所述优先级配置信息包括:组合标志符以及与所述组合标志符对应的优先级数值,其中,所述组合标志符用于区分不同的所述连接设备和所述音频流类型的组合。The priority configuration information includes: a combination identifier and a priority value corresponding to the combination identifier, wherein the combination identifier is used to distinguish different combinations of the connection device and the audio stream type.
  16. 根据权利要求11所述的装置,其中,所述配置更新模块,用于若所述用户行为数据包括控制来自目标连接设备的、属于目标音频流类型的音频流,抢占其他音频流进行播放的数据,则对所述目标场景模式对应的优先级配置信息中,所述目标连接设备的目标音频流类型对应的优先级数值进行更新。The device according to claim 11, wherein the configuration update module is configured to control the audio stream from the target connected device, which belongs to the target audio stream type, and preempt other audio streams for playback if the user behavior data includes , update the priority value corresponding to the target audio stream type of the target connection device in the priority configuration information corresponding to the target scene mode.
  17. 根据权利要求11所述的装置,其中,The apparatus of claim 11, wherein,
    所述模式确定模块,用于采集用户语音数据,对所述用户语音数据进行识别确定所述目标场景模式;The mode determination module is configured to collect user voice data, and identify the user voice data to determine the target scene mode;
    或者,or,
    所述模式确定模块,用于采集环境音频数据,对所述环境音频数据进行识别确定所述目标场景模式;The mode determination module is used to collect environmental audio data, and identify the environmental audio data to determine the target scene mode;
    或者,or,
    所述模式确定模块,用于响应于针对所述音频播放设备的用户操作,基于所述用户操作确定所述目标场景模式;The mode determination module is configured to determine the target scene mode based on the user operation in response to the user operation on the audio playback device;
    或者,or,
    所述模式确定模块,用于接收来自控制设备的场景切换信息,根据所述场景切换信息确定所述目标场景模式。The mode determination module is configured to receive scene switching information from the control device, and determine the target scene mode according to the scene switching information.
  18. 根据权利要求17所述的装置,其中,所述目标场景模式是场景配置信息中配置的场景模式,所述场景模式包括家庭、会议、工作、开车、预留中的至少一种。The device according to claim 17, wherein the target scene mode is a scene mode configured in scene configuration information, and the scene mode includes at least one of family, meeting, work, driving, and reservation.
  19. 一种音频播放设备,所述音频播放设备包括处理器和存储器,所述存储器中存储有计算机程序,所述计算机程序由所述处理器执行,以实现如权利要求1至10任一项所述的方法。An audio playback device, the audio playback device includes a processor and a memory, and a computer program is stored in the memory, and the computer program is executed by the processor, so as to realize any one of claims 1 to 10. Methods.
  20. 一种计算机可读存储介质,所述存储介质中存储有计算机程序,所述计算机程序由处理器执行,以实现如权利要求1至10任一项所述的方法。A computer-readable storage medium, in which a computer program is stored, and the computer program is executed by a processor to implement the method according to any one of claims 1 to 10.
PCT/CN2022/105703 2021-07-22 2022-07-14 Priority configuration method and apparatus for audio playing, and device and storage medium WO2023001054A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110831393.0A CN115686424A (en) 2021-07-22 2021-07-22 Priority configuration method, device, equipment and storage medium for audio playing
CN202110831393.0 2021-07-22

Publications (1)

Publication Number Publication Date
WO2023001054A1 true WO2023001054A1 (en) 2023-01-26

Family

ID=84978884

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/105703 WO2023001054A1 (en) 2021-07-22 2022-07-14 Priority configuration method and apparatus for audio playing, and device and storage medium

Country Status (2)

Country Link
CN (1) CN115686424A (en)
WO (1) WO2023001054A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115835419A (en) * 2023-02-14 2023-03-21 深圳市友恺通信技术有限公司 Wireless device state monitoring system and method based on Internet of things

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116017388B (en) * 2023-02-17 2023-08-22 荣耀终端有限公司 Popup window display method based on audio service and electronic equipment
CN117858031B (en) * 2024-03-07 2024-05-28 深圳市汇杰芯科技有限公司 Low-delay wireless opposite-speaking and TWS seamless switching system, method and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105550037A (en) * 2015-12-11 2016-05-04 北京元心科技有限公司 Method and device for allocating audio resources in multiple systems
CN109525707A (en) * 2018-10-15 2019-03-26 维沃移动通信有限公司 A kind of audio frequency playing method and mobile terminal
CN109890021A (en) * 2019-03-06 2019-06-14 西安易朴通讯技术有限公司 Bluetooth headset switching method, bluetooth headset and terminal
US20210193158A1 (en) * 2019-12-23 2021-06-24 Motorola Solutions, Inc. Device and method for controlling a speaker according to priority data
CN113050910A (en) * 2019-12-26 2021-06-29 阿里巴巴集团控股有限公司 Voice interaction method, device, equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105550037A (en) * 2015-12-11 2016-05-04 北京元心科技有限公司 Method and device for allocating audio resources in multiple systems
CN109525707A (en) * 2018-10-15 2019-03-26 维沃移动通信有限公司 A kind of audio frequency playing method and mobile terminal
CN109890021A (en) * 2019-03-06 2019-06-14 西安易朴通讯技术有限公司 Bluetooth headset switching method, bluetooth headset and terminal
US20210193158A1 (en) * 2019-12-23 2021-06-24 Motorola Solutions, Inc. Device and method for controlling a speaker according to priority data
CN113050910A (en) * 2019-12-26 2021-06-29 阿里巴巴集团控股有限公司 Voice interaction method, device, equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115835419A (en) * 2023-02-14 2023-03-21 深圳市友恺通信技术有限公司 Wireless device state monitoring system and method based on Internet of things

Also Published As

Publication number Publication date
CN115686424A (en) 2023-02-03

Similar Documents

Publication Publication Date Title
WO2023001054A1 (en) Priority configuration method and apparatus for audio playing, and device and storage medium
US11812485B2 (en) Bluetooth communication method and terminal
US9712659B2 (en) Duplex audio for mobile communication device and accessory
US20100048133A1 (en) Audio data flow input/output method and system
US9652195B2 (en) Audio output device that utilizes policies to concurrently handle multiple audio streams from different source devices
WO2013060109A1 (en) Processing method for call of terminal, terminal and processing system
US11875085B2 (en) Audio rendering device and audio configurator device for audio stream selection, and related methods
CN105491252A (en) Method and device of switching color ring back tone
US10236016B1 (en) Peripheral-based selection of audio sources
CN113766477A (en) Device connection method, device, electronic device and computer readable medium
CN105183446A (en) Audio management system
WO2017148270A1 (en) Volume control method and device, and terminal
WO2021169472A1 (en) Voice call transfer method and electronic device
WO2023109156A1 (en) Screen projection method and device, and storage medium
WO2022057552A1 (en) Device control system
CN107707727A (en) A kind of method and device for controlling terminal
WO2024119947A1 (en) Bluetooth communication method and apparatus, electronic device, and computer-readable medium
CN113760219A (en) Information processing method and device
US10827271B1 (en) Backward compatibility for audio systems and methods
CN111580781A (en) Mobile terminal audio output method and mobile terminal
WO2023035918A1 (en) Audio playing control method and apparatus, and audio output device and storage medium
WO2023061273A1 (en) Device connection method and apparatus, and electronic device and storage medium
CN114885261A (en) Earphone assembly, wireless audio playing system and communication method thereof
WO2020062861A1 (en) Voice playback control method and device for bluetooth speaker
WO2024113982A1 (en) Bluetooth connection method, mobile terminal, 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: 22845219

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: 22845219

Country of ref document: EP

Kind code of ref document: A1