WO2019104774A1 - Communication method and communication device - Google Patents

Communication method and communication device Download PDF

Info

Publication number
WO2019104774A1
WO2019104774A1 PCT/CN2017/117047 CN2017117047W WO2019104774A1 WO 2019104774 A1 WO2019104774 A1 WO 2019104774A1 CN 2017117047 W CN2017117047 W CN 2017117047W WO 2019104774 A1 WO2019104774 A1 WO 2019104774A1
Authority
WO
WIPO (PCT)
Prior art keywords
processing component
communication
audio device
audio
request
Prior art date
Application number
PCT/CN2017/117047
Other languages
French (fr)
Chinese (zh)
Inventor
薛俊晓
Original Assignee
歌尔科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 歌尔科技有限公司 filed Critical 歌尔科技有限公司
Publication of WO2019104774A1 publication Critical patent/WO2019104774A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a communication method and a communication device.
  • the communication network is mainly divided into a civil communication network and a dedicated communication network
  • the dedicated communication network refers to a communication network set up by various agencies, enterprises, railways, aviation, military, meteorological units and the like for the business needs of the unit.
  • the traditional communication equipment only supports the communication using the civil communication network. If some special industry workers need to use the dedicated communication network for communication, they need to be equipped with a communication device that can support the dedicated communication network, which causes waste of resources and is inconvenient. Staff carry. It is therefore necessary to provide a communication device capable of supporting both a dedicated communication network and a civil communication network.
  • the present invention provides a communication method and a communication device, and realizes a communication device that simultaneously supports a dedicated communication network and a civil communication network, thereby greatly improving the user experience.
  • the present invention provides a communication method, which is applied to a communication device, where the communication device includes a first processing component, a second processing component, and an audio device; the method includes:
  • the communication initiation request is a first type of communication request, establishing a connection of the first processing component with the audio device and disconnecting the second processing component from the audio device, and triggering the first processing component to process the communication initiation request;
  • the communication initiation request is a second type of communication request, establishing a connection of the second processing component with the audio device and disconnecting the first processing component from the audio device, and triggering the second processing component to process the communication initiation request.
  • the communication initiation request is a first type of communication request
  • establishing a connection of the first processing component with the audio device and disconnecting the second processing component from the audio device, and triggering the first processing to process the communication initiation request comprises:
  • the communication initiation request is the first type of communication request, determining whether the second processing component is connected to the audio device;
  • the first processing component is triggered to process the communication initiation request.
  • the communication initiation request is a second type of communication request
  • establishing a connection of the second processing component with the audio device and disconnecting the first processing component from the audio device, and triggering the second processing component to process the communication initiation request comprises:
  • the communication initiation request is a second type of communication request, determining whether the second processing component is connected to the audio device;
  • the communication initiation request is a second type of communication request
  • establishing a connection of the second processing component with the audio device and disconnecting the first processing component from the audio device, and triggering the second processing component to process the communication initiation request further include:
  • the audio device comprises a plurality of audio sub-devices; wherein each audio sub-device corresponds to an audio flag value;
  • Disconnecting the second processing component from the audio device and establishing a connection of the first processing component to the audio device includes:
  • a first audio transmission channel between the first processing component and the audio device is set based on the audio flag value to establish a connection of the first processing component to the audio device.
  • the audio device comprises a plurality of audio sub-devices; wherein each audio sub-device corresponds to an audio flag value;
  • Disconnecting the first processing component from the audio device and establishing a connection of the second processing component to the audio device includes:
  • the present invention provides a communication device including a first processing component, a second processing component, an audio device, and a memory; a memory for storing computer readable program code, the first processing component for executing computer readable program code achieve:
  • Receiving a communication initiation request determining a communication type of the communication initiation request; establishing a connection with the audio device and disconnecting the second processing component from the audio device if the communication initiation request is the first type communication request, and processing the communication initiation request;
  • the communication initiation request is a second type of communication request, establishing a connection of the second processing component with the audio device and disconnecting the audio device, and triggering the second processing component to process the communication initiation request.
  • the first processing component establishes a connection with the audio device and disconnects the second processing component from the audio device if the communication initiation request is the first type of communication request, and processes the communication initiation request specifically:
  • the communication initiation request is a first type of communication request, determining whether the second processing component is connected to the audio device; if so, disconnecting the second processing component from the audio device and establishing a connection with the audio device; triggering the first processing component Processing the communication initiation request; if not, triggering the first processing component to process the communication initiation request.
  • the first processing component establishes the connection of the second processing component to the audio device and disconnects the audio device if the communication initiation request is the second type of communication request, and triggers the second processing component to process the communication initiation request, specifically:
  • the communication initiation request is a second type of communication request, determining whether the second processing component is connected to the audio device; if yes, triggering the second processing component to process the communication initiation request; if not, disconnecting the first processing component from the audio device, Establishing a connection of the second processing component to the audio device; triggering the second processing component to process the communication initiation request.
  • the first processing component after the communication initiation request is a second type of communication request, establishing a connection of the second processing component with the audio device and disconnecting the audio device, and triggering the second processing component to process the communication initiation request, specifically Yes:
  • Receiving a communication end request disconnecting the second processing component from the audio device and establishing a connection of the first processing component to the audio device.
  • the audio device comprises a plurality of audio sub-devices; wherein each audio sub-device corresponds to an audio flag value;
  • the first processing component disconnects the connection of the second processing component from the audio device, and establishes a connection between the first processing component and the audio device, specifically:
  • the processing component audio device comprises a plurality of audio sub-devices; wherein each audio sub-device corresponds to an audio flag value;
  • the first processing component disconnects the connection between the first processing component and the audio device, and establishes the connection between the second processing component and the audio component, specifically: acquiring an audio flag value corresponding to the second processing component; and disconnecting the first processing component and the audio device Establishing a first audio transmission channel; setting a second audio transmission channel between the second processing component and the audio device based on the audio flag value to establish a connection of the second processing component to the audio device.
  • the present invention provides a computer readable storage medium storing a computer program that can implement any of the above communication methods when executed by a computer.
  • the present invention can obtain the following technical effects:
  • the present invention provides a communication method that is applied to a communication device that includes a first processing processing component, a second processing component, and an audio device.
  • the method determines the communication type of the communication initiation request after receiving the communication initiation request. If the communication initiation request is a first type of communication request, establishing a connection of the first processing component with the audio device and disconnecting the second processing component from the audio device, and triggering the first processing component to process the communication initiation request. If the communication initiation request is a second type of communication request, establishing a connection of the second processing component with the audio device and disconnecting the first processing component from the audio device, and triggering the second processing component to process the communication initiation request.
  • FIG. 1 is a flow chart of an embodiment of a communication method according to an embodiment of the present invention.
  • FIG. 2 is a flow chart of another embodiment of a communication method according to an embodiment of the present invention.
  • FIG. 3 is a schematic structural diagram of an embodiment of a communication apparatus according to an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of another embodiment of a communication device according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of an embodiment of a communication device according to an embodiment of the present invention.
  • the embodiments of the present invention provide a communication method and a communication device, which are applicable to, but not limited to, a mobile phone that can communicate, and a wearable device or other electronic device that can implement communication.
  • the communication equipment of the private network is usually developed and manufactured by a specialized manufacturer.
  • the communication equipment that users usually use does not have the function of supporting private network communication, and is only suitable for civil network communication. Therefore, in order to design a communication device that supports both a dedicated communication network and a civil communication network, it is necessary to solve how to embed a communication module having a dedicated network communication function into a communication device that supports the communication function of the civil network.
  • the inventors have proposed a technical solution of the present invention through a series of studies.
  • the present invention can be applied to a communication device including a first processing component, a second processing component, and an audio device.
  • the method determines the communication type of the communication initiation request after receiving the communication initiation request. If the communication initiation request is a first type of communication request, establishing a connection of the first processing component with the audio device and disconnecting the second processing component from the audio device, and triggering the first processing component to process the communication initiation request.
  • the communication initiation request is a second type of communication request
  • establishing a connection of the second processing component with the audio device and disconnecting the first processing component from the audio device, and triggering the second processing component to process the communication initiation request By determining the call type of the call initiation request and establishing the connection of the first processing component or the second processing component with the audio device according to the call type of the call initiation request, a communication device capable of simultaneously supporting communication of different communication types is realized.
  • FIG. 1 is a flowchart of an embodiment of a communication method according to an embodiment of the present invention. The method is applied to a communication device, and the communication device may include: a first processing component, a second processing component, and an audio device.
  • the method can include:
  • the execution entity may be the first processing component or the second processing component, and is not specifically limited herein.
  • the first processing component may include one or more processors, which in addition to the communication function, may also implement other functions of the communication device, such as audio and video playback functions, Camera function, APP (Application, application software) application functions. Wherein the performance of the first processing component is better than the second processing component.
  • the second processing component can be a microcontroller or a microcontroller independently of the first processing component, can independently process the communication request and the audio signal, and implement information interaction with the first processing component by providing a communication interface.
  • the first processing component first determines the sending after receiving the communication initiation request.
  • the communication type in the present invention can be divided into, but not limited to, a civil network communication type and a private network communication type.
  • the civil network communication type is usually used as the first type of communication request, by the first The processing component performs processing; the private network communication request is treated as a second type of communication request, and is processed by the second processing component.
  • the communication initiation request is a first type of communication request, establishing a connection of the first processing component with the audio device and disconnecting the second processing component from the audio device, and triggering the first processing component to process the communication initiation request.
  • the communication initiation request is a second type of communication request, establishing a connection of the second processing component with the audio device and disconnecting the first processing component from the audio device, and triggering the second processing component to process the communication initiation request.
  • the audio device may include an audio playback device and an audio receiving device, such as a speaker, a headset, a Bluetooth, and the like.
  • the audio device has been physically connected to the first processing component and the second processing component.
  • the first processing component based on the Andiord system implements control of the logical connection of the audio device by adding logic switches.
  • the logic switch determines and notifies the switching of the audio drive control logic switch through the data of the HAL (Hardware Abstraction Layer) layer.
  • HAL Hardware Abstraction Layer
  • the logic switch is switched between the first processing component and the second processing component.
  • the logic switch establishes the connection between the first processing component and the audio device, the connection of the second processing component to the audio device is disconnected, and vice versa.
  • the second processing component is logically coupled to the audio device.
  • the corresponding communication request can be processed independently, so after the first processing component or the second processing component is triggered to process the communication initiation request, the first processing is performed.
  • the component or the second processing component establishes a connection with the communication receiving device and transmits the communication data using the audio device.
  • the communication initiation request is a first type of communication request
  • establishing a connection of the first processing component with the audio device and disconnecting the second processing component from the audio device, and triggering the first process Handling communication initiation requests includes:
  • the communication initiation request is the first type of communication request, determining whether the second processing component is connected to the audio device;
  • the first processing component is triggered to process the communication initiation request.
  • the communication initiation request is a second type of communication request
  • establishing a connection of the second processing component with the audio device and disconnecting the first processing component from the audio device, and triggering the second process includes:
  • the communication initiation request is a second type of communication request, determining whether the second processing component is connected to the audio device;
  • Determining whether the second processing component is connected to the audio device may be determined by a second processing component communication state recorded in the HAL layer, the communication state being generated based on the type of the last communication initiation request. For example, when the communication state of the second processing component recorded in the HAL layer is in the on state, it indicates that the last call initiation request is the second type communication request; if the communication state is off, it indicates that the last call initiation request is the first A type of communication request. When the communication state is in an on state, the second processing state is logically connected to the audio device, and the second processing state is disconnected from the logical connection of the audio device. The communication status of the second processing component is set to the HAL layer through the communication information management layer (TelephoneManager).
  • TelephoneManager communication information management layer
  • the method may further include:
  • determining whether the second processing component is connected to the audio device comprises:
  • the communication request is the first type of communication request, determining whether the communication state of the second processing component and the audio device is in an open state;
  • the second processing component can be disconnected from the audio device by default, that is, the first processing component is connected to the audio device by default, only in the When the second type of communication request is received, the connection of the second processing component to the audio device is established to implement communication of the private network. Therefore, it can be ensured that the user does not affect the system audio playing function when using the audio function of the communication device.
  • the communication initiation request is a second type of communication request
  • establishing a connection of the second processing component with the audio device, and disconnecting the first processing component from the audio device, and triggering the second processing component to process the communication initiation request Also includes:
  • the first processing component to the audio module is implemented on the basis of the original audio architecture based on the Android system by adding a logic switch.
  • the control by controlling the logical connection with the first processing component or the second processing component, implements targeted processing of communication initiation requests for different communication types. Therefore, the communication device that can support the communication between the civil network and the private network is designed, which greatly improves the user experience.
  • FIG. 2 is a flow chart of another embodiment of a communication method according to an embodiment of the present invention, the method being applied to a communication device, the communication device including a first processing component, a second processing component, and an audio device.
  • the method can include:
  • step 203 If the communication initiation request is the first type of communication request, determine whether the second processing component is connected to the audio device, if yes, execute step 204; if no, perform step 207.
  • the HAL layer since the HAL layer records the communication state of the second processing component, it can be determined whether the current second processing component is connected to the audio device only by determining the communication state of the second processing component in the HAL layer. .
  • the logic switch After disconnecting the second audio transmission channel established by the second processing component and the audio device, at this time, the logic switch establishes a logical connection between the first processing component and the audio device.
  • the audio device may comprise a plurality of audio sub-devices, each audio sub-device corresponding to an audio flag value.
  • the selection control of the audio routing is added, and the audio routing is based on the connection state of the audio device in the communication device, and the audio flag value corresponding to the current communication initiation request is obtained.
  • the audio device in the communication device includes a headset, a speaker, and a Bluetooth.
  • the audio flag value corresponding to the Bluetooth is acquired, and the first audio transmission channel of the first processing component and the Bluetooth device is established.
  • the connection state of the external audio device is changed, for example, connected to the earphone, the first audio transmission channel can be switched to be connected to the earphone according to the generated audio flag value.
  • step 208 If the communication initiation request is a second type of communication request, determine whether the second processing component is connected to the audio device, and if yes, perform step 212; if no, perform step 209.
  • the communication initiation request type is the second type communication request
  • acquiring the audio device based connection status After the audio flag value corresponding to the second processing component is sent to the second processing component through the second processing component and the AT (ATCommands) command interface of the first processing component, the second audio component and the audio device are switched by the second processing component.
  • the AT command interface is a communication interface between the second processing component and the first processing component.
  • the volume setting of the second processing component can control the volume setting in the second processing component by expanding the volume setting interface in the system audio module, specifically, receiving the volume adjustment instruction at the volume setting interface of the audio module. Thereafter, the volume adjustment command can be sent to the second processing component through the AT command interface to implement adjustment of the volume of the second processing component.
  • the first processing component implements control of the volume setting and the audio transmission channel in the second processing component based on the AT command interface, and establishes the first processing component and the second processing component and the audio device based on the selection control of the audio routing. And connecting the first audio transmission channel of the first processing component and the second audio transmission channel of the second processing component to the audio device based on the audio flag value, without manual switching by the user, providing a convenient and flexible
  • the communication method has laid a foundation for designing a communication device that can support civil network communication and private network communication, and greatly improves the user experience.
  • FIG. 3 is a schematic structural diagram of an embodiment of a communication device according to an embodiment of the present invention.
  • the device is applied to a communication device, and the communication device may include: a first processing component, a second processing component, and an audio device.
  • the device can include:
  • the first receiving module 301 is configured to receive a communication initiation request.
  • the determining module 302 is configured to determine a communication type of the communication initiation request.
  • the first processing component may include one or more processors, which in addition to the communication function, may also implement other functions of the communication device, such as audio and video playback functions, Camera function, APP (Application, application software) application functions. Wherein the performance of the first processing component is due to the second processing component.
  • the second processing component can be a microcontroller or a microcontroller independently of the first processing component, can independently process the communication request and the audio signal, and implement information interaction with the first processing component by providing a communication interface.
  • the processing component After receiving the communication initiation request, the processing component first determines the communication type of the initiation request.
  • the communication type in the present invention can be divided into, but not limited to, a civil network communication type and a private network communication type.
  • the civil network communication type is usually used as the first type of communication request, by the first The processing component performs processing; the private network communication request is treated as a second type of communication request, and is processed by the second processing component.
  • the first type of communication request processing module 303 is configured to establish a connection between the first processing component and the audio device and disconnect the second processing component from the audio device if the communication initiation request is the first type of communication request, and trigger the first processing Component The communication initiates the request.
  • the second type of communication request processing module 304 is configured to establish a connection between the second processing component and the audio device and disconnect the first processing component from the audio device if the communication initiation request is the second type of communication request, and trigger the second processing The component handles the communication initiation request.
  • the audio device may include an audio playback device and an audio receiving device, such as a speaker, a headset, a Bluetooth, and the like.
  • the audio device has been physically connected to the first processing component and the second processing component.
  • the first processing component based on the Andiord system implements control of the logical connection of the audio device by adding logic switches.
  • the logic switch determines and notifies the switching of the audio drive control logic switch through the data of the HAL (Hardware Abstraction Layer) layer.
  • HAL Hardware Abstraction Layer
  • the logic switch is switched between the first processing component and the second processing component.
  • the logic switch establishes the connection between the first processing component and the audio device, the connection of the second processing component to the audio device is disconnected, and vice versa.
  • the second processing component is logically coupled to the audio device.
  • the corresponding communication request can be processed independently, so after the first processing component or the second processing component is triggered to process the communication initiation request, the first processing is performed.
  • the component or the second processing component establishes a connection with the communication receiving device and transmits the communication data using the audio device.
  • the first type of communication request processing module includes:
  • the first determining unit is configured to determine whether the second processing component is connected to the audio device if the communication initiation request is the first type communication request; if yes, trigger the first connection establishing unit; if not, the first triggering unit.
  • a first connection establishing unit configured to disconnect the second processing component from the audio device, and establish a connection between the first processing component and the audio device;
  • the first triggering unit is configured to trigger the first processing component to process the communication initiation request.
  • the second type of communication request processing module includes:
  • the second determining unit is configured to determine whether the second processing component is connected to the audio device if the communication initiation request is the second type of communication request; if yes, trigger the second triggering unit; if not, trigger the second connection establishing unit.
  • a second connection establishing unit configured to disconnect the first processing component from the audio device, and establish a connection between the second processing component and the audio device;
  • the second triggering unit is configured to trigger the second processing component to process the communication initiation request.
  • Determining whether the second processing component is connected to the audio device may be determined by a second processing component communication state recorded in the HAL layer, the communication state being generated based on the type of the last communication initiation request. For example, when the communication state of the second processing component recorded in the HAL layer is in the on state, it indicates that the last call initiation request is the second type communication request; if the communication state is off, it indicates that the last call initiation request is the first A type of communication request. When the communication When the state is on, the second processing state is logically connected to the audio device, and the second processing state is disconnected from the logical connection of the audio device. The communication status of the second processing component is set to the HAL layer through the communication information management layer (TelephoneManager).
  • TelephoneManager communication information management layer
  • the method further includes:
  • a recording unit configured to record that a communication state between the second processing component and the audio device is in an open state
  • the first determining unit can be specifically used to:
  • the communication request is the first type of communication request, determining whether the communication state of the second processing component and the audio device is in an open state;
  • the second processing component can be disconnected from the audio device by default, that is, the first processing component is connected to the audio device by default, only in the When the second type of communication request is received, the connection of the second processing component to the audio device is established to implement communication of the private network. Therefore, it can be ensured that the user does not affect the system audio playing function when using the audio function of the communication device.
  • the method further includes:
  • a second receiving module configured to receive a communication end request
  • a disconnect module is configured to disconnect the second processing component from the audio device and establish a connection of the first processing component to the audio device.
  • the first processing component to the audio module is implemented on the basis of the original audio architecture based on the Android system by adding a logic switch.
  • the control by controlling the logical connection with the first processing component or the second processing component, implements targeted processing of communication initiation requests for different communication types. Therefore, the communication device that can support the communication between the civil network and the private network is designed, which greatly improves the user experience.
  • FIG. 4 is a schematic structural diagram of another embodiment of a communication device according to an embodiment of the present invention.
  • the device is applied to a communication device, and the communication device includes a first processing component, a second processing component, and an audio device.
  • the device can include:
  • the first receiving module 401 is configured to receive a communication initiation request.
  • the determining module 402 is configured to determine a communication type of the communication initiation request.
  • the first type of communication request processing module 403 is configured to establish a connection between the first processing component and the audio device and disconnect the second processing component from the audio device if the communication initiation request is the first type of communication request, and trigger the first processing The component handles the communication initiation request.
  • the first type of communication request processing module 403 can include:
  • the first determining unit 411 determines whether the second processing component is connected to the audio device if the communication initiation request is the first type of communication request, and if so, triggers the first obtaining unit 412; if not, triggers the first triggering unit 415.
  • the HAL layer since the HAL layer records the communication state of the second processing component, it can be determined whether the current second processing component is connected to the audio device only by determining the communication state of the second processing component in the HAL layer. .
  • the first obtaining unit 412 is configured to obtain an audio flag value corresponding to the first processing component.
  • the first disconnecting unit 413 is configured to disconnect the second audio transmission channel established by the second processing component and the audio device.
  • the first connection establishing unit 414 is configured to set a first audio transmission channel between the first processing component and the audio device based on the audio flag value to establish a connection between the first processing component and the audio device.
  • the logic switch After disconnecting the second audio transmission channel established by the second processing component and the audio device, at this time, the logic switch establishes a logical connection between the first processing component and the audio device.
  • the audio device may comprise a plurality of audio sub-devices, each audio sub-device corresponding to an audio flag value.
  • the selection control of the audio routing is added, and the audio routing is based on the connection state of the audio device in the communication device, and the audio flag value corresponding to the current communication initiation request is obtained.
  • the audio device in the communication device includes a headset, a speaker, and a Bluetooth.
  • the audio flag value corresponding to the Bluetooth is acquired, and the first audio transmission channel of the first processing component and the Bluetooth device is established.
  • the connection state of the external audio device is changed, for example, connected to the earphone, the first audio transmission channel can be switched to be connected to the earphone according to the generated audio flag value.
  • the first triggering unit 415 is configured to trigger the first processing component to process the communication initiation request.
  • the second type of communication request processing module 404 is configured to establish a connection between the second processing component and the audio device and disconnect the first processing component from the audio device if the communication initiation request is the second type of communication request, and trigger the second processing The component handles the communication initiation request.
  • the second type of communication request processing module 404 can include:
  • the second determining unit 416 is configured to determine whether the second processing component is connected to the audio device if the communication initiation request is the second type of communication request, and if so, trigger the second triggering unit 410; if not, trigger the second acquiring unit 417.
  • the second obtaining unit 417 is configured to obtain an audio flag value corresponding to the second processing component.
  • the second disconnecting unit 418 is configured to disconnect the first audio transmission channel established by the first processing component and the audio device.
  • the second connection establishing unit 419 is configured to set a second audio transmission channel between the second processing component and the audio device based on the audio flag value to establish a connection between the second processing component and the audio device.
  • the second triggering unit 420 is configured to trigger the second processing component to process the communication initiation request.
  • the communication initiation request type is the second type communication request
  • acquiring the audio device based connection status After the audio flag value corresponding to the second processing component is sent to the second processing component through the second processing component and the AT (ATCommands) command interface of the first processing component, the second audio component and the audio device are switched by the second processing component.
  • the AT command interface is a communication interface between the second processing component and the first processing component.
  • the volume setting of the second processing component can control the volume setting in the second processing component by expanding the volume setting interface in the system audio module, specifically, receiving the volume adjustment instruction at the volume setting interface of the audio module. Thereafter, the volume adjustment command can be sent to the second processing component through the AT command interface to implement adjustment of the volume of the second processing component.
  • the first processing component implements control of the volume setting and the audio transmission channel in the second processing component based on the AT command interface, and establishes the first processing component and the second processing component and the audio device based on the selection control of the audio routing. And connecting the first audio transmission channel of the first processing component and the second audio transmission channel of the second processing component to the audio device based on the audio flag value, without manual switching by the user, providing a convenient and flexible
  • the communication method has laid a foundation for designing a communication device that can support civil network communication and private network communication, and greatly improves the user experience.
  • FIG. 5 is a schematic structural diagram of an embodiment of a communication device according to an embodiment of the present invention.
  • the device may include: a first processing component 501, a second processing component 502, an audio device 503, and a memory 504 for storing a computer readable program.
  • Code, first processing component 501 is configured to execute computer program code to:
  • the second processing component 502 is connected to the audio device 504 and the first processing component 501 is disconnected from the audio device 504 and the second processing component 502 is triggered to process the communication initiation request.
  • processing component 501 is further configured to perform all or part of the foregoing method steps.
  • the first processing component 501 can include one or more processors to execute computer instructions.
  • the first processing component 501 can also be one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays. (FPGA), controller, microcontroller, microprocessor or other electronic component implementation for performing the above methods.
  • ASICs application specific integrated circuits
  • DSPs digital signal processors
  • DSPDs digital signal processing devices
  • PLDs programmable logic devices
  • FPGA field programmable gate arrays.
  • controller microcontroller, microprocessor or other electronic component implementation for performing the above methods.
  • the memory 504 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable.
  • SRAM static random access memory
  • EEPROM electrically erasable programmable read only memory
  • EPROM Programmable Read Only Memory
  • PROM Programmable Read Only Memory
  • ROM Read Only Memory
  • Magnetic Memory Fast Flash memory, disk or CD.
  • the electronic device may also include other components such as an input/output interface, a communication component, and the like.
  • the input/output interface provides an interface between the processing component and the peripheral interface module, and the peripheral interface module may be an output device, an input device, or the like.
  • the communication component is configured to facilitate wired or wireless communication between the mobile device and other devices, such as communication with the control device, and the like.
  • the second processing component 502 can also serve as an execution body for performing all or part of the foregoing method steps. This is not specifically limited.
  • the first processing component 501 establishes a connection with the audio device 503 and disconnects the second processing component 502 from the audio device 503 if the communication initiation request is a first type of communication request and processes
  • the communication initiation request may specifically be:
  • the communication initiation request is a first type of communication request, determining whether the second processing component 502 is connected to the audio device; if so, disconnecting the second processing component 502 from the audio device 503 and establishing a connection with the audio device 503; triggering The first processing component 501 processes the communication initiation request; if not, the first processing component 501 is triggered to process the communication initiation request.
  • the first processing component 501 establishes a connection of the second processing component 502 with the audio device 503 and disconnects the first processing component 501 and the audio device if the communication initiation request is a second type of communication request.
  • the connection of 503 and triggering the second processing component 502 to process the communication initiation request is specifically:
  • the communication initiation request is a second type of communication request
  • the connection of the device 503 establishes a connection between the second processing component 502 and the audio device 503; triggering the second processing component 502 to process the communication initiation request.
  • the first processing component 501 establishes a connection of the second processing component 502 with the audio device 503 and disconnects the first processing component 501 and the audio device if the communication initiation request is a second type of communication request.
  • the connection of 503 and triggering the second processing component 502 to process the communication initiation request specifically:
  • the audio device 503 may include multiple audio sub-devices; wherein each audio sub-device corresponds to one audio flag value;
  • the first processing component 501 disconnects the connection between the second processing component 502 and the audio device 503, and establishes a connection between the first processing component 501 and the audio device 503.
  • the first processing component 501 disconnects the connection with the audio device 503, and establishes the connection between the second processing component 502 and the audio device 503, specifically: acquiring the audio flag value corresponding to the second processing component 502; disconnecting the first processing component 501 from The first audio transmission channel established by the audio device 503; the second audio transmission channel between the second processing component 502 and the audio device 503 is set based on the audio flag value to establish a connection between the second processing component 502 and the audio device 503.
  • the embodiment of the present invention provides a computer program product, including a computer readable storage medium, for storing computer instructions used by the button detecting device of the embodiment of the present invention, which includes a method for performing a button detecting method in any of the above embodiments. program of.
  • the present invention provides a computer readable storage medium storing a computer program.
  • the computer program When the computer program is executed by a computer, the communication method in any of the above embodiments of FIG. 1 and FIG. 2 can be implemented, and in the embodiments of FIGS. 3 and 4 Communication device.
  • a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
  • the memory may include non-persistent memory, random access memory (RAM), and/or non-volatile memory in a computer readable medium, such as read only memory (ROM) or flash memory.
  • RAM random access memory
  • ROM read only memory
  • Memory is an example of a computer readable medium.
  • Computer readable media includes both permanent and non-persistent, removable and non-removable media.
  • Information storage can be implemented by any method or technology.
  • the information can be computer readable instructions, data structures, modules of programs, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory. (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disk read only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, Magnetic tape cartridges, magnetic tape storage or other magnetic storage devices or any other non-transportable media can be used to store information that can be accessed by a computing device.
  • computer readable media does not include non-transitory computer readable media, such as modulated data signals and carrier waves.
  • a first device is coupled to a second device
  • the first device can be directly electrically coupled to the second device.
  • the device is electrically coupled to the second device indirectly via other devices or coupling means.

Abstract

The present invention discloses a communication method and a communication device. The method is applied to a communication device, the communication device comprises a first processing component, a second processing component and an audio device. The method comprises: receiving a communication initiation request and determining the communication type of the communication initiation request. If the communication initiation request is a first type of communication request, establishing a connection between the first processing component and the audio device, disconnecting the second processing component from the audio device, and triggering the first processing component to process the communication initiation request. If the communication initiation request is a second type of communication request, establishing a connection between the second processing component and the audio device, disconnecting the first processing component from the audio device, and triggering the second processing component to process the communication initiation request. The present invention can realize a communication device capable of simultaneously supporting communication of different communication types on the basis of the communication method.

Description

通信方法及通信设备Communication method and communication device 技术领域Technical field
本发明涉及通信技术领域,尤其涉及一种通信方法及一种通信设备。The present invention relates to the field of communications technologies, and in particular, to a communication method and a communication device.
背景技术Background technique
目前,通信网主要分为民用通信网及专用通信网,专用通信网是指各机关、企业、铁路、航空、军事、气象等单位为本单位业务需要而设置的通信网。At present, the communication network is mainly divided into a civil communication network and a dedicated communication network, and the dedicated communication network refers to a communication network set up by various agencies, enterprises, railways, aviation, military, meteorological units and the like for the business needs of the unit.
传统的通信设备仅支持使用民用通信网进行通信,如果一些特殊行业工作人员需要使用专用通信网进行通信时,则需要再配备一个可以支持专用通信网的通信设备,造成资源上的浪费且不便于工作人员携带。因此提供一种能够同时支持专用通信网及民用通信网的通信设备是非常必要的。The traditional communication equipment only supports the communication using the civil communication network. If some special industry workers need to use the dedicated communication network for communication, they need to be equipped with a communication device that can support the dedicated communication network, which causes waste of resources and is inconvenient. Staff carry. It is therefore necessary to provide a communication device capable of supporting both a dedicated communication network and a civil communication network.
发明内容Summary of the invention
有鉴于此,本发明提供了一种通信方法及一种通信设备,实现了一种同时支持专用通信网及民用通信网的通信设备,大大提高了用户的使用体验。In view of this, the present invention provides a communication method and a communication device, and realizes a communication device that simultaneously supports a dedicated communication network and a civil communication network, thereby greatly improving the user experience.
为了解决上述技术问题,本发明提供了一种通信方法,应用于通信设备,通信设备包括第一处理组件、第二处理组件以及音频设备;该方法包括:In order to solve the above technical problem, the present invention provides a communication method, which is applied to a communication device, where the communication device includes a first processing component, a second processing component, and an audio device; the method includes:
接收通信发起请求;Receiving a communication initiation request;
判断通信发起请求的通信类型;Determining the communication type of the communication initiation request;
如果通信发起请求为第一类通信请求,建立第一处理组件与音频设备的连接以及断开第二处理组件与音频设备的连接,并触发第一处理组件处理通信发起请求;If the communication initiation request is a first type of communication request, establishing a connection of the first processing component with the audio device and disconnecting the second processing component from the audio device, and triggering the first processing component to process the communication initiation request;
如果通信发起请求为第二类通信请求,建立第二处理组件与音频设备的连接以及断开第一处理组件与音频设备的连接,并触发第二处理组件处理通信发起请求。If the communication initiation request is a second type of communication request, establishing a connection of the second processing component with the audio device and disconnecting the first processing component from the audio device, and triggering the second processing component to process the communication initiation request.
优选地,如果通信发起请求为第一类通信请求,建立第一处理组件与音频设备的连接以及断开第二处理组件与音频设备的连接,并触发第一处理处理通信发起请求包括:Preferably, if the communication initiation request is a first type of communication request, establishing a connection of the first processing component with the audio device and disconnecting the second processing component from the audio device, and triggering the first processing to process the communication initiation request comprises:
如果通信发起请求为第一类通信请求,判断第二处理组件与音频设备是否连接;If the communication initiation request is the first type of communication request, determining whether the second processing component is connected to the audio device;
如果是,断开第二处理组件与音频设备的连接,并建立第一处理组件与音频设备的连接; If yes, disconnecting the second processing component from the audio device and establishing a connection of the first processing component to the audio device;
触发第一处理组件处理通信发起请求;Triggering the first processing component to process the communication initiation request;
如果否,触发第一处理组件处理通信发起请求。If not, the first processing component is triggered to process the communication initiation request.
优选地,如果通信发起请求为第二类通信请求,建立第二处理组件与音频设备的连接以及断开第一处理组件与音频设备的连接,并触发第二处理组件处理通信发起请求包括:Preferably, if the communication initiation request is a second type of communication request, establishing a connection of the second processing component with the audio device and disconnecting the first processing component from the audio device, and triggering the second processing component to process the communication initiation request comprises:
如果通信发起请求为第二类通信请求,判断第二处理组件与音频设备是否连接;If the communication initiation request is a second type of communication request, determining whether the second processing component is connected to the audio device;
如果是,触发第二处理组件处理通信发起请求;If yes, triggering the second processing component to process the communication initiation request;
如果否,断开第一处理组件与音频设备的连接,建立第二处理组件与音频设备的连接;If not, disconnecting the first processing component from the audio device, establishing a connection between the second processing component and the audio device;
触发第二处理组件处理通信发起请求。Triggering the second processing component to process the communication initiation request.
优选地,如果通信发起请求为第二类通信请求,建立第二处理组件与音频设备的连接以及断开第一处理组件与音频设备的连接,并触发第二处理组件处理通信发起请求之后,还包括:Preferably, if the communication initiation request is a second type of communication request, establishing a connection of the second processing component with the audio device and disconnecting the first processing component from the audio device, and triggering the second processing component to process the communication initiation request, further include:
接收通信结束请求;Receiving a communication end request;
断开第二处理组件与音频设备的连接并建立第一处理组件与音频设备的连接。Disconnecting the second processing component from the audio device and establishing a connection of the first processing component to the audio device.
优选地,音频设备包括多个音频子设备;其中,每一个音频子设备对应一个音频标志数值;Preferably, the audio device comprises a plurality of audio sub-devices; wherein each audio sub-device corresponds to an audio flag value;
断开第二处理组件与音频设备的连接,并建立第一处理组件与音频设备的连接包括:Disconnecting the second processing component from the audio device and establishing a connection of the first processing component to the audio device includes:
获取第一处理组件对应的音频标志数值;Obtaining an audio flag value corresponding to the first processing component;
断开第二处理组件与音频设备建立的第二音频传输通道;Disconnecting a second audio transmission channel established by the second processing component and the audio device;
基于音频标志数值设置第一处理组件与音频设备之间的第一音频传输通道,以建立第一处理组件与音频设备的连接。A first audio transmission channel between the first processing component and the audio device is set based on the audio flag value to establish a connection of the first processing component to the audio device.
优选地,音频设备包括多个音频子设备;其中,每一个音频子设备对应一个音频标志数值;Preferably, the audio device comprises a plurality of audio sub-devices; wherein each audio sub-device corresponds to an audio flag value;
断开第一处理组件与音频设备的连接,并建立第二处理组件与音频设备的连接包括:Disconnecting the first processing component from the audio device and establishing a connection of the second processing component to the audio device includes:
获取第二处理组件对应的音频标志数值;Obtaining an audio flag value corresponding to the second processing component;
断开第一处理组件与音频设备建立的第一音频传输通道;Disconnecting the first audio transmission channel established by the first processing component and the audio device;
基于音频标志数值设置第二处理组件与音频设备之间的第二音频传输通道,以建立第二 处理组件与音频设备的连接。Setting a second audio transmission channel between the second processing component and the audio device based on the audio flag value to establish a second Handle the connection of the component to the audio device.
本发明提供了一种通信设备,通信设备包括第一处理组件、第二处理组件、音频设备及存储器;存储器用于存储计算机可读程序代码,第一处理组件用于执行计算机可读程序代码以实现:The present invention provides a communication device including a first processing component, a second processing component, an audio device, and a memory; a memory for storing computer readable program code, the first processing component for executing computer readable program code achieve:
接收通信发起请求;判断通信发起请求的通信类型;如果通信发起请求为第一类通信请求,建立与音频设备的连接以及断开第二处理组件与音频设备的连接,并处理通信发起请求;如果通信发起请求为第二类通信请求,建立第二处理组件与音频设备的连接以及断开与音频设备的连接,并触发第二处理组件处理通信发起请求。Receiving a communication initiation request; determining a communication type of the communication initiation request; establishing a connection with the audio device and disconnecting the second processing component from the audio device if the communication initiation request is the first type communication request, and processing the communication initiation request; The communication initiation request is a second type of communication request, establishing a connection of the second processing component with the audio device and disconnecting the audio device, and triggering the second processing component to process the communication initiation request.
优选地,第一处理组件如果通信发起请求为第一类通信请求,建立与音频设备的连接以及断开第二处理组件与音频设备的连接,并处理通信发起请求具体是:Preferably, the first processing component establishes a connection with the audio device and disconnects the second processing component from the audio device if the communication initiation request is the first type of communication request, and processes the communication initiation request specifically:
如果通信发起请求为第一类通信请求,判断第二处理组件与音频设备是否连接;如果是,断开第二处理组件与音频设备的连接,并建立与音频设备的连接;触发第一处理组件处理通信发起请求;如果否,触发第一处理组件处理通信发起请求。If the communication initiation request is a first type of communication request, determining whether the second processing component is connected to the audio device; if so, disconnecting the second processing component from the audio device and establishing a connection with the audio device; triggering the first processing component Processing the communication initiation request; if not, triggering the first processing component to process the communication initiation request.
优选地,第一处理组件如果通信发起请求为第二类通信请求,建立第二处理组件与音频设备的连接以及断开与音频设备的连接,并触发第二处理组件处理通信发起请求具体是:Preferably, the first processing component establishes the connection of the second processing component to the audio device and disconnects the audio device if the communication initiation request is the second type of communication request, and triggers the second processing component to process the communication initiation request, specifically:
如果通信发起请求为第二类通信请求,判断第二处理组件与音频设备是否连接;如果是,触发第二处理组件处理通信发起请求;如果否,断开第一处理组件与音频设备的连接,建立第二处理组件与音频设备的连接;触发第二处理组件处理通信发起请求。If the communication initiation request is a second type of communication request, determining whether the second processing component is connected to the audio device; if yes, triggering the second processing component to process the communication initiation request; if not, disconnecting the first processing component from the audio device, Establishing a connection of the second processing component to the audio device; triggering the second processing component to process the communication initiation request.
优选地,第一处理组件如果通信发起请求为第二类通信请求,建立第二处理组件与音频设备的连接以及断开与音频设备的连接,并触发第二处理组件处理通信发起请求之后,具体是:Preferably, the first processing component, after the communication initiation request is a second type of communication request, establishing a connection of the second processing component with the audio device and disconnecting the audio device, and triggering the second processing component to process the communication initiation request, specifically Yes:
接收通信结束请求;断开第二处理组件与音频设备的连接并建立第一处理组件与音频设备的连接。Receiving a communication end request; disconnecting the second processing component from the audio device and establishing a connection of the first processing component to the audio device.
优选地,音频设备包括多个音频子设备;其中,每一个音频子设备对应一个音频标志数值;Preferably, the audio device comprises a plurality of audio sub-devices; wherein each audio sub-device corresponds to an audio flag value;
第一处理组件断开第二处理组件与音频设备的连接,并建立第一处理组件与音频设备的连接具体是:The first processing component disconnects the connection of the second processing component from the audio device, and establishes a connection between the first processing component and the audio device, specifically:
获取第一处理组件对应的音频标志数值;断开第二处理组件与音频设备建立的第二音频 传输通道;基于音频标志数值设置第一处理组件与音频设备之间的第一音频传输通道,以建立第一处理组件与音频设备的连接。Obtaining an audio flag value corresponding to the first processing component; disconnecting the second audio generated by the second processing component and the audio device a transmission channel; setting a first audio transmission channel between the first processing component and the audio device based on the audio flag value to establish a connection of the first processing component to the audio device.
优选地,处理组件音频设备包括多个音频子设备;其中,每一个音频子设备对应一个音频标志数值;Preferably, the processing component audio device comprises a plurality of audio sub-devices; wherein each audio sub-device corresponds to an audio flag value;
第一处理组件断开第一处理组件与音频设备的连接,并建立第二处理组件与音频组件的连接具体是:获取第二处理组件对应的音频标志数值;断开第一处理组件与音频设备建立的第一音频传输通道;基于音频标志数值设置第二处理组件与音频设备之间的第二音频传输通道,以建立第二处理组件与音频设备的连接。The first processing component disconnects the connection between the first processing component and the audio device, and establishes the connection between the second processing component and the audio component, specifically: acquiring an audio flag value corresponding to the second processing component; and disconnecting the first processing component and the audio device Establishing a first audio transmission channel; setting a second audio transmission channel between the second processing component and the audio device based on the audio flag value to establish a connection of the second processing component to the audio device.
本发明提供了一种计算机可读存储介质,存储有计算机程序,计算机程序被计算机执行时可以实现上述任一项通信方法。The present invention provides a computer readable storage medium storing a computer program that can implement any of the above communication methods when executed by a computer.
与现有技术相比,本发明可以获得包括以下技术效果:Compared with the prior art, the present invention can obtain the following technical effects:
本发明给出了一种通信方法,该方法应用于通信设备,通信设备包括第一处理处理组件、第二处理组件以及音频设备。该方法通过接收通信发起请求后,判断通信发起请求的通信类型。如果通信发起请求为第一类通信请求,建立第一处理组件与音频设备的连接以及断开第二处理组件与音频设备的连接,并触发第一处理组件处理通信发起请求。如果通信发起请求为第二类通信请求,建立第二处理组件与音频设备的连接以及断开第一处理组件与音频设备的连接,并触发第二处理组件处理通信发起请求。通过判断通话发起请求的通话类型,并根据通话发起请求的通话类型建立第一处理组件或第二处理组件与音频设备的连接,基于该通信方法可实现一种可同时支持不同通信类型通信的通信设备。The present invention provides a communication method that is applied to a communication device that includes a first processing processing component, a second processing component, and an audio device. The method determines the communication type of the communication initiation request after receiving the communication initiation request. If the communication initiation request is a first type of communication request, establishing a connection of the first processing component with the audio device and disconnecting the second processing component from the audio device, and triggering the first processing component to process the communication initiation request. If the communication initiation request is a second type of communication request, establishing a connection of the second processing component with the audio device and disconnecting the first processing component from the audio device, and triggering the second processing component to process the communication initiation request. By determining the call type of the call initiation request, and establishing a connection between the first processing component or the second processing component and the audio device according to the call type of the call initiation request, based on the communication method, a communication capable of simultaneously supporting communication of different communication types can be realized. device.
附图说明DRAWINGS
图1是本发明实施例的一种通信方法的一个实施例的流程图;1 is a flow chart of an embodiment of a communication method according to an embodiment of the present invention;
图2是本发明实施例的一种通信方法的另一个实施例的流程图;2 is a flow chart of another embodiment of a communication method according to an embodiment of the present invention;
图3是本发明实施例的一种通信装置的一个实施例的结构示意图;3 is a schematic structural diagram of an embodiment of a communication apparatus according to an embodiment of the present invention;
图4是本发明实施例的一种通信装置的另一个实施例的结构示意图;4 is a schematic structural diagram of another embodiment of a communication device according to an embodiment of the present invention;
图5是本发明实施例的一种通信设备的一个实施例的结构示意图。FIG. 5 is a schematic structural diagram of an embodiment of a communication device according to an embodiment of the present invention.
具体实施方式 Detailed ways
以下将配合附图及实施例来详细说明本发明的实施方式,藉此对本发明如何应用技术手段来解决技术问题并达成技术功效的实现过程能充分理解并据以实施。The embodiments of the present invention will be described in detail below with reference to the accompanying drawings and embodiments, in which the present invention can be fully understood and implemented by the technical means of solving the technical problems and achieving the technical effects.
本发明实施例提供了一种通信方法及一种通信设备,适用但不限于可以进行通信的手机,能够实现通信的可穿戴设备或其他电子设备。The embodiments of the present invention provide a communication method and a communication device, which are applicable to, but not limited to, a mobile phone that can communicate, and a wearable device or other electronic device that can implement communication.
目前,专用网的通信设备通常是由专门的生产厂商研发、制造的。用户通常使用的通信设备并不具备支持专用网通信功能,仅适用于民用网通信。因此,要设计一种同时支持专用通信网及民用通信网的通信设备,需要解决如何将具有专用网通信功能的通信模块嵌入到现有支持民用网通信功能的通信设备中。At present, the communication equipment of the private network is usually developed and manufactured by a specialized manufacturer. The communication equipment that users usually use does not have the function of supporting private network communication, and is only suitable for civil network communication. Therefore, in order to design a communication device that supports both a dedicated communication network and a civil communication network, it is necessary to solve how to embed a communication module having a dedicated network communication function into a communication device that supports the communication function of the civil network.
为了解决如何将具有专用网通信功能的通信模块嵌入到现有支持民用网通信功能的通信设备中的技术问题,发明人经过一系列研究提出了本发明的技术方案。本发明中,可以应用于通信设备,通信设备包括第一处理组件、第二处理组件以及音频设备。方法通过接收通信发起请求后,判断通信发起请求的通信类型。如果通信发起请求为第一类通信请求,建立第一处理组件与音频设备的连接以及断开第二处理组件与音频设备的连接,并触发第一处理组件处理通信发起请求。如果通信发起请求为第二类通信请求,建立第二处理组件与音频设备的连接以及断开第一处理组件与音频设备的连接,并触发第二处理组件处理通信发起请求。通过判断通话发起请求的通话类型,并根据通话发起请求的通话类型建立第一处理组件或第二处理组件与音频设备的连接,实现了一种可同时支持不同通信类型通信的通信设备。下面将结合附图对本发明技术方案进行详细描述。In order to solve the technical problem of how to embed a communication module having a dedicated network communication function into a communication device that supports the communication function of the civil network, the inventors have proposed a technical solution of the present invention through a series of studies. In the present invention, it can be applied to a communication device including a first processing component, a second processing component, and an audio device. The method determines the communication type of the communication initiation request after receiving the communication initiation request. If the communication initiation request is a first type of communication request, establishing a connection of the first processing component with the audio device and disconnecting the second processing component from the audio device, and triggering the first processing component to process the communication initiation request. If the communication initiation request is a second type of communication request, establishing a connection of the second processing component with the audio device and disconnecting the first processing component from the audio device, and triggering the second processing component to process the communication initiation request. By determining the call type of the call initiation request and establishing the connection of the first processing component or the second processing component with the audio device according to the call type of the call initiation request, a communication device capable of simultaneously supporting communication of different communication types is realized. The technical solution of the present invention will be described in detail below with reference to the accompanying drawings.
图1是本发明实施例提供的一种通信方法的一个实施例的流程图,该方法应用于通信设备,该通信设备可以包括:包括第一处理组件、第二处理组件以及音频设备。FIG. 1 is a flowchart of an embodiment of a communication method according to an embodiment of the present invention. The method is applied to a communication device, and the communication device may include: a first processing component, a second processing component, and an audio device.
该方法可以包括:The method can include:
101:接收通信发起请求。101: Receive a communication initiation request.
102:判断通信发起请求的通信类型。102: Determine the communication type of the communication initiation request.
本发明实施例中,执行主体既可以是第一处理组件也可以是第二处理组件,在此不做具体的限定。In the embodiment of the present invention, the execution entity may be the first processing component or the second processing component, and is not specifically limited herein.
基于Andiord(安卓)系统的通信设备中,该第一处理组件可以包括一个或多个处理器,该处理组件除可以实现通信功能外,还可以实现该通信设备其它功能,例如音视频播放功能、拍照功能,APP(Application,应用软件)应用功能等。其中,第一处理组件的性能优于第二处理组件。第二处理组件可以是微控制器或单片机独立于第一处理组件,可以独立实现对通信请求及音频信号的处理,并通过提供通信接口实现与第一处理组件的信息交互。In the communication device based on the Andiord (Android) system, the first processing component may include one or more processors, which in addition to the communication function, may also implement other functions of the communication device, such as audio and video playback functions, Camera function, APP (Application, application software) application functions. Wherein the performance of the first processing component is better than the second processing component. The second processing component can be a microcontroller or a microcontroller independently of the first processing component, can independently process the communication request and the audio signal, and implement information interaction with the first processing component by providing a communication interface.
以第一处理组件作为执行主体为例,第一处理组件接收到通信发起请求后首先判断该发 起请求的通信类型。本发明中该通信类型可以分为但不限于:民用网通信类型以及专用网通信类型。Taking the first processing component as an execution subject as an example, the first processing component first determines the sending after receiving the communication initiation request. The type of communication requested. The communication type in the present invention can be divided into, but not limited to, a civil network communication type and a private network communication type.
实际应用中,民用网通信的使用较为频繁,而专用网通信功能通常仅在工作时间使用,因此在基于Andiord系统的通信设备中,通常将民用网通信类型作为第一类通信请求,由第一处理组件进行处理;将专用网通信请求作为第二类通信请求,由第二处理组件进行处理。In practical applications, the use of civil network communication is more frequent, and the private network communication function is usually only used during working hours. Therefore, in the communication device based on the Andiord system, the civil network communication type is usually used as the first type of communication request, by the first The processing component performs processing; the private network communication request is treated as a second type of communication request, and is processed by the second processing component.
103:如果通信发起请求为第一类通信请求,建立第一处理组件与音频设备的连接以及断开第二处理组件与音频设备的连接,并触发第一处理组件处理通信发起请求。103: If the communication initiation request is a first type of communication request, establishing a connection of the first processing component with the audio device and disconnecting the second processing component from the audio device, and triggering the first processing component to process the communication initiation request.
104:如果通信发起请求为第二类通信请求,建立第二处理组件与音频设备的连接以及断开第一处理组件与音频设备的连接,并触发第二处理组件处理通信发起请求。104: If the communication initiation request is a second type of communication request, establishing a connection of the second processing component with the audio device and disconnecting the first processing component from the audio device, and triggering the second processing component to process the communication initiation request.
其中,音频设备可以包括音频播放设备及音频接收设备,例如喇叭、耳机、蓝牙等。在实际使用中,音频设备已经与第一处理组件及第二处理组件进行物理连接。基于Andiord系统的第一处理组件则通过增加逻辑开关实现对音频设备逻辑连接的管控。逻辑开关通过HAL(Hardware Abstraction Layer,硬件抽象层)层的数据来决策并通知音频驱动控制逻辑开关的切换。The audio device may include an audio playback device and an audio receiving device, such as a speaker, a headset, a Bluetooth, and the like. In actual use, the audio device has been physically connected to the first processing component and the second processing component. The first processing component based on the Andiord system implements control of the logical connection of the audio device by adding logic switches. The logic switch determines and notifies the switching of the audio drive control logic switch through the data of the HAL (Hardware Abstraction Layer) layer.
本发明中,逻辑开关在第一处理组件与第二处理组件之间切换,当逻辑开关建立第一处理组件与音频设备的连接后,第二处理组件与音频设备的连接是断开的,反之第二处理组件与音频设备是逻辑连接的。In the present invention, the logic switch is switched between the first processing component and the second processing component. When the logic switch establishes the connection between the first processing component and the audio device, the connection of the second processing component to the audio device is disconnected, and vice versa. The second processing component is logically coupled to the audio device.
由于第一处理组件与第二处理组件是两个相互独立的处理组件,均可独立处理相应的通信请求,因此在触发第一处理组件或第二处理组件处理通信发起请求后,将第一处理组件或第二处理组件建立与通信接收设备的连接,并利用音频设备传输通信数据。Since the first processing component and the second processing component are two independent processing components, the corresponding communication request can be processed independently, so after the first processing component or the second processing component is triggered to process the communication initiation request, the first processing is performed. The component or the second processing component establishes a connection with the communication receiving device and transmits the communication data using the audio device.
可选地,在某些实施例中,如果通信发起请求为第一类通信请求,建立第一处理组件与音频设备的连接以及断开第二处理组件与音频设备的连接,并触发第一处理处理通信发起请求包括:Optionally, in some embodiments, if the communication initiation request is a first type of communication request, establishing a connection of the first processing component with the audio device and disconnecting the second processing component from the audio device, and triggering the first process Handling communication initiation requests includes:
如果通信发起请求为第一类通信请求,判断第二处理组件与音频设备是否连接;If the communication initiation request is the first type of communication request, determining whether the second processing component is connected to the audio device;
如果是,断开第二处理组件与音频设备的连接,并建立第一处理组件与音频设备的连接;If yes, disconnecting the second processing component from the audio device and establishing a connection of the first processing component to the audio device;
触发第一处理组件处理通信发起请求;Triggering the first processing component to process the communication initiation request;
如果否,触发第一处理组件处理通信发起请求。If not, the first processing component is triggered to process the communication initiation request.
可选地,在某些实施例中,如果通信发起请求为第二类通信请求,建立第二处理组件与音频设备的连接以及断开第一处理组件与音频设备的连接,并触发第二处理组件处理通信发起请求包括:Optionally, in some embodiments, if the communication initiation request is a second type of communication request, establishing a connection of the second processing component with the audio device and disconnecting the first processing component from the audio device, and triggering the second process The component processing communication initiation request includes:
如果通信发起请求为第二类通信请求,判断第二处理组件与音频设备是否连接; If the communication initiation request is a second type of communication request, determining whether the second processing component is connected to the audio device;
如果是,触发第二处理组件处理通信发起请求If yes, trigger the second processing component to process the communication initiation request
如果否,断开第一处理组件与音频设备的连接,建立第二处理组件与音频设备的连接;If not, disconnecting the first processing component from the audio device, establishing a connection between the second processing component and the audio device;
触发第二处理组件处理通信发起请求。Triggering the second processing component to process the communication initiation request.
判断第二处理组件是否与音频设备连接,可以通过HAL层中记录的第二处理组件通信状态进行判断,该通信状态是基于上一次通信发起请求的类型生成的。例如,当HAL层中记录的第二处理组件的通信状态处于开启状态,则表明上一次通话发起请求为第二类通信请求;如果该通信状态处于关闭状态,则表明上一次通话发起请求为第一类通信请求。当该通信状态处于开启状态时,第二处理状态与音频设备为逻辑连接,反之该第二处理状态与音频设备的逻辑连接为断开的。其中,第二处理组件的通信状态是通过通信信息管理层(TelephoneManager)设置到HAL层中。Determining whether the second processing component is connected to the audio device may be determined by a second processing component communication state recorded in the HAL layer, the communication state being generated based on the type of the last communication initiation request. For example, when the communication state of the second processing component recorded in the HAL layer is in the on state, it indicates that the last call initiation request is the second type communication request; if the communication state is off, it indicates that the last call initiation request is the first A type of communication request. When the communication state is in an on state, the second processing state is logically connected to the audio device, and the second processing state is disconnected from the logical connection of the audio device. The communication status of the second processing component is set to the HAL layer through the communication information management layer (TelephoneManager).
可选地,在某些实施例中,触发第二处理组件处理通信请求之后,该方法还可以包括:Optionally, in some embodiments, after the second processing component is triggered to process the communication request, the method may further include:
记录第二处理组件与音频设备之间的通信状态处于开启状态;Recording that the communication state between the second processing component and the audio device is in an on state;
如果通信请求为第一类通信请求,判断第二处理组件与音频设备是否连接包括:If the communication request is a first type of communication request, determining whether the second processing component is connected to the audio device comprises:
如果通信请求为第一类通信请求,判断第二处理组件与音频设备的通信状态是否处于开启状态;If the communication request is the first type of communication request, determining whether the communication state of the second processing component and the audio device is in an open state;
如果是,确定第二处理组件与音频设备连接;If yes, determining that the second processing component is connected to the audio device;
如果否,确定第一处理组件与音频设备连接。If not, it is determined that the first processing component is connected to the audio device.
可选地,为了保证Andiord系统的音频模块可以正常工作,可设置在默认状态下,第二处理组件与音频设备为断开连接,也即默认状态下第一处理组件与音频设备连接,仅在接收到第二类通信请求的情况下建立第二处理组件与音频设备的连接,实现专用网的通信。从而可以保证用户在使用通信设备的音频功能时,不影响系统音频播放功能。Optionally, in order to ensure that the audio module of the Andiord system can work normally, the second processing component can be disconnected from the audio device by default, that is, the first processing component is connected to the audio device by default, only in the When the second type of communication request is received, the connection of the second processing component to the audio device is established to implement communication of the private network. Therefore, it can be ensured that the user does not affect the system audio playing function when using the audio function of the communication device.
可选地,如果通信发起请求为第二类通信请求,建立第二处理组件与音频设备的连接以及断开第一处理组件与音频设备的连接,并触发第二处理组件处理通信发起请求之后,还包括:Optionally, if the communication initiation request is a second type of communication request, establishing a connection of the second processing component with the audio device, and disconnecting the first processing component from the audio device, and triggering the second processing component to process the communication initiation request, Also includes:
接收通信结束请求;Receiving a communication end request;
断开第二处理组件与音频设备的连接并建立第一处理组件与音频设备的连接。Disconnecting the second processing component from the audio device and establishing a connection of the first processing component to the audio device.
本发明实施例中,通过在建立第一处理组件及第二处理组件与音频设备物理连接的基础上,基于Android系统通过增加逻辑开关,在原有音频架构基础上,实现第一处理组件对音频模块的管控,通过控制与第一处理组件或第二处理组件的逻辑连接,实现了对不同通信类型的通信发起请求的针对性处理。从而设计获得了可以支持将民用网通信及专用网通信的通信设备,大大提高了用户的使用体验。 In the embodiment of the present invention, based on the physical connection between the first processing component and the second processing component and the audio device, the first processing component to the audio module is implemented on the basis of the original audio architecture based on the Android system by adding a logic switch. The control, by controlling the logical connection with the first processing component or the second processing component, implements targeted processing of communication initiation requests for different communication types. Therefore, the communication device that can support the communication between the civil network and the private network is designed, which greatly improves the user experience.
图2是本发明实施例的一种通信方法的另一个实施例的流程图,该方法应用于通信设备,该通信设备包括第一处理组件、第二处理组件以及音频设备。2 is a flow chart of another embodiment of a communication method according to an embodiment of the present invention, the method being applied to a communication device, the communication device including a first processing component, a second processing component, and an audio device.
该方法可以包括:The method can include:
201:接收通信发起请求。201: Receive a communication initiation request.
202:判断通信发起请求的通信类型。202: Determine the communication type of the communication initiation request.
203:如果通信发起请求为第一类通信请求,判断第二处理组件与音频设备是否连接,如果是,执行步骤204;如果否,执行步骤207。203: If the communication initiation request is the first type of communication request, determine whether the second processing component is connected to the audio device, if yes, execute step 204; if no, perform step 207.
基于图1实施例可知,由于HAL层记录了该第二处理组件的通信状态,因此仅通过判断HAL层中该第二处理组件的通信状态即可判断出当前第二处理组件与音频设备是否连接。According to the embodiment of FIG. 1 , since the HAL layer records the communication state of the second processing component, it can be determined whether the current second processing component is connected to the audio device only by determining the communication state of the second processing component in the HAL layer. .
204:获取第一处理组件对应的音频标志数值。204: Acquire an audio flag value corresponding to the first processing component.
205:断开第二处理组件与音频设备建立的第二音频传输通道。205: Disconnect the second audio transmission channel established by the second processing component and the audio device.
206:基于音频标志数值设置第一处理组件与音频设备之间的第一音频传输通道,以建立第一处理组件与音频设备的连接。206: Set a first audio transmission channel between the first processing component and the audio device based on the audio flag value to establish a connection between the first processing component and the audio device.
在断开第二处理组件与音频设备建立的第二音频传输通道后,此时,逻辑开关建立了第一处理组件与音频设备的逻辑连接。为了建立该第一处理组件与音频设备的第一音频传输通道。可选地,音频设备可以包括多个音频子设备,每一个音频子设备对应一个音频标志数值。为了实现第一处理组件对系统音频模块的管控,增加了音频路由选择的选择控制,该音频路由选择基于该通信设备中的音频设备的连接状态,获取当前通信发起请求对应的音频标志数值。例如,通信设备中的音频设备包括耳机,喇叭,蓝牙,当该通信设备处于蓝牙连接状态时,获取蓝牙对应的音频标志数值,建立第一处理组件与蓝牙设备的第一音频传输通道。当然,如果外部音频设备的连接状态发生改变时,例如连接为耳机,可根据生成的音频标志数值切换该第一音频传输通道与耳机进行连接。After disconnecting the second audio transmission channel established by the second processing component and the audio device, at this time, the logic switch establishes a logical connection between the first processing component and the audio device. In order to establish the first audio transmission channel of the first processing component and the audio device. Alternatively, the audio device may comprise a plurality of audio sub-devices, each audio sub-device corresponding to an audio flag value. In order to implement the control of the system audio module by the first processing component, the selection control of the audio routing is added, and the audio routing is based on the connection state of the audio device in the communication device, and the audio flag value corresponding to the current communication initiation request is obtained. For example, the audio device in the communication device includes a headset, a speaker, and a Bluetooth. When the communication device is in a Bluetooth connection state, the audio flag value corresponding to the Bluetooth is acquired, and the first audio transmission channel of the first processing component and the Bluetooth device is established. Of course, if the connection state of the external audio device is changed, for example, connected to the earphone, the first audio transmission channel can be switched to be connected to the earphone according to the generated audio flag value.
207:触发第一处理组件处理通信发起请求。207: Trigger the first processing component to process the communication initiation request.
208:如果通信发起请求为第二类通信请求,判断第二处理组件与音频设备是否连接,如果是,执行步骤212;如果否,执行步骤209。208: If the communication initiation request is a second type of communication request, determine whether the second processing component is connected to the audio device, and if yes, perform step 212; if no, perform step 209.
209:获取第二处理组件对应的音频标志数值。209: Acquire an audio flag value corresponding to the second processing component.
210:断开第一处理组件与音频设备建立的第一音频传输通道。210: Disconnect the first audio transmission channel established by the first processing component and the audio device.
211:基于音频标志数值设置第二处理组件与音频设备之间的第二音频传输通道,以建立第二处理组件与音频设备的连接。211: Set a second audio transmission channel between the second processing component and the audio device based on the audio flag value to establish a connection between the second processing component and the audio device.
212:触发第二处理组件处理通信发起请求。212: Trigger the second processing component to process the communication initiation request.
可选地,当通信发起请求类型为第二类通信请求时,在基于音频设备的连接状态获取该 第二处理组件对应的音频标志数值后,需要通过第二处理组件与该第一处理组件的AT(ATCommands)命令接口发送至第二处理组件,由第二处理组件切换第二音频通道与音频设备的连接,以建立第二处理组件与音频设备的连接。其中,AT命令接口为第二处理组件与该第一处理组件的通信接口。Optionally, when the communication initiation request type is the second type communication request, acquiring the audio device based connection status After the audio flag value corresponding to the second processing component is sent to the second processing component through the second processing component and the AT (ATCommands) command interface of the first processing component, the second audio component and the audio device are switched by the second processing component. The connection to establish a connection between the second processing component and the audio device. The AT command interface is a communication interface between the second processing component and the first processing component.
可选地,第二处理组件的音量设置可以通过扩展系统音频模块中的音量设置接口进行对第二处理组件中音量设置的管控,具体地,在该音频模块的音量设置接口接收到音量调节指令后,可通过AT命令接口发送至该音量调节指令至第二处理组件,以实现对第二处理组件的音量的调节。Optionally, the volume setting of the second processing component can control the volume setting in the second processing component by expanding the volume setting interface in the system audio module, specifically, receiving the volume adjustment instruction at the volume setting interface of the audio module. Thereafter, the volume adjustment command can be sent to the second processing component through the AT command interface to implement adjustment of the volume of the second processing component.
本发明实施例中,第一处理组件基于AT命令接口实现对第二处理组件中音量设置及音频传输通道的管控,并基于音频路由的选择控制建立第一处理组件及第二处理组件与音频设备的连接,并可基于音频标志数值切换第一处理组件的第一音频传输通道及第二处理组件的第二音频传输通道与音频设备的连接,无需用户进行手动切换,提供了一种便捷,灵活的通信方法,为设计获得了可以支持将民用网通信及专用网通信的通信设备奠定了基础,大大提高了用户的使用体验。In the embodiment of the present invention, the first processing component implements control of the volume setting and the audio transmission channel in the second processing component based on the AT command interface, and establishes the first processing component and the second processing component and the audio device based on the selection control of the audio routing. And connecting the first audio transmission channel of the first processing component and the second audio transmission channel of the second processing component to the audio device based on the audio flag value, without manual switching by the user, providing a convenient and flexible The communication method has laid a foundation for designing a communication device that can support civil network communication and private network communication, and greatly improves the user experience.
图3是本发明实施例提供的一种通信装置的一个实施例的结构示意图,该装置应用于通信设备,该通信设备可以包括:包括第一处理组件、第二处理组件以及音频设备。FIG. 3 is a schematic structural diagram of an embodiment of a communication device according to an embodiment of the present invention. The device is applied to a communication device, and the communication device may include: a first processing component, a second processing component, and an audio device.
该装置可以包括:The device can include:
第一接收模块301,用于接收通信发起请求。The first receiving module 301 is configured to receive a communication initiation request.
判断模块302,用于判断通信发起请求的通信类型。The determining module 302 is configured to determine a communication type of the communication initiation request.
基于Andiord(安卓)系统的通信设备中,该第一处理组件可以包括一个或多个处理器,该处理组件除可以实现通信功能外,还可以实现该通信设备其它功能,例如音视频播放功能、拍照功能,APP(Application,应用软件)应用功能等。其中,第一处理组件的性能由于第二处理组件。第二处理组件可以是微控制器或单片机独立于第一处理组件,可以独立实现对通信请求及音频信号的处理,并通过提供通信接口实现与第一处理组件的信息交互。In the communication device based on the Andiord (Android) system, the first processing component may include one or more processors, which in addition to the communication function, may also implement other functions of the communication device, such as audio and video playback functions, Camera function, APP (Application, application software) application functions. Wherein the performance of the first processing component is due to the second processing component. The second processing component can be a microcontroller or a microcontroller independently of the first processing component, can independently process the communication request and the audio signal, and implement information interaction with the first processing component by providing a communication interface.
处理组件接收到通信发起请求后首先判断该发起请求的通信类型。本发明中该通信类型可以分为但不限于:民用网通信类型以及专用网通信类型。After receiving the communication initiation request, the processing component first determines the communication type of the initiation request. The communication type in the present invention can be divided into, but not limited to, a civil network communication type and a private network communication type.
实际应用中,民用网通信的使用较为频繁,而专用网通信功能通常仅在工作时间使用,因此在基于Andiord系统的通信设备中,通常将民用网通信类型作为第一类通信请求,由第一处理组件进行处理;将专用网通信请求作为第二类通信请求,由第二处理组件进行处理。In practical applications, the use of civil network communication is more frequent, and the private network communication function is usually only used during working hours. Therefore, in the communication device based on the Andiord system, the civil network communication type is usually used as the first type of communication request, by the first The processing component performs processing; the private network communication request is treated as a second type of communication request, and is processed by the second processing component.
第一类通信请求处理模块303,用于如果通信发起请求为第一类通信请求,建立第一处理组件与音频设备的连接以及断开第二处理组件与音频设备的连接,并触发第一处理组件处 理通信发起请求。The first type of communication request processing module 303 is configured to establish a connection between the first processing component and the audio device and disconnect the second processing component from the audio device if the communication initiation request is the first type of communication request, and trigger the first processing Component The communication initiates the request.
第二类通信请求处理模块304,用于如果通信发起请求为第二类通信请求,建立第二处理组件与音频设备的连接以及断开第一处理组件与音频设备的连接,并触发第二处理组件处理通信发起请求。The second type of communication request processing module 304 is configured to establish a connection between the second processing component and the audio device and disconnect the first processing component from the audio device if the communication initiation request is the second type of communication request, and trigger the second processing The component handles the communication initiation request.
其中,音频设备可以包括音频播放设备及音频接收设备,例如喇叭、耳机、蓝牙等。在实际使用中,音频设备已经与第一处理组件及第二处理组件进行物理连接。基于Andiord系统的第一处理组件则通过增加逻辑开关实现对音频设备逻辑连接的管控。逻辑开关通过HAL(Hardware Abstraction Layer,硬件抽象层)层的数据来决策并通知音频驱动控制逻辑开关的切换。The audio device may include an audio playback device and an audio receiving device, such as a speaker, a headset, a Bluetooth, and the like. In actual use, the audio device has been physically connected to the first processing component and the second processing component. The first processing component based on the Andiord system implements control of the logical connection of the audio device by adding logic switches. The logic switch determines and notifies the switching of the audio drive control logic switch through the data of the HAL (Hardware Abstraction Layer) layer.
本发明中,逻辑开关在第一处理组件与第二处理组件之间切换,当逻辑开关建立第一处理组件与音频设备的连接后,第二处理组件与音频设备的连接是断开的,反之第二处理组件与音频设备是逻辑连接的。In the present invention, the logic switch is switched between the first processing component and the second processing component. When the logic switch establishes the connection between the first processing component and the audio device, the connection of the second processing component to the audio device is disconnected, and vice versa. The second processing component is logically coupled to the audio device.
由于第一处理组件与第二处理组件是两个相互独立的处理组件,均可独立处理相应的通信请求,因此在触发第一处理组件或第二处理组件处理通信发起请求后,将第一处理组件或第二处理组件建立与通信接收设备的连接,并利用音频设备传输通信数据。Since the first processing component and the second processing component are two independent processing components, the corresponding communication request can be processed independently, so after the first processing component or the second processing component is triggered to process the communication initiation request, the first processing is performed. The component or the second processing component establishes a connection with the communication receiving device and transmits the communication data using the audio device.
可选地,在某些实施例中,第一类通信请求处理模块包括:Optionally, in some embodiments, the first type of communication request processing module includes:
第一判断单元,用于如果通信发起请求为第一类通信请求,判断第二处理组件与音频设备是否连接;如果是,触发第一连接建立单元;如果否触发,第一触发单元。The first determining unit is configured to determine whether the second processing component is connected to the audio device if the communication initiation request is the first type communication request; if yes, trigger the first connection establishing unit; if not, the first triggering unit.
第一连接建立单元,用于断开第二处理组件与音频设备的连接,并建立第一处理组件与音频设备的连接;a first connection establishing unit, configured to disconnect the second processing component from the audio device, and establish a connection between the first processing component and the audio device;
第一触发单元,用于触发第一处理组件处理通信发起请求。The first triggering unit is configured to trigger the first processing component to process the communication initiation request.
可选地,在某些实施例中,第二类通信请求处理模块包括:Optionally, in some embodiments, the second type of communication request processing module includes:
第二判断单元,用于如果通信发起请求为第二类通信请求,判断第二处理组件与音频设备是否连接;如果是,触发第二触发单元;如果否,触发第二连接建立单元。The second determining unit is configured to determine whether the second processing component is connected to the audio device if the communication initiation request is the second type of communication request; if yes, trigger the second triggering unit; if not, trigger the second connection establishing unit.
第二连接建立单元,用于断开第一处理组件与音频设备的连接,建立第二处理组件与音频设备的连接;a second connection establishing unit, configured to disconnect the first processing component from the audio device, and establish a connection between the second processing component and the audio device;
第二触发单元,用于触发第二处理组件处理通信发起请求。The second triggering unit is configured to trigger the second processing component to process the communication initiation request.
判断第二处理组件是否与音频设备连接,可以通过HAL层中记录的第二处理组件通信状态进行判断,该通信状态是基于上一次通信发起请求的类型生成的。例如,当HAL层中记录的第二处理组件的通信状态处于开启状态,则表明上一次通话发起请求为第二类通信请求;如果该通信状态处于关闭状态,则表明上一次通话发起请求为第一类通信请求。当该通信状 态处于开启状态时,第二处理状态与音频设备为逻辑连接,反之该第二处理状态与音频设备的逻辑连接为断开的。其中,第二处理组件的通信状态是通过通信信息管理层(TelephoneManager)设置到HAL层中。Determining whether the second processing component is connected to the audio device may be determined by a second processing component communication state recorded in the HAL layer, the communication state being generated based on the type of the last communication initiation request. For example, when the communication state of the second processing component recorded in the HAL layer is in the on state, it indicates that the last call initiation request is the second type communication request; if the communication state is off, it indicates that the last call initiation request is the first A type of communication request. When the communication When the state is on, the second processing state is logically connected to the audio device, and the second processing state is disconnected from the logical connection of the audio device. The communication status of the second processing component is set to the HAL layer through the communication information management layer (TelephoneManager).
可选地,在某些实施例中,第二触发单元之后,还可以包括:Optionally, in some embodiments, after the second triggering unit, the method further includes:
记录单元,用于记录第二处理组件与音频设备之间的通信状态处于开启状态;a recording unit, configured to record that a communication state between the second processing component and the audio device is in an open state;
第一判断单元具体可以用于:The first determining unit can be specifically used to:
如果通信请求为第一类通信请求,判断第二处理组件与音频设备的通信状态是否处于开启状态;If the communication request is the first type of communication request, determining whether the communication state of the second processing component and the audio device is in an open state;
如果是,确定第二处理组件与音频设备连接;If yes, determining that the second processing component is connected to the audio device;
如果否,确定第一处理组件与音频设备连接。If not, it is determined that the first processing component is connected to the audio device.
可选地,为了保证Andiord系统的音频模块可以正常工作,可设置在默认状态下,第二处理组件与音频设备为断开连接,也即默认状态下第一处理组件与音频设备连接,仅在接收到第二类通信请求的情况下建立第二处理组件与音频设备的连接,实现专用网的通信。从而可以保证用户在使用通信设备的音频功能时,不影响系统音频播放功能。Optionally, in order to ensure that the audio module of the Andiord system can work normally, the second processing component can be disconnected from the audio device by default, that is, the first processing component is connected to the audio device by default, only in the When the second type of communication request is received, the connection of the second processing component to the audio device is established to implement communication of the private network. Therefore, it can be ensured that the user does not affect the system audio playing function when using the audio function of the communication device.
可选地,第二类通信请求处理模块304之后,还可以包括:Optionally, after the second type of communication request processing module 304, the method further includes:
第二接收模块,用于接收通信结束请求;a second receiving module, configured to receive a communication end request;
断开连接模块,用于断开第二处理组件与音频设备的连接并建立第一处理组件与音频设备的连接。A disconnect module is configured to disconnect the second processing component from the audio device and establish a connection of the first processing component to the audio device.
本发明实施例中,通过在建立第一处理组件及第二处理组件与音频设备物理连接的基础上,基于Android系统通过增加逻辑开关,在原有音频架构基础上,实现第一处理组件对音频模块的管控,通过控制与第一处理组件或第二处理组件的逻辑连接,实现了对不同通信类型的通信发起请求的针对性处理。从而设计获得了可以支持将民用网通信及专用网通信的通信设备,大大提高了用户的使用体验。In the embodiment of the present invention, based on the physical connection between the first processing component and the second processing component and the audio device, the first processing component to the audio module is implemented on the basis of the original audio architecture based on the Android system by adding a logic switch. The control, by controlling the logical connection with the first processing component or the second processing component, implements targeted processing of communication initiation requests for different communication types. Therefore, the communication device that can support the communication between the civil network and the private network is designed, which greatly improves the user experience.
图4是本发明实施例的一种通信装置的另一个实施例的结构示意图,该装置应用于通信设备,该通信设备包括第一处理组件、第二处理组件以及音频设备。4 is a schematic structural diagram of another embodiment of a communication device according to an embodiment of the present invention. The device is applied to a communication device, and the communication device includes a first processing component, a second processing component, and an audio device.
该装置可以包括:The device can include:
第一接收模块401,用于接收通信发起请求。The first receiving module 401 is configured to receive a communication initiation request.
判断模块402,用于判断通信发起请求的通信类型。The determining module 402 is configured to determine a communication type of the communication initiation request.
第一类通信请求处理模块403,用于如果通信发起请求为第一类通信请求,建立第一处理组件与音频设备的连接以及断开第二处理组件与音频设备的连接,并触发第一处理组件处理通信发起请求。 The first type of communication request processing module 403 is configured to establish a connection between the first processing component and the audio device and disconnect the second processing component from the audio device if the communication initiation request is the first type of communication request, and trigger the first processing The component handles the communication initiation request.
第一类通信请求处理模块403可以包括:The first type of communication request processing module 403 can include:
第一判断单元411,如果通信发起请求为第一类通信请求,判断第二处理组件与音频设备是否连接,如果是,触发第一获取单元412;如果否,触发第一触发单元415。The first determining unit 411 determines whether the second processing component is connected to the audio device if the communication initiation request is the first type of communication request, and if so, triggers the first obtaining unit 412; if not, triggers the first triggering unit 415.
基于图3实施例可知,由于HAL层记录了该第二处理组件的通信状态,因此仅通过判断HAL层中该第二处理组件的通信状态即可判断出当前第二处理组件与音频设备是否连接。According to the embodiment of FIG. 3, since the HAL layer records the communication state of the second processing component, it can be determined whether the current second processing component is connected to the audio device only by determining the communication state of the second processing component in the HAL layer. .
第一获取单元412,用于获取第一处理组件对应的音频标志数值。The first obtaining unit 412 is configured to obtain an audio flag value corresponding to the first processing component.
第一断开单元413,用于断开第二处理组件与音频设备建立的第二音频传输通道。The first disconnecting unit 413 is configured to disconnect the second audio transmission channel established by the second processing component and the audio device.
第一连接建立单元414,用于基于音频标志数值设置第一处理组件与音频设备之间的第一音频传输通道,以建立第一处理组件与音频设备的连接。The first connection establishing unit 414 is configured to set a first audio transmission channel between the first processing component and the audio device based on the audio flag value to establish a connection between the first processing component and the audio device.
在断开第二处理组件与音频设备建立的第二音频传输通道后,此时,逻辑开关建立了第一处理组件与音频设备的逻辑连接。为了建立该第一处理组件与音频设备的第一音频传输通道。可选地,音频设备可以包括多个音频子设备,每一个音频子设备对应一个音频标志数值。为了实现第一处理组件对系统音频模块的管控,增加了音频路由选择的选择控制,该音频路由选择基于该通信设备中的音频设备的连接状态,获取当前通信发起请求对应的音频标志数值。例如,通信设备中的音频设备包括耳机,喇叭,蓝牙,当该通信设备处于蓝牙连接状态时,获取蓝牙对应的音频标志数值,建立第一处理组件与蓝牙设备的第一音频传输通道。当然,如果外部音频设备的连接状态发生改变时,例如连接为耳机,可根据生成的音频标志数值切换该第一音频传输通道与耳机进行连接。After disconnecting the second audio transmission channel established by the second processing component and the audio device, at this time, the logic switch establishes a logical connection between the first processing component and the audio device. In order to establish the first audio transmission channel of the first processing component and the audio device. Alternatively, the audio device may comprise a plurality of audio sub-devices, each audio sub-device corresponding to an audio flag value. In order to implement the control of the system audio module by the first processing component, the selection control of the audio routing is added, and the audio routing is based on the connection state of the audio device in the communication device, and the audio flag value corresponding to the current communication initiation request is obtained. For example, the audio device in the communication device includes a headset, a speaker, and a Bluetooth. When the communication device is in a Bluetooth connection state, the audio flag value corresponding to the Bluetooth is acquired, and the first audio transmission channel of the first processing component and the Bluetooth device is established. Of course, if the connection state of the external audio device is changed, for example, connected to the earphone, the first audio transmission channel can be switched to be connected to the earphone according to the generated audio flag value.
第一触发单元415,用于触发第一处理组件处理通信发起请求。The first triggering unit 415 is configured to trigger the first processing component to process the communication initiation request.
第二类通信请求处理模块404,用于如果通信发起请求为第二类通信请求,建立第二处理组件与音频设备的连接以及断开第一处理组件与音频设备的连接,并触发第二处理组件处理通信发起请求。The second type of communication request processing module 404 is configured to establish a connection between the second processing component and the audio device and disconnect the first processing component from the audio device if the communication initiation request is the second type of communication request, and trigger the second processing The component handles the communication initiation request.
第二类通信请求处理模块404可以包括:The second type of communication request processing module 404 can include:
第二判断单元416,用于如果通信发起请求为第二类通信请求,判断第二处理组件与音频设备是否连接,如果是,触发第二触发单元410;如果否,触发第二获取单元417。The second determining unit 416 is configured to determine whether the second processing component is connected to the audio device if the communication initiation request is the second type of communication request, and if so, trigger the second triggering unit 410; if not, trigger the second acquiring unit 417.
第二获取单元417,用于获取第二处理组件对应的音频标志数值。The second obtaining unit 417 is configured to obtain an audio flag value corresponding to the second processing component.
第二断开单元418,用于断开第一处理组件与音频设备建立的第一音频传输通道。The second disconnecting unit 418 is configured to disconnect the first audio transmission channel established by the first processing component and the audio device.
第二连接建立单元419,用于基于音频标志数值设置第二处理组件与音频设备之间的第二音频传输通道,以建立第二处理组件与音频设备的连接。The second connection establishing unit 419 is configured to set a second audio transmission channel between the second processing component and the audio device based on the audio flag value to establish a connection between the second processing component and the audio device.
第二触发单元420,用于触发第二处理组件处理通信发起请求。The second triggering unit 420 is configured to trigger the second processing component to process the communication initiation request.
可选地,当通信发起请求类型为第二类通信请求时,在基于音频设备的连接状态获取该 第二处理组件对应的音频标志数值后,需要通过第二处理组件与该第一处理组件的AT(ATCommands)命令接口发送至第二处理组件,由第二处理组件切换第二音频通道与音频设备的连接,以建立第二处理组件与音频设备的连接。其中,AT命令接口为第二处理组件与该第一处理组件的通信接口。Optionally, when the communication initiation request type is the second type communication request, acquiring the audio device based connection status After the audio flag value corresponding to the second processing component is sent to the second processing component through the second processing component and the AT (ATCommands) command interface of the first processing component, the second audio component and the audio device are switched by the second processing component. The connection to establish a connection between the second processing component and the audio device. The AT command interface is a communication interface between the second processing component and the first processing component.
可选地,第二处理组件的音量设置可以通过扩展系统音频模块中的音量设置接口进行对第二处理组件中音量设置的管控,具体地,在该音频模块的音量设置接口接收到音量调节指令后,可通过AT命令接口发送至该音量调节指令至第二处理组件,以实现对第二处理组件的音量的调节。Optionally, the volume setting of the second processing component can control the volume setting in the second processing component by expanding the volume setting interface in the system audio module, specifically, receiving the volume adjustment instruction at the volume setting interface of the audio module. Thereafter, the volume adjustment command can be sent to the second processing component through the AT command interface to implement adjustment of the volume of the second processing component.
本发明实施例中,第一处理组件基于AT命令接口实现对第二处理组件中音量设置及音频传输通道的管控,并基于音频路由的选择控制建立第一处理组件及第二处理组件与音频设备的连接,并可基于音频标志数值切换第一处理组件的第一音频传输通道及第二处理组件的第二音频传输通道与音频设备的连接,无需用户进行手动切换,提供了一种便捷,灵活的通信方法,为设计获得了可以支持将民用网通信及专用网通信的通信设备奠定了基础,大大提高了用户的使用体验。In the embodiment of the present invention, the first processing component implements control of the volume setting and the audio transmission channel in the second processing component based on the AT command interface, and establishes the first processing component and the second processing component and the audio device based on the selection control of the audio routing. And connecting the first audio transmission channel of the first processing component and the second audio transmission channel of the second processing component to the audio device based on the audio flag value, without manual switching by the user, providing a convenient and flexible The communication method has laid a foundation for designing a communication device that can support civil network communication and private network communication, and greatly improves the user experience.
图5是本发明实施例提供的一种通信设备的一个实施例的结构示意图,设备可以包括:第一处理组件501,第二处理组件502、音频设备503以及存储器504用于存储计算机可读程序代码,第一处理组件501用于执行计算机程序代码以实现:FIG. 5 is a schematic structural diagram of an embodiment of a communication device according to an embodiment of the present invention. The device may include: a first processing component 501, a second processing component 502, an audio device 503, and a memory 504 for storing a computer readable program. Code, first processing component 501 is configured to execute computer program code to:
接收通信发起请求;判断通信发起请求的通信类型;如果通信发起请求为第一类通信请求,建立与音频设备504的连接以及断开第二处理组件502与音频设备504的连接,并处理通信发起请求;Receiving a communication initiation request; determining a communication type of the communication initiation request; establishing a connection with the audio device 504 and disconnecting the second processing component 502 from the audio device 504 if the communication initiation request is a first type communication request, and processing the communication initiation request;
如果通信发起请求为第二类通信请求,建立第二处理组件502与音频设备504的连接以及断开第一处理组件501与音频设备504的连接,并触发第二处理组件502处理通信发起请求。If the communication initiation request is a second type of communication request, the second processing component 502 is connected to the audio device 504 and the first processing component 501 is disconnected from the audio device 504 and the second processing component 502 is triggered to process the communication initiation request.
可选地,该处理组件501还用于执行前述各方法步骤中的全部或部分步骤。Optionally, the processing component 501 is further configured to perform all or part of the foregoing method steps.
其中,该第一处理组件501可以包括一个或多个处理器来执行计算机指令。当然第一处理组件501也可以为一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。The first processing component 501 can include one or more processors to execute computer instructions. Of course, the first processing component 501 can also be one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays. (FPGA), controller, microcontroller, microprocessor or other electronic component implementation for performing the above methods.
该存储器504可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快 闪存储器,磁盘或光盘。The memory 504 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable. Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Fast Flash memory, disk or CD.
当然,电子设备还可以包括其他部件,例如输入/输出接口、通信组件等。输入/输出接口为处理组件和外围接口模块之间提供接口,上述外围接口模块可以是输出设备、输入设备等。通信组件被配置为便于可移动设备和其他设备之间有线或无线方式的通信,例如和控制设备的通信等等。Of course, the electronic device may also include other components such as an input/output interface, a communication component, and the like. The input/output interface provides an interface between the processing component and the peripheral interface module, and the peripheral interface module may be an output device, an input device, or the like. The communication component is configured to facilitate wired or wireless communication between the mobile device and other devices, such as communication with the control device, and the like.
可选地,在某些实施例中,第二处理组件502还可以作为执行主体用于执行前述各方法步骤中的全部或部分步骤。在此不做具体限定。Optionally, in some embodiments, the second processing component 502 can also serve as an execution body for performing all or part of the foregoing method steps. This is not specifically limited.
可选地,在某些实施例中第一处理组件501如果通信发起请求为第一类通信请求,建立与音频设备503的连接以及断开第二处理组件502与音频设备503的连接,并处理通信发起请求具体可以是:Optionally, in some embodiments the first processing component 501 establishes a connection with the audio device 503 and disconnects the second processing component 502 from the audio device 503 if the communication initiation request is a first type of communication request and processes The communication initiation request may specifically be:
如果通信发起请求为第一类通信请求,判断第二处理组件502与音频设备是否连接;如果是,断开第二处理组件502与音频设备503的连接,并建立与音频设备503的连接;触发第一处理组件501处理通信发起请求;如果否,触发第一处理组件501处理通信发起请求。If the communication initiation request is a first type of communication request, determining whether the second processing component 502 is connected to the audio device; if so, disconnecting the second processing component 502 from the audio device 503 and establishing a connection with the audio device 503; triggering The first processing component 501 processes the communication initiation request; if not, the first processing component 501 is triggered to process the communication initiation request.
可选地,在某些实施例中,第一处理组件501如果通信发起请求为第二类通信请求,建立第二处理组件502与音频设备503的连接以及断开第一处理组件501与音频设备503的连接,并触发第二处理组件502处理通信发起请求具体是:Optionally, in some embodiments, the first processing component 501 establishes a connection of the second processing component 502 with the audio device 503 and disconnects the first processing component 501 and the audio device if the communication initiation request is a second type of communication request. The connection of 503 and triggering the second processing component 502 to process the communication initiation request is specifically:
如果通信发起请求为第二类通信请求,判断第二处理组件502与音频设备503是否连接;如果是,触发第二处理组件502处理通信发起请求;如果否,断开第一处理组件501与音频设备503的连接,建立第二处理组件502与音频设备503的连接;触发第二处理组件502处理通信发起请求。If the communication initiation request is a second type of communication request, it is determined whether the second processing component 502 is connected to the audio device 503; if so, the second processing component 502 is triggered to process the communication initiation request; if not, the first processing component 501 is disconnected from the audio The connection of the device 503 establishes a connection between the second processing component 502 and the audio device 503; triggering the second processing component 502 to process the communication initiation request.
可选地,在某些实施例中,第一处理组件501如果通信发起请求为第二类通信请求,建立第二处理组件502与音频设备503的连接以及断开第一处理组件501与音频设备503的连接,并触发第二处理组件502处理通信发起请求之后,具体是:Optionally, in some embodiments, the first processing component 501 establishes a connection of the second processing component 502 with the audio device 503 and disconnects the first processing component 501 and the audio device if the communication initiation request is a second type of communication request. After the connection of 503 and triggering the second processing component 502 to process the communication initiation request, specifically:
接收通信结束请求;断开第二处理组件502与音频设备503的连接并建立第一处理组件501与音频设备503的连接。Receiving a communication end request; disconnecting the second processing component 502 from the audio device 503 and establishing a connection of the first processing component 501 with the audio device 503.
可选地,在某些实施例中,音频设备503可以包括多个音频子设备;其中,每一个音频子设备对应一个音频标志数值;Optionally, in some embodiments, the audio device 503 may include multiple audio sub-devices; wherein each audio sub-device corresponds to one audio flag value;
第一处理组件501断开第二处理组件502与音频设备503的连接,并建立第一处理组件501与音频设备503的连接具体是:The first processing component 501 disconnects the connection between the second processing component 502 and the audio device 503, and establishes a connection between the first processing component 501 and the audio device 503.
获取第一处理组件501对应的音频标志数值;断开第二处理组件502与音频设备503建立的第二音频传输通道;基于音频标志数值设置第一处理组件501与音频设备503之间的第 一音频传输通道,以建立第一处理组件501与音频设备503的连接。Acquiring the audio flag value corresponding to the first processing component 501; disconnecting the second audio transmission channel established by the second processing component 502 and the audio device 503; setting the first processing component 501 and the audio device 503 based on the audio flag value An audio transmission channel to establish a connection between the first processing component 501 and the audio device 503.
第一处理组件501断开与音频设备503的连接,并建立第二处理组件502与音频设备503的连接具体是:获取第二处理组件502对应的音频标志数值;断开第一处理组件501与音频设备503建立的第一音频传输通道;基于音频标志数值设置第二处理组件502与音频设备503之间的第二音频传输通道,以建立第二处理组件502与音频设备503的连接。The first processing component 501 disconnects the connection with the audio device 503, and establishes the connection between the second processing component 502 and the audio device 503, specifically: acquiring the audio flag value corresponding to the second processing component 502; disconnecting the first processing component 501 from The first audio transmission channel established by the audio device 503; the second audio transmission channel between the second processing component 502 and the audio device 503 is set based on the audio flag value to establish a connection between the second processing component 502 and the audio device 503.
本发明实施例提供了一种计算机程序产品,包括计算机可读存储介质,用于储存本发明实施例按键检测装置所用的计算机指令,其包含用于执行上述任一实施例中按键检测方法所涉及的程序。The embodiment of the present invention provides a computer program product, including a computer readable storage medium, for storing computer instructions used by the button detecting device of the embodiment of the present invention, which includes a method for performing a button detecting method in any of the above embodiments. program of.
本发明提供了一种计算机可读存储介质,存储有计算机程序,计算机程序被计算机执行时可以实现上述任一图1、图2实施例中的通信方法,以及图3、图4实施例中的通信装置。在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。The present invention provides a computer readable storage medium storing a computer program. When the computer program is executed by a computer, the communication method in any of the above embodiments of FIG. 1 and FIG. 2 can be implemented, and in the embodiments of FIGS. 3 and 4 Communication device. In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。The memory may include non-persistent memory, random access memory (RAM), and/or non-volatile memory in a computer readable medium, such as read only memory (ROM) or flash memory. Memory is an example of a computer readable medium.
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括非暂存电脑可读媒体(transitory media),如调制的数据信号和载波。Computer readable media includes both permanent and non-persistent, removable and non-removable media. Information storage can be implemented by any method or technology. The information can be computer readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory. (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disk read only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, Magnetic tape cartridges, magnetic tape storage or other magnetic storage devices or any other non-transportable media can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory computer readable media, such as modulated data signals and carrier waves.
如在说明书及权利要求当中使用了某些词汇来指称特定组件。本领域技术人员应可理解,硬件制造商可能会用不同名词来称呼同一个组件。本说明书及权利要求并不以名称的差异来作为区分组件的方式,而是以组件在功能上的差异来作为区分的准则。如在通篇说明书及权利要求当中所提及的“包含”为一开放式用语,故应解释成“包含但不限定于”。“大致”是指在可接收的误差范围内,本领域技术人员能够在一定误差范围内解决所述技术问题,基本达到所述技术效果。此外,“耦接”一词在此包含任何直接及间接的电性耦接手段。因此,若文中描述一第一装置耦接于一第二装置,则代表所述第一装置可直接电性耦接于所述第二 装置,或通过其他装置或耦接手段间接地电性耦接至所述第二装置。说明书后续描述为实施本发明的较佳实施方式,然所述描述乃以说明本发明的一般原则为目的,并非用以限定本发明的范围。本发明的保护范围当视所附权利要求所界定者为准。Certain terms are used throughout the description and claims to refer to particular components. Those skilled in the art will appreciate that hardware manufacturers may refer to the same component by different nouns. The present specification and the claims do not use the difference in the name as the means for distinguishing the components, but the difference in function of the components as the criterion for distinguishing. The word "comprising" as used throughout the specification and claims is an open term and should be interpreted as "including but not limited to". "Substantially" means that within the range of acceptable errors, those skilled in the art will be able to solve the technical problems within a certain error range, substantially achieving the technical effects. In addition, the term "coupled" is used herein to include any direct and indirect electrical coupling means. Therefore, if a first device is coupled to a second device, the first device can be directly electrically coupled to the second device. The device is electrically coupled to the second device indirectly via other devices or coupling means. The description of the present invention is intended to be illustrative of the preferred embodiments of the invention. The scope of the invention is defined by the appended claims.
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的商品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种商品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的商品或者系统中还存在另外的相同要素It should also be noted that the terms "including", "comprising" or "comprising" or any other variations thereof are intended to encompass a non-exclusive inclusion, such that the item or system comprising a plurality of elements includes not only those elements but also Other elements, or elements that are inherent to such goods or systems. In the absence of more restrictions, elements defined by the phrase "including one..." do not exclude the existence of additional identical elements in the item or system that includes the element.
上述说明示出并描述了本发明的若干优选实施例,但如前所述,应当理解本发明并非局限于本文所披露的形式,不应看作是对其他实施例的排除,而可用于各种其他组合、修改和环境,并能够在本文所述申请构想范围内,通过上述教导或相关领域的技术或知识进行改动。而本领域人员所进行的改动和变化不脱离本发明的精神和范围,则都应在本发明所附权利要求的保护范围内。 The above description illustrates and describes several preferred embodiments of the present invention, but as described above, it should be understood that the invention is not limited to the forms disclosed herein, and should not be construed as Other combinations, modifications, and environments are possible and can be modified by the above teachings or related art or knowledge within the scope of the application concept described herein. All changes and modifications made by those skilled in the art are intended to be within the scope of the appended claims.

Claims (10)

  1. 一种通信方法,其中,应用于通信设备,所述通信设备包括第一处理组件、第二处理组件以及音频设备;所述方法包括:A communication method, wherein the method is applied to a communication device, the communication device comprising a first processing component, a second processing component, and an audio device; the method comprising:
    接收通信发起请求;Receiving a communication initiation request;
    判断所述通信发起请求的通信类型;Determining a communication type of the communication initiation request;
    如果所述通信发起请求为第一类通信请求,建立所述第一处理组件与所述音频设备的连接以及断开所述第二处理组件与所述音频设备的连接,并触发所述第一处理组件处理所述通信发起请求;And if the communication initiation request is a first type of communication request, establishing a connection between the first processing component and the audio device, and disconnecting the second processing component from the audio device, and triggering the first Processing component processing the communication initiation request;
    如果所述通信发起请求为第二类通信请求,建立所述第二处理组件与所述音频设备的连接以及断开所述第一处理组件与所述音频设备的连接,并触发所述第二处理组件处理所述通信发起请求。And if the communication initiation request is a second type of communication request, establishing a connection between the second processing component and the audio device, and disconnecting the first processing component from the audio device, and triggering the second The processing component processes the communication initiation request.
  2. 根据权利要求1所述的方法,其中,所述如果所述通信发起请求为第一类通信请求,建立所述第一处理组件与所述音频设备的连接以及断开所述第二处理组件与所述音频设备的连接,并触发所述第一处理处理所述通信发起请求包括:The method of claim 1, wherein if the communication initiation request is a first type of communication request, establishing a connection of the first processing component with the audio device and disconnecting the second processing component The connecting of the audio device and triggering the first processing to process the communication initiation request includes:
    如果所述通信发起请求为第一类通信请求,判断所述第二处理组件与所述音频设备是否连接;If the communication initiation request is a first type of communication request, determining whether the second processing component is connected to the audio device;
    如果是,断开所述第二处理组件与所述音频设备的连接,并建立所述第一处理组件与所述音频设备的连接;If yes, disconnecting the second processing component from the audio device and establishing a connection between the first processing component and the audio device;
    触发所述第一处理组件处理所述通信发起请求;Triggering the first processing component to process the communication initiation request;
    如果否,触发所述第一处理组件处理所述通信发起请求。If not, the first processing component is triggered to process the communication initiation request.
  3. 根据权利要求1所述的方法,其中,所述如果所述通信发起请求为第二类通信请求,建立所述第二处理组件与所述音频设备的连接以及断开所述第一处理组件与所述音频设备的连接,并触发所述第二处理组件处理所述通信发起请求包括:The method of claim 1, wherein if the communication initiation request is a second type of communication request, establishing a connection of the second processing component with the audio device and disconnecting the first processing component from The connecting of the audio device and triggering the second processing component to process the communication initiation request includes:
    如果所述通信发起请求为第二类通信请求,判断所述第二处理组件与所述音频设备是否连接;If the communication initiation request is a second type of communication request, determining whether the second processing component is connected to the audio device;
    如果是,触发所述第二处理组件处理所述通信发起请求;If yes, triggering the second processing component to process the communication initiation request;
    如果否,断开所述第一处理组件与所述音频设备的连接,建立所述第二处理组件与所述音频设备的连接;If not, disconnecting the first processing component from the audio device, establishing a connection between the second processing component and the audio device;
    触发所述第二处理组件处理所述通信发起请求。Triggering the second processing component to process the communication initiation request.
  4. 根据权利要求1所述的方法,其中,所述如果所述通信发起请求为第二类通信请求,建立所述第二处理组件与所述音频设备的连接以及断开所述第一处理组件与所述音频 设备的连接,并触发所述第二处理组件处理所述通信发起请求之后,还包括:The method of claim 1, wherein if the communication initiation request is a second type of communication request, establishing a connection of the second processing component with the audio device and disconnecting the first processing component from The audio After the connection of the device and triggering the second processing component to process the communication initiation request, the method further includes:
    接收通信结束请求;Receiving a communication end request;
    断开所述第二处理组件与所述音频设备的连接并建立所述第一处理组件与所述音频设备的连接。Disconnecting the second processing component from the audio device and establishing a connection of the first processing component to the audio device.
  5. 根据权利要求2所述的方法,其中,所述音频设备包括多个音频子设备;其中,每一个音频子设备对应一个音频标志数值;The method of claim 2 wherein said audio device comprises a plurality of audio sub-devices; wherein each audio sub-device corresponds to an audio flag value;
    所述断开所述第二处理组件与所述音频设备的连接,并建立所述第一处理组件与所述音频设备的连接包括:Disconnecting the second processing component from the audio device and establishing a connection between the first processing component and the audio device includes:
    获取所述第一处理组件对应的音频标志数值;Obtaining an audio flag value corresponding to the first processing component;
    断开所述第二处理组件与所述音频设备建立的第二音频传输通道;Disconnecting a second audio transmission channel established by the second processing component and the audio device;
    基于所述音频标志数值设置所述第一处理组件与所述音频设备之间的第一音频传输通道,以建立所述第一处理组件与所述音频设备的连接。Setting a first audio transmission channel between the first processing component and the audio device based on the audio flag value to establish a connection of the first processing component to the audio device.
  6. 基于权利要求3所述的方法,其中,所述音频设备包括多个音频子设备;其中,每一个音频子设备对应一个音频标志数值;The method of claim 3, wherein the audio device comprises a plurality of audio sub-devices; wherein each audio sub-device corresponds to an audio flag value;
    所述断开所述第一处理组件与所述音频设备的连接,并建立所述第二处理组件与所述音频设备的连接包括:Disconnecting the first processing component from the audio device and establishing a connection between the second processing component and the audio device includes:
    获取所述第二处理组件对应的音频标志数值;Obtaining an audio flag value corresponding to the second processing component;
    断开所述第一处理组件与所述音频设备建立的第一音频传输通道;Disconnecting the first audio transmission channel established by the first processing component and the audio device;
    基于所述音频标志数值设置所述第二处理组件与所述音频设备之间的第二音频传输通道,以建立所述第二处理组件与所述音频设备的连接。Setting a second audio transmission channel between the second processing component and the audio device based on the audio flag value to establish a connection of the second processing component to the audio device.
  7. 一种通信设备,其中,所述通信设备包括第一处理组件、第二处理组件、音频设备及存储器;所述存储器用于存储计算机可读程序代码,所述第一处理组件用于执行所述计算机可读程序代码以实现:A communication device, wherein the communication device includes a first processing component, a second processing component, an audio device, and a memory; the memory is configured to store computer readable program code, the first processing component to execute the Computer readable program code to implement:
    接收通信发起请求;判断所述通信发起请求的通信类型;Receiving a communication initiation request; determining a communication type of the communication initiation request;
    如果所述通信发起请求为第一类通信请求,建立与所述音频设备的连接以及断开所述第二处理组件与所述音频设备的连接,并处理所述通信发起请求;如果所述通信发起请求为第二类通信请求,建立所述第二处理组件与所述音频设备的连接以及断开与所述音频设备的连接,并触发所述第二处理组件处理所述通信发起请求。If the communication initiation request is a first type of communication request, establishing a connection with the audio device and disconnecting the second processing component from the audio device, and processing the communication initiation request; if the communication Initiating a request for a second type of communication request, establishing a connection of the second processing component with the audio device, and disconnecting the audio device, and triggering the second processing component to process the communication initiation request.
  8. 根据权利要求7所述的设备,其中,所述第一处理组件如果所述通信发起请求为第一类通信请求,建立与所述音频设备的连接以及断开所述第二处理组件与所述音频设备的连接,并处理所述通信发起请求具体是: The apparatus of claim 7, wherein the first processing component establishes a connection with the audio device and disconnects the second processing component from the communication request if the communication initiation request is a first type of communication request The connection of the audio device and processing the communication initiation request is specifically:
    如果所述通信发起请求为第一类通信请求,判断所述第二处理组件与所述音频设备是否连接;如果是,断开所述第二处理组件与所述音频设备的连接,并建立所述第一处理组件与所述音频设备的连接;触发所述第一处理组件处理所述通信发起请求;如果否,触发所述第一处理组件处理所述通信发起请求。If the communication initiation request is a first type of communication request, determining whether the second processing component is connected to the audio device; if yes, disconnecting the second processing component from the audio device, and establishing a Determining a connection of the first processing component to the audio device; triggering the first processing component to process the communication initiation request; if not, triggering the first processing component to process the communication initiation request.
  9. 根据权利要求7所述的设备,其中,所述第一处理组件如果所述通信发起请求为第二类通信请求,建立所述第二处理组件与所述音频设备的连接以及断开与所述音频设备的连接,并触发所述第二处理组件处理所述通信发起请求具体是:The apparatus of claim 7, wherein the first processing component establishes a connection and disconnection of the second processing component with the audio device if the communication initiation request is a second type of communication request The connection of the audio device and triggering the second processing component to process the communication initiation request is specifically:
    如果所述通信发起请求为第二类通信请求,判断所述第二处理组件与所述音频设备是否连接;如果是,触发所述第二处理组件处理所述通信发起请求;如果否,断开所述第一处理组件与所述音频设备的连接,建立所述第二处理组件与所述音频设备的连接;触发所述第二处理组件处理所述通信发起请求。If the communication initiation request is a second type of communication request, determining whether the second processing component is connected to the audio device; if yes, triggering the second processing component to process the communication initiation request; if not, disconnecting a connection of the first processing component to the audio device, establishing a connection between the second processing component and the audio device; triggering the second processing component to process the communication initiation request.
  10. 根据权利要求7所述的设备,其中,所述第一处理组件如果所述通信发起请求为第二类通信请求,建立所述第二处理组件与所述音频设备的连接以及断开与所述音频设备的连接,并触发所述第二处理组件处理所述通信发起请求之后,具体是:The apparatus of claim 7, wherein the first processing component establishes a connection and disconnection of the second processing component with the audio device if the communication initiation request is a second type of communication request After the connection of the audio device and triggering the second processing component to process the communication initiation request, specifically:
    接收通信结束请求;断开所述第二处理组件与所述音频设备的连接并建立所述第一处理组件与所述音频设备的连接。 Receiving a communication end request; disconnecting the second processing component from the audio device and establishing a connection of the first processing component to the audio device.
PCT/CN2017/117047 2017-11-30 2017-12-18 Communication method and communication device WO2019104774A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2017112438792 2017-11-30
CN201711243879.2A CN107968829A (en) 2017-11-30 2017-11-30 Communication means and communication equipment

Publications (1)

Publication Number Publication Date
WO2019104774A1 true WO2019104774A1 (en) 2019-06-06

Family

ID=61998571

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/117047 WO2019104774A1 (en) 2017-11-30 2017-12-18 Communication method and communication device

Country Status (2)

Country Link
CN (1) CN107968829A (en)
WO (1) WO2019104774A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101878667A (en) * 2007-11-30 2010-11-03 摩托罗拉公司 Be used at the method and apparatus of calling out control audio conversion between transfer period
CN103118398A (en) * 2011-11-16 2013-05-22 三星电子株式会社 Data communication device in a portable terminal and method thereof
WO2013179092A1 (en) * 2012-05-30 2013-12-05 Nokia Corporation Method and apparatus for providing notification of a network access technology switching event
CN106941635A (en) * 2016-12-22 2017-07-11 北京小米移动软件有限公司 Audio amplifier connection method and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102378316A (en) * 2010-08-17 2012-03-14 北京迅光达通信技术有限公司 Double-network digital mobile communication terminal and double-network communication method thereof
CN102547602B (en) * 2012-02-24 2014-07-23 海能达通信股份有限公司 Shoulder microphone and system and method for realizing three-party conversion between public network and private network
CN103813481A (en) * 2013-09-23 2014-05-21 杭州优能通信系统有限公司 Intelligent terminal device and business processing method thereof
CN103716459B (en) * 2013-12-13 2016-04-06 优能通信科技(杭州)有限公司 A kind of audio system having mobile phone and intercom call function concurrently
US9883241B2 (en) * 2015-05-17 2018-01-30 Surewaves Mediatech Private Limited System and method for automatic content recognition and audience measurement for television channels and advertisements

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101878667A (en) * 2007-11-30 2010-11-03 摩托罗拉公司 Be used at the method and apparatus of calling out control audio conversion between transfer period
CN103118398A (en) * 2011-11-16 2013-05-22 三星电子株式会社 Data communication device in a portable terminal and method thereof
WO2013179092A1 (en) * 2012-05-30 2013-12-05 Nokia Corporation Method and apparatus for providing notification of a network access technology switching event
CN106941635A (en) * 2016-12-22 2017-07-11 北京小米移动软件有限公司 Audio amplifier connection method and device

Also Published As

Publication number Publication date
CN107968829A (en) 2018-04-27

Similar Documents

Publication Publication Date Title
EP2891952B1 (en) Seamless content transfer
US9749329B2 (en) Network connection managing device, system and method
CN105893459A (en) Media content playback system and method
WO2017162043A1 (en) Access method, configuration method and apparatus used for inter-device service
EP3005760A1 (en) Wireless docking architecture
US9137270B2 (en) Binding multiple addresses to a socket in a network system
US20160320755A1 (en) Wireless music system and method for setting alarm clock of wireless music system
CN105893457A (en) Media content playback system and method
WO2013174265A1 (en) Data transmission method and device
US10013232B2 (en) Wireless speaker connection management
WO2023165309A1 (en) Method and device for creating shareable remote direct memory access link
US9420033B2 (en) Managing file transfer commands
US20160041879A1 (en) Data backup to and restore from trusted devices
CN105893458A (en) Media content playback system and method
WO2020135131A1 (en) Network hotspot switching method, intelligent terminal and computer-readable storage medium
WO2009084791A1 (en) Method of and apparatus for downloading data
WO2016155363A1 (en) Method and device for maintaining playlist of multimedia file player
WO2019104774A1 (en) Communication method and communication device
US9497580B1 (en) Using application context to facilitate pairing with a peripheral device
TWI689819B (en) Audio playback device
US8335764B2 (en) Multicast address search including multiple search modes
US9648382B2 (en) Display apparatus, display system and storage medium
TW201316180A (en) Method and system for managing parallel resource requests in a portable computing device
JP2017169066A5 (en)
WO2022001423A1 (en) Interaction control method and apparatus, and 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: 17933283

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

Country of ref document: EP

Kind code of ref document: A1