CN113590079B - Music playing control method, device and computer readable storage medium - Google Patents

Music playing control method, device and computer readable storage medium Download PDF

Info

Publication number
CN113590079B
CN113590079B CN202110895321.2A CN202110895321A CN113590079B CN 113590079 B CN113590079 B CN 113590079B CN 202110895321 A CN202110895321 A CN 202110895321A CN 113590079 B CN113590079 B CN 113590079B
Authority
CN
China
Prior art keywords
music
target data
playing
communication channel
audio file
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
CN202110895321.2A
Other languages
Chinese (zh)
Other versions
CN113590079A (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.)
Fiio Electronics Technology Co ltd
Original Assignee
Fiio Electronics Technology 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 Fiio Electronics Technology Co ltd filed Critical Fiio Electronics Technology Co ltd
Priority to CN202110895321.2A priority Critical patent/CN113590079B/en
Publication of CN113590079A publication Critical patent/CN113590079A/en
Application granted granted Critical
Publication of CN113590079B publication Critical patent/CN113590079B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • G06F3/165Management of the audio stream, e.g. setting of volume, audio stream path

Abstract

The application provides a music playing control method, a music playing control device and a computer readable storage medium. The music playing control method applied to the first device comprises the following steps: transmitting a control request corresponding to a second music playing application in the second device to the second device through a preset communication channel; receiving returned current playing information of a second music playing application, wherein the current playing information comprises a music file list and playing states of all music files in the music file list; sending a play control instruction corresponding to the current play information to the second equipment; receiving an audio file in a second format returned by the second equipment based on the playing control instruction through a preset communication channel, and converting the audio file into the audio file in a first format; a first music playing application within the first device is controlled to play the audio file in the second format. According to the method and the device, when the first device remotely controls the second device and acquires the music data of the second device, the two devices can operate the respective interfaces at the same time, and operation conflicts cannot be generated.

Description

Music playing control method, device and computer readable storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a music playing control method, apparatus, and computer readable storage medium.
Background
The mobile terminal equipment can acquire the music file and the related data in the other mobile terminal equipment through remote control, namely, the other mobile terminal equipment is connected and controlled through a local area network or Bluetooth, short-distance data transmission is carried out through a simple communication rule, and the data of the other mobile terminal equipment are acquired and play control is carried out. The existing remote control software has higher requirements on the type, system version, authority and whether auxiliary functions are opened or not of the mobile equipment, and in the remote control process, two mobile terminal equipment in remote control cannot operate interfaces at the same time, otherwise, operation conflicts can be generated.
Therefore, the existing method for controlling music playing between devices has the technical problem that the control device and the controlled device cannot operate simultaneously when acquiring data.
Disclosure of Invention
In order to solve the technical problems, the invention provides a music playing control method, a device and a computer readable storage medium, which concretely comprises the following steps:
in a first aspect, an embodiment of the present application provides a music playing control method, applied to a first device, where the method includes:
transmitting a control request corresponding to a second music playing application in second equipment to the second equipment through a preset communication channel;
receiving current playing information of the second music playing application returned by the second equipment, wherein the current playing information comprises a music file list and playing states of all music files in the music file list;
sending a play control instruction corresponding to the current play information to the second equipment;
receiving an audio file in a second format returned by the second device based on the play control instruction through the preset communication channel, and converting the audio file into the audio file in a first format;
and controlling a first music playing application in the first device to play the audio file in the second format.
According to a specific embodiment disclosed in the present application, before the step of sending, to the second device, a control request corresponding to the second music playing application in the second device via the preset communication channel, the method further includes:
judging whether the first equipment and the second equipment are both preset type operating systems or not;
if the first device and the second device are both the preset type operating system, establishing the preset communication channel through a TCP/IP Socket protocol or an Rfcomm protocol;
if the first device and/or the second device is not the preset type of operating system, the preset communication channel is established through a TCP/IP Socket protocol.
According to a specific embodiment disclosed in the present application, the step of receiving, through the preset communication channel, the audio file in the second format returned by the second device based on the play control instruction, and converting the audio file into the audio file in the first format includes:
receiving a target data packet returned by the second device based on the play control instruction through the preset communication channel, wherein the target data packet corresponds to an audio file in a second format;
judging whether the target data packet received in the preset time is complete or not;
if the target data packets received within the preset time are complete, converting all the target data packets into audio files in a first format;
and outputting a receiving abnormal signal if the target data packet received in the preset time is incomplete.
According to a specific embodiment disclosed in the present application, the step of determining whether the target data packet received in the preset time is complete includes:
the method comprises the steps of obtaining marking information contained in a last target data packet received within preset time, wherein the marking information comprises the sequence of a current target data packet in all target data packets and the number of all target data packets;
judging whether the sequence of the current target data packet in all the target data packets is the same as the number of all the target data packets or not;
if the target data packets are the same, judging that the target data packets received in the preset time are complete;
if the target data packets are different, judging that the target data packets received in the preset time are incomplete.
In a second aspect, an embodiment of the present application provides a music playing control method, which is applied to a second device, where the method includes:
receiving a control request sent by a first device through a preset communication channel, wherein the preset communication channel is a special communication channel between the second device and the first device, and the control request indicates to control a second music playing application in the second device;
transmitting current playing information of the second music playing application to the first device, wherein the current playing information comprises a music file list and playing states of all music files in the music file list;
receiving a play control instruction which is sent by the first equipment and corresponds to the current play information;
and sending the audio file in the second format corresponding to the playing control instruction to the first device through the preset communication channel.
According to a specific embodiment disclosed in the present application, before the step of receiving, via a preset communication channel corresponding to the first device, a control request sent by the first device to the second music playing application in the second device, the method further includes:
respectively establishing a preset communication channel between the second equipment and each first equipment;
the step of sending the audio file in the second format corresponding to the play control instruction to the first device through the preset communication channel includes:
and sending corresponding audio files through preset communication channels corresponding to the first devices respectively.
According to a specific embodiment disclosed in the present application, the step of sending the corresponding audio file through the preset communication channels corresponding to each first device, where the number of preset communication channels is greater than one, includes:
if the number of the received play control instructions is greater than one, judging whether each play control instruction conflicts or not;
if not, sending an audio file in a second format corresponding to the playing control instruction to the corresponding first device through each preset communication channel;
if so, sending the audio file in the second format corresponding to the playing control instruction to the first device with the highest priority.
In a third aspect, an embodiment of the present application provides a music playing control device, applied to a first apparatus, where the device includes:
a first sending module, configured to send a control request corresponding to a second music playing application in a second device to the second device via a preset communication channel;
the first receiving module is used for receiving current playing information of the second music playing application returned by the second equipment, wherein the current playing information comprises a music file list and playing states of all music files in the music file list;
the second sending module is used for sending a playing control instruction corresponding to the current playing information to the second equipment;
the second receiving module is used for receiving the audio file in the second format returned by the second device based on the playing control instruction through the preset communication channel and converting the audio file into the audio file in the first format;
and the play control module is used for controlling a first music play application in the first equipment to play the audio file in the second format.
In a fourth aspect, an embodiment of the present application provides a music playing control apparatus applied to a second device, where the apparatus includes:
the first receiving module is used for receiving a control request sent by a first device through a preset communication channel, wherein the preset communication channel is a special communication channel between the second device and the first device, and the control request indicates to control a second music playing application in the second device;
a first sending module, configured to send current playing information of the second music playing application to the first device, where the current playing information includes a music file list and playing states of music files in the music file list;
the second receiving module is used for receiving a play control instruction which is sent by the first equipment and corresponds to the current play information;
and the second sending module is used for sending the audio file in the second format corresponding to the playing control instruction to the first device through the preset communication channel.
In a fifth aspect, embodiments of the present application provide a computer readable storage medium storing a computer program, where the computer program implements the music playing control method according to any one of the embodiments of the first and second aspects when executed on a processor.
Compared with the prior art, the application has the following beneficial effects:
the method and the device establish preset communication channels between the second equipment and each first equipment respectively, and data transmission is carried out between the first equipment and the second equipment through the corresponding preset communication channels. The first device sends a control request to the second device through a preset communication channel, then receives the returned current playing information of the second music playing application and sends a playing control instruction corresponding to the current playing information to the second device, further receives an audio file in a second format returned by the second device based on the playing control instruction through the preset communication channel, converts the audio file into an audio file in a first format, and then controls the first music playing application in the first device to play the audio file in the second format. According to the method and the device, when the first device remotely controls the second device and acquires the music data of the second device, the two devices can operate the respective interfaces at the same time, and operation conflicts cannot be generated.
Drawings
In order to more clearly illustrate the technical solutions of the present invention, the drawings that are required for the embodiments will be briefly described, it being understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope of the present invention. Like elements are numbered alike in the various figures.
Fig. 1 is a flowchart of a music playing control method applied to a first device according to an embodiment of the present application;
fig. 2 is a flowchart of a music playing control method applied to a second device according to an embodiment of the present application;
fig. 3 is a block diagram of a music playing control device applied to a first apparatus according to an embodiment of the present application;
fig. 4 is a block diagram of a music playing control device applied to a second apparatus according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments.
The components of the embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the invention, as presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be made by a person skilled in the art without making any inventive effort, are intended to be within the scope of the present invention.
The terms "comprises," "comprising," "including," or any other variation thereof, are intended to cover a specific feature, number, step, operation, element, component, or combination of the foregoing, which may be used in various embodiments of the present invention, and are not intended to first exclude the presence of or increase the likelihood of one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing.
Furthermore, the terms "first," "second," "third," and the like are used merely to distinguish between descriptions and should not be construed as indicating or implying relative importance.
Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which various embodiments of the invention belong. The terms (such as those defined in commonly used dictionaries) will be interpreted as having a meaning that is the same as the context of the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein in connection with the various embodiments of the invention.
Some embodiments of the present application are described in detail below with reference to the accompanying drawings. The embodiments described below and features of the embodiments may be combined with each other without conflict.
Referring to fig. 1, a music playing control method applied to a first device according to an embodiment of the present application is shown in fig. 1, where the method mainly includes:
step S101 of transmitting a control request corresponding to a second music playing application in a second device to the second device via a preset communication channel.
The preset communication channel is a dedicated communication channel for connection and data transmission between the second device and the first device. Before a preset communication channel between the first device and the second device is established, whether the first device and the second device are both preset type operating systems, such as an Android system or an iOS system, can be judged. If the first equipment and the second equipment are both the preset type operating systems, a preset communication channel is established through a TCP/IP Socket protocol or an Rfcomm protocol; if the first device and/or the second device is not the preset type of operating system, a preset communication channel is established through a TCP/IP Socket protocol. Most of the existing mobile terminal control software needs to be remotely controlled under the same operating system, such as android control android and iOS control iOS, so that the existing mobile terminal control software has a large limitation. According to different preset types of operating systems, different protocols are adopted to establish corresponding preset communication channels for data transmission, and good compatibility among devices can be achieved.
A connection is required before a preset communication channel is established between the first device and the second device. The manner in which the first device is connected to the second device includes, but is not limited to, bluetooth and local area networks. In the Bluetooth mode, selecting a second device from a connectable device list displayed by the first device to connect; in the local area network mode, the connection can be performed by inputting the IP address of the second device into the control interface of the first device. After the first device sends a control request to the second device, if the second device allows control, a preset communication channel between the first device and the second device is established according to the technical means.
After the first device and the second device establish the preset communication channel, the user clicks the first music playing application on the first device to enter the corresponding display interface, and a control request can be sent to the second device according to user input or automatically. The control request sent by the first device is for requesting control of a second music playing application running in the second device. In particular, the types of the first music playing application and the second music playing application may be different applications. The account information associated with the different types of music playing applications is different, for example, the second music playing application logs in to a member account, and the first music playing application logs in to a non-member account, so that a user can play music files which are not associated with and stored in the first music playing application on the first music playing application by controlling the second device and acquiring the music data associated with the second music playing application through the technical means.
Step S102, receiving current playing information of the second music playing application returned by the second device, where the current playing information includes a music file list and playing states of all music files in the music file list.
After the first device sends a control request to the second device and the second device allows control, the first device receives a music file list of the second music playing application and playing states of all music files in the music file list, wherein the number of the music file lists is at least one. For example, there are a plurality of music file lists such as "history play" and "favorite music" on the second music play application, each of which includes 10 pieces of song display information, and the second music play application is playing the 2 nd song of "favorite music". Then the first device receives the following types of data: a. the two music file lists each include 10 song display information; b. a first type of play state: the second music playing application is playing the 2 nd song in the favorite music; c. the second type of playing state, i.e. the other music files in the second music playing application are in an unplayed state.
Step S103, sending a play control instruction corresponding to the current play information to the second device.
In the implementation, the first device displays the current playing information of the second music playing application on the display interface of the first music playing application, for example, three types of data, namely a, b and c in step S102, so that the user performs music playing control on the second music playing application according to the current playing state of the second music playing application.
Compared with the existing remote control method, the method only analyzes and executes the data sent by the second device, and screen mirroring is not needed. Therefore, in the application, the first device and the second device execute different instructions or operations during control, and operation conflict cannot be generated to influence the other device.
Step S104, receiving, through the preset communication channel, an audio file in a second format returned by the second device based on the play control instruction, and converting the audio file into an audio file in a first format.
In implementation, a target data packet returned by the second device based on the play control instruction can be received through a preset communication channel, wherein the target data packet corresponds to the audio file in the second format. And then judging whether the target data packet received in the preset time is complete or not. If the target data packets received within the preset time are complete, converting all the target data packets into audio files in a first format; if the target data packet received within the preset time is incomplete, outputting a receiving abnormal signal. Because the first music playing application running on the first device and the second music playing application running on the second device may be of different types, the audio file formats that the two types of music playing applications can receive or play may also be different, and it is necessary to convert the audio files of the two different formats.
In specific implementation, the method can further comprise the following steps of judging whether the target data packet received in the preset time is complete: the method comprises the steps of firstly obtaining marking information contained in a last target data packet received within preset time, wherein the marking information comprises the sequence of the current target data packet in all target data packets and the number of all target data packets. And then judging whether the sequence of the current target data packet in all the target data packets is the same as the number of all the target data packets. If the target data packets are the same, judging that the target data packets received in the preset time are complete; if the target data packets are different, the incomplete target data packets received in the preset time are judged.
Step S105, controlling the first music playing application in the first device to play the audio file in the second format.
The first device may also receive current volume data associated with the audio file while receiving the audio file returned by the second device. By the technical means, the first device can not only play the second device according to the received current playing information of the second music playing application, but also further receive the audio file returned by the second device according to the playing control instruction. By playing the audio file with the corresponding volume size on the first device, the user can more intuitively feel the sound size of the music played on the second device, so that the user can send more accurate music playing control to the second device through the first device.
Referring to fig. 2, a music playing control method applied to a second device according to an embodiment of the present application is shown in fig. 2, where the method mainly includes:
step S201, a first device receives a control request via a preset communication channel, where the preset communication channel is a dedicated communication channel between the second device and the first device, and the control request indicates to control a second music playing application in the second device.
In practice, there may be situations where multiple first devices control the same second device within the same time frame. At this time, the second devices simultaneously connected to the plurality of first devices may respectively establish preset communication channels with the respective first devices.
Step S202, sending current playing information of the second music playing application to the first device, where the current playing information includes a music file list and playing states of music files in the music file list.
Step S203, receiving a play control instruction sent by the first device and corresponding to the current play information.
The specific implementation process of step S202 and step S203 may refer to step S102 and step S103, which are not described in detail herein.
Step S204, sending, to the first device, an audio file in a second format corresponding to the play control instruction through the preset communication channel.
In the implementation, after the second device establishes the corresponding preset communication channels with the plurality of first devices, the corresponding audio files can be sent through the corresponding preset communication channels of the first devices respectively. When the number of the preset communication channels is greater than one, at the same time point, the second device may receive a plurality of play control instructions, and at this time, it is necessary to further determine the priority order among the play control instructions, and respond to the corresponding play control instructions according to the priority order. The method comprises the following specific steps: if the number of the received play control instructions is greater than one, judging whether each play control instruction conflicts or not; if not, sending the audio file in the second format corresponding to the playing control instruction to the corresponding first equipment through each preset communication channel; if so, sending the audio file in the second format corresponding to the playing control instruction to the first device with the highest priority.
The priority order of each play control instruction may be associated with a corresponding permission level of the first device. For example: after the second device allows the first devices to control, each first device may be assigned a permission level value, where the higher the permission level value, the higher the priority order of its corresponding play control instruction, which is not specifically limited herein.
In particular, the second device may send the audio file in the second format to the first device in the form of a target data packet. Tag information may be added to each of the target data packets, the tag information including an order of a current target data packet among all of the target data packets and a number of all of the target data packets, and then each of the target data packets is transmitted to the first device in order based on a preset communication channel. For example, if the data corresponding to the audio file is divided into 10 target data packets and sent sequentially, the first target data packet will have a subscript 1, and information of 10 target data packets in total, and so on. When the subscript of the last target packet received by the first device reaches 10, it represents that the audio file received by the first device is complete.
Before dividing the audio file in the second format into a plurality of data packets, it may be determined whether the length of the initial target data corresponding to the audio file is greater than the maximum data length allowed to pass through the preset communication channel. If the length of the initial target data is greater than the maximum data length allowed to pass through the preset communication channel, dividing the initial target data into at least two target data packets with the length smaller than the maximum data length; if the length of the initial target data is smaller than or equal to the maximum data length allowed to pass through the preset communication channel, determining the initial target data as a target data packet.
According to the music playing control method, according to different preset types of operating systems, different protocols are adopted to establish corresponding preset communication channels for data transmission, and good compatibility among devices can be achieved. The first device in the application analyzes and executes the data sent by the second device, screen mirroring is not needed, different instructions or operations are executed when the first device and the second device are controlled, and operation conflicts are not generated to influence the other device. And the second equipment can respectively establish preset communication channels with the first equipment, and respectively send corresponding audio files through the preset communication channels, so that the control of the second equipment by the first equipment is realized.
In correspondence to the above-described method embodiment, referring to fig. 3, the present invention further provides a music playing control apparatus 300 applied to a first device, where the music playing control apparatus 300 applied to the first device includes:
a first sending module 301, configured to send, to a second device via a preset communication channel, a control request corresponding to a second music playing application in the second device;
a first receiving module 302, configured to receive current playing information of the second music playing application returned by the second device, where the current playing information includes a music file list and playing states of music files in the music file list;
a second sending module 303, configured to send a play control instruction corresponding to the current play information to the second device;
a second receiving module 304, configured to receive, through the preset communication channel, an audio file in a second format returned by the second device based on the play control instruction, and convert the audio file into an audio file in a first format;
a play control module 305, configured to control a first music playing application in the first device to play the audio file in the second format.
In correspondence to the above-described method embodiment, referring to fig. 4, the present invention further provides a music playing control apparatus 400 applied to a second device, the music playing control apparatus 400 applied to the second device includes:
a first receiving module 401, configured to receive, via a preset communication channel, a control request sent by a first device, where the preset communication channel is a dedicated communication channel between the second device and the first device, and the control request indicates to control a second music playing application in the second device;
a first sending module 402, configured to send current playing information of the second music playing application to the first device, where the current playing information includes a music file list and a playing state of each music file in the music file list;
a second receiving module 403, configured to receive a play control instruction sent by the first device and corresponding to the current play information;
and a second sending module 404, configured to send, to the first device, an audio file in a second format corresponding to the play control instruction through the preset communication channel.
According to the music playing control device and the computer readable storage medium, according to different preset types of operating systems, different protocols are adopted to establish corresponding preset communication channels for data transmission, and good compatibility among devices can be achieved. The first device in the application analyzes and executes the data sent by the second device, screen mirroring is not needed, different instructions or operations are executed when the first device and the second device are controlled, and operation conflicts are not generated to influence the other device. And the second equipment can respectively establish preset communication channels with the first equipment, and respectively send corresponding audio files through the preset communication channels, so that the control of the second equipment by the first equipment is realized.
The specific implementation process of the provided computer readable storage medium may refer to the specific implementation process of the music playing control method provided in the foregoing embodiment, and will not be described in detail herein.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other manners as well. The apparatus embodiments described above are merely illustrative, for example, of the flow diagrams and block diagrams in the figures, which illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules or units in various embodiments of the invention may be integrated together to form a single part, or the modules may exist alone, or two or more modules may be integrated to form a single part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a smart phone, a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a Read-On-y Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present invention.

Claims (8)

1. A music play control method, applied to a first device, comprising:
transmitting a control request corresponding to a second music playing application in second equipment to the second equipment through a preset communication channel;
receiving current playing information of the second music playing application returned by the second equipment, wherein the current playing information comprises a music file list and playing states of all music files in the music file list;
sending a play control instruction corresponding to the current play information to the second device so as to perform music play control on a second music play application of the second device according to the current play state of the second music play application of the second device, wherein the second music play application does not generate operation conflict with the second device;
receiving an audio file in a second format returned by the second device based on the play control instruction through the preset communication channel, and converting the audio file into the audio file in a first format;
controlling a first music playing application in the first device to play the audio file in the first format;
the step of receiving the audio file in the second format returned by the second device based on the play control instruction through the preset communication channel and converting the audio file into the audio file in the first format includes: receiving a target data packet returned by the second device based on the play control instruction through the preset communication channel, wherein the target data packet corresponds to an audio file in a second format; judging whether the target data packet received in the preset time is complete or not; if the target data packets received within the preset time are complete, converting all the target data packets into audio files in a first format; outputting a receiving abnormal signal if the target data packet received in the preset time is incomplete;
the step of judging whether the target data packet received in the preset time is complete comprises the following steps: the method comprises the steps of obtaining marking information contained in a last target data packet received within preset time, wherein the marking information comprises the sequence of a current target data packet in all target data packets and the number of all target data packets; judging whether the sequence of the current target data packet in all the target data packets is the same as the number of all the target data packets or not; if the target data packets are the same, judging that the target data packets received in the preset time are complete; if the target data packets are different, judging that the target data packets received in the preset time are incomplete.
2. The method of claim 1, wherein prior to the step of sending a control request corresponding to a second music playing application within a second device to the second device via a preset communication channel, the method further comprises:
judging whether the first equipment and the second equipment are both preset type operating systems or not;
if the first device and the second device are both the preset type operating system, establishing the preset communication channel through a TCP/IP Socket protocol or an Rfcomm protocol;
if the first device and/or the second device is not the preset type of operating system, the preset communication channel is established through a TCP/IP Socket protocol.
3. A music play control method, characterized by being applied to a second device, the method comprising:
receiving a control request sent by a first device through a preset communication channel, wherein the preset communication channel is a special communication channel between the second device and the first device, the control request indicates to control a second music playing application in the second device, and the first device is the first device to which the music playing control method according to any one of claims 1 or 2 is applied;
transmitting current playing information of the second music playing application to the first device, wherein the current playing information comprises a music file list and playing states of all music files in the music file list;
receiving a play control instruction which is sent by the first equipment and corresponds to the current play information;
and sending the audio file in the second format corresponding to the playing control instruction to the first device through the preset communication channel.
4. A method according to claim 3, wherein prior to the step of receiving, via a preset communication channel corresponding to the first device, a control request sent by the first device to the second music playing application in the second device, the method further comprises:
respectively establishing a preset communication channel between the second equipment and each first equipment;
the step of sending the audio file in the second format corresponding to the play control instruction to the first device through the preset communication channel includes:
and sending corresponding audio files through preset communication channels corresponding to the first devices respectively.
5. The method of claim 4, wherein the number of the preset communication channels is greater than one, and the step of transmitting the corresponding audio file through the preset communication channel corresponding to each first device includes:
if the number of the received play control instructions is greater than one, judging whether each play control instruction conflicts or not;
if not, sending an audio file in a second format corresponding to the playing control instruction to the corresponding first device through each preset communication channel;
if so, sending the audio file in the second format corresponding to the playing control instruction to the first device with the highest priority.
6. A music play control apparatus, characterized by being applied to a first device, comprising:
a first sending module, configured to send a control request corresponding to a second music playing application in a second device to the second device via a preset communication channel;
the first receiving module is used for receiving current playing information of the second music playing application returned by the second equipment, wherein the current playing information comprises a music file list and playing states of all music files in the music file list;
the second sending module is used for sending a playing control instruction corresponding to the current playing information to the second equipment so as to carry out music playing control on a second music playing application of the second equipment according to the current playing state of the second music playing application of the second equipment, and the second music playing application does not generate operation conflict with the second equipment;
the second receiving module is used for receiving the audio file in the second format returned by the second device based on the playing control instruction through the preset communication channel and converting the audio file into the audio file in the first format;
the playing control module is used for controlling a first music playing application in the first equipment to play the audio file in the second format;
the second receiving module is further configured to receive, through the preset communication channel, a target data packet returned by the second device based on the play control instruction, where the target data packet corresponds to an audio file in a second format; judging whether the target data packet received in the preset time is complete or not; if the target data packets received within the preset time are complete, converting all the target data packets into audio files in a first format; outputting a receiving abnormal signal if the target data packet received in the preset time is incomplete;
the second receiving module is further configured to obtain tag information included in a last target data packet received in a preset time, where the tag information includes an order of a current target data packet in all the target data packets and a number of all the target data packets; judging whether the sequence of the current target data packet in all the target data packets is the same as the number of all the target data packets or not; if the target data packets are the same, judging that the target data packets received in the preset time are complete; if the target data packets are different, judging that the target data packets received in the preset time are incomplete.
7. A music play control apparatus, characterized by being applied to a second device, comprising:
a first receiving module, configured to receive a control request sent by a first device through a preset communication channel, where the preset communication channel is a dedicated communication channel between the second device and the first device, and the control request indicates to control a second music playing application in the second device, and the first device is a first device to which the music playing control method according to any one of claims 1 or 2 is applied;
a first sending module, configured to send current playing information of the second music playing application to the first device, where the current playing information includes a music file list and playing states of music files in the music file list;
the second receiving module is used for receiving a play control instruction which is sent by the first equipment and corresponds to the current play information;
and the second sending module is used for sending the audio file in the second format corresponding to the playing control instruction to the first device through the preset communication channel.
8. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed on a processor, implements the music play control method of any one of claims 1 to 2 or the music play control method of any one of claims 5 to 7.
CN202110895321.2A 2021-08-05 2021-08-05 Music playing control method, device and computer readable storage medium Active CN113590079B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110895321.2A CN113590079B (en) 2021-08-05 2021-08-05 Music playing control method, device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110895321.2A CN113590079B (en) 2021-08-05 2021-08-05 Music playing control method, device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN113590079A CN113590079A (en) 2021-11-02
CN113590079B true CN113590079B (en) 2024-03-22

Family

ID=78255335

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110895321.2A Active CN113590079B (en) 2021-08-05 2021-08-05 Music playing control method, device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN113590079B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105282856A (en) * 2015-11-04 2016-01-27 广东欧珀移动通信有限公司 Method for controlling information transmission and user terminal
CN105530277A (en) * 2014-09-30 2016-04-27 宇龙计算机通信科技(深圳)有限公司 Method and device for cooperative work of devices
CN105744334A (en) * 2016-02-18 2016-07-06 海信集团有限公司 Method and equipment for audio and video synchronization and synchronous playing
WO2017031864A1 (en) * 2015-08-25 2017-03-02 广东欧珀移动通信有限公司 Playing control method and apparatus for multimedia playing device
CN108540842A (en) * 2018-04-18 2018-09-14 广州华多网络科技有限公司 Audio-frequence player device, audio frequency playing method, equipment and storage medium
CN108804070A (en) * 2018-05-30 2018-11-13 Oppo广东移动通信有限公司 Method for playing music, device, storage medium and electronic equipment
CN108986815A (en) * 2018-09-28 2018-12-11 联想(北京)有限公司 Sound control method, device and electronic equipment
CN113132782A (en) * 2020-01-16 2021-07-16 百度在线网络技术(北京)有限公司 Streaming media transmission method, streaming media playing device and electronic device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105530277A (en) * 2014-09-30 2016-04-27 宇龙计算机通信科技(深圳)有限公司 Method and device for cooperative work of devices
WO2017031864A1 (en) * 2015-08-25 2017-03-02 广东欧珀移动通信有限公司 Playing control method and apparatus for multimedia playing device
CN105282856A (en) * 2015-11-04 2016-01-27 广东欧珀移动通信有限公司 Method for controlling information transmission and user terminal
CN105744334A (en) * 2016-02-18 2016-07-06 海信集团有限公司 Method and equipment for audio and video synchronization and synchronous playing
CN108540842A (en) * 2018-04-18 2018-09-14 广州华多网络科技有限公司 Audio-frequence player device, audio frequency playing method, equipment and storage medium
CN108804070A (en) * 2018-05-30 2018-11-13 Oppo广东移动通信有限公司 Method for playing music, device, storage medium and electronic equipment
CN108986815A (en) * 2018-09-28 2018-12-11 联想(北京)有限公司 Sound control method, device and electronic equipment
CN113132782A (en) * 2020-01-16 2021-07-16 百度在线网络技术(北京)有限公司 Streaming media transmission method, streaming media playing device and electronic device

Also Published As

Publication number Publication date
CN113590079A (en) 2021-11-02

Similar Documents

Publication Publication Date Title
KR101303474B1 (en) Remote control signal learning and processing by a host device and accessory
EP3111666B1 (en) Direct selection of audio source
CN107342083B (en) Method and apparatus for providing voice service
EP3169086A1 (en) Connection method for multimedia playing device, master device, control terminal, and system
US20230308976A1 (en) Seamless bluetooth switching system
KR101588993B1 (en) Protocol translating adapter
CN107948568B (en) Method and device for realizing wired screen transmission
CN104601205A (en) Content sharing method and device
CN110708694A (en) Method, system, storage medium and electronic device for realizing simultaneous online public and private networks
US20090296902A1 (en) Voip monitoring system and voip monitoring method
CN107948566B (en) Method and device for realizing plug-and-play screen transmission
US20170090856A1 (en) Method and terminal for controlling grouping play of playing system
CN107948565B (en) Method and device for realizing wired screen transmission
US7783803B2 (en) Pairing service technologies
KR20080113693A (en) System and method for data communication
CN113590079B (en) Music playing control method, device and computer readable storage medium
JP2015220533A (en) On-vehicle information system, on-vehicle device, information terminal, application execution method
CN113079588A (en) Control method, control device, control equipment and storage medium
CN110602338B (en) Audio processing method, device, system, storage medium and equipment
CN112533188A (en) Output processing method and device of playing source
EP2833605B1 (en) Mobile terminal control apparatus
CN113676761B (en) Multimedia resource playing method and device and main control equipment
KR101464145B1 (en) A method, a system, a server, a client, a computer program and a computer program product for determining a user guide in a computer network
CN111145741A (en) Method and device for providing multimedia content, electronic equipment and storage medium
US11265412B2 (en) Cooperation system, cooperation method, and computer program product

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