CN107682902B - Control method of electronic equipment and electronic equipment - Google Patents

Control method of electronic equipment and electronic equipment Download PDF

Info

Publication number
CN107682902B
CN107682902B CN201710827810.8A CN201710827810A CN107682902B CN 107682902 B CN107682902 B CN 107682902B CN 201710827810 A CN201710827810 A CN 201710827810A CN 107682902 B CN107682902 B CN 107682902B
Authority
CN
China
Prior art keywords
sound output
equipment
target sound
electronic
electronic device
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201710827810.8A
Other languages
Chinese (zh)
Other versions
CN107682902A (en
Inventor
王建辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201710827810.8A priority Critical patent/CN107682902B/en
Publication of CN107682902A publication Critical patent/CN107682902A/en
Application granted granted Critical
Publication of CN107682902B publication Critical patent/CN107682902B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/24Reselection being triggered by specific parameters
    • H04W36/32Reselection being triggered by specific parameters by location or mobility data, e.g. speed data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • H04W4/023Services making use of location information using mutual or relative location information between multiple location based services [LBS] targets or of distance thresholds

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephone Function (AREA)
  • Circuit For Audible Band Transducer (AREA)

Abstract

The invention provides a control method of electronic equipment and the electronic equipment, the method comprises: acquiring relative distance values between the electronic equipment and at least two sound output devices respectively; determining a sound output device meeting a preset condition in the at least two sound output devices as a target sound output device based on relative distance values between the electronic device and the at least two sound output devices respectively; and establishing connection with the target sound output equipment, and sending audio playing data to the target sound output equipment. According to the control method of the electronic equipment provided by the embodiment of the invention, the electronic equipment can be automatically switched to the sound output equipment meeting the conditions to output the sound according to the relative distance values between the electronic equipment and at least two sound output equipment, so that the operation is convenient and fast, and the time is saved.

Description

Control method of electronic equipment and electronic equipment
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a control method for an electronic device and an electronic device.
Background
With the development of wireless connection technology, it is currently possible to establish a connection between one electronic device (e.g., a mobile phone, a tablet computer, or an audio player) and any one of at least two sound output devices (e.g., a stereo set), and in the process of playing an audio file by the electronic device, the sound output device connected to the electronic device may be switched between the at least two sound output devices according to the requirements of a user, and the sound is output by the switched and connected sound output device, thereby improving the audio playing effect.
At present, in the process of playing an audio file, when a sound output device needs to be switched to another sound output device to output sound, a user is usually required to determine a sound output device to be connected in a connectable device list, then click a "disconnect" button to disconnect the currently connected sound output device from the electronic device, and finally click a "connect" button corresponding to the sound output device to be connected, so as to implement switching of the electronic device between the two sound output devices, and enable the electronic device to send audio playing data to the sound output device after switching connection. Therefore, when the electronic device switches the sound output device for outputting sound between at least two sound output devices, the electronic device needs to be manually operated by a user, and the operation is complex and time-consuming.
Disclosure of Invention
The embodiment of the invention provides a control method of electronic equipment and the electronic equipment, and aims to solve the problems of complex operation and time consumption when the conventional electronic equipment switches between at least two sound output equipment and outputs sound output equipment.
In a first aspect, an embodiment of the present invention provides a method for controlling an electronic device, which is applied to an electronic device with an audio playing function, and includes:
acquiring relative distance values between the electronic equipment and at least two sound output devices respectively;
determining a sound output device meeting a preset condition in the at least two sound output devices as a target sound output device based on relative distance values between the electronic device and the at least two sound output devices respectively;
and establishing connection with the target sound output equipment, and sending audio playing data to the target sound output equipment.
In a second aspect, an embodiment of the present invention further provides an electronic device, where the electronic device has an audio playing function, and the electronic device includes:
the distance value acquisition module is used for acquiring relative distance values between the electronic equipment and at least two pieces of sound output equipment respectively;
the determining module is used for determining the sound output equipment meeting the preset condition in the at least two sound output equipment as target sound output equipment based on the relative distance values between the electronic equipment and the at least two sound output equipment respectively;
and the processing module is used for establishing connection with the target sound output equipment and sending audio playing data to the target sound output equipment.
In a third aspect, an embodiment of the present invention further provides an electronic device, including a processor, a memory, and a computer program stored on the memory and executable on the processor, where the computer program, when executed by the processor, implements the steps of the control method of the electronic device.
In this way, in the embodiment of the present invention, the relative distance values between the electronic device and at least two sound output devices are obtained; determining a sound output device meeting a preset condition in the at least two sound output devices as a target sound output device based on relative distance values between the electronic device and the at least two sound output devices respectively; and establishing connection with the target sound output equipment, and sending audio playing data to the target sound output equipment. The electronic equipment can automatically switch to the sound output equipment meeting the conditions to output sound according to the relative distance value between the electronic equipment and at least two sound output equipment, and the operation is convenient and time-saving.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive exercise.
Fig. 1 is a schematic flowchart of a control method of an electronic device according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of another control method for an electronic device according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a distance value obtaining module in an electronic device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a processing module in an electronic device according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a processing unit in an electronic device according to an embodiment of the present invention;
FIG. 7 is a schematic structural diagram of another electronic device provided in an embodiment of the invention;
fig. 8 is a schematic structural diagram of another electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a schematic flowchart of a control method of an electronic device according to an embodiment of the present invention, applied to an electronic device with an audio playing function, as shown in fig. 1, including the following steps:
step 101, obtaining relative distance values between the electronic equipment and at least two sound output devices respectively.
In the embodiment of the invention, the electronic equipment can acquire the relative distance values between the electronic equipment and at least two sound output devices respectively in the process of playing the audio file. The relative distance value between the electronic device and an audio output device can be understood as a linear distance in space between the electronic device and the audio output device.
In addition, the above-mentioned electronic device obtains the relative distance value with each sound output device, may obtain its coordinate information and the coordinate information of the sound output device through the electronic device, for example: the electronic equipment detects the coordinate information of the electronic equipment through the positioning sensor, reads the prestored coordinate information of the sound output equipment, or sends a coordinate information request to the sound output equipment, receives the coordinate information fed back by the sound output equipment based on the coordinate information request, and calculates a relative distance value according to the coordinate information of the electronic equipment and the coordinate information of the sound output equipment.
Or, the electronic device may obtain the relative distance value between the electronic device and each sound output device, or the electronic device may obtain the transmission duration of the bluetooth signal or the infrared signal transmitted to the sound output device by the electronic device, and calculate the relative distance value according to the transmission duration and the transmission speed of the bluetooth signal or the infrared signal.
It should be noted that, each of the at least two sound output devices may be a sound output device that the electronic device detects in its surrounding environment to be connectable; or, the sound output device may also be a sound output device in the history connection sound output device list of the electronic device; alternatively, it may be a sound output device connectable in the surrounding environment and a sound output device in the history connection sound output device list. In addition, the sound output device may be an audio device or the like.
And 102, determining the sound output equipment meeting the preset condition in the at least two sound output equipment as target sound output equipment based on the relative distance values between the electronic equipment and the at least two sound output equipment respectively.
In this embodiment of the present invention, if the relative distance values between the electronic device and at least two sound output devices are obtained in step 101, the electronic device may determine whether the relative distance values between the electronic device and each sound output device satisfy a preset condition, and use the sound output device that satisfies the preset condition as the target sound output device.
The determining of the sound output device meeting the preset condition as the target sound output device may be that the electronic device sorts at least two sound output devices according to relative distance values between the sound output devices and the at least two sound output devices, and selects a sound output device at a position specified in advance in the sorted list as the sound output device meeting the preset condition. For example: and sequencing at least two sound output devices according to the relative distance values in an ascending mode, and taking the sound output device at the second position in the sequence as a target sound output device.
And 103, establishing connection with the target sound output equipment, and sending audio playing data to the target sound output equipment.
In the embodiment of the present invention, if the target sound output device meeting the preset condition is determined in step 102, the electronic device may establish a connection with the target sound output device, and send audio playing data to the target sound output device, so as to switch to the sound output device meeting the preset condition to output sound in time.
The connection with the target sound output device may be established by the electronic device judging whether the target sound output device is a history connection sound output device, and if the target sound output device is the history connection sound output device, the electronic device acquiring history connection information thereof and directly realizing connection with the target sound output device; if the connection request is not the historical connection sound output device, the electronic device sends a connection request to the target sound output device, receives feedback information sent by the target sound device in response to the connection request, and achieves connection with the target sound output device.
In the embodiment of the present invention, the electronic device may be any electronic terminal with an audio playing function, for example: the Mobile terminal may be a Mobile terminal such as a Mobile phone, a Tablet Personal Computer (Tablet Personal Computer), a Laptop Computer (Laptop Computer), a Personal Digital Assistant (PDA), a Mobile Internet Device (MID) or a Wearable Device (Wearable Device) with an audio playing application installed therein, and an audio player.
In this way, in the embodiment of the present invention, the relative distance values between the electronic device and at least two sound output devices are obtained; determining a sound output device meeting a preset condition in the at least two sound output devices as a target sound output device based on relative distance values between the electronic device and the at least two sound output devices respectively; and establishing connection with the target sound output equipment, and sending audio playing data to the target sound output equipment. The electronic equipment can automatically switch to the sound output equipment meeting the conditions to output sound according to the relative distance value between the electronic equipment and at least two sound output equipment, and the operation is convenient and time-saving.
Referring to fig. 2, fig. 2 is a schematic flowchart of a control method of an electronic device according to an embodiment of the present invention, and as shown in fig. 2, the method includes the following steps:
step 201, obtaining relative distance values between the electronic device and at least two sound output devices respectively.
In the embodiment of the invention, in the process of playing the audio file by the electronic equipment, the electronic equipment can acquire the relative distance value between the electronic equipment and at least two sound output devices according to the preset frequency. For example: the value of the relative distance between the electronic device and the at least two sound output devices acquired every 1 minute interval may be set to the preset frequency.
Optionally, step 201 includes: detecting the coordinate information of the electronic equipment and judging whether the coordinate information of the electronic equipment changes or not; if the coordinate information of the electronic equipment changes, respectively acquiring the coordinate information of the at least two sound output devices; and respectively calculating relative distance values between the electronic equipment and the at least two sound output devices based on the coordinate information of the electronic equipment and the coordinate information of the at least two sound output devices.
In this embodiment, in the process of playing the audio file, when it is detected that the coordinate information of the electronic device changes, that is, the electronic device moves, the electronic device detects the coordinate information of the electronic device and obtains the coordinate information of each sound output device, so as to calculate the relative distance value between the electronic device and at least two sound output devices, thereby implementing timely switching of the sound output devices outputting sound, and reducing the power consumption of the electronic device.
Step 202, comparing the relative distance values between the electronic device and the at least two sound output devices, and determining the sound output device with the smallest relative distance value with the electronic device as the target sound output device.
In this embodiment of the present invention, if the relative distance values between the electronic device and at least two sound output devices are obtained in step 201, the electronic device may compare the relative distance values between the electronic device and each sound output device, and determine the sound output device with the smallest relative distance value with the electronic device as the target sound output device.
The electronic device can generate a distance sorting list corresponding to the at least two sound output devices, if the relative distances between the electronic device and the at least two sound output devices are obtained, the relative distances between the electronic device and the at least two sound output devices can be sorted in the distance sorting list, sorting is carried out according to a descending mode, and the sound output devices at corresponding positions in the sorting list are selected as the target sound output devices, so that switching of the sound output devices outputting sound is more timely.
For example: the electronic device may add at least two historically connected sound output devices to the distance sorted list, acquire a relative distance value between the electronic device and each sound output device when the electronic device moves each time, update the position of each sound output device in the distance sorted list according to each relative distance value in a descending manner, and select the sound output device at the last position in the sorted list as the target sound output device.
Step 203, establishing connection with the target sound output device, and sending audio playing data to the target sound output device.
In the embodiment of the present invention, if the target sound output device is determined in step 202, the electronic device may establish a connection with the target sound output device, and send audio playing data to the target sound output device, so as to switch to the sound output device meeting the preset condition in time to output sound.
Optionally, step 203 includes: judging whether the sound output equipment currently connected with the electronic equipment is the target sound output equipment or not; if the current sound output equipment connected with the electronic equipment is not the target sound output equipment, switching the current sound output equipment connected with the electronic equipment into the target sound output equipment, and sending audio playing data to the target sound output equipment.
In this embodiment, when determining the target sound output device, the electronic device may determine whether the currently connected sound output device is the target sound output device, and if not, execute a connection operation with the target sound output device, so that the currently output sound output device may be switched to the target sound output device in time; and if the target sound output equipment is the target sound output equipment, the connection operation is not executed any more, and the audio playing data is continuously sent to the currently connected sound output equipment, so that the repeated connection operation is avoided, and the electric quantity loss of the electronic equipment is saved.
Further optionally, the step of switching the sound output device currently connected to the electronic device to the target sound output device and sending audio playing data to the target sound output device includes: displaying a prompt associated with the target sound output device; and if a determined operation instruction input by the user based on the prompt information is received, switching the current sound output equipment connected with the electronic equipment to the target sound output equipment, and outputting the audio playing data to the target sound output equipment. Therefore, the electronic equipment can perform switching operation according to the needs of the user in the process of switching the sound output equipment for outputting sound, and the user experience effect of the electronic equipment is improved.
In the embodiment of the invention, the relative distance values between the electronic equipment and the at least two sound output devices are compared, the sound output device with the minimum relative distance value with the electronic equipment is determined as the target sound output device, the electronic equipment can be switched to the sound output device with the minimum relative distance value to output sound, the sound output device can be switched to output sound in time, and the sound effect of the electronic equipment in the process of playing the audio file is improved.
Referring to fig. 3, fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, where the electronic device has an audio playing function, and as shown in fig. 3, the electronic device 300 includes a distance value obtaining module 301, a determining module 302, and a processing module 303, which are connected in sequence:
a distance value obtaining module 301, configured to obtain relative distance values between the electronic device and at least two sound output devices respectively;
a determining module 302, configured to determine, based on relative distance values between the electronic device and the at least two sound output devices, a sound output device that meets a preset condition among the at least two sound output devices as a target sound output device;
and the processing module 303 is configured to establish a connection with the target sound output device, and send audio playing data to the target sound output device.
Optionally, the determining module 302 is specifically configured to compare relative distance values between the electronic device and the at least two sound output devices, and determine the sound output device with the smallest relative distance value with the electronic device as the target sound output device.
Optionally, as shown in fig. 4, the distance value obtaining module 301 includes:
a coordinate detection unit 3011, configured to detect coordinate information of the electronic device and determine whether the coordinate information of the electronic device changes;
a coordinate obtaining unit 3012, configured to obtain coordinate information of the at least two pieces of sound output devices respectively if the coordinate information of the electronic device changes;
a calculating unit 3013, configured to calculate, based on the coordinate information of the electronic device and the coordinate information of the at least two sound output devices, relative distance values between the electronic device and the at least two sound output devices, respectively.
Optionally, as shown in fig. 5, the processing module 303 includes:
a determining unit 3031, configured to determine whether a sound output device currently connected to the electronic device is the target sound output device;
a processing unit 3032, configured to switch, if the sound output device currently connected to the electronic device is not the target sound output device, the sound output device currently connected to the electronic device to the target sound output device, and send audio playing data to the target sound output device.
Optionally, as shown in fig. 6, the processing unit 3032 includes:
a prompt subunit 30321, configured to display prompt information associated with the target sound output device;
and the processing subunit 30322 is configured to, if a certain operation instruction input by the user based on the prompt information is received, switch the sound output device currently connected to the electronic device to the target sound output device, and output the audio playing data to the target sound output device.
The electronic device 300 can implement the processes implemented by the electronic device in the embodiments of fig. 1 and fig. 2, and in order to avoid repetition, the details are not described here.
The electronic device 300 of the embodiment of the present invention obtains the relative distance values between the electronic device and at least two sound output devices respectively; determining a sound output device meeting a preset condition in the at least two sound output devices as a target sound output device based on relative distance values between the electronic device and the at least two sound output devices respectively; and establishing connection with the target sound output equipment, and sending audio playing data to the target sound output equipment. The electronic equipment can automatically switch to the sound output equipment meeting the conditions to output sound according to the relative distance value between the electronic equipment and at least two sound output equipment, and the operation is convenient and time-saving.
Referring to fig. 7, fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 7, an electronic device 700 includes: at least one processor 701, a memory 702, at least one network interface 704, and a user interface 703. The various components in the electronic device 700 are coupled together by a bus system 705. It is understood that the bus system 705 is used to enable communications among the components. The bus system 705 includes a power bus, a control bus, and a status signal bus in addition to a data bus. But for clarity of illustration the various busses are labeled in figure 7 as the bus system 705. The electronic device 700 has an audio playing function, such as installing an audio playing application.
The user interface 703 may include, among other things, a display, a keyboard, or a pointing device (e.g., a mouse, trackball, touch pad, or touch screen, among others.
It is to be understood that the memory 702 in embodiments of the present invention may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of example, but not limitation, many forms of RAM are available, such as Static random access memory (Static RAM, SRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic random access memory (Synchronous DRAM, SDRAM), Double Data rate Synchronous Dynamic random access memory (ddr SDRAM ), Enhanced Synchronous SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and direct memory bus RAM (DRRAM). The memory 702 of the systems and methods described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
In some embodiments, memory 702 stores the following elements, executable modules or data structures, or a subset thereof, or an expanded set thereof: an operating system 7021 and application programs 7022.
The operating system 7021 includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, for implementing various basic services and processing hardware-based tasks. The application 7022 includes various applications, such as a Media Player (Media Player), a Browser (Browser), and the like, for implementing various application services. Programs that implement methods in accordance with embodiments of the present invention can be included within application program 7022.
In an embodiment of the present invention, the electronic device 700 further includes: a computer program stored on the memory 702 and executable on the processor 701, in particular a computer program in the application 7022, which computer program, when executed by the processor 701, performs the steps of: acquiring relative distance values between the electronic equipment and at least two sound output devices respectively; determining a sound output device meeting a preset condition in the at least two sound output devices as a target sound output device based on relative distance values between the electronic device and the at least two sound output devices respectively; and establishing connection with the target sound output equipment, and sending audio playing data to the target sound output equipment.
The method disclosed in the above embodiments of the present invention may be applied to the processor 701, or implemented by the processor 701. The processor 701 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be implemented by integrated logic circuits of hardware or instructions in the form of software in the processor 701. The Processor 701 may be a general-purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable Gate Array (FPGA) or other programmable logic device, discrete Gate or transistor logic device, or discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules may reside in ram, flash memory, rom, prom, or eprom, registers, among other computer-readable storage media known in the art. The computer readable storage medium is located in the memory 702, and the processor 701 reads the information in the memory 702, and performs the steps of the above method in combination with the hardware thereof. In particular, the computer readable storage medium has stored thereon a computer program, which when executed by the processor 701 implements the steps of the control method embodiments of the electronic device as described above.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For a hardware implementation, the Processing units may be implemented within 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 (FPGAs), general purpose processors, controllers, micro-controllers, microprocessors, other electronic units configured to perform the functions described herein, or a combination thereof.
For a software implementation, the techniques described herein may be implemented with modules (e.g., procedures, functions, and so on) that perform the functions described herein. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
Optionally, the computer program may further implement the following steps when executed by the processor 701: and comparing the relative distance values between the electronic equipment and the at least two sound output equipment respectively, and determining the sound output equipment with the minimum relative distance value with the electronic equipment as the target sound output equipment.
Optionally, the computer program may further implement the following steps when executed by the processor 701: detecting the coordinate information of the electronic equipment and judging whether the coordinate information of the electronic equipment changes or not; if the coordinate information of the electronic equipment changes, respectively acquiring the coordinate information of the at least two sound output devices; and respectively calculating relative distance values between the electronic equipment and the at least two sound output devices based on the coordinate information of the electronic equipment and the coordinate information of the at least two sound output devices.
Optionally, the computer program may further implement the following steps when executed by the processor 701: judging whether the sound output equipment currently connected with the electronic equipment is the target sound output equipment or not; if the current sound output equipment connected with the electronic equipment is not the target sound output equipment, switching the current sound output equipment connected with the electronic equipment into the target sound output equipment, and sending audio playing data to the target sound output equipment.
Optionally, the computer program may further implement the following steps when executed by the processor 701: displaying a prompt associated with the target sound output device; and if a determined operation instruction input by the user based on the prompt information is received, switching the current sound output equipment connected with the electronic equipment to the target sound output equipment, and outputting the audio playing data to the target sound output equipment.
The electronic device 700 is capable of implementing the processes implemented by the electronic device in the foregoing embodiments, and in order to avoid repetition, the details are not described here.
The electronic device 700 of the embodiment of the present invention obtains the relative distance values between the electronic device and at least two sound output devices respectively; determining a sound output device meeting a preset condition in the at least two sound output devices as a target sound output device based on relative distance values between the electronic device and the at least two sound output devices respectively; and establishing connection with the target sound output equipment, and sending audio playing data to the target sound output equipment. The electronic equipment can automatically switch to the sound output equipment meeting the conditions to output sound according to the relative distance value between the electronic equipment and at least two sound output equipment, and the operation is convenient and time-saving.
Referring to fig. 8, fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, which can implement details of a control method of the electronic device in the embodiments of fig. 1 and fig. 2, and achieve the same effect. As shown in fig. 8, the electronic device 800 includes a Radio Frequency (RF) circuit 810, a memory 820, an input unit 830, a display unit 840, a processor 850, an audio circuit 860, a communication module 870, and a power supply 880, and the electronic device 800 has an audio playing function, such as installing an audio playing application.
The input unit 830 may be used, among other things, to receive numeric or character information input by a user and to generate signal inputs related to user settings and function control of the electronic device 800. Specifically, in the embodiment of the present invention, the input unit 830 may include a touch panel 831. The touch panel 831, also referred to as a touch screen, can collect touch operations performed by a user on or near the touch panel 831 (e.g., operations performed by the user on the touch panel 831 using a finger, a stylus, or any other suitable object or accessory), and drive the corresponding connection device according to a preset program. Alternatively, the touch panel 831 may include two portions, i.e., a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts it to touch point coordinates, and sends the touch point coordinates to the processor 850, and can receive and execute commands sent from the processor 850. In addition, the touch panel 831 may be implemented by various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 831, the input unit 830 may include other input devices 832, and the other input devices 832 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
Among other things, the display unit 840 may be used to display information input by the user or information provided to the user, as well as various menu interfaces of the electronic device 800. The display unit 840 may include a display panel 841, and the display panel 841 may be alternatively configured in the form of an LCD or an Organic Light-Emitting Diode (OLED), or the like.
It should be noted that the touch panel 831 can overlay the display panel 841 to form a touch display screen, which, when detecting a touch operation thereon or nearby, is transmitted to the processor 850 to determine the type of touch event, and then the processor 850 provides a corresponding visual output on the touch display screen according to the type of touch event.
The touch display screen comprises an application program interface display area and a common control display area. The arrangement modes of the application program interface display area and the common control display area are not limited, and can be an arrangement mode which can distinguish two display areas, such as vertical arrangement, left-right arrangement and the like. The application interface display area may be used to display an interface of an application. Each interface may contain at least one interface element such as an icon and/or widget desktop control for an application. The application interface display area may also be an empty interface that does not contain any content. The common control display area is used for displaying controls with high utilization rate, such as application icons like setting buttons, interface numbers, scroll bars, phone book icons and the like. The touch screen is a flexible screen, and the two surfaces of the flexible screen are both pasted with the organic transparent conductive films of the carbon nanotubes.
The processor 850 is a control center of the electronic device 800, connects various parts of the whole mobile phone by using various interfaces and lines, and performs various functions of the electronic device 800 and processes data by operating or executing software programs and/or modules stored in the first memory 821 and calling data stored in the second memory 822, thereby integrally monitoring the electronic device 800. Optionally, processor 850 may include one or more processing units.
In an embodiment of the present invention, the electronic device further includes: a computer program stored in the first memory 821 and executable on the processor 850, the computer program when executed by the processor 850 performing the steps of: acquiring relative distance values between the electronic equipment and at least two sound output devices respectively; determining a sound output device meeting a preset condition in the at least two sound output devices as a target sound output device based on relative distance values between the electronic device and the at least two sound output devices respectively; and establishing connection with the target sound output equipment, and sending audio playing data to the target sound output equipment.
Optionally, the computer program when executed by the processor 850 may further implement the steps of: and comparing the relative distance values between the electronic equipment and the at least two sound output equipment respectively, and determining the sound output equipment with the minimum relative distance value with the electronic equipment as the target sound output equipment.
Optionally, the computer program when executed by the processor 850 may further implement the steps of: detecting the coordinate information of the electronic equipment and judging whether the coordinate information of the electronic equipment changes or not; if the coordinate information of the electronic equipment changes, respectively acquiring the coordinate information of the at least two sound output devices; and respectively calculating relative distance values between the electronic equipment and the at least two sound output devices based on the coordinate information of the electronic equipment and the coordinate information of the at least two sound output devices.
Optionally, the computer program when executed by the processor 850 may further implement the steps of: judging whether the sound output equipment currently connected with the electronic equipment is the target sound output equipment or not; if the current sound output equipment connected with the electronic equipment is not the target sound output equipment, switching the current sound output equipment connected with the electronic equipment into the target sound output equipment, and sending audio playing data to the target sound output equipment.
Optionally, the computer program when executed by the processor 850 may further implement the steps of: displaying a prompt associated with the target sound output device; and if a determined operation instruction input by the user based on the prompt information is received, switching the current sound output equipment connected with the electronic equipment to the target sound output equipment, and outputting the audio playing data to the target sound output equipment.
The electronic device 800 can implement the processes implemented by the electronic device in the foregoing embodiments, and in order to avoid repetition, the details are not described here.
The electronic device 800 of the embodiment of the present invention obtains the relative distance values between the electronic device and at least two sound output devices respectively; determining a sound output device meeting a preset condition in the at least two sound output devices as a target sound output device based on relative distance values between the electronic device and the at least two sound output devices respectively; and establishing connection with the target sound output equipment, and sending audio playing data to the target sound output equipment. The electronic equipment can automatically switch to the sound output equipment meeting the conditions to output sound according to the relative distance value between the electronic equipment and at least two sound output equipment, and the operation is convenient and time-saving.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system, the electronic device and the unit described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present application, it should be understood that the disclosed electronic device and method may be implemented in other ways. For example, the above-described embodiments of the electronic device are merely illustrative, and for example, a division of a unit is only one type of division of a logical function, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of electronic devices or units through some interfaces, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment of the present invention.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (7)

1. A control method of electronic equipment is applied to the electronic equipment with an audio playing function, and is characterized by comprising the following steps:
acquiring relative distance values between the electronic equipment and at least two sound output devices respectively;
determining a sound output device meeting a preset condition in the at least two sound output devices as a target sound output device based on relative distance values between the electronic device and the at least two sound output devices respectively;
establishing connection with the target sound output equipment, and sending audio playing data to the target sound output equipment;
the step of establishing a connection with the target sound output device and sending audio playing data to the target sound output device includes:
judging whether the sound output equipment currently connected with the electronic equipment is the target sound output equipment or not;
if the current sound output equipment connected with the electronic equipment is not the target sound output equipment, switching the current sound output equipment connected with the electronic equipment into the target sound output equipment, and sending audio playing data to the target sound output equipment;
the step of switching the sound output device currently connected with the electronic device to the target sound output device and sending audio playing data to the target sound output device includes:
displaying a prompt associated with the target sound output device;
and if a determined operation instruction input by the user based on the prompt information is received, switching the current sound output equipment connected with the electronic equipment to the target sound output equipment, and outputting the audio playing data to the target sound output equipment.
2. The method according to claim 1, wherein the step of determining a sound output device satisfying a preset condition from among the at least two sound output devices as a target sound output device based on the relative distance values between the electronic device and the sound output devices, respectively, comprises:
and comparing the relative distance values between the electronic equipment and the at least two sound output equipment respectively, and determining the sound output equipment with the minimum relative distance value with the electronic equipment as the target sound output equipment.
3. The method according to claim 1, wherein the step of obtaining the relative distance values between the electronic device and the at least two sound output devices comprises:
detecting the coordinate information of the electronic equipment and judging whether the coordinate information of the electronic equipment changes or not;
if the coordinate information of the electronic equipment changes, respectively acquiring the coordinate information of the at least two sound output devices;
and respectively calculating relative distance values between the electronic equipment and the at least two sound output devices based on the coordinate information of the electronic equipment and the coordinate information of the at least two sound output devices.
4. An electronic device having an audio playing function, the electronic device comprising:
the distance value acquisition module is used for acquiring relative distance values between the electronic equipment and at least two pieces of sound output equipment respectively;
the determining module is used for determining the sound output equipment meeting the preset condition in the at least two sound output equipment as target sound output equipment based on the relative distance values between the electronic equipment and the at least two sound output equipment respectively;
the processing module is used for establishing connection with the target sound output equipment and sending audio playing data to the target sound output equipment;
the processing module comprises:
a judging unit, configured to judge whether a sound output device currently connected to the electronic device is the target sound output device;
the processing unit is used for switching the sound output equipment which is currently connected with the electronic equipment into the target sound output equipment and sending audio playing data to the target sound output equipment if the sound output equipment which is currently connected with the electronic equipment is not the target sound output equipment;
the processing unit includes:
a prompt subunit, configured to display prompt information associated with the target sound output device;
and the processing subunit is configured to, if a certain operation instruction input by the user based on the prompt information is received, switch the sound output device currently connected to the electronic device to the target sound output device, and output the audio playing data to the target sound output device.
5. The electronic device according to claim 4, wherein the determining module is specifically configured to compare relative distance values between the electronic device and the at least two sound output devices, and determine the sound output device with the smallest relative distance value to the electronic device as the target sound output device.
6. The electronic device of claim 4, wherein the distance value obtaining module comprises:
the coordinate detection unit is used for detecting the coordinate information of the electronic equipment and judging whether the coordinate information of the electronic equipment changes or not;
the coordinate acquisition unit is used for respectively acquiring the coordinate information of the at least two sound output devices if the coordinate information of the electronic device changes;
and the calculating unit is used for calculating relative distance values between the electronic equipment and the at least two sound output devices respectively based on the coordinate information of the electronic equipment and the coordinate information of the at least two sound output devices respectively.
7. An electronic device, characterized in that it comprises a processor, a memory, a computer program stored on said memory and executable on said processor, said computer program, when executed by said processor, implementing the steps of the control method of an electronic device according to any one of claims 1 to 3.
CN201710827810.8A 2017-09-14 2017-09-14 Control method of electronic equipment and electronic equipment Active CN107682902B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710827810.8A CN107682902B (en) 2017-09-14 2017-09-14 Control method of electronic equipment and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710827810.8A CN107682902B (en) 2017-09-14 2017-09-14 Control method of electronic equipment and electronic equipment

Publications (2)

Publication Number Publication Date
CN107682902A CN107682902A (en) 2018-02-09
CN107682902B true CN107682902B (en) 2019-12-24

Family

ID=61136732

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710827810.8A Active CN107682902B (en) 2017-09-14 2017-09-14 Control method of electronic equipment and electronic equipment

Country Status (1)

Country Link
CN (1) CN107682902B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111970639B (en) * 2020-09-02 2023-03-24 Tcl通讯(宁波)有限公司 Method, device, terminal equipment and storage medium for keeping safe distance
CN112312375A (en) * 2020-11-17 2021-02-02 Oppo广东移动通信有限公司 Device connection method, first device, second device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104575539A (en) * 2014-12-29 2015-04-29 广东欧珀移动通信有限公司 Music playing control method and device
CN105142010A (en) * 2015-07-30 2015-12-09 广东欧珀移动通信有限公司 Bluetooth connection selection method of multi-play device and main play device
CN105845157A (en) * 2016-03-22 2016-08-10 广东欧珀移动通信有限公司 Method, device and system for link controlling of music playing system
CN106385609A (en) * 2016-09-18 2017-02-08 广东小天才科技有限公司 Method for controlling sound box to play, wearable device, smart television and system
CN106775565A (en) * 2016-12-22 2017-05-31 上海百芝龙网络科技有限公司 A kind of many equipment seamless switching sound playing systems based on user's positioning

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5284451B2 (en) * 2011-11-30 2013-09-11 株式会社東芝 Electronic device and audio output method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104575539A (en) * 2014-12-29 2015-04-29 广东欧珀移动通信有限公司 Music playing control method and device
CN105142010A (en) * 2015-07-30 2015-12-09 广东欧珀移动通信有限公司 Bluetooth connection selection method of multi-play device and main play device
CN105845157A (en) * 2016-03-22 2016-08-10 广东欧珀移动通信有限公司 Method, device and system for link controlling of music playing system
CN106385609A (en) * 2016-09-18 2017-02-08 广东小天才科技有限公司 Method for controlling sound box to play, wearable device, smart television and system
CN106775565A (en) * 2016-12-22 2017-05-31 上海百芝龙网络科技有限公司 A kind of many equipment seamless switching sound playing systems based on user's positioning

Also Published As

Publication number Publication date
CN107682902A (en) 2018-02-09

Similar Documents

Publication Publication Date Title
CN106383645A (en) Music playing control method and mobile terminal
CN106126077B (en) Display control method of application program icons and mobile terminal
CN107171874B (en) Voice engine switching method, mobile terminal and server
CN107526492B (en) Interface display method of application program and mobile terminal
CN107678644B (en) Image processing method and mobile terminal
CN106354373B (en) Icon moving method and mobile terminal
CN106453953B (en) Wireless access point connection method and mobile terminal
CN106775378B (en) Method for determining candidate words of input method and mobile terminal
CN106445116B (en) Method for calling out message notification bar and mobile terminal
CN106951174A (en) The method of adjustment and mobile terminal of a kind of dummy keyboard
MX2008014057A (en) Multi-function key with scrolling.
KR20140138189A (en) Method, device, and system for controlling computer terminal
CN107172287B (en) Multi-card communication method and mobile terminal
CN106168894B (en) Content display method and mobile terminal
CN106970752B (en) Screen capturing method and mobile terminal
CN107678813B (en) Desktop icon theme switching method and mobile terminal
CN106874046B (en) Application program operation method and mobile terminal
CN107479822B (en) Information input method and terminal
CN107547738B (en) Prompting method and mobile terminal
CN106940597A (en) A kind of camera starts control method and mobile terminal
CN106648329A (en) Application icon display method and mobile terminal
CN107229408B (en) Terminal, input control method thereof, and computer-readable storage medium
CN106873891B (en) Touch operation method and mobile terminal
CN106778389A (en) The loss detection method and mobile terminal of a kind of mobile terminal
CN106126034A (en) A kind of keypress function method to set up and mobile terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant