CN109951526B - Lyric transmission method and related equipment - Google Patents

Lyric transmission method and related equipment Download PDF

Info

Publication number
CN109951526B
CN109951526B CN201910126847.7A CN201910126847A CN109951526B CN 109951526 B CN109951526 B CN 109951526B CN 201910126847 A CN201910126847 A CN 201910126847A CN 109951526 B CN109951526 B CN 109951526B
Authority
CN
China
Prior art keywords
lyric
data transmission
equipment
type
control
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
CN201910126847.7A
Other languages
Chinese (zh)
Other versions
CN109951526A (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 CN201910126847.7A priority Critical patent/CN109951526B/en
Publication of CN109951526A publication Critical patent/CN109951526A/en
Application granted granted Critical
Publication of CN109951526B publication Critical patent/CN109951526B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The application provides a lyric transmission method and related equipment, wherein the method comprises the following steps: the method comprises the steps that a control end calls a first data transmission interface to send a lyric type query instruction to a device end, wherein the lyric type query instruction is used for indicating the device end to query and return supported lyric types, and the control end and the device end are connected by using a universal plug and play (UPnP) protocol; receiving a lyric type returned by the equipment end through the first data transmission interface, wherein the lyric type is a pure text lyric type, a line-by-line lyric type and/or a word-by-word lyric type; searching a lyric file of the lyric type according to the lyric type; and calling a second data transmission interface to send the lyric file to the equipment terminal.

Description

Lyric transmission method and related equipment
Technical Field
The present invention relates to the field of communications, and in particular, to a lyric transmission method and related device.
Background
At present, media playing is widely applied to mobile phones, such as online music playing, online movie playing, and the like, wherein synchronous display of lyrics is often accompanied in the online music playing process. If other devices in the home network, such as a television, a sound box and the like, are used, the UPnP protocol needs to be used for connection, so that the mobile phone is used as a control terminal to push the audio to other UPnP devices for playing.
The existing home network can only transmit some basic metadata such as the song name, the singer name, the album name, the playing link URL, the album cover and the like of a song to a device end playing the music for use through equipment connected by UPnP, and the lyrics are not transmitted to the device end, so that the synchronous lyrics cannot be displayed on a device end with a screen such as a television, and the lyrics are an important ring for user experience in a music scene.
Disclosure of Invention
The application provides a lyric transmission method and related equipment, so that UPnP control equipment synchronously transmits lyrics to UPnP playing equipment while transmitting audio.
In a first aspect, the present application provides a method for transmitting lyrics, the method comprising the steps of:
the method comprises the steps that a control end calls a first data transmission interface to send a lyric type query instruction to a device end, wherein the lyric type query instruction is used for indicating the device end to query and return supported lyric types, and the control end and the device end are connected by using a universal plug and play (UPnP) protocol;
receiving a lyric type returned by the equipment end through the first data transmission interface, wherein the lyric type is a pure text lyric type, a line-by-line lyric type and/or a word-by-word lyric type;
searching a lyric file of the lyric type according to the lyric type;
and calling a second data transmission interface to send the lyric file to the equipment terminal.
Optionally, before the control end sends the lyric type query instruction to the device end through the first data transmission interface, the method further includes:
the control end and the plurality of equipment ends are connected with a network in a wired or wireless mode;
the control end acquires the IP address of the control end in the network through a dynamic host configuration DHCP protocol and an automatic IP address allocation protocol, and the plurality of equipment ends acquire the corresponding IP address of the equipment end in the network through the DHCP protocol and the automatic IP address allocation protocol;
the control terminal searches a target equipment terminal in the network through a Simple Service Discovery (SSDP) protocol;
the control end receives device description information and service description information of the target device end, which are sent by the target device end through an SSDP protocol, wherein the device description information comprises an IP address of the device end, and the service description information of the device end comprises service control interface information, first data transmission service control interface information and second data transmission service control interface information;
and the control terminal calls a service control interface of the equipment terminal to establish connection with the equipment terminal according to the IP address of the control terminal and the IP address of the target equipment terminal.
Optionally, before the control end sends the lyric type query instruction to the device end through the first data transmission interface, the method further includes:
and upgrading the equipment end to enable the service description information of the equipment end to be newly added with first data transmission service control interface information and second data transmission service control interface information, and enabling the equipment end to execute inquiry and return the operation of the supported lyric types after receiving a lyric type inquiry instruction sent by a control end, wherein the first data transmission interface is used for transmitting an instruction for acquiring the lyric support types of the equipment end, and the second data transmission interface is used for transmitting lyric files.
Optionally, when the lyric types supported by the device side are multiple, the control side displays the multiple lyric types supported by the device side to a user;
searching a lyric file of the target lyric type according to the target lyric type selected by the user;
and calling a second data transmission interface to send the lyric file of the target lyric type to the equipment terminal.
In a second aspect, a method for transmitting lyrics is provided, the method comprising the steps of:
the method comprises the steps that a device side receives a lyric type query instruction sent by a control side through a first data transmission interface, wherein the control side and the device side are connected through a universal plug and play (UPnP) protocol;
inquiring the lyric type supported by the equipment terminal according to the lyric type inquiry instruction, wherein the lyric type is a pure text lyric type, a line-by-line lyric type and/or a word-by-word lyric type;
sending the lyric type to the control end through the first data transmission port;
and receiving the lyric file of the lyric type sent by the control end through a second data transmission interface.
Optionally, before the device side receives the lyric type query instruction sent by the control side through the first data transmission interface, the method further includes:
the equipment end and the control end are connected with a network in a wired or wireless mode;
the equipment side acquires a corresponding equipment side IP address in the network through a DHCP protocol and an automatic IP address allocation protocol, and the control side acquires a control side IP address in the network through a dynamic host configuration DHCP protocol and an automatic IP address allocation protocol;
the device side receives a target device side search application sent by the control side through an SSDP protocol;
the equipment side sends equipment description information and service description information of the equipment side through an SSDP protocol, wherein the equipment description information comprises an IP address of the equipment side, and the service description information of the equipment side comprises service control interface information, first data transmission service control interface information and second data transmission service control interface information;
and the control end calls a service control interface of the equipment end to establish connection with the equipment end according to the IP address of the control end and the IP address of the target equipment end.
Optionally, before the device side receives the lyric type query instruction sent by the control side through the first data transmission interface, the method further includes:
the method comprises the steps of upgrading the equipment end to enable service description information of the equipment end to be added with first data transmission service control interface information and second data transmission service control interface information, enabling the equipment end to execute query and return operation of a supported lyric type after receiving a lyric type query instruction sent by the control end, wherein the first data transmission service control interface information is used for the control end to call a first data transmission interface, the second data transmission service control interface information is used for the control end to call a second data transmission interface, the first data transmission interface is used for transmitting an instruction for obtaining the lyric support type of the equipment end, and the second data transmission interface is used for transmitting a lyric file.
Optionally, when the device side supports a plurality of lyric types, the device side sends the plurality of lyric types to the control side through the first data transmission port;
and receiving a lyric file of a target lyric type sent by the control end through a second data transmission interface, wherein the lyric file of the target lyric type is the lyric file sent to the equipment end by calling the second data transmission interface after the control end shows a plurality of lyric types supported by the equipment end to a user and searches the lyric file of the target lyric type according to the target lyric type selected by the user.
In a third aspect, there is provided a lyric transmitting apparatus comprising a transmitting unit, a receiving unit, and a searching unit, wherein,
the transmitting unit is used for calling a first data transmission interface to transmit a lyric type query instruction to a device end, wherein the lyric type query instruction is used for indicating the device end to query and return supported lyric types, and the control end and the device end are connected by using a universal plug and play (UPnP) protocol;
the receiving unit is used for receiving the lyric types returned by the equipment end through the first data transmission interface, wherein the lyric types are pure text lyric types, line-by-line lyric types and/or word-by-word lyric types;
the searching unit is used for searching a lyric file of the lyric type according to the lyric type;
the sending unit is further used for calling a second data transmission interface to send the lyric file to the equipment side.
Optionally, the apparatus further includes a connection establishing unit, where the connection establishing unit is configured to connect the network with the plurality of device sides in a wired or wireless manner before the sending unit calls the first data transmission interface to send the lyric type query instruction to the device side;
the connection establishing unit is further used for acquiring the control end IP address in the network through a dynamic host configuration DHCP protocol and an automatic IP address allocation protocol, and the plurality of equipment ends acquire the corresponding equipment end IP address in the network through the DHCP protocol and the automatic IP address allocation protocol;
the connection establishing unit is also used for searching a target equipment terminal in the network through a Simple Service Discovery (SSDP) protocol;
the connection establishing unit is further configured to receive device description information and service description information of the target device end, where the device description information includes the device end IP address, and the service description information of the device end includes service control interface information, first data transmission service control interface information, and second data transmission service control interface information, and the device description information is sent by the target device end through an SSDP protocol;
the connection establishing unit is also used for calling a service control interface of the equipment end to establish connection with the equipment end according to the IP address of the control end and the IP address of the target equipment end.
Optionally, the apparatus further includes an upgrading unit, where the upgrading unit is configured to upgrade the device end before the control end calls the first data transmission interface to send a lyric type query instruction to the device end, so that the service description information of the device end adds first data transmission service control interface information and second data transmission service control interface information, and the device end executes query and returns a supported lyric type after receiving the lyric type query instruction sent by the control end, where the first data transmission service control interface information is used by the control end to call the first data transmission interface, the second data transmission service control interface information is used by the control end to call the second data transmission interface, and the first data transmission interface is used to transmit an instruction for obtaining a device-end lyric support type, and the second data transmission interface is used for transmitting the lyric file.
Optionally, the apparatus further includes a selection unit, where the selection unit is configured to show, to a user, a plurality of lyric types supported by the device side in a case that the plurality of lyric types supported by the device side are provided;
the searching unit is also used for searching a lyric file of the target lyric type according to the target lyric type selected by the user;
the sending unit is further used for calling a second data transmission interface to send the lyric file of the target lyric type to the equipment terminal.
In a fourth aspect, the present application provides a lyric transmitting apparatus comprising a receiving unit, a querying unit, and a transmitting unit, wherein,
the receiving unit is used for receiving a lyric type query instruction sent by a control end through a first data transmission interface, wherein the control end and the equipment end establish connection by using a universal plug and play (UPnP) protocol;
the query unit is used for querying the lyric types supported by the equipment terminal according to the lyric type query instruction, wherein the lyric types are pure text lyric types, line-by-line lyric types and/or word-by-word lyric types;
the transmitting unit is used for transmitting the lyric type to the control terminal through the first data transmission port;
the receiving unit is further configured to receive, through the second data transmission interface, a lyric file of the lyric type sent by the control end.
In a fifth aspect, there is provided a terminal comprising a processor and a memory, the processor and the memory being connected to each other, wherein the memory is configured to store a computer program, the computer program comprising program instructions, and the processor is configured to invoke the program instructions to execute the method of the first aspect.
In a sixth aspect, there is provided a computer readable storage medium storing a computer program comprising program instructions which, when executed by a processor, cause the processor to perform the method of the first aspect described above.
According to the scheme, firstly, a control end calls a first data transmission interface to send a lyric type query instruction to an equipment end, then receives a lyric type returned by the equipment end through the first data transmission interface, searches a lyric file of the lyric type according to the lyric type, and accordingly calls a second data transmission interface to send the lyric file to the equipment end. In the method, the control end firstly obtains the lyric types supported by the equipment end through the interface for obtaining the lyric types, and then sends the lyric files of the lyric types supported by the equipment end through the interface for transmitting the lyric, so that the control end achieves the purpose of transmitting the lyrics to the playing equipment while transmitting audio, and the user experience is further improved.
Drawings
FIG. 1 is a schematic flow chart of a lyric transmission method provided by the present application;
fig. 2 is a schematic flowchart of a method for establishing a connection between a control end and a device end in a method for transmitting lyrics according to the present application;
FIG. 3 is a schematic diagram of a prompt message indicating that the current device is unable to display lyrics, according to the present application;
FIG. 4 is a schematic diagram of a prompt message for prompting a current device to support lyrics in multiple formats according to the present application;
FIG. 5a is a timing diagram of transmission in a lyric transmission method provided herein;
FIG. 5b is a schematic diagram of an instruction code for querying a lyric support type in a lyric transmission method provided by the present application;
FIG. 5c is a schematic diagram of an instruction code for returning a lyric support type in a lyric transmission method provided by the present application;
FIG. 5d is a schematic diagram illustrating an instruction code for pushing a lyric file in a lyric transmission method according to the present application;
FIG. 6 is a schematic flow chart of another lyric transmission method provided by the present application;
FIG. 7 is a schematic diagram of a lyric transmitting device according to the present application;
FIG. 8 is a schematic diagram of another lyric transmitting device provided herein;
fig. 9 is a block diagram illustrating a structure of a terminal provided in the present application.
Detailed Description
In order to make the scheme of the present application better understood, the following is a brief introduction to the Universal Plug and Play (UPnP) protocol used in the present application.
The UPnP protocol is an architecture for common peer-to-peer networking of PCs and smart devices (or appliances), especially in the home. UPnP is based on Internet standards and technologies (e.g., TCP/IP, HTTP and XML) that allow such devices to automatically connect and interoperate with each other, thereby making networks (especially home networks) possible for more people. The UPnP architecture does not have a device driver and replaces the device driver with a common protocol, so that the UPnP can be used across various operating system platforms, application programs can be developed, language limitations do not exist, only the UPnP protocol is added on the basis of the existing network facilities, and the UPnP architecture can be used without adding new facilities or assuming network media again. And the UPnP device can dynamically enter the network, then obtain the IP address, learn or search the information of the operation and service which the UPnP device should perform, sense whether other devices exist and the action and the current state of the other devices, and all the operations can be automatically completed. That is, as long as any device is connected to the network, all devices on the network can immediately sense that a new device is added, the devices can communicate with each other, and can be directly used or controlled through the control end, and all the devices do not need to be set in advance, and plug and play are completely achieved.
Therefore, UPnP can fully utilize the functions of TCP/IP and network technologies, not only can seamlessly interface with similar networks, but also can control network devices and the transmission of information between devices, and based on this, the current applications of UPnP are very wide, such as home automation, printing, picture processing, audio/video entertainment, kitchen devices, automobile networks, and similar networks in public venues, and so on. For a UPnP device playing music, the current control end can only push audio to the device end to play, but cannot display lyrics, so that the method for pushing synchronous lyrics to the device end through the UPnP is provided, and the user experience is further improved.
Fig. 1 is a schematic flowchart of a lyric transmission method provided by the present application, and as shown in fig. 1, the lyric transmission method provided by the present application includes the following steps:
s101: and the control end calls the first data transmission interface to send a lyric type query instruction to the equipment end.
In a specific embodiment of the present application, the lyric type query instruction is used to instruct the device side to query and return a supported lyric type, and the control side and the device side establish a connection using a universal plug and play UPnP protocol. That is, the control end is a control end that can send out a service control message to the device end, and the device end is a device end that can respond to the service control message, return a related result, or return an error. The control terminal may be an application program on a terminal such as a mobile phone, a computer, or a PC, for example: cell phone QQ music, PCQQ music, etc., and are not limited herein. The device side may be a UPnP terminal having a music playing function and a display screen, for example: a television, a sound device, etc., and is not particularly limited herein.
In a specific embodiment of the present application, before the control end sends the lyric type query instruction to the device end through the first data transmission interface, the method further includes: the control end and the plurality of equipment ends are connected with a network in a wired or wireless mode; the control end obtains the control end IP address in the network through a Dynamic Host Configuration Protocol (DHCP) Protocol and an automatic IP address allocation Protocol, and the plurality of equipment ends obtain the corresponding equipment end IP address in the network through the DHCP Protocol and the automatic IP address allocation Protocol; the control end searches a target equipment end in the network through a Simple Service Discovery Protocol (SSDP); the control end receives device description information and service description information of the target device end, which are sent by the target device end through an SSDP protocol, wherein the device description information comprises an IP address of the device end, and the service description information of the device end comprises service control interface information, first data transmission service control interface information and second data transmission service control interface information; and the control terminal calls a service control interface of the equipment terminal to establish connection with the equipment terminal according to the IP address of the control terminal and the IP address of the target equipment terminal. Fig. 2 is a schematic flow chart of a method for establishing a connection between a control terminal and a device terminal in a method for transmitting lyrics according to the present application. It should be understood that fig. 2 is only illustrative of the above steps and should not be construed as being particularly limiting.
In a specific embodiment of the present application, before the control end sends the lyric type query instruction to the device end through the first data transmission interface, the method further includes: the method comprises the steps of upgrading the equipment end to enable service description information of the equipment end to be added with first data transmission service control interface information and second data transmission service control interface information, enabling the equipment end to execute query and return operation of a supported lyric type after receiving a lyric type query instruction sent by the control end, wherein the first data transmission service control interface information is used for the control end to call a first data transmission interface, the second data transmission service control interface information is used for the control end to call a second data transmission interface, the first data transmission interface is used for transmitting an instruction for obtaining the lyric support type of the equipment end, and the second data transmission interface is used for transmitting a lyric file. It can be understood that the device side may be upgraded by firmware, for example, upgrading a UPnP module in a television by a driver, so that a first data transmission service interface and a second data transmission service interface are added to a UPnP service of the television, and first data service control interface information and second data transmission service control interface information are added to corresponding service description information. It should be understood that the above examples are illustrative only and are not to be construed as being particularly limiting.
S102: and receiving the lyric type returned by the equipment end through the first data transmission interface.
In a specific embodiment of the present application, the lyric type is a pure text lyric type, a line-by-line lyric type and/or a word-by-word lyric type. The format of the plain text lyrics may be txt, word, pdf, etc. plain text lyrics without time tags, which is not specifically limited herein; the progressive lyric format may be LRC, SNC, SRT, SSA, KRC, SMI, ASS, etc., and is not specifically limited herein; the verbatim lyric format may be QRC, KSC, etc., and is not particularly limited herein.
In a specific embodiment of the application, the first data transmission interface cannot be added in advance at the device end without the lyric display function, and therefore, the control end section acquires information that the device end cannot display lyrics through the first data transmission interface when the device end does not display the lyric function. It can be understood that, after the control end obtains the information that the device end cannot display the lyrics, the control end may also display a prompt message that the device cannot display the lyrics to the user, and the control end may also recommend to the user other playing devices with screens that may be currently connected. For example: the equipment end is acoustic equipment which is not provided with a display screen and cannot be added with a first data transmission interface, the control end is a QQ music program in the mobile phone, after the mobile phone is in session connection with the acoustic equipment, a user selects the acoustic equipment in the QQ music program by using the mobile phone to play music, the QQ music program can display prompt information that the current equipment cannot display lyrics, and recommend other current playing equipment capable of playing audio and lyrics to the user, and the prompt information can be prompt through a prompt window shown in figure 3. It should be understood that fig. 3 is only an example and is not a specific limitation, and the prompt message may be other forms of messages such as voice.
S103: and searching a lyric file of the lyric type according to the lyric type.
In a specific embodiment of the present application, the control end searches for the lyric file of the lyric type according to the lyric type may be a search in an online network search manner, or a search in an offline lyric library, which is not limited herein. The lyric file may be a complete lyric file, or may be a URL of the lyric file, which is not limited herein.
In a specific embodiment of the present application, when a plurality of lyric types supported by an equipment end are provided, the control end displays the plurality of lyric types supported by the equipment end to a user; searching a lyric file of the target lyric type according to the target lyric type selected by the user; and calling a second data transmission interface to send the lyric file of the target lyric type to the equipment terminal. It should be understood that when the lyrics displayed line by line and the lyrics formats displayed word by word supported by the device are various, the control end may display only one of the lyrics formats line by line and one of the lyrics words by word according to the preset priority order, thereby achieving the purposes of simplifying operation and improving user experience. For example: the control end is a music playing program in the mobile phone, the equipment end is a television with a display screen, and the television can support the lyrics in LRC, KRC and ASS formats displayed line by line and can also support the lyrics in QRC format with karaoke effect displayed word by word. After the session connection between the mobile phone and the television is established, a user uses the mobile phone to select the television to play music in a certain music playing program, the certain music playing program can display prompt information that the current equipment can support lyrics in two formats of LRC and QRC to the user, the user can select lyrics in any format, such as QRC format, to play music according to requirements, and the certain music playing program can send the lyrics in QRC format selected by the user to the television, so that the television can display the lyrics word by word while playing the music. The prompt information of the control end may be a prompt window shown in fig. 4. It should be understood that fig. 4 is only an example and is not a specific limitation, and the prompt message may be other forms of messages such as voice.
S104: and calling a second data transmission interface to send the lyric file to the equipment terminal.
In a specific embodiment of the present application, the interaction between the control end and the device end may be sent in a wired or wireless manner. The Wireless mode includes a General Packet Radio Service (GPRS), a Wireless Local Area Network (WLAN), ZigBee (ZigBee), Bluetooth (Bluetooth), Near Field Communication (NFC), and the like, and the wired mode includes a network cable, a copper wire, RS232, RS458, and the like. It should be understood that the above examples of communication methods are merely for illustration and should not be construed as limiting.
The lyric transmission method provided by the present application is further described below with reference to fig. 5a-5d as an example. Fig. 5a is a transmission timing diagram in a lyric transmission method provided by the present application. As shown in fig. 5a, the control end is a music playing application program on the mobile phone, and the device end is a UPnP device with a display screen. Firstly, a first data transmission interface GetLyricSupportType Action is added to the UPnP service of the equipment end and used for inquiring the support type of the lyrics, and a second data transmission interface SetLyric Action is added and used for pushing the lyrics to the equipment end. Specifically, when the control end queries the lyric type, the control end may call a getlyricsupporttypeaction of the device end to send a getlyricsupporttypecommand shown in fig. 5b to the device end, after receiving the getlyricsupporttypecommand, the device end returns the lyric type supported by the device end shown in fig. 5c, that is, an LRC format, to the control end, and finally, the control end calls a SetLyric Action to send a SetLyric command shown in fig. 5d to the device end, and pushes lyrics in a target format to the device end, that is, a lyric file in an LRC format, and after receiving the lyric file, the device end may perform synchronous playing of music and lyrics. It should be understood that the codes shown in fig. 5b, 5c, and 5d are only for illustration, and the present application may be implemented by using other codes, and are not limited in particular.
According to the scheme, firstly, a control end calls a first data transmission interface to send a lyric type query instruction to an equipment end, then receives a lyric type returned by the equipment end through the first data transmission interface, searches a lyric file of the lyric type according to the lyric type, and accordingly calls a second data transmission interface to send the lyric file to the equipment end. In the method, the control end firstly obtains the lyric types supported by the equipment end through the interface for obtaining the lyric types, and then sends the lyric files of the lyric types supported by the equipment end through the interface for transmitting the lyric, so that the control end achieves the purpose of transmitting the lyrics to the playing equipment while transmitting audio, and the user experience is further improved.
Fig. 6 is a schematic flowchart of another lyric transmission method provided by the present application, and as shown in fig. 6, the lyric transmission method provided by the present application includes the following steps:
s601: and the equipment terminal receives a lyric type query instruction sent by the control terminal through the first data transmission interface.
In a specific embodiment of the present application, the lyric type query instruction is used to instruct the device side to query and return a supported lyric type, and the control side and the device side establish a connection using a universal plug and play UPnP protocol. That is, the control end is a control end that can send out a service control message to the device end, and the device end is a device end that can respond to the service control message, return a related result, or return an error. The control terminal may be an application program on a terminal such as a mobile phone, a computer, or a PC, for example: cell phone QQ music, PCQQ music, etc., and are not limited herein. The device side may be a UPnP terminal having a music playing function and a display screen, for example: a television, a sound device, etc., and is not particularly limited herein.
In a specific embodiment of the present application, before the device side receives, through the first data transmission interface, the lyric type query instruction sent by the control side, the method further includes: the equipment end and the control end are connected with a network in a wired or wireless mode; the equipment side acquires a corresponding equipment side IP address in the network through a DHCP protocol and an automatic IP address allocation protocol, and the control side acquires a control side IP address in the network through a dynamic host configuration DHCP protocol and an automatic IP address allocation protocol; the device side receives a target device side search application sent by the control side through an SSDP protocol; the equipment side sends equipment description information and service description information of the equipment side through an SSDP protocol, wherein the equipment description information comprises an IP address of the equipment side, and the service description information of the equipment side comprises service control interface information, first data transmission service control interface information and second data transmission service control interface information; and the control end calls a service control interface of the equipment end to establish connection with the equipment end according to the IP address of the control end and the IP address of the target equipment end. Fig. 2 is a schematic flow chart of a method for establishing a connection between a control terminal and a device terminal in a method for transmitting lyrics according to the present application. It should be understood that fig. 2 is only illustrative of the above steps and should not be construed as being particularly limiting.
In a specific embodiment of the present application, before the device side receives, through the first data transmission interface, the lyric type query instruction sent by the control side, the method further includes: the method comprises the steps of upgrading the equipment end to enable service description information of the equipment end to be added with first data transmission service control interface information and second data transmission service control interface information, enabling the equipment end to execute query and return operation of a supported lyric type after receiving a lyric type query instruction sent by the control end, wherein the first data transmission service control interface information is used for the control end to call a first data transmission interface, the second data transmission service control interface information is used for the control end to call a second data transmission interface, the first data transmission interface is used for transmitting an instruction for obtaining the lyric support type of the equipment end, and the second data transmission interface is used for transmitting a lyric file. It can be understood that the device side may be upgraded by firmware, for example, upgrading a UPnP module in a television by a driver, so that a first data transmission service interface and a second data transmission service interface are added to a UPnP service of the television, and first data service control interface information and second data transmission service control interface information are added to corresponding service description information. It should be understood that the above examples are illustrative only and are not to be construed as being particularly limiting.
S602: and inquiring the lyric types supported by the equipment terminal according to the lyric type inquiry instruction.
In a specific embodiment of the present application, the lyric type is a pure text lyric type, a line-by-line lyric type and/or a word-by-word lyric type. The format of the plain text lyrics may be txt, word, pdf, etc. plain text lyrics without time tags, which is not specifically limited herein; the progressive lyric format may be LRC, SNC, SRT, SSA, KRC, SMI, ASS, etc., and is not specifically limited herein; the verbatim lyric format may be QRC, KSC, etc., and is not particularly limited herein.
In a specific embodiment of the application, the first data transmission interface cannot be added in advance at the device end without the lyric display function, and therefore, the control end section acquires information that the device end cannot display lyrics through the first data transmission interface when the device end does not display the lyric function. It can be understood that, after the control end obtains the information that the device end cannot display the lyrics, the control end may also display a prompt message that the device cannot display the lyrics to the user, and the control end may also recommend to the user other playing devices with screens that may be currently connected. For example: the equipment end is acoustic equipment which is not provided with a display screen and cannot be added with a first data transmission interface, the control end is a QQ music program in the mobile phone, after the mobile phone is in session connection with the acoustic equipment, a user selects the acoustic equipment in the QQ music program by using the mobile phone to play music, the QQ music program can display prompt information that the current equipment cannot display lyrics, and recommend other current playing equipment capable of playing audio and lyrics to the user, and the prompt information can be prompt through a prompt window shown in figure 3. It should be understood that fig. 3 is only an example and is not a specific limitation, and the prompt message may be other forms of messages such as voice.
S603: and sending the lyric type to the control end through the first data transmission port.
In a specific embodiment of the present application, when a plurality of lyric types supported by the device side are provided, the device side sends the plurality of lyric types to the control side through the first data transmission port; and receiving a lyric file of a target lyric type sent by the control end through a second data transmission interface, wherein the lyric file of the target lyric type is the lyric file sent to the equipment end by calling the second data transmission interface after the control end shows a plurality of lyric types supported by the equipment end to a user and searches the lyric file of the target lyric type according to the target lyric type selected by the user. It should be understood that when the lyrics displayed line by line and the lyrics formats displayed word by word supported by the device are various, the control end may display only one of the lyrics formats line by line and one of the lyrics words by word according to the preset priority order, thereby achieving the purposes of simplifying operation and improving user experience. For example: the control end is a QQ music program in the mobile phone, the equipment end is a television with a display screen, and the television can support the lyrics in LRC, KRC and ASS formats displayed line by line and can also support the lyrics in QRC format with karaoke effect displayed word by word. After the session connection between the mobile phone and the television is established, a user uses the mobile phone to select the television in the QQ music program for music playing, the QQ music program can display prompt information that the current equipment can support lyrics in two formats, namely LRC and QRC, to the user, the user can select lyrics in any format according to requirements, such as QRC format, for music playing, and the QQ music program can send the lyrics in QRC format selected by the user to the television, so that the television can display the lyrics word by word while playing music. The prompt information of the control end may be a prompt window shown in fig. 4. It should be understood that fig. 4 is only an example and is not a specific limitation, and the prompt message may be other forms of messages such as voice.
In a specific embodiment of the present application, after the device side sends the lyric type to the control side through the first data transmission port, the control side may search for a lyric file of the lyric type according to the lyric type in a network online search manner, or in an offline lyric library search manner, which is not limited herein. The lyric file may be a complete lyric file, or may be a URL of the lyric file, which is not limited herein.
S604: and receiving the lyric file of the lyric type sent by the control end through a second data transmission interface.
In a specific embodiment of the present application, the interaction between the control end and the device end may be sent in a wired or wireless manner. The wireless mode includes GPRS, WLAN, ZigBee, Bluetooth, NFC, etc., and the wired mode includes network cable, copper wire, RS232, RS458, etc. It should be understood that the above examples of communication methods are merely for illustration and should not be construed as limiting.
The lyric transmission method provided by the present application is further described below by taking fig. 5a to 5d as examples. Fig. 5a is a transmission timing diagram in a lyric transmission method provided by the present application. As shown in fig. 5a, the control end is a music playing application program on the mobile phone, and the device end is a UPnP device with a display screen. Firstly, a first data transmission interface GetLyricSupportType Action is added to the UPnP service of the equipment end and used for inquiring the support type of the lyrics, and a second data transmission interface SetLyric Action is added and used for pushing the lyrics to the equipment end. Specifically, when the control end queries the lyric type, the control end may call a getlyricsupporttypeaction of the device end to send a getlyricsupporttypecommand shown in fig. 5b to the device end, after receiving the getlyricsupporttypecommand, the device end returns the lyric type supported by the device end shown in fig. 5c, that is, an LRC format, to the control end, and finally, the control end calls a SetLyric Action to send a SetLyric command shown in fig. 5d to the device end, and pushes lyrics in a target format to the device end, that is, a lyric file in an LRC format, and after receiving the lyric file, the device end may perform synchronous playing of music and lyrics. It should be understood that the codes shown in fig. 5b, 5c, and 5d are only for illustration, and the present application may be implemented by using other codes, and are not limited in particular.
According to the scheme, firstly, an equipment end receives a lyric type query instruction sent by a control end through a first data transmission interface, then queries the lyric type supported by the equipment end according to the lyric type query instruction, and sends the lyric type to the control end through a first data transmission port, so that a lyric file of the lyric type sent by the control end is received through a second data transmission interface. In the method, the equipment end firstly returns the lyric types supported by the equipment end through the interface for obtaining the lyric types, and then receives the lyric files of the lyric types supported by the equipment end through the interface for transmitting the lyric, so that the equipment end can synchronously play the lyrics while playing the music, and the user experience is further improved.
The embodiment of the present application further describes a schematic structural diagram of a terminal that belongs to the same inventive concept as the embodiment of the method described in fig. 1, as shown in fig. 7, fig. 7 is a schematic structural diagram of a lyric transmission apparatus provided in the present application, as shown in fig. 7, the lyric transmission apparatus includes a sending unit 710, a receiving unit 720, a searching unit 730, a connection establishing unit 740, an upgrading unit 750, and a selecting unit 760, where the sending unit 710 is configured to call a first data transmission interface to send a lyric type query instruction to a device side.
The receiving unit 720 is configured to receive a lyric type returned by the device side through the first data transmission interface, where the lyric type is a pure text lyric type, a line-by-line lyric type, and/or a word-by-word lyric type;
the searching unit 730 is configured to search a lyric file of the lyric type according to the lyric type;
the sending unit 710 is further configured to invoke a second data transmission interface to send the lyric file to the device side.
In a specific embodiment of the present application, the lyric type query instruction is used to instruct the device side to query and return a supported lyric type, and the control side and the device side establish a connection using a universal plug and play UPnP protocol. That is, the control end is a control end that can send out a service control message to the device end, and the device end is a device end that can respond to the service control message, return a related result, or return an error. The control terminal may be an application program on a terminal such as a mobile phone, a computer, or a PC, for example: cell phone QQ music, PCQQ music, etc., and are not limited herein. The device side may be a UPnP terminal having a music playing function and a display screen, for example: a television, a sound device, etc., and is not particularly limited herein.
In a specific embodiment of the present application, the apparatus further includes a connection establishing unit 740, where the connection establishing unit 740 is configured to connect the network with the multiple device sides in a wired or wireless manner before the sending unit 710 calls the first data transmission interface to send the lyric type query instruction to the device side; the connection establishing unit 740 is further configured to obtain the control end IP address in the network through a dynamic host configuration DHCP protocol and an automatic IP address assignment protocol, and the multiple device ends obtain the corresponding device end IP address in the network through the DHCP protocol and the automatic IP address assignment protocol; the connection establishing unit 740 is further configured to search for a target device end in the network through a simple service discovery SSDP protocol; the connection establishing unit 740 is further configured to receive device description information and service description information of the target device end, where the device description information includes the device end IP address, and the service description information of the device end includes service control interface information, first data transmission service control interface information, and second data transmission service control interface information, and is sent by the target device end through an SSDP protocol; the connection establishing unit 740 is further configured to invoke a service control interface of the device end to establish a connection with the device end according to the IP address of the control end and the IP address of the target device end. Fig. 2 is a schematic flow chart of a method for establishing a connection between a control terminal and a device terminal in a method for transmitting lyrics according to the present application. It should be understood that fig. 2 is only illustrative of the above steps and should not be construed as being particularly limiting.
In a specific embodiment of the present application, the apparatus further includes an upgrading unit 750, where the upgrading unit 750 is configured to upgrade the device side before the sending unit 710 calls the first data transmission interface to send a lyric type query instruction to the device side, so that the service description information of the device side is newly added with first data transmission service control interface information and second data transmission service control interface information, and the device side executes an operation of querying and returning a supported lyric type after receiving the lyric type query instruction sent by the control side, where the first data transmission service control interface information is used by the control side to call the first data transmission interface, the second data transmission service control interface information is used by the control side to call the second data transmission interface, and the first data transmission interface is used to transmit an instruction of obtaining the lyric support type of the device side, and the second data transmission interface is used for transmitting the lyric file. It can be understood that the device side may be upgraded by firmware, for example, upgrading a UPnP module in a television by a driver, so that a first data transmission service interface and a second data transmission service interface are added to a UPnP service of the television, and first data service control interface information and second data transmission service control interface information are added to corresponding service description information. It should be understood that the above examples are illustrative only and are not to be construed as being particularly limiting.
In a specific embodiment of the present application, the lyric type is a pure text lyric type, a line-by-line lyric type and/or a word-by-word lyric type. The format of the plain text lyrics may be txt, word, pdf, etc. plain text lyrics without time tags, which is not specifically limited herein; the progressive lyric format may be LRC, SNC, SRT, SSA, KRC, SMI, ASS, etc., and is not specifically limited herein; the verbatim lyric format may be QRC, KSC, etc., and is not particularly limited herein.
In a specific embodiment of the application, the first data transmission interface cannot be added in advance at the device end without the lyric display function, and therefore, the control end section acquires information that the device end cannot display lyrics through the first data transmission interface when the device end does not display the lyric function. It can be understood that, after the control end obtains the information that the device end cannot display the lyrics, the control end may also display a prompt message that the device cannot display the lyrics to the user, and the control end may also recommend to the user other playing devices with screens that may be currently connected. For example: the equipment end is acoustic equipment which is not provided with a display screen and cannot be added with a first data transmission interface, the control end is a QQ music program in the mobile phone, after the mobile phone is in session connection with the acoustic equipment, a user selects the acoustic equipment in the QQ music program by using the mobile phone to play music, the QQ music program can display prompt information that the current equipment cannot display lyrics, and recommend other current playing equipment capable of playing audio and lyrics to the user, and the prompt information can be prompt through a prompt window shown in figure 3. It should be understood that fig. 3 is only an example and is not a specific limitation, and the prompt message may be other forms of messages such as voice.
In a specific embodiment of the present application, the searching unit 730 searches for the lyric file of the lyric type according to the lyric type by performing an online search through a network, or by performing a search in an offline lyric library, which is not limited herein. The lyric file may be a complete lyric file, or may be a URL of the lyric file, which is not limited herein.
In a specific embodiment of the present application, the apparatus further includes a selecting unit 760, where the selecting unit 760 is configured to show, to a user, a plurality of lyric types supported by the device side when the number of lyric types supported by the device side is multiple; the searching unit 730 is further configured to search for a lyric file of the target lyric type according to the target lyric type selected by the user; the sending unit 710 is further configured to invoke a second data transmission interface to send the lyric file of the target lyric type to the device side. It should be understood that when the lyrics displayed line by line and the lyrics formats displayed word by word supported by the device are various, the control end may display only one of the lyrics formats line by line and one of the lyrics words by word according to the preset priority order, thereby achieving the purposes of simplifying operation and improving user experience. For example: the control end is a QQ music program in the mobile phone, the equipment end is a television with a display screen, and the television can support the lyrics in LRC, KRC and ASS formats displayed line by line and can also support the lyrics in QRC format with karaoke effect displayed word by word. After the session connection between the mobile phone and the television is established, a user uses the mobile phone to select the television in the QQ music program for music playing, the QQ music program can display prompt information that the current equipment can support lyrics in two formats, namely LRC and QRC, to the user, the user can select lyrics in any format according to requirements, such as QRC format, for music playing, and the QQ music program can send the lyrics in QRC format selected by the user to the television, so that the television can display the lyrics word by word while playing music. The prompt information of the control end may be a prompt window shown in fig. 4. It should be understood that fig. 4 is only an example and is not a specific limitation, and the prompt message may be other forms of messages such as voice.
In a specific embodiment of the present application, the interaction between the control end and the device end may be sent in a wired or wireless manner. The wireless mode includes GPRS, WLAN, ZigBee, Bluetooth, NFC, etc., and the wired mode includes network cable, copper wire, RS232, RS458, etc. It should be understood that the above examples of communication methods are merely for illustration and should not be construed as limiting.
The lyric transmission method provided by the present application is further described below by taking fig. 5a to 5d as examples. Fig. 5a is a transmission timing diagram in a lyric transmission method provided by the present application. As shown in fig. 5a, the control end is a music playing application program on the mobile phone, and the device end is a UPnP device with a display screen. Firstly, a first data transmission interface GetLyricSupportType Action is added to the UPnP service of the equipment end and used for inquiring the support type of the lyrics, and a second data transmission interface SetLyric Action is added and used for pushing the lyrics to the equipment end. Specifically, when the control end queries the lyric type, the control end may call a getlyricsupporttypeaction of the device end to send a getlyricsupporttypecommand shown in fig. 5b to the device end, after receiving the getlyricsupporttypecommand, the device end returns the lyric type supported by the device end shown in fig. 5c, that is, an LRC format, to the control end, and finally, the control end calls a SetLyric Action to send a SetLyric command shown in fig. 5d to the device end, and pushes lyrics in a target format to the device end, that is, a lyric file in an LRC format, and after receiving the lyric file, the device end may perform synchronous playing of music and lyrics. It should be understood that the codes shown in fig. 5b, 5c, and 5d are only for illustration, and the present application may be implemented by using other codes, and are not limited in particular.
According to the scheme, firstly, a control end calls a first data transmission interface to send a lyric type query instruction to an equipment end, then receives a lyric type returned by the equipment end through the first data transmission interface, searches a lyric file of the lyric type according to the lyric type, and accordingly calls a second data transmission interface to send the lyric file to the equipment end. In the method, the control end firstly obtains the lyric types supported by the equipment end through the interface for obtaining the lyric types, and then sends the lyric files of the lyric types supported by the equipment end through the interface for transmitting the lyric, so that the control end achieves the purpose of transmitting the lyrics to the playing equipment while transmitting audio, and the user experience is further improved.
The embodiment of the present application further describes a schematic structural diagram of a terminal that belongs to the same inventive concept as the embodiment of the method described in fig. 6, as shown in fig. 8, fig. 8 is a schematic structural diagram of another lyric transmission apparatus provided in the present application, as shown in fig. 8, the lyric transmission apparatus includes a receiving unit 810, an inquiring unit 820, a sending unit 830, a connection establishing unit 840, and an upgrading unit 850, wherein,
the receiving unit 810 is configured to receive a lyric type query instruction sent by a control end through a first data transmission interface, where the control end and the device end establish a connection using a universal plug and play UPnP protocol;
the query unit 820 is configured to query a lyric type supported by the device side according to the lyric type query instruction, where the lyric type is a pure text lyric type, a line-by-line lyric type and/or a word-by-word lyric type;
the sending unit 830 is configured to send the lyric type to the control end through the first data transmission port;
the receiving unit 810 is further configured to receive, through the second data transmission interface, a lyric file of the lyric type sent by the control end.
In a specific embodiment of the present application, the lyric type query instruction is used to instruct the device side to query and return a supported lyric type, and the control side and the device side establish a connection using a universal plug and play UPnP protocol. That is, the control end is a control end that can send out a service control message to the device end, and the device end is a device end that can respond to the service control message, return a related result, or return an error. The control terminal may be an application program on a terminal such as a mobile phone, a computer, or a PC, for example: cell phone QQ music, PCQQ music, etc., and are not limited herein. The device side may be a UPnP terminal having a music playing function and a display screen, for example: a television, a sound device, etc., and is not particularly limited herein.
In a specific embodiment of the present application, the apparatus further includes a connection establishing unit 840, where the connection establishing unit 840 is configured to connect the control end to a network in a wired or wireless manner before the receiving unit 810 receives the lyric type query instruction sent by the control end through the first data transmission interface; the connection establishing unit 840 is further configured to obtain a corresponding device IP address in the network through a DHCP protocol and an automatic IP address assignment protocol, and the control end obtains a control end IP address in the network through a dynamic host configuration DHCP protocol and an automatic IP address assignment protocol; the connection establishing unit 840 is further configured to receive a target device end search application sent by the control end through an SSDP protocol; the connection establishing unit 840 is further configured to send device description information and service description information of the device end through an SSDP protocol, where the device description information includes an IP address of the device end, and the service description information of the device end includes service control interface information, first data transmission service control interface information, and second data transmission service control interface information; the connection establishing unit 840 is further configured to establish a connection with the control end, where the control end invokes a service control interface of the device end to establish a connection with the device end according to an IP address of the control end and an IP address of the target device end. Fig. 2 is a schematic flow chart of a method for establishing a connection between a control terminal and a device terminal in a method for transmitting lyrics according to the present application. It should be understood that fig. 2 is only illustrative of the above steps and should not be construed as being particularly limiting.
In a specific embodiment of the present application, the apparatus further includes an upgrading unit 850, where the upgrading unit 850 is configured to, before the receiving unit 810 receives a lyric type query instruction sent by a control end through a first data transmission interface, upgrade the device end, so that the service description information of the device end is newly added with first data transmission service control interface information and second data transmission service control interface information, and the device end executes an operation of querying and returning a supported lyric type after receiving the lyric type query instruction sent by the control end, where the first data transmission service control interface information is used by the control end to call the first data transmission interface, the second data transmission service control interface information is used by the control end to call the second data transmission interface, and the first data transmission interface is used to transmit an instruction of obtaining a device-end lyric support type, and the second data transmission interface is used for transmitting the lyric file. It can be understood that the device side may be upgraded by firmware, for example, upgrading a UPnP module in a television by a driver, so that a first data transmission service interface and a second data transmission service interface are added to a UPnP service of the television, and first data service control interface information and second data transmission service control interface information are added to corresponding service description information. It should be understood that the above examples are illustrative only and are not to be construed as being particularly limiting.
In a specific embodiment of the present application, the lyric type is a pure text lyric type, a line-by-line lyric type and/or a word-by-word lyric type. The format of the plain text lyrics may be txt, word, pdf, etc. plain text lyrics without time tags, which is not specifically limited herein; the progressive lyric format may be LRC, SNC, SRT, SSA, KRC, SMI, ASS, etc., and is not specifically limited herein; the verbatim lyric format may be QRC, KSC, etc., and is not particularly limited herein.
In a specific embodiment of the application, the first data transmission interface cannot be added in advance at the device end without the lyric display function, and therefore, the control end section acquires information that the device end cannot display lyrics through the first data transmission interface when the device end does not display the lyric function. It can be understood that, after the control end obtains the information that the device end cannot display the lyrics, the control end may also display a prompt message that the device cannot display the lyrics to the user, and the control end may also recommend to the user other playing devices with screens that may be currently connected. For example: the equipment end is acoustic equipment which is not provided with a display screen and cannot be added with a first data transmission interface, the control end is a QQ music program in the mobile phone, after the mobile phone is in session connection with the acoustic equipment, a user selects the acoustic equipment in the QQ music program by using the mobile phone to play music, the QQ music program can display prompt information that the current equipment cannot display lyrics, and recommend other current playing equipment capable of playing audio and lyrics to the user, and the prompt information can be prompt through a prompt window shown in figure 3. It should be understood that fig. 3 is only an example and is not a specific limitation, and the prompt message may be other forms of messages such as voice.
In a specific embodiment of the present application, the control end searches for the lyric file of the lyric type according to the lyric type may be a search in an online network search manner, or a search in an offline lyric library, which is not limited herein. The lyric file may be a complete lyric file, or may be a URL of the lyric file, which is not limited herein.
In a specific embodiment of the present application, when a plurality of lyric types supported by the device side are provided, the device side sends the plurality of lyric types to the control side through the first data transmission port; and receiving a lyric file of a target lyric type sent by the control end through a second data transmission interface, wherein the lyric file of the target lyric type is the lyric file sent to the equipment end by calling the second data transmission interface after the control end shows a plurality of lyric types supported by the equipment end to a user and searches the lyric file of the target lyric type according to the target lyric type selected by the user. It should be understood that when the lyrics displayed line by line and the lyrics formats displayed word by word supported by the device are various, the control end may display only one of the lyrics formats line by line and one of the lyrics words by word according to the preset priority order, thereby achieving the purposes of simplifying operation and improving user experience. For example: the control end is a QQ music program in the mobile phone, the equipment end is a television with a display screen, and the television can support the lyrics in LRC, KRC and ASS formats displayed line by line and can also support the lyrics in QRC format with karaoke effect displayed word by word. After the session connection between the mobile phone and the television is established, a user uses the mobile phone to select the television in the QQ music program for music playing, the QQ music program can display prompt information that the current equipment can support lyrics in two formats, namely LRC and QRC, to the user, the user can select lyrics in any format according to requirements, such as QRC format, for music playing, and the QQ music program can send the lyrics in QRC format selected by the user to the television, so that the television can display the lyrics word by word while playing music. The prompt information of the control end may be a prompt window shown in fig. 4. It should be understood that fig. 4 is only an example and is not a specific limitation, and the prompt message may be other forms of messages such as voice.
In a specific embodiment of the present application, the interaction between the control end and the device end may be sent in a wired or wireless manner. The wireless mode includes GPRS, WLAN, ZigBee, Bluetooth, NFC, etc., and the wired mode includes network cable, copper wire, RS232, RS458, etc. It should be understood that the above examples of communication methods are merely for illustration and should not be construed as limiting.
The lyric transmission method provided by the present application is further described below with reference to fig. 5a-5d as an example. Fig. 5a is a transmission timing diagram in a lyric transmission method provided by the present application. As shown in fig. 5a, the control end is a music playing application program on the mobile phone, and the device end is a UPnP device with a display screen. Firstly, a first data transmission interface GetLyricSupportType Action is added to the UPnP service of the equipment end and used for inquiring the support type of the lyrics, and a second data transmission interface SetLyric Action is added and used for pushing the lyrics to the equipment end. Specifically, when the control end queries the lyric type, the control end may call a getlyricsupporttypeaction of the device end to send a getlyricsupporttypecommand shown in fig. 5b to the device end, after receiving the getlyricsupporttypecommand, the device end returns the lyric type supported by the device end shown in fig. 5c, that is, an LRC format, to the control end, and finally, the control end calls a SetLyric Action to send a SetLyric command shown in fig. 5d to the device end, and pushes lyrics in a target format to the device end, that is, a lyric file in an LRC format, and after receiving the lyric file, the device end may perform synchronous playing of music and lyrics. It should be understood that the codes shown in fig. 5b, 5c, and 5d are only for illustration, and the present application may be implemented by using other codes, and are not limited in particular.
According to the scheme, firstly, an equipment end receives a lyric type query instruction sent by a control end through a first data transmission interface, then queries the lyric type supported by the equipment end according to the lyric type query instruction, and sends the lyric type to the control end through a first data transmission port, so that a lyric file of the lyric type sent by the control end is received through a second data transmission interface. In the method, the equipment end firstly returns the lyric types supported by the equipment end through the interface for obtaining the lyric types, and then receives the lyric files of the lyric types supported by the equipment end through the interface for transmitting the lyric, so that the equipment end can synchronously play the lyrics while playing the music, and the user experience is further improved
In order to better implement the above scheme of the embodiment of the present invention, the present invention further provides a terminal of a lyric transmission method, which is described in detail below with reference to fig. 9:
as shown in fig. 9, which is a schematic structural diagram of a terminal provided in the embodiment of the present invention, the terminal 900 may include at least one processor 901, a communication bus 902, a memory 903, and at least one communication interface 904.
Processor 901 may be a general-purpose Central Processing Unit (CPU), a microprocessor, an Application-Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to control the execution of programs in accordance with the present invention.
Communication bus 902 may include a path that transfers information between the aforementioned components. The communication interface 904 may be implemented using any transceiver or the like for communicating with other devices or communication networks, such as ethernet, Radio Access Technology (RAN), WLAN, etc.
The Memory 903 may be a Read-Only Memory (ROM) or other type of static storage device that can store static information and instructions, a Random Access Memory (RAM) or other type of dynamic storage device that can store information and instructions, an Electrically Erasable Programmable Read-Only Memory (EEPROM), a Compact Disc Read-Only Memory (CD-ROM) or other optical Disc storage, optical Disc storage (including Compact Disc, laser Disc, optical Disc, digital versatile Disc, blu-ray Disc, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to these. The memory may be self-contained and coupled to the processor via a bus. The memory may also be integral to the processor.
The memory 903 is used for storing program codes for implementing the present invention, and the processor 901 controls the execution of the program codes. The processor 901 is configured to execute the program code stored in the memory 903, and the program code may execute the implementation manners described in all the embodiments of the method and apparatus for transmitting lyrics provided in this application, which is not described herein again
In particular implementations, processor 901 may include one or more CPUs such as CPU0 and CPU1 in fig. 9 as an alternative embodiment.
In an alternative implementation, terminal 900 may include multiple processors, such as processor 901 and processor 908 in fig. 9. Each of these processors may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions).
In this implementation, as an alternative embodiment, the terminal 900 may further include an output device 905 and an input device 906. An output device 905, which is in communication with the processor 901, may display information in a variety of ways. For example, the output device 905 may be a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) Display device, a Cathode Ray Tube (CRT) Display device, a projector (projector), or the like. The input device 906, which is in communication with the processor 901, may accept input from a user in a variety of ways. For example, the input device 906 may be a mouse, keyboard, touch screen device, or sensing device, among others.
In a specific implementation, the terminal 900 may be a desktop, a laptop, a network server, a Personal Digital Assistant (PDA), a mobile phone, a tablet computer, a wireless terminal device, a communication device, or an embedded device. The embodiment of the present invention does not limit the type of the terminal 900.
Embodiments of the present invention also provide a computer storage medium for storing computer software instructions for implementing the methods shown in fig. 1 and fig. 6, which includes a program for executing the embodiments of the methods. Processing of unbalanced data may be achieved by executing stored programs.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (15)

1. A method for transmitting lyrics, comprising:
the method comprises the steps that a control end calls a first data transmission interface to send a lyric type query instruction to a device end, wherein the lyric type query instruction is used for indicating the device end to query and return supported lyric types, and the control end and the device end are connected by using a universal plug and play (UPnP) protocol;
receiving a lyric type returned by the equipment end through the first data transmission interface, wherein the lyric type is a pure text lyric type, a line-by-line lyric type and/or a word-by-word lyric type;
searching a lyric file of the lyric type according to the lyric type;
and calling a second data transmission interface to send the lyric file to the equipment terminal.
2. The method of claim 1, wherein before the control end sends the lyric type query instruction to the device end through the first data transmission interface, the method further comprises:
the control end and the plurality of equipment ends are connected with a network in a wired or wireless mode;
the control end acquires the IP address of the control end in the network through a dynamic host configuration DHCP protocol and an automatic IP address allocation protocol, and the equipment ends acquire the IP address of the equipment end in the network through the DHCP protocol and the automatic IP address allocation protocol;
the control terminal searches a target equipment terminal in the network through a Simple Service Discovery (SSDP) protocol;
the control end receives device description information and service description information of the target device end, which are sent by the target device end through an SSDP protocol, wherein the device description information comprises an IP address of the device end, and the service description information of the device end comprises service control interface information, first data transmission service control interface information and second data transmission service control interface information;
and the control terminal calls a service control interface of the equipment terminal to establish connection with the equipment terminal according to the IP address of the control terminal and the IP address of the target equipment terminal.
3. The method of claim 2, wherein before the control end sends the lyric type query instruction to the device end through the first data transmission interface, the method further comprises:
the method comprises the steps of upgrading the equipment end to enable service description information of the equipment end to be added with first data transmission service control interface information and second data transmission service control interface information, enabling the equipment end to execute query and return operation of a supported lyric type after receiving a lyric type query instruction sent by the control end, wherein the first data transmission service control interface information is used for the control end to call a first data transmission interface, the second data transmission service control interface information is used for the control end to call a second data transmission interface, the first data transmission interface is used for transmitting an instruction for obtaining the lyric support type of the equipment end, and the second data transmission interface is used for transmitting a lyric file.
4. The method according to claim 1, wherein in case that the device side supports a plurality of lyrics types, the method further comprises:
the control end displays a plurality of lyric types supported by the equipment end to a user;
searching a lyric file of the target lyric type according to the target lyric type selected by the user;
and calling a second data transmission interface to send the lyric file of the target lyric type to the equipment terminal.
5. A method for transmitting lyrics, comprising:
the method comprises the steps that a device side receives a lyric type query instruction sent by a control side through a first data transmission interface, wherein the control side and the device side are connected through a universal plug and play (UPnP) protocol;
inquiring the lyric type supported by the equipment terminal according to the lyric type inquiry instruction, wherein the lyric type is a pure text lyric type, a line-by-line lyric type and/or a word-by-word lyric type;
sending the lyric type to the control end through the first data transmission port;
and receiving the lyric file of the lyric type sent by the control end through a second data transmission interface.
6. The method of claim 5, wherein before the device side receives the lyric type query instruction sent by the control side through the first data transmission interface, the method further comprises:
the equipment end and the control end are connected with a network in a wired or wireless mode;
the equipment side acquires a corresponding equipment side IP address in the network through a DHCP protocol and an automatic IP address allocation protocol, and the control side acquires a control side IP address in the network through a dynamic host configuration DHCP protocol and an automatic IP address allocation protocol;
the device side receives a target device side search application sent by the control side through an SSDP protocol;
the equipment side sends equipment description information and service description information of the equipment side through an SSDP protocol, wherein the equipment description information comprises an IP address of the equipment side, and the service description information of the equipment side comprises service control interface information, first data transmission service control interface information and second data transmission service control interface information;
and the control end calls a service control interface of the equipment end to establish connection with the equipment end according to the IP address of the control end and the IP address of the target equipment end.
7. The method of claim 6, wherein before the device side receives the lyric type query instruction sent by the control side through the first data transmission interface, the method further comprises:
the method comprises the steps of upgrading the equipment end to enable service description information of the equipment end to be added with first data transmission service control interface information and second data transmission service control interface information, enabling the equipment end to execute query and return operation of a supported lyric type after receiving a lyric type query instruction sent by the control end, wherein the first data transmission service control interface information is used for the control end to call a first data transmission interface, the second data transmission service control interface information is used for the control end to call a second data transmission interface, the first data transmission interface is used for transmitting an instruction for obtaining the lyric support type of the equipment end, and the second data transmission interface is used for transmitting a lyric file.
8. The method according to claim 5, wherein in case that the device side supports a plurality of lyrics types, the method further comprises:
the equipment side sends the multiple lyric types to the control side through the first data transmission port;
and receiving a lyric file of a target lyric type sent by the control end through a second data transmission interface, wherein the lyric file of the target lyric type is the lyric file sent to the equipment end by calling the second data transmission interface after the control end shows a plurality of lyric types supported by the equipment end to a user and searches the lyric file of the target lyric type according to the target lyric type selected by the user.
9. A lyric transmitting apparatus, comprising a transmitting unit, a receiving unit, and a searching unit, wherein,
the transmitting unit is used for calling a first data transmission interface to transmit a lyric type query instruction to a device end, wherein the lyric type query instruction is used for indicating the device end to query and return supported lyric types, and a control end and the device end are connected by using a universal plug and play (UPnP) protocol;
the receiving unit is used for receiving the lyric types returned by the equipment end through the first data transmission interface, wherein the lyric types are pure text lyric types, line-by-line lyric types and/or word-by-word lyric types;
the searching unit is used for searching a lyric file of the lyric type according to the lyric type;
the sending unit is further used for calling a second data transmission interface to send the lyric file to the equipment side.
10. The apparatus according to claim 9, further comprising a connection establishing unit, configured to connect the network with the plurality of device sides in a wired or wireless manner before the sending unit calls the first data transmission interface to send the lyric type query instruction to the device side;
the connection establishing unit is further used for acquiring the control end IP address in the network through a dynamic host configuration DHCP protocol and an automatic IP address allocation protocol, and the plurality of equipment ends acquire the corresponding equipment end IP address in the network through the DHCP protocol and the automatic IP address allocation protocol;
the connection establishing unit is also used for searching a target equipment terminal in the network through a Simple Service Discovery (SSDP) protocol;
the connection establishing unit is further configured to receive device description information and service description information of the target device end, where the device description information includes the device end IP address, and the service description information of the device end includes service control interface information, first data transmission service control interface information, and second data transmission service control interface information, and the device description information is sent by the target device end through an SSDP protocol;
the connection establishing unit is also used for calling a service control interface of the equipment end to establish connection with the equipment end according to the IP address of the control end and the IP address of the target equipment end.
11. The apparatus according to claim 10, further comprising an upgrading unit configured to upgrade an equipment side before the control side invokes a first data transmission interface to send a lyric type query instruction to the equipment side, so that service description information of the equipment side is added with first data transmission service control interface information and second data transmission service control interface information, and the equipment side executes an operation of querying and returning a supported lyric type after receiving the lyric type query instruction sent by the control side, wherein the first data transmission service control interface information is used for the control side to invoke the first data transmission interface, the second data transmission service control interface information is used for the control side to invoke the second data transmission interface, and the first data transmission interface is used for transmitting an instruction of obtaining the equipment side lyric support type, and the second data transmission interface is used for transmitting the lyric file.
12. The apparatus according to claim 9, further comprising a selection unit, wherein the selection unit is configured to show a plurality of lyrics types supported by the device side to a user if the plurality of lyrics types supported by the device side are provided;
the searching unit is also used for searching a lyric file of the target lyric type according to the target lyric type selected by the user;
the sending unit is further used for calling a second data transmission interface to send the lyric file of the target lyric type to the equipment terminal.
13. A lyric transmission device is characterized by comprising a receiving unit, a query unit and a transmitting unit, wherein,
the receiving unit is used for receiving a lyric type query instruction sent by a control end through a first data transmission interface, wherein the control end and the equipment end are connected by using a universal plug and play (UPnP) protocol;
the query unit is used for querying the lyric types supported by the equipment terminal according to the lyric type query instruction, wherein the lyric types are pure text lyric types, line-by-line lyric types and/or word-by-word lyric types;
the transmitting unit is used for transmitting the lyric type to the control terminal through the first data transmission port;
the receiving unit is also used for receiving the lyric file of the lyric type sent by the control terminal through a second data transmission interface.
14. A terminal, characterized in that it comprises a processor and a memory, said processor and memory being interconnected, wherein said memory is adapted to store a computer program comprising program instructions, said processor being configured to invoke said program instructions to perform the method according to any one of claims 1-4.
15. A computer-readable storage medium, characterized in that the computer storage medium stores a computer program comprising program instructions that, when executed by a processor, cause the processor to perform the method according to any of claims 1-4.
CN201910126847.7A 2019-02-20 2019-02-20 Lyric transmission method and related equipment Active CN109951526B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910126847.7A CN109951526B (en) 2019-02-20 2019-02-20 Lyric transmission method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910126847.7A CN109951526B (en) 2019-02-20 2019-02-20 Lyric transmission method and related equipment

Publications (2)

Publication Number Publication Date
CN109951526A CN109951526A (en) 2019-06-28
CN109951526B true CN109951526B (en) 2021-08-24

Family

ID=67007614

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910126847.7A Active CN109951526B (en) 2019-02-20 2019-02-20 Lyric transmission method and related equipment

Country Status (1)

Country Link
CN (1) CN109951526B (en)

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101218790A (en) * 2005-07-04 2008-07-09 Sk电信股份有限公司 Household network system and its controlling method, method for setting house gateway of household network system and method for processing event protocol of household network system
CN101325612B (en) * 2008-07-24 2011-09-21 中兴通讯股份有限公司 Remote access control system and method for household network
CN101335586B (en) * 2008-08-04 2011-01-19 中兴通讯股份有限公司 Method and mobile terminal for playing mobile phone television service on multimedia playing equipment
CN104519034B (en) * 2013-09-30 2018-01-26 大唐终端设备有限公司 Control device and its communication means for multiple terminals collaboration amusement
CN106815230B (en) * 2015-11-27 2019-05-14 腾讯科技(深圳)有限公司 Lyrics page generation method and device
US10110942B2 (en) * 2016-12-30 2018-10-23 Mora Global, Inc. User relationship enhancement for social media platform
CN109241329A (en) * 2018-08-03 2019-01-18 百度在线网络技术(北京)有限公司 For the music retrieval method of AR scene, device, equipment and storage medium

Also Published As

Publication number Publication date
CN109951526A (en) 2019-06-28

Similar Documents

Publication Publication Date Title
US8516071B2 (en) Systems and methods for creating virtual universal plug-and-play systems
JP6093482B2 (en) Method and apparatus for displaying search results on portable terminal
EP2696559B1 (en) Method and Device for Resource Sharing Between Devices
CN101764726B (en) Enhanced content sharing framework
US9600226B2 (en) Media playback processing and control method, apparatus, and system
CN104601205A (en) Content sharing method and device
WO2020181906A1 (en) Method and apparatus for interacting with smart television
CN105573609A (en) Content sharing method and device
WO2004036334A2 (en) Web services via instant messaging
CN102725747A (en) Personal cloud computing with session migration
CN102821150A (en) Cloud server and application managing method based on same
WO2022057677A1 (en) Vibration control method and apparatus, and electronic device and computer-readable storage medium
KR20040101246A (en) System and method for concurrent multimodal communication using concurrent multimodal tags
KR20110093087A (en) Method and apparatus for using service of home network device based on remote access
CN102065340B (en) System and method for implementing multimedia synchronous interaction
CN111970546A (en) Method and device for controlling terminal interaction, electronic equipment and storage medium
CN111028839A (en) Smart home control method and device and electronic equipment
CN102158522A (en) Information processing apparatus, information processing method, control target device, and information processing system
CN105142184A (en) Flow control method and electronic device
CN103248654A (en) Negotiation method, device and system for virtual desktop service parameters
JP7081014B2 (en) Methods and devices for adjusting the number of instances, electronic devices, storage media and computer programs
CN109951526B (en) Lyric transmission method and related equipment
CN112637626A (en) Plug flow method, system, device, electronic equipment and storage medium
CN112328413A (en) Application service calling method, device and system
CN103248668A (en) Virtual desktop service parameter negotiation method, device and system

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