CN108881286B - Multimedia playing control method, terminal, sound box equipment and system - Google Patents

Multimedia playing control method, terminal, sound box equipment and system Download PDF

Info

Publication number
CN108881286B
CN108881286B CN201810786274.6A CN201810786274A CN108881286B CN 108881286 B CN108881286 B CN 108881286B CN 201810786274 A CN201810786274 A CN 201810786274A CN 108881286 B CN108881286 B CN 108881286B
Authority
CN
China
Prior art keywords
sound box
terminal
multimedia
instruction
playing
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
CN201810786274.6A
Other languages
Chinese (zh)
Other versions
CN108881286A (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.)
Tencent Music Entertainment Technology Shenzhen Co Ltd
Original Assignee
Tencent Music Entertainment Technology Shenzhen 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 Tencent Music Entertainment Technology Shenzhen Co Ltd filed Critical Tencent Music Entertainment Technology Shenzhen Co Ltd
Priority to CN201810786274.6A priority Critical patent/CN108881286B/en
Publication of CN108881286A publication Critical patent/CN108881286A/en
Application granted granted Critical
Publication of CN108881286B publication Critical patent/CN108881286B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/163In-band adaptation of TCP data exchange; In-band control procedures

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Telephone Function (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The application provides a multimedia playing control method, a terminal, a sound box device and a system, and belongs to the technical field of computers. The method comprises the following steps: the terminal can acquire the basic information of the sound box equipment, establish connection with the sound box equipment based on the basic information of the sound box equipment, then acquire the state information of the sound box equipment from the sound box equipment, and send the multimedia play list to the sound box equipment by using the state information of the sound box equipment. After the sound box device receives the multimedia play list, the multimedia to be played can be determined, the data of the multimedia to be played is obtained by using the play link of the multimedia to be played, and the data of the multimedia to be played is played. By adopting the method and the device, the multimedia playing delay can be reduced.

Description

Multimedia playing control method, terminal, sound box equipment and system
Technical Field
The invention relates to the technical field of computers, in particular to a method, a terminal, a sound box device and a system for controlling multimedia playing.
Background
With the development of computer technology, the sound quality of speaker devices is getting better, and people hope to use speaker devices to play multimedia data in their mobile phones or tablet computers, for example, to use speaker devices to play songs in their mobile phones.
In the related art, a bluetooth connection is generally established between a mobile phone and a speaker device, multimedia data to be played is sent to the speaker device, and the speaker device plays the multimedia data after receiving the multimedia data.
Due to the fact that the Bluetooth transmission bandwidth is limited, the data volume of the multimedia data is large, and after the multimedia data are sent to the loudspeaker box device, the transmission delay of the multimedia data can be caused, and then the playing delay of the multimedia data can be caused.
Disclosure of Invention
In order to solve the problems in the prior art, embodiments of the present invention provide a method, a terminal, a speaker device, and a system for controlling multimedia playing. The technical scheme is as follows:
in a first aspect, a method for controlling multimedia playing is provided, where the method includes:
the method comprises the steps that a terminal obtains basic information of the sound box device, wherein the basic information comprises address information and a Transmission Control Protocol (TCP) port number;
the terminal establishes TCP connection with the sound box equipment based on the basic information;
the terminal sends a state information acquisition request to the sound box equipment;
the terminal receives state information sent by the sound box equipment, wherein the state information comprises one of a playing state, a pause state and an unplayed state;
and if the state information is in a pause state or an unplayed state, sending a multimedia play list to the sound box equipment, wherein the multimedia play list comprises the name and the play link of each multimedia.
Optionally, the obtaining, by the terminal, basic information of the sound box device includes:
the terminal sends a multicast message;
the terminal receives basic information sent by the sound box equipment; alternatively, the first and second electrodes may be,
the terminal acquires the basic information of the sound box equipment through the camera shooting component.
Optionally, the method further includes:
after the terminal establishes TCP connection with the sound box equipment, the terminal sends heartbeat detection messages to the sound box equipment at intervals of a preset time;
and if the response information fed back by the sound box equipment is not received for the preset time lengths of the continuous preset number, the terminal is disconnected from the TCP with the sound box equipment.
Optionally, the method further includes:
after the terminal establishes TCP connection with the sound box equipment, the terminal stores basic information of the sound box equipment;
and when the terminal is disconnected from the network and is accessed to the network again, if the basic information of the sound box equipment which is acquired currently is the same as the stored basic information of the sound box equipment, the TCP connection is automatically reestablished with the sound box equipment.
Optionally, the method further includes:
after the terminal establishes TCP connection with the sound box equipment, when detecting that the multimedia play list is updated, sending the updated multimedia play list to the sound box equipment.
Optionally, the method further includes:
after the terminal is connected with the sound box device in a TCP mode, when the terminal receives a preset operation instruction, a control instruction corresponding to the operation instruction is sent to the sound box device, and the control instruction comprises a playing instruction, a pause instruction, a last playing instruction, a next playing instruction, a volume adjusting instruction, a mute setting instruction, a playing mode switching instruction and a playing progress adjusting instruction.
In a second aspect, a method for controlling multimedia playing is provided, the method comprising:
the sound box equipment establishes Transmission Control Protocol (TCP) connection with the terminal;
the sound box equipment receives a state information acquisition request sent by the terminal;
the sound box equipment sends current state information to the terminal, wherein the state information comprises one of a playing state, a pause state and an unplayed state;
the sound box equipment receives a multimedia play list sent by the terminal, wherein the multimedia play list comprises the name and the play link of each multimedia;
the sound box equipment determines multimedia to be played according to the current playing mode and the multimedia playing list;
the sound box equipment acquires data of the multimedia to be played through a playing link corresponding to the multimedia to be played;
and playing the data of the multimedia to be played.
Optionally, the method further includes:
the sound box equipment receives multicast information sent by the terminal;
and the sound box equipment sends basic information to the terminal.
Optionally, the method further includes:
when the sound box equipment receives a multimedia recording instruction, recording the sound in the environment;
and when the sound box equipment receives a recording ending instruction, acquiring recorded multimedia data and sending the recorded multimedia data to the terminal.
Optionally, the method further includes:
the sound box equipment receives a control instruction from a hardware interface of the equipment, wherein the control instruction comprises a playing instruction, a pause instruction, a last playing instruction, a next playing instruction, a volume adjusting instruction, a mute setting instruction, a playing mode switching instruction, a playing progress adjusting instruction, a multimedia downloading instruction and a collection instruction;
and the sound box equipment executes the control instruction and sends result information after the control instruction is executed to the terminal.
In a third aspect, a terminal for controlling multimedia playing is provided, where the terminal includes:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring basic information of the sound box equipment, and the basic information comprises address information and a Transmission Control Protocol (TCP) port number;
the connection module is used for establishing TCP connection with the sound box equipment based on the basic information;
the sending module is used for sending a state information obtaining request to the sound box equipment;
the receiving module is used for receiving state information sent by the sound box equipment, wherein the state information comprises one of a playing state, a pause state and an unplayed state;
the sending module is further configured to send a play stop instruction to the sound box device and send a multimedia play list to the sound box device if the state information is in a play state, and send the multimedia play list to the sound box device if the state information is in a pause state or an unplayed state, where the multimedia play list includes a name and a play link of each multimedia.
Optionally, the obtaining module is configured to:
sending a multicast message;
receiving basic information sent by the sound box equipment; alternatively, the first and second electrodes may be,
and acquiring basic information of the sound box equipment through the camera shooting component.
Optionally, the sending module is further configured to:
after the terminal establishes TCP connection with the sound box equipment, the terminal sends heartbeat detection messages to the sound box equipment at intervals of a preset time;
the terminal further comprises:
and the disconnection module is used for disconnecting the TCP connection with the sound box equipment if the response information fed back by the sound box equipment is not received for the preset time lengths of the preset number continuously.
Optionally, the terminal further includes:
the storage module is used for storing the basic information of the sound box equipment by the terminal after the terminal establishes TCP connection with the sound box equipment;
the connection module is further configured to, when the terminal is disconnected from the network and re-accesses the network, automatically reestablish a TCP connection with the sound box device if the currently acquired basic information of the sound box device is the same as the stored basic information of the sound box device.
Optionally, the sending module is further configured to:
after the terminal establishes TCP connection with the sound box equipment, when detecting that the multimedia play list is updated, sending the updated multimedia play list to the sound box equipment.
Optionally, the sending module is further configured to:
after the terminal is connected with the sound box device in a TCP mode, when a preset operation instruction is received, a control instruction corresponding to the operation instruction is sent to the sound box device, and the control instruction comprises a playing instruction, a pause instruction, a last playing instruction, a next playing instruction, a volume adjusting instruction, a mute setting instruction, a playing mode switching instruction and a playing progress adjusting instruction.
In a fourth aspect, a speaker apparatus for multimedia playback control is provided, the speaker apparatus comprising:
the connection module is used for establishing Transmission Control Protocol (TCP) connection with the terminal;
the receiving module is used for receiving the acquisition request of the state information sent by the terminal;
a sending module, configured to send current state information to the terminal, where the state information includes one of a play state, a pause state, and an unplayed state;
the receiving module is further configured to receive a multimedia play list sent by the terminal, where the multimedia play list includes a name and a play link of each multimedia;
the determining module is used for determining the multimedia to be played according to the current playing mode and the multimedia playing list;
the acquisition module is used for acquiring the data of the multimedia to be played through a playing link corresponding to the multimedia to be played;
and the playing module is used for playing the data of the multimedia to be played.
Optionally, the receiving module is further configured to receive multicast information sent by the terminal;
the sending module is further configured to send the basic information to the terminal.
Optionally, the speaker device further includes:
the recording module is used for recording the sound in the environment when receiving the multimedia recording instruction;
the sending module is further configured to obtain the recorded multimedia data and send the recorded multimedia data to the terminal when receiving the recording ending instruction.
Optionally, the receiving module is further configured to:
the sound box equipment receives a control instruction from a hardware interface of the equipment, wherein the control instruction comprises a playing instruction, a pause instruction, a last playing instruction, a next playing instruction, a volume adjusting instruction, a mute setting instruction, a playing mode switching instruction, a playing progress adjusting instruction, a multimedia downloading instruction and a collection instruction;
the speaker device further includes:
the execution module is used for executing the control instruction;
and the sending module is also used for sending result information after the control instruction is executed to the terminal.
In a fifth aspect, a system for controlling multimedia playing is provided, the system comprising a terminal and a box device, wherein:
the terminal, as described in the third aspect above;
the speaker device is the speaker device according to the fourth aspect.
The technical scheme provided by the embodiment of the invention has the beneficial effects that at least:
in the embodiment of the invention, the terminal can acquire the basic information of the sound box equipment, establish connection with the sound box equipment based on the basic information of the sound box equipment, then acquire the state information of the sound box equipment from the sound box equipment, and send the multimedia play list to the sound box equipment by using the state information of the sound box equipment. After the sound box device receives the multimedia play list, the multimedia to be played can be determined, the data of the multimedia to be played is obtained by using the play link of the multimedia to be played, and the data of the multimedia to be played is played. Therefore, the terminal is connected with the sound box device through the TCP, so that the connection stability is good, the terminal sends the multimedia play list to the sound box device, the sound box device downloads the data of the multimedia to be played based on the play link of the multimedia to be played for playing, and the terminal is not required to send the data of the multimedia to be played to the sound box device, so that the data transmission delay can be reduced, the multimedia playing delay can be reduced, and the multimedia play list is sent to the sound box device, so that the sound box device can continue to play the multimedia based on the multimedia play list even after the terminal is disconnected with the sound box device.
Drawings
Fig. 1 is a system diagram of multimedia playing control according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for controlling multimedia playing according to an embodiment of the present invention;
fig. 3 is a schematic display diagram of a sound box apparatus according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a code interpretation provided by an embodiment of the invention;
fig. 5 is a schematic structural diagram of a terminal according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a terminal according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a terminal according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a sound box apparatus according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of a sound box apparatus according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of a sound box apparatus according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of a terminal according to an embodiment of the present invention;
fig. 12 is a schematic structural diagram of a sound box device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
The embodiment of the invention provides a method for controlling multimedia playing, wherein an execution main body of the method can be a terminal and a box device, wherein the terminal can be a mobile phone, a tablet personal computer and the like.
The terminal is installed with multimedia playing application programs, such as audio application programs, etc., and the terminal can be provided with a processor, a memory and a transceiver, wherein the processor can be used for processing the process of multimedia playing control, the memory can be used for storing data required and generated in the process of multimedia playing control, and the transceiver can be used for receiving and transmitting data. The terminal can also be provided with a loudspeaker, a recorder, a screen and the like, wherein the loudspeaker can be used for playing multimedia data, the recorder can be used for recording audio data, the screen can be used for displaying lyrics, an operation interface of the terminal and the like, and the screen can be a touch screen and the like.
The sound box device can be provided with a processor, a memory and a transceiver, wherein the processor can be used for processing the process of multimedia playing control, the memory can be used for storing data required and generated in the process of multimedia playing control, and the transceiver can be used for receiving and sending data, receiving a multimedia play list sent by a terminal and the like. The speaker device may further be provided with a speaker, a recorder, and the like, the speaker may be used to play multimedia data, and the recorder may be used to record audio data.
In this embodiment, the detailed description of the scheme is performed by taking the terminal as a mobile phone and the multimedia as audio, and other situations are similar to the above, and the detailed description is omitted in this embodiment.
Before implementation, an application scenario of the embodiment of the present invention is first introduced:
as shown in fig. 1, when a user wants to play multimedia in a terminal using a speaker device, the speaker device may establish a connection with the terminal, and then transmit a multimedia play list in the terminal to the speaker device, so that the speaker device plays the multimedia.
As shown in fig. 2, the execution flow of the method for controlling multimedia playing may be as follows:
step 201, the terminal acquires basic information of the sound box device, wherein the basic information includes address information and a TCP port number.
In implementation, when a user wants to play audio in the terminal by using the speaker device, a multimedia application program can be installed in the terminal, then the multimedia application program is started, the terminal can display a main interface of the multimedia application program, and a speaker device playing option is displayed in the main interface. A user may click a play option of the sound box device, and the terminal may detect a click instruction of the option to obtain basic information of the sound box device, where the basic information includes address information, a TCP (Transmission Control Protocol) port number, and the like, and the address information may be an IP (Internet Protocol, Protocol interconnected before network) address.
Two possible ways are given below:
the first method is as follows: the terminal sends a multicast message; and the terminal receives the basic information sent by the sound box equipment.
In implementation, after the terminal and the speaker device access the same WIFI (Wireless Fidelity ) network, that is, in the same lan, the terminal may send a multicast message of a UDP (User data Protocol) type, and after the speaker device receives the multicast message sent by the terminal, the speaker device may obtain its own basic information regardless of whether a connection is currently established with other terminals. And then transmits its own basic information to the terminal transmitting the multicast message. The terminal can receive the basic information sent by the sound box equipment, the identification of the sound box equipment is displayed, a user can click the identification of the sound box equipment, and the terminal can establish TCP connection with the sound box equipment. As shown in fig. 3, the loudspeaker device is labeled "sonessplay 5".
For example, the multicast information may be preset to indicate that a connection is established with the speaker device, and may be DISCOVERY qplay3.0, and the speaker device may return basic information to the terminal through JSON.
The second method comprises the following steps: the terminal acquires the basic information of the sound box equipment through the camera shooting component, the identification of the sound box equipment is displayed, a user can click the identification of the sound box equipment, and the terminal can establish TCP connection with the sound box equipment.
In implementation, after the sound box device is connected to the WIFI, a two-dimensional code picture can be generated, and the two-dimensional code picture includes the basic information of the sound box device itself. The user can open the camera shooting component in the terminal, the two-dimensional code picture is scanned, and the terminal can acquire the basic information of the sound box device.
Optionally, the basic information may further include the following information: the identification of the sound box equipment, the name of the sound box equipment, the basic state of the sound box equipment, the identification of the equipment which is currently connected with the sound box equipment, the name of the equipment which is currently connected with the sound box equipment, a tcp port number, an http port number, a protocol version number and the like. The identification of the sound box device is generally an equipment serial number, generally a Guid character string, the basic state of the sound box device is used for indicating whether to establish connection with other terminals, and the device currently establishing connection with the sound box device is generally the current control device of the sound box device. The field code may be as follows:
the field codes may have:
“device_id”:“AF323A-234123-BCDE”,
“device_name”:“Bos's Speaker",
“status”:“connected”
“connected_device_id”:“AAAA-BBBB”,
“connected_device_name”:“Annie's iPhone”,
“last_connected_device_id”:“CCCC-DDDD”,
“tcp_connection_port”;:“4578”,
“http_connection_port”:“4579”,
“version”:“250”.
an explanation of the corresponding field codes described above can be seen in fig. 4.
Step 202, the terminal establishes a TCP connection with the speaker device based on the basic information.
In implementation, after the terminal acquires the basic information of the sound box device, it may perform three-way handshake with the sound box device based on the IP address and the TCP port number in the basic information (the process is the same as the process in the prior art, and is not described here any more), and establish a TCP connection.
It should be noted that, the sound box device generally establishes a connection with only one terminal, and after receiving the TCP connection request each time, the sound box device disconnects the currently connected terminal, and the process may be to send a disconnection notification to the currently connected terminal.
Step 203, the terminal sends a request for acquiring the state information to the sound box device, and the sound box device receives the request for acquiring the state information sent by the terminal.
In implementation, after the terminal establishes the TCP connection with the audio equipment, the terminal may send a request for acquiring the status information to the audio equipment using the TCP connection, and the audio equipment receives the request for acquiring the status information sent by the terminal.
For example, the terminal sends the request for acquiring the status information to the sound box device, and the request may be sent as follows:
"command_id":"234",
"command_name":"query_status".
wherein, command _ id is used to indicate the identification of the obtaining request which is the state information, and command _ name is used to indicate the name of the obtaining request which is the state information.
Step 204, the sound box device sends the current state information to the terminal, and the terminal receives the state information sent by the sound box device.
The state information includes one of a playing state, a paused state and an unplayed state, the playing state indicates that the multimedia data is currently being played, the paused state indicates that the multimedia data is currently in the playing interface, but the unplayed state indicates that the multimedia data is not currently in the playing interface, and the multimedia play list is not stored in the sound box device.
In an implementation, the sound box device may determine whether multimedia data is currently played, and if the multimedia data is currently played, the state information is a playing state, if a multimedia playlist exists, but the multimedia data is not played, the state information is a paused state, and if no multimedia playlist exists, the state information is an unplayed state.
After the sound box device determines the state information of the sound box device, the sound box device can send the state information of the sound box device to the terminal, and the terminal can receive the state information sent by the sound box device.
Corresponding to the field in step 203, the field code of the status information fed back to the terminal by the sound box device may be as follows:
"command_id":"234",
"command_name":"query_status",
“code”:"success",
“msg”:"",
"data":
{
"volume":0.5,
"playing_status":"playing",
"media_id":"ABCD-DEFG",
"media_info_name":"One Upon ATime(Mix Version)",
"media_info_artist_name":"Jackie Zhang",
"medis_info_album_name":"The Last Summer",
"media_duration_ms":7895100,
"media_play_pos_ms":34100,
}
step 205, if the state information is in a playing state, sending a playing stop instruction to the sound box device, and sending a multimedia play list to the sound box device, and if the state information is in a paused state or an unplayed state, sending a multimedia play list to the sound box device, where the multimedia play list includes a name and a playing link of each multimedia.
The multimedia play list comprises the name and play link of each multimedia. For example, the multimedia is audio, and the multimedia playlist includes audio such as "ice rain", "cat call" and the like, and a play link of "ice rain", "cat call" and the like, where the play link may be a URL (Uniform Resource Locator) and the like.
In implementation, after the terminal acquires the state information of the sound box device, it may determine a current multimedia playlist, and determine which state information is, and if the state information is in a playing state, send a play stop instruction to the sound box device, and send the multimedia playlist to the sound box device. If the state information is in a pause state, the multimedia play list can be directly sent to the sound box equipment, and if the state information is in an unplayed state, the multimedia play list can also be directly sent to the sound box equipment.
Step 206, the sound box device receives the multimedia play list sent by the terminal.
Step 207, the sound box device determines the multimedia to be played according to the current playing mode and the multimedia playing list.
The playing modes include random playing, single-track loop, list loop, and the like.
In implementation, after the sound box device receives the multimedia play list sent by the terminal, the sound box device may obtain the currently set play mode through a system program, and then determine the multimedia to be played by using the current play mode and the multimedia play list. For example, if the play mode is random play, a random algorithm is used to arbitrarily select one multimedia from the multimedia play list and determine the multimedia to be played, if the play mode is list circulation, the first multimedia is selected from the multimedia play list and determined as the multimedia to be played, and if the play mode is single song circulation, the first multimedia is selected from the multimedia play list and determined as the multimedia to be played.
Step 208, the sound box equipment acquires data of the multimedia to be played through a playing link corresponding to the multimedia to be played; and playing the data of the multimedia to be played.
In implementation, after the speaker device determines the multimedia to be played, the playing link of the multimedia to be played can be loaded, the data of the multimedia to be played is obtained, and then the data is played.
In this way, since the terminal sends the multimedia play list to the sound box device, even after the terminal is disconnected from the sound box device, the sound box device can continue to play multimedia based on the multimedia play list.
In addition, during the playing process, the obtained multimedia data can be played and downloaded and stored at the same time.
Optionally, in the embodiment of the present invention, a process of keeping connection between the terminal and the speaker device is further provided, and a corresponding process may be as follows:
after the terminal establishes TCP connection with the sound box equipment, the terminal sends heartbeat detection messages to the sound box equipment at intervals of preset time; and if the response information fed back by the sound box equipment is not received for the preset time length of the continuous preset number, the terminal disconnects the TCP connection with the sound box equipment.
The preset time duration may be preset and stored in the terminal, for example, the preset time duration is 60 seconds. The preset number may also be preset and stored in the terminal, e.g., the preset number is 5, etc. The heartbeat detection message may also be preset and stored in the terminal, for example, in a preset first field. The response information may also be preset and stored in the sound box device, for example, a preset second field or the like.
In implementation, after the terminal establishes the TCP connection with the sound box device, the terminal may send the heartbeat detection message to the sound box device through the TCP connection every preset time. After the sound box equipment receives the heartbeat detection message sent by the terminal, the sound box equipment can send preset response information to the terminal, when the terminal does not receive the response information sent by the sound box equipment for the first time, timing is started, and if the response information sent by the sound box equipment is not received within a preset time period of a preset number of continuous times, the sound box equipment is in fault (a network can be disconnected), and TCP connection with the sound box equipment can be disconnected. Thus, power consumption of the terminal can be saved.
Optionally, the embodiment of the present invention further provides a process of establishing connection between the terminal and the sound box device again, and the corresponding processing may be as follows:
after the terminal establishes TCP connection with the sound box equipment, the terminal stores basic information of the sound box equipment; and when the terminal is disconnected from the network and is accessed to the network again, if the basic information of the sound box equipment obtained currently is the same as the stored basic information of the sound box equipment, the TCP connection is automatically reestablished with the sound box equipment.
In implementation, after the terminal establishes the TCP connection with the speaker device, the terminal may store the basic information of the speaker device.
If the terminal returns to the range of the previously connected WIFI network again after network connection is disconnected in the follow-up process, the terminal can be accessed to the WIFI again, the terminal determines that the sound box device is connected before the network connection is disconnected, the multicast message can be automatically sent outwards, and the sound box device can send own basic information to the terminal after receiving the multicast message. After the terminal receives the basic information sent by the sound box equipment, if the basic information is the same, the terminal can directly establish TCP connection with the sound box equipment, and therefore the TCP connection with the sound box equipment can be reestablished without user operation.
Optionally, the terminal may further send the updated multimedia playlist to the sound box device, and the corresponding processing may be as follows:
after the terminal establishes TCP connection with the sound box equipment, when the multimedia play list is detected to be updated, the updated multimedia play list is sent to the sound box equipment.
In implementation, after the terminal establishes TCP connection with the sound box device, if a user deletes a multimedia in the multimedia play list on the terminal, or adds a multimedia, or directly changes the multimedia play list, the terminal may determine that the multimedia play list is updated, and may send the updated multimedia play list to the sound box device.
After the sound box device receives the multimedia play list, the received multimedia play list can be used for replacing the previous multimedia play list, and the newly received multimedia play list is used for playing.
Optionally, in the embodiment of the present invention, a process of sending a control instruction to a sound box device by a terminal is further provided, and the corresponding process may be as follows:
after the terminal establishes TCP connection with the sound box equipment, when the terminal receives a preset operation instruction, a control instruction corresponding to the operation instruction is sent to the sound box equipment.
The control instruction comprises a playing instruction, a pause instruction, a previous playing instruction, a next playing instruction, a volume adjusting instruction, a mute setting instruction, a playing mode switching instruction and a playing progress adjusting instruction. The playing instruction is used for indicating playing of multimedia, the pausing instruction is used for indicating pausing of playing of multimedia, the next instruction is played, the next multimedia adjacent to the currently played multimedia is indicated to be played, the previous instruction is played, the previous multimedia adjacent to the currently played multimedia is indicated to be played, the volume adjusting instruction is used for indicating that the volume is adjusted to a certain value, the mute setting instruction is used for indicating that the volume is adjusted to zero, the playing mode switching instruction is used for indicating switching of playing modes, the playing progress adjusting instruction is used for indicating adjustment of playing progress, for example, the current playing is carried out for 1 minute, and data playing for 3 minutes is adjusted.
In implementation, after the terminal establishes the TCP connection with the sound box device, the user may operate the terminal, so that the terminal controls the sound box device, that is, touches the terminal, so that the terminal receives the operation instruction, the terminal determines the control instruction corresponding to the operation instruction, and then the terminal may send the control instruction corresponding to the operation instruction to the sound box device. After the sound box equipment receives the control instruction, the control instruction can be executed. Therefore, the control of the terminal on the sound box equipment can be realized.
Optionally, an embodiment of the present invention further provides a process of recording multimedia data by using a sound box device, where the corresponding processing may be as follows:
when the sound box equipment receives a multimedia recording instruction, recording the sound in the environment; and when the sound box equipment receives the recording ending instruction, acquiring the recorded multimedia data and sending the multimedia data to the terminal.
In implementation, the sound box device is provided with a recording button, a user can click the recording button, the sound box device can receive a click instruction of the recording button, namely, a multimedia recording instruction is received, the sound recorder can be started, sound in the environment is recorded, and multimedia data are obtained. When the user wants to finish recording, the user can click a button for finishing recording, and the terminal can receive a click instruction of the button for finishing recording, namely the terminal receives a recording finishing instruction, and can acquire recorded multimedia data and send the multimedia data to the terminal.
The terminal can display the multimedia data after receiving the multimedia data sent by the sound box equipment, and correspondingly displays a voice recognition option and a playing option. If the user selects the voice recognition option, the terminal detects a click command of the voice recognition option, performs voice recognition on audio data in the received multimedia data by using a preset voice recognition algorithm, and displays a recognition result. If the user selects the playing option, the terminal detects the click command of the playing option and performs playing processing on the received multimedia data.
Optionally, in the implementation of the present invention, after the terminal is connected to the sound box device, the sound box device may also control the processing of the terminal, and the corresponding processing may be as follows:
the method comprises the steps that the sound box equipment receives a control instruction from a hardware interface of the equipment, wherein the control instruction comprises a playing instruction, a pause instruction, a last instruction, a next instruction, a volume adjusting instruction, a mute setting instruction, a playing mode switching instruction, a playing progress adjusting instruction, a multimedia downloading instruction and a collection instruction; and the sound box equipment executes the control instruction and sends result information after the control instruction is executed to the terminal.
The control instruction comprises a playing instruction, a pause instruction, a previous playing instruction, a next playing instruction, a volume adjusting instruction, a mute setting instruction, a playing mode switching instruction, a playing progress adjusting instruction, a multimedia downloading instruction and a collection instruction.
In implementation, the sound box device is provided with an adjusting button or an adjusting key, for example, there may be a volume adjusting key, a multimedia switching key, a pause key, and the like.
The user can operate the button or key set on the sound box device, and the terminal can detect the corresponding operation instruction, namely receive the control instruction from the hardware interface of the device. The sound box device can execute the control instruction and can send result information after the control instruction is executed to the terminal, and therefore the sound box device can also control the terminal. For example, the volume adjustment range of multimedia playing is 0-10, a user adjusts the volume from 5 to 7 by adjusting a volume adjustment key, the sound box device adjusts the volume to 7, and sends the adjusted volume to the terminal to inform that the volume is adjusted.
For another example, the user may operate and download the multimedia currently being played on the speaker device, the speaker device may send a multimedia downloading instruction to the terminal after downloading the data of the multimedia currently being played, the terminal may perform downloading after receiving the multimedia downloading instruction, return a downloading success message if the downloading is successful, and return a downloading failure message if the downloading is failed.
For another example, the user may operate to collect the multimedia currently being played on the speaker device, after adding the multimedia to the favorite, the speaker device may send a collection instruction to the terminal, and carry an identifier of the multimedia therein, and after receiving the collection instruction, the terminal may add the multimedia to the favorite, and return a success message.
In the embodiment of the invention, the terminal can acquire the basic information of the sound box equipment, establish connection with the sound box equipment based on the basic information of the sound box equipment, then acquire the state information of the sound box equipment from the sound box equipment, and send the multimedia play list to the sound box equipment by using the state information of the sound box equipment. After the sound box device receives the multimedia play list, the multimedia to be played can be determined, the data of the multimedia to be played is obtained by using the play link of the multimedia to be played, and the data of the multimedia to be played is played. Therefore, the terminal is connected with the sound box device through the TCP, so that the connection stability is good, the terminal sends the multimedia play list to the sound box device, the sound box device downloads the data of the multimedia to be played based on the play link of the multimedia to be played for playing, and the terminal is not required to send the data of the multimedia to be played to the sound box device, so that the data transmission delay can be reduced, the multimedia playing delay can be reduced, and the multimedia play list is sent to the sound box device, so that the sound box device can continue to play the multimedia based on the multimedia play list even after the terminal is disconnected with the sound box device.
Based on the same technical concept, an embodiment of the present invention further provides a terminal, as shown in fig. 5, where the terminal includes:
an obtaining module 510, configured to obtain basic information of a sound box device, where the basic information includes address information and a transmission control protocol TCP port number;
a connection module 520, configured to establish a TCP connection with the sound box device based on the basic information;
a sending module 530, configured to send a request for obtaining status information to the sound box device;
a receiving module 540, configured to receive state information sent by the sound box device, where the state information includes one of a playing state, a pause state, and an unplayed state;
the sending module 530 is further configured to send a play stop instruction to the sound box device and send a multimedia play list to the sound box device if the state information is in a play state, and send the multimedia play list to the sound box device if the state information is in a pause state or an unplayed state, where the multimedia play list includes a name and a play link of each multimedia.
Optionally, the obtaining module 510 is configured to:
sending a multicast message;
receiving basic information sent by the sound box equipment; alternatively, the first and second electrodes may be,
and acquiring basic information of the sound box equipment through the camera shooting component.
Optionally, the sending module 530 is further configured to:
after the terminal establishes TCP connection with the sound box equipment, the terminal sends heartbeat detection messages to the sound box equipment at intervals of a preset time;
as shown in fig. 6, the terminal further includes:
a disconnection module 550, configured to disconnect the TCP connection with the sound box device if the response information fed back by the sound box device is not received for a preset number of continuous preset durations.
Optionally, as shown in fig. 7, the terminal further includes:
the storage module 560 is configured to, after the terminal establishes a TCP connection with the sound box device, store the basic information of the sound box device by the terminal;
the connection module is further configured to, when the terminal is disconnected from the network and re-accesses the network, automatically reestablish a TCP connection with the sound box device if the currently acquired basic information of the sound box device is the same as the stored basic information of the sound box device.
Optionally, the sending module 530 is further configured to:
after the terminal establishes TCP connection with the sound box equipment, when detecting that the multimedia play list is updated, sending the updated multimedia play list to the sound box equipment.
Optionally, the sending module 530 is further configured to:
after the terminal is connected with the sound box device in a TCP mode, when a preset operation instruction is received, a control instruction corresponding to the operation instruction is sent to the sound box device, and the control instruction comprises a playing instruction, a pause instruction, a last playing instruction, a next playing instruction, a volume adjusting instruction, a mute setting instruction, a playing mode switching instruction and a playing progress adjusting instruction.
In the embodiment of the invention, the terminal can acquire the basic information of the sound box equipment, establish connection with the sound box equipment based on the basic information of the sound box equipment, then acquire the state information of the sound box equipment from the sound box equipment, and send the multimedia play list to the sound box equipment by using the state information of the sound box equipment. After the sound box device receives the multimedia play list, the multimedia to be played can be determined, the data of the multimedia to be played is obtained by using the play link of the multimedia to be played, and the data of the multimedia to be played is played. Therefore, the terminal is connected with the sound box device through the TCP, so that the connection stability is good, the terminal sends the multimedia play list to the sound box device, the sound box device downloads the data of the multimedia to be played based on the play link of the multimedia to be played for playing, and the terminal is not required to send the data of the multimedia to be played to the sound box device, so that the data transmission delay can be reduced, the multimedia playing delay can be reduced, and the multimedia play list is sent to the sound box device, so that the sound box device can continue to play the multimedia based on the multimedia play list even after the terminal is disconnected with the sound box device.
It should be noted that: in the terminal provided in the foregoing embodiment, only the division of the functional modules is exemplified when controlling multimedia playing, and in practical applications, the function distribution may be completed by different functional modules according to needs, that is, the internal structure of the terminal is divided into different functional modules to complete all or part of the functions described above. In addition, the terminal and the method embodiment for controlling multimedia playing provided by the above embodiments belong to the same concept, and the specific implementation process thereof is detailed in the method embodiment and will not be described herein again.
Based on the same technical concept, an embodiment of the present invention further provides a speaker device, as shown in fig. 8, where the terminal includes:
a connection module 810, configured to establish a TCP connection with a terminal;
a receiving module 820, configured to receive an obtaining request of status information sent by the terminal;
a sending module 830, configured to send current state information to the terminal, where the state information includes one of a play state, a pause state, and an unplayed state;
the receiving module 820 is further configured to receive a multimedia play list sent by the terminal, where the multimedia play list includes a name and a play link of each multimedia;
a determining module 840, configured to determine a multimedia to be played according to a current play mode and the multimedia play list;
an obtaining module 850, configured to obtain data of a multimedia to be played through a playing link corresponding to the multimedia to be played;
and a playing module 860, configured to play the data of the multimedia to be played.
Optionally, the receiving module 820 is further configured to receive multicast information sent by the terminal;
the sending module 830 is further configured to send the basic information to the terminal.
Optionally, as shown in fig. 9, the speaker device further includes:
the recording module 870 is used for recording the sound in the environment when receiving the multimedia recording instruction;
the sending module 830 is further configured to, when receiving a recording end instruction, obtain recorded multimedia data and send the obtained recorded multimedia data to the terminal.
Optionally, the receiving module 820 is further configured to:
the sound box equipment receives a control instruction from a hardware interface of the equipment, wherein the control instruction comprises a playing instruction, a pause instruction, a last playing instruction, a next playing instruction, a volume adjusting instruction, a mute setting instruction, a playing mode switching instruction, a playing progress adjusting instruction, a multimedia downloading instruction and a collection instruction;
as shown in fig. 10, the speaker device further includes:
an executing module 880, configured to execute the control instruction;
the sending module 830 is further configured to send result information after the control instruction is executed to the terminal.
In the embodiment of the invention, the terminal can acquire the basic information of the sound box equipment, establish connection with the sound box equipment based on the basic information of the sound box equipment, then acquire the state information of the sound box equipment from the sound box equipment, and send the multimedia play list to the sound box equipment by using the state information of the sound box equipment. After the sound box device receives the multimedia play list, the multimedia to be played can be determined, the data of the multimedia to be played is obtained by using the play link of the multimedia to be played, and the data of the multimedia to be played is played. Therefore, the terminal sends the multimedia play list to the sound box equipment, so that the sound box equipment downloads the data of the multimedia to be played based on the play link of the multimedia to be played for playing, and the data of the multimedia to be played are not required to be sent to the sound box equipment by the terminal, so that the delay of data transmission can be reduced, and the multimedia playing delay can be further reduced.
It should be noted that: in the terminal provided in the foregoing embodiment, only the division of the functional modules is exemplified when controlling multimedia playing, and in practical applications, the function distribution may be completed by different functional modules according to needs, that is, the internal structure of the terminal is divided into different functional modules to complete all or part of the functions described above. In addition, the terminal and the method embodiment for controlling multimedia playing provided by the above embodiments belong to the same concept, and the specific implementation process thereof is detailed in the method embodiment and will not be described herein again.
Fig. 11 shows a block diagram of a terminal 1100 according to an exemplary embodiment of the present invention. The terminal 1100 may be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion video Experts compression standard Audio Layer 3), an MP4 player (Moving Picture Experts Group Audio Layer IV, motion video Experts compression standard Audio Layer 4), a notebook computer, or a desktop computer. Terminal 1100 may also be referred to by other names such as user equipment, portable terminal, laptop terminal, desktop terminal, and so forth.
In general, terminal 1100 includes: a processor 1101 and a memory 1102.
Processor 1101 may include one or more processing cores, such as a 4-core processor, an 8-core processor, or the like. The processor 1101 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 1101 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 1101 may be integrated with a GPU (Graphics Processing Unit) that is responsible for rendering and drawing the content that the display screen needs to display. In some embodiments, the processor 1101 may further include an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.
Memory 1102 may include one or more computer-readable storage media, which may be non-transitory. Memory 1102 can also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 1102 is used to store at least one instruction for execution by processor 1101 to implement the method of multimedia playback control provided by the method embodiments of the present application.
In some embodiments, the terminal 1100 may further include: a peripheral interface 1103 and at least one peripheral. The processor 1101, memory 1102 and peripheral interface 1103 may be connected by a bus or signal lines. Various peripheral devices may be connected to the peripheral interface 1103 by buses, signal lines, or circuit boards. Specifically, the peripheral device includes: at least one of radio frequency circuitry 1104, touch display screen 1105, camera 1106, audio circuitry 1107, positioning component 1108, and power supply 1109.
The peripheral interface 1103 may be used to connect at least one peripheral associated with I/O (Input/Output) to the processor 1101 and the memory 1102. In some embodiments, the processor 1101, memory 1102, and peripheral interface 1103 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1101, the memory 1102 and the peripheral device interface 1103 may be implemented on separate chips or circuit boards, which is not limited by this embodiment.
The Radio Frequency circuit 1104 is used to receive and transmit RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuit 1104 communicates with communication networks and other communication devices via electromagnetic signals. The radio frequency circuit 1104 converts an electric signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electric signal. Optionally, the radio frequency circuit 1104 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuit 1104 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: metropolitan area networks, various generation mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the rf circuit 1104 may further include NFC (Near Field Communication) related circuits, which are not limited in this application.
The display screen 1105 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 1105 is a touch display screen, the display screen 1105 also has the ability to capture touch signals on or over the surface of the display screen 1105. The touch signal may be input to the processor 1101 as a control signal for processing. At this point, the display screen 1105 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, display 1105 may be one, providing the front panel of terminal 1100; in other embodiments, the display screens 1105 can be at least two, respectively disposed on different surfaces of the terminal 1100 or in a folded design; in still other embodiments, display 1105 can be a flexible display disposed on a curved surface or on a folded surface of terminal 1100. Even further, the display screen 1105 may be arranged in a non-rectangular irregular pattern, i.e., a shaped screen. The Display screen 1105 may be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), and the like.
Camera assembly 1106 is used to capture images or video. Optionally, camera assembly 1106 includes a front camera and a rear camera. Generally, a front camera is disposed at a front panel of the terminal, and a rear camera is disposed at a rear surface of the terminal. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, camera assembly 1106 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
The audio circuitry 1107 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals to the processor 1101 for processing or inputting the electric signals to the radio frequency circuit 1104 to achieve voice communication. For stereo capture or noise reduction purposes, multiple microphones may be provided, each at a different location of terminal 1100. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from the processor 1101 or the radio frequency circuit 1104 into sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, the audio circuitry 1107 may also include a headphone jack.
Positioning component 1108 is used to locate the current geographic position of terminal 1100 for purposes of navigation or LBS (Location Based Service). The Positioning component 1108 may be a Positioning component based on the united states GPS (Global Positioning System), the chinese beidou System, the russian graves System, or the european union galileo System.
Power supply 1109 is configured to provide power to various components within terminal 1100. The power supply 1109 may be alternating current, direct current, disposable or rechargeable. When the power supply 1109 includes a rechargeable battery, the rechargeable battery may support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, terminal 1100 can also include one or more sensors 1110. The one or more sensors 1110 include, but are not limited to: acceleration sensor 1111, gyro sensor 1112, pressure sensor 1113, fingerprint sensor 1114, optical sensor 1115, and proximity sensor 1116.
Acceleration sensor 1111 may detect acceleration levels in three coordinate axes of a coordinate system established with terminal 1100. For example, the acceleration sensor 1111 may be configured to detect components of the gravitational acceleration in three coordinate axes. The processor 1101 may control the touch display screen 1105 to display a user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 1111. The acceleration sensor 1111 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 1112 may detect a body direction and a rotation angle of the terminal 1100, and the gyro sensor 1112 may cooperate with the acceleration sensor 1111 to acquire a 3D motion of the user with respect to the terminal 1100. From the data collected by gyroscope sensor 1112, processor 1101 may implement the following functions: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
Pressure sensor 1113 may be disposed on a side bezel of terminal 1100 and/or on an underlying layer of touch display screen 1105. When the pressure sensor 1113 is disposed on the side frame of the terminal 1100, the holding signal of the terminal 1100 from the user can be detected, and the processor 1101 performs left-right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 1113. When the pressure sensor 1113 is disposed at the lower layer of the touch display screen 1105, the processor 1101 controls the operability control on the UI interface according to the pressure operation of the user on the touch display screen 1105. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 1114 is configured to collect a fingerprint of the user, and the processor 1101 identifies the user according to the fingerprint collected by the fingerprint sensor 1114, or the fingerprint sensor 1114 identifies the user according to the collected fingerprint. Upon recognizing that the user's identity is a trusted identity, the user is authorized by the processor 1101 to perform relevant sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying for and changing settings, etc. Fingerprint sensor 1114 may be disposed on the front, back, or side of terminal 1100. When a physical button or vendor Logo is provided on the terminal 1100, the fingerprint sensor 1114 may be integrated with the physical button or vendor Logo.
Optical sensor 1115 is used to collect ambient light intensity. In one embodiment, the processor 1101 may control the display brightness of the touch display screen 1105 based on the ambient light intensity collected by the optical sensor 1115. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 1105 is increased; when the ambient light intensity is low, the display brightness of the touch display screen 1105 is turned down. In another embodiment, processor 1101 may also dynamically adjust the shooting parameters of camera assembly 1106 based on the ambient light intensity collected by optical sensor 1115.
Proximity sensor 1116, also referred to as a distance sensor, is typically disposed on a front panel of terminal 1100. Proximity sensor 1116 is used to capture the distance between the user and the front face of terminal 1100. In one embodiment, the touch display screen 1105 is controlled by the processor 1101 to switch from a bright screen state to a dark screen state when the proximity sensor 1116 detects that the distance between the user and the front face of the terminal 1100 is gradually decreasing; when the proximity sensor 1116 detects that the distance between the user and the front face of the terminal 1100 becomes gradually larger, the touch display screen 1105 is controlled by the processor 1101 to switch from a breath-screen state to a bright-screen state.
Those skilled in the art will appreciate that the configuration shown in fig. 11 does not constitute a limitation of terminal 1100, and may include more or fewer components than those shown, or may combine certain components, or may employ a different arrangement of components.
Fig. 12 shows a block diagram of an audio enclosure device 1200 according to an exemplary embodiment of the present invention.
Generally, the speaker device 1200 includes: a processor 1201 and a memory 1202.
The processor 1201 may include one or more processing cores, such as a 4-core processor, an 8-core processor, or the like. The processor 1201 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 1201 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 1201 may be integrated with a GPU (Graphics Processing Unit) that is responsible for rendering and drawing content that the display screen needs to display. In some embodiments, the processor 1201 may further include an AI (Artificial Intelligence) processor for processing a computing operation related to machine learning.
Memory 1202 may include one or more computer-readable storage media, which may be non-transitory. Memory 1202 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 1202 is used to store at least one instruction for execution by processor 1201 to implement the method of multimedia playback control provided by the method embodiments herein.
In some embodiments, the speaker device 1200 may further include: a peripheral interface 1203 and at least one peripheral. The processor 1201, memory 1202, and peripheral interface 1203 may be connected by a bus or signal line. Various peripheral devices may be connected to peripheral interface 1203 via a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 1204, touch display 1205, audio circuitry 1206, and power source 1207.
The peripheral interface 1203 may be used to connect at least one peripheral associated with I/O (Input/Output) to the processor 1201 and the memory 1202. In some embodiments, the processor 1201, memory 1202, and peripheral interface 1203 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1201, the memory 1202 and the peripheral device interface 1203 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
The Radio Frequency circuit 1204 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuit 1204 communicates with a communication network and other communication devices by electromagnetic signals. The radio frequency circuit 1204 converts an electric signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electric signal. Optionally, the radio frequency circuit 1204 comprises: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. Rf circuit 1204 may communicate with other loudspeaker devices via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: metropolitan area networks, various generation mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the rf circuit 1204 may further include NFC (Near Field Communication) related circuits, which are not limited in this application.
The display screen 1205 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 1205 is a touch display screen, the display screen 1205 also has the ability to acquire touch signals on or over the surface of the display screen 1205. The touch signal may be input to the processor 1201 as a control signal for processing. At this point, the display 1205 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display 1205 may be one, providing the front panel of the loudspeaker device 1200; in other embodiments, the number of the display panels 1205 can be at least two, and the two display panels are respectively disposed on different surfaces of the sound box device 1200 or are in a folding design; in still other embodiments, the display 1205 may be a flexible display disposed on a curved surface or on a folded surface of the loudspeaker device 1200. Even further, the display screen 1205 may be arranged in a non-rectangular irregular figure, i.e., a shaped screen. The Display panel 1205 can be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), or other materials.
Audio circuitry 1206 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals into the processor 1201 for processing or inputting the electric signals into the radio frequency circuit 1204 to achieve voice communication. For the purpose of stereo sound collection or noise reduction, a plurality of microphones may be provided at different positions of the speaker device 1200. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from the processor 1201 or the radio frequency circuit 1204 into sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, audio circuitry 1206 may also include a headphone jack.
The power source 1207 is used to power the various components in the loudspeaker device 1200. The power source 1207 may be alternating current, direct current, disposable or rechargeable. When the power source 1207 includes a rechargeable battery, the rechargeable battery may support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology.
Those skilled in the art will appreciate that the configuration shown in FIG. 12 is not intended to be limiting of the loudspeaker device 1200, and may include more or fewer components than shown, or some components may be combined, or a different arrangement of components may be used.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (17)

1. A method for multimedia playback control, the method comprising:
the method comprises the steps that a terminal obtains basic information of the sound box device, wherein the basic information comprises address information and a Transmission Control Protocol (TCP) port number;
the terminal establishes TCP connection with the sound box equipment based on the basic information;
the terminal sends a state information acquisition request to the sound box equipment;
the terminal receives state information sent by the sound box equipment, wherein the state information comprises one of a playing state, a pause state and an unplayed state;
if the state information is in a playing state, sending a playing stopping instruction to the sound box equipment, and sending a multimedia playing list to the sound box equipment, and if the state information is in a pause state or an unplayed state, sending the multimedia playing list to the sound box equipment, wherein the multimedia playing list comprises the name and playing link of each multimedia;
when the multimedia play list is detected to be updated, sending the updated multimedia play list to the sound box equipment so that the sound box equipment plays the multimedia in the updated multimedia play list;
when multimedia data recorded by the sound box equipment are received, displaying the multimedia data and correspondingly displaying a voice recognition option and a playing option, wherein the multimedia data are environmental sounds recorded by the sound box equipment after a recording button of the sound box equipment is triggered;
when a click instruction of the voice recognition option is received, performing voice recognition on the multimedia data, and displaying a recognition result;
and when a click instruction of the playing option is received, playing the multimedia data.
2. The method according to claim 1, wherein the terminal acquires basic information of the speaker device, and the method comprises:
the terminal sends a multicast message;
the terminal receives basic information sent by the sound box equipment; alternatively, the first and second electrodes may be,
the terminal acquires the basic information of the sound box equipment through the camera shooting component.
3. The method of claim 1, further comprising:
after the terminal establishes TCP connection with the sound box equipment, the terminal sends heartbeat detection messages to the sound box equipment at intervals of a preset time;
and if the response information fed back by the sound box equipment is not received for the preset time lengths of the continuous preset number, the terminal is disconnected from the TCP with the sound box equipment.
4. The method of claim 1, further comprising:
after the terminal establishes TCP connection with the sound box equipment, the terminal stores basic information of the sound box equipment;
and when the terminal is disconnected from the network and is accessed to the network again, if the basic information of the sound box equipment which is acquired currently is the same as the stored basic information of the sound box equipment, the TCP connection is automatically reestablished with the sound box equipment.
5. The method of claim 1, further comprising:
after the terminal is connected with the sound box device in a TCP mode, when the terminal receives a preset operation instruction, a control instruction corresponding to the operation instruction is sent to the sound box device, and the control instruction comprises a playing instruction, a pause instruction, a last playing instruction, a next playing instruction, a volume adjusting instruction, a mute setting instruction, a playing mode switching instruction and a playing progress adjusting instruction.
6. A method for multimedia playback control, the method comprising:
the sound box equipment establishes Transmission Control Protocol (TCP) connection with the terminal;
the sound box equipment receives a state information acquisition request sent by the terminal;
the sound box equipment sends current state information to the terminal, wherein the state information comprises one of a playing state, a pause state and an unplayed state;
the sound box equipment receives a multimedia play list sent by the terminal, wherein the multimedia play list comprises the name and the play link of each multimedia;
the sound box equipment determines multimedia to be played according to the current playing mode and the multimedia playing list;
the sound box equipment acquires data of the multimedia to be played through a playing link corresponding to the multimedia to be played;
playing the data of the multimedia to be played;
the sound box equipment receives the updated multimedia play list sent by the terminal;
the sound box equipment plays the multimedia data in the updated multimedia play list;
the method further comprises the following steps: when the sound box equipment receives a multimedia recording instruction triggered by a recording button on the equipment, recording the sound in the environment; when the sound box equipment receives a recording ending instruction triggered by the recording button, the recorded multimedia data are acquired and sent to the terminal, so that the terminal displays the multimedia data, and correspondingly displays a voice recognition option and a playing option, and the terminal performs voice recognition processing or playing processing on the multimedia data.
7. The method of claim 6, further comprising:
the sound box equipment receives multicast information sent by the terminal;
and the sound box equipment sends basic information to the terminal.
8. The method of claim 6, further comprising:
the sound box equipment receives a control instruction from a hardware interface of the equipment, wherein the control instruction comprises a playing instruction, a pause instruction, a last playing instruction, a next playing instruction, a volume adjusting instruction, a mute setting instruction, a playing mode switching instruction, a playing progress adjusting instruction, a multimedia downloading instruction and a collection instruction;
and the sound box equipment executes the control instruction and sends result information after the control instruction is executed to the terminal.
9. A multimedia play control terminal, characterized in that the terminal comprises:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring basic information of the sound box equipment, and the basic information comprises address information and a Transmission Control Protocol (TCP) port number;
the connection module is used for establishing TCP connection with the sound box equipment based on the basic information;
the sending module is used for sending a state information obtaining request to the sound box equipment;
the receiving module is used for receiving state information sent by the sound box equipment, wherein the state information comprises one of a playing state, a pause state and an unplayed state;
the sending module is further configured to send a play stop instruction to the sound box device and send a multimedia play list to the sound box device if the state information is in a play state, and send the multimedia play list to the sound box device if the state information is in a pause state or an unplayed state, where the multimedia play list includes a name and a play link of each multimedia;
the sending module is further configured to send the updated multimedia playlist to the sound box device when it is detected that the multimedia playlist is updated, so that the sound box device plays multimedia in the updated multimedia playlist;
the receiving module is further configured to:
when multimedia data recorded by the sound box equipment are received, displaying the multimedia data and correspondingly displaying a voice recognition option and a playing option, wherein the multimedia data are environmental sounds recorded by the sound box equipment after a recording button of the sound box equipment is triggered;
when a click instruction of the voice recognition option is received, performing voice recognition on the multimedia data, and displaying a recognition result;
and when a click instruction of the playing option is received, playing the multimedia data.
10. The terminal of claim 9, wherein the obtaining module is configured to:
sending a multicast message;
receiving basic information sent by the sound box equipment; alternatively, the first and second electrodes may be,
and acquiring basic information of the sound box equipment through the camera shooting component.
11. The terminal of claim 9, wherein the sending module is further configured to:
after the terminal establishes TCP connection with the sound box equipment, the terminal sends heartbeat detection messages to the sound box equipment at intervals of a preset time;
the terminal further comprises:
and the disconnection module is used for disconnecting the TCP connection with the sound box equipment if the response information fed back by the sound box equipment is not received for the preset time lengths of the preset number continuously.
12. The terminal of claim 9, wherein the terminal further comprises:
the storage module is used for storing the basic information of the sound box equipment by the terminal after the terminal establishes TCP connection with the sound box equipment;
the connection module is further configured to, when the terminal is disconnected from the network and re-accesses the network, automatically reestablish a TCP connection with the sound box device if the currently acquired basic information of the sound box device is the same as the stored basic information of the sound box device.
13. The terminal of claim 9, wherein the sending module is further configured to:
after the terminal is connected with the sound box device in a TCP mode, when a preset operation instruction is received, a control instruction corresponding to the operation instruction is sent to the sound box device, and the control instruction comprises a playing instruction, a pause instruction, a last playing instruction, a next playing instruction, a volume adjusting instruction, a mute setting instruction, a playing mode switching instruction and a playing progress adjusting instruction.
14. A speaker apparatus controlled by multimedia play, the speaker apparatus comprising:
the connection module is used for establishing Transmission Control Protocol (TCP) connection with the terminal;
the receiving module is used for receiving the acquisition request of the state information sent by the terminal;
a sending module, configured to send current state information to the terminal, where the state information includes one of a play state, a pause state, and an unplayed state;
the receiving module is further configured to receive a multimedia play list sent by the terminal, where the multimedia play list includes a name and a play link of each multimedia;
the determining module is used for determining the multimedia to be played according to the current playing mode and the multimedia playing list;
the acquisition module is used for acquiring the data of the multimedia to be played through a playing link corresponding to the multimedia to be played;
the playing module is used for playing the data of the multimedia to be played;
the receiving module is further configured to receive an updated multimedia playlist sent by the terminal;
the playing module is further configured to play the multimedia data in the updated multimedia play list;
the recording module is used for recording the sound in the environment when the sound box equipment receives a multimedia recording instruction triggered by a recording button on the equipment;
the sending module is further configured to, when the sound box device receives a recording ending instruction triggered by the recording button, obtain recorded multimedia data and send the multimedia data to the terminal, so that the terminal displays the multimedia data, and correspondingly displays a voice recognition option and a play option, so that the terminal performs voice recognition processing or play processing on the multimedia data.
15. The loudspeaker device according to claim 14, wherein the receiving module is further configured to receive multicast information sent by the terminal;
the sending module is further configured to send the basic information to the terminal.
16. The loudspeaker device of claim 14, wherein the receiving module is further configured to:
the sound box equipment receives a control instruction from a hardware interface of the equipment, wherein the control instruction comprises a playing instruction, a pause instruction, a last playing instruction, a next playing instruction, a volume adjusting instruction, a mute setting instruction, a playing mode switching instruction, a playing progress adjusting instruction, a multimedia downloading instruction and a collection instruction;
the speaker device further includes:
the execution module is used for executing the control instruction;
and the sending module is also used for sending result information after the control instruction is executed to the terminal.
17. A system for multimedia play control, the system comprising a terminal and a box device, wherein:
the terminal as claimed in any one of claims 9-13;
the loudspeaker device according to any one of claims 14-16.
CN201810786274.6A 2018-07-17 2018-07-17 Multimedia playing control method, terminal, sound box equipment and system Active CN108881286B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810786274.6A CN108881286B (en) 2018-07-17 2018-07-17 Multimedia playing control method, terminal, sound box equipment and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810786274.6A CN108881286B (en) 2018-07-17 2018-07-17 Multimedia playing control method, terminal, sound box equipment and system

Publications (2)

Publication Number Publication Date
CN108881286A CN108881286A (en) 2018-11-23
CN108881286B true CN108881286B (en) 2021-10-15

Family

ID=64302635

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810786274.6A Active CN108881286B (en) 2018-07-17 2018-07-17 Multimedia playing control method, terminal, sound box equipment and system

Country Status (1)

Country Link
CN (1) CN108881286B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110234036B (en) * 2019-06-19 2022-02-11 广州酷狗计算机科技有限公司 Method, device and system for playing multimedia file
CN110290415A (en) * 2019-07-29 2019-09-27 四川长虹电器股份有限公司 A method of realizing more seamless collaborations of equipment room media play
CN110825449A (en) * 2019-09-19 2020-02-21 咪咕音乐有限公司 Music playing method, electronic equipment and storage medium
CN111145741B (en) * 2019-12-17 2022-12-27 中移(杭州)信息技术有限公司 Method and device for providing multimedia content, electronic equipment and storage medium
CN111586660A (en) * 2020-04-30 2020-08-25 上海明略人工智能(集团)有限公司 Information display method and device, storage medium and electronic equipment
CN111787455A (en) * 2020-06-18 2020-10-16 深圳创维-Rgb电子有限公司 Passive sound box adaptation method, front-end sound box driving device and storage medium
CN114697298B (en) * 2022-02-23 2023-11-28 青岛海尔科技有限公司 Method and device for acquiring multimedia resources, storage medium and electronic device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105025393A (en) * 2015-07-01 2015-11-04 深圳Tcl数字技术有限公司 Audio-video play control method and device
CN107332976A (en) * 2017-05-31 2017-11-07 腾讯音乐娱乐(深圳)有限公司 Karaoke method, device, equipment and system
CN107835453A (en) * 2017-08-31 2018-03-23 江苏省公用信息有限公司 A kind of method for getting rid of screen to television IPTV content based on webpage
CN108200469A (en) * 2018-01-23 2018-06-22 歌尔科技有限公司 A kind of audio and video projective techniques, device and system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4984669B2 (en) * 2006-06-15 2012-07-25 ソニー株式会社 Data writing apparatus and data delivery system
US20090292378A1 (en) * 2008-05-23 2009-11-26 Corevalus Systems, Llc Linking Media Displays with Performance Enhancements and Methods Thereof
KR101800889B1 (en) * 2011-02-07 2017-11-23 삼성전자주식회사 Device and method for playing music
CN104601685B (en) * 2014-12-31 2019-03-12 Oppo广东移动通信有限公司 A kind of method for playing music and device of intelligent sound box
CN106445448B (en) * 2016-08-29 2020-10-09 北京元心科技有限公司 Audio device control method and system of terminal and mobile terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105025393A (en) * 2015-07-01 2015-11-04 深圳Tcl数字技术有限公司 Audio-video play control method and device
CN107332976A (en) * 2017-05-31 2017-11-07 腾讯音乐娱乐(深圳)有限公司 Karaoke method, device, equipment and system
CN107835453A (en) * 2017-08-31 2018-03-23 江苏省公用信息有限公司 A kind of method for getting rid of screen to television IPTV content based on webpage
CN108200469A (en) * 2018-01-23 2018-06-22 歌尔科技有限公司 A kind of audio and video projective techniques, device and system

Also Published As

Publication number Publication date
CN108881286A (en) 2018-11-23

Similar Documents

Publication Publication Date Title
CN108881286B (en) Multimedia playing control method, terminal, sound box equipment and system
CN109348247B (en) Method and device for determining audio and video playing time stamp and storage medium
CN108391171B (en) Video playing control method and device, and terminal
CN109874312B (en) Method and device for playing audio data
CN110022489B (en) Video playing method, device and storage medium
CN109327608B (en) Song sharing method, terminal, server and system
CN108737897B (en) Video playing method, device, equipment and storage medium
CN109246123B (en) Media stream acquisition method and device
CN110324689B (en) Audio and video synchronous playing method, device, terminal and storage medium
CN108093307B (en) Method and system for acquiring playing file
CN109144346B (en) Song sharing method and device and storage medium
CN110248236B (en) Video playing method, device, terminal and storage medium
CN108831513B (en) Method, terminal, server and system for recording audio data
CN107896337B (en) Information popularization method and device and storage medium
CN111083526B (en) Video transition method and device, computer equipment and storage medium
CN111741366A (en) Audio playing method, device, terminal and storage medium
CN109743461B (en) Audio data processing method, device, terminal and storage medium
CN111327928A (en) Song playing method, device and system and computer storage medium
CN110234036B (en) Method, device and system for playing multimedia file
CN111092991B (en) Lyric display method and device and computer storage medium
CN110808021B (en) Audio playing method, device, terminal and storage medium
CN111818358A (en) Audio file playing method and device, terminal and storage medium
CN111818367A (en) Audio file playing method, device, terminal, server and storage medium
CN109783176B (en) Page switching method and device
CN111399796B (en) Voice message aggregation method and device, electronic equipment and storage medium

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